1 2011-10-13 Ed Schonberg <schonberg@adacore.com>
3 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
4 New predicate to determine whether some operations on an array
5 type are available when the full view of its component may differ
6 from the view of the point of the array declaration.
7 * sem_ch4.adb (Find_Equality_Types): Use
8 Available_Full_View_Of_Component.
9 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
11 2011-10-13 Ed Schonberg <schonberg@adacore.com>
13 * sem_ch9.adb: Analyze aspects while discriminants of protected
16 2011-10-13 Geert Bosch <bosch@adacore.com>
18 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
19 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
20 longer depend on an external library.
21 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
22 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
24 * gcc-interface/Make-lang.in: Update dependencies.
26 2011-10-13 Cyrille Comar <comar@adacore.com>
28 * gnat_ugn.texi: Minor editing.
30 2011-10-13 Vincent Celier <celier@adacore.com>
32 * projects.texi: Add documentation on packages and attributes
33 that are inherited from a project being extended into the
36 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
38 * exp_ch3.adb (Build_Master): Rewritten.
39 (Expand_N_Full_Type_Declaration): Reformat the declarative
40 region. Update the call to Build_Master_Renaming.
41 (Expand_Previous_Access_Type): Rewritten.
42 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
43 Add local constant Result_Subt and update related usage.
44 (Expand_N_Extended_Return_Statement): Add local constant
45 Result_Subt and update related usage.
46 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
47 new context detection mechanism.
48 (Build_Class_Wide_Master):
49 Use Insert_Action to add the renaming into the tree.
50 (Build_Master_Entity): Rewritten to use the new context detection
52 (Build_Master_Renaming): Add formal parameter Ins_Nod
53 and related usage. Use Insert_Action to add the renaming into the
55 (Find_Enclosing_Context): New subsidiary routine. Rather
56 than relying on enclosing scopes, this routine looks at the
57 tree structure to figure out the proper context for a _master
58 or a _chain. This approach eliminates the issues with transient
59 scopes which have not been converted into blocks.
60 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
61 to better reflect the new usage. Update the related comment.
62 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
64 * sem_ch3.adb (Access_Definition): Update the calls to
65 Build_Master_Entity and Build_Master_Renaming.
66 * sem_ch6.adb (Create_Extra_Formals): Add local variable
67 Full_Subt. Code reformatting.
68 * sem_util.adb (Is_Iterator): Alphabetized.
69 (Is_LHS): Alphabetized.
70 (Is_Limited_Class_Wide_Type): New routine.
71 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
73 2011-10-13 Geert Bosch <bosch@adacore.com>
75 * a-ngrear.adb (Solve): Make generic and move to
76 System.Generic_Array_Operations.
77 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
78 New generic solvers to compute a vector resp. matrix Y such
79 that A * Y = X, approximately.
80 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
81 Implement using Forward_Eliminate and Back_Substitute
82 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
84 * a-ngcoar.ads ("abs"): Fix return type to be real.
86 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
89 * s-linux-alpha.ads: Do not "with" Interfaces.C.
90 * s-linux-sparc.ads: Likewise.
92 2011-10-13 Geert Bosch <bosch@adacore.com>
94 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
96 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
98 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
101 2011-10-13 Geert Bosch <bosch@adacore.com>
103 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
104 move to System.Generic_Array_Operations.
106 2011-10-13 Geert Bosch <bosch@adacore.com>
108 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
109 * s-gearop.ads (L2_Norm): Change profile to be suitable for
111 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
114 2011-10-13 Robert Dewar <dewar@adacore.com>
116 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
117 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
118 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
119 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
120 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
121 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
123 2011-10-13 Geert Bosch <bosch@adacore.com>
125 * s-gearop.adb: Minor comment additions.
127 2011-10-13 Fedor Rybin <frybin@adacore.com>
129 * gnat_ugn.texi: Add gnattest section.
131 2011-10-13 Ed Schonberg <schonberg@adacore.com>
133 * freeze.adb: Do not create body of renaming if declaration has
136 2011-10-13 Olivier Hainque <hainque@adacore.com>
138 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
139 further, to the ppc+kernel case only.
141 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
143 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
144 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
145 Do not create a pool formal on .NET/JVM.
146 (Expand_N_Extended_Return_Statement): Alphabetize local
147 variables. Do not create a renaming of the build-in-place pool
148 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
149 Add the user-defined pool only on non-VM targets.
150 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
151 local variables. Do not add a pool actual on .NET/JVM.
152 * sem_ch6.adb: Add with and use clause for Targparm.
153 (Create_Extra_Formals): Add build-in-place pool formal only on
155 * rtsfind.ads: Alphabetize entries.
157 2011-10-13 Sergey Rybin <rybin@adacore.com>
159 * gnat_ugn.texi: Minor correction.
161 2011-10-13 Ed Schonberg <schonberg@adacore.com>
163 * sem_ch8.adb: Minor error message improvement.
165 2011-10-13 Robert Dewar <dewar@adacore.com>
167 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
169 2011-10-13 Gary Dismukes <dismukes@adacore.com>
171 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
172 of a for loop for an enumeration type with an enumeration rep
173 clause, which involves moving the original loop parameter into
174 a nested block, the loop parameter's entity must be removed from
175 the entity list of the loop scope.
177 2011-10-13 Bob Duff <duff@adacore.com>
179 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
180 that gets passed in the same cases where BIP_Alloc_Form is passed
181 (caller-unknown-size results). BIP_Storage_Pool is used when
182 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
183 to the user-defined storage pool is passed at the call site,
184 and this pool is used in callee to allocate the result.
185 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
186 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
187 the additional BIP_Storage_Pool actual.
188 (Expand_N_Extended_Return_Statement): Allocate the function
189 result using the user-defined storage pool, if BIP_Alloc_Form =
191 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
192 * exp_ch4.adb: Don't overwrite storage pool set by
193 Expand_N_Extended_Return_Statement.
194 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
195 for use in build-in-place function calls within allocators
196 where the access type has a user-defined storage pool.
198 2011-10-13 Sergey Rybin <rybin@adacore.com>
200 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
203 2011-10-13 Nicolas Roche <roche@adacore.com>
205 * gnatlink.adb: Ensure that -mrtp is passed when
206 runtime name ends with 'rtp'.
208 2011-10-13 Ed Schonberg <schonberg@adacore.com>
210 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
211 unchecked union type can be limited.
213 2011-10-13 Olivier Hainque <hainque@adacore.com>
215 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
216 the use of the signal trampoline for PPC in the sjlj case as well.
217 Add legitimate casts, preventing compile time warnings on the
218 (sighandler *) profile.
220 2011-10-13 Yannick Moy <moy@adacore.com>
222 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
223 analysis in Alfa mode.
225 2011-10-13 Ed Schonberg <schonberg@adacore.com>
227 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
228 expressions are legal limited return values if each one of their
229 dependent expressions are legal.
231 2011-10-13 Ed Schonberg <schonberg@adacore.com>
233 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
234 if the prefix of the call is a qualified expression, rewrite as
236 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
237 code statement is legal if it is a rewriting of a procedure call.
239 2011-10-13 Ed Schonberg <schonberg@adacore.com>
241 * exp_aggr.adb (Flatten): If a component association has a box,
242 assume that aggregate is not static.
243 (Safe_Aggregate): If a component association in a non-limited
244 aggregate has a box, assume that it cannot be expanded in place.
246 2011-10-13 Vincent Celier <celier@adacore.com>
248 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
249 Process_Project_Tree_Phase_1 with Packages_To_Check.
250 (Process_Project_And_Apply_Config): Ditto
251 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
252 Remove default for argument Packages_To_Check.
253 * prj-proc.adb (Recursive_Process): New argument
256 (Process_Project_Tree_Phase_1): Ditto.
257 (Recursive_Project.Process_Aggregated_Projects): Call
258 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
260 * prj-proc.ads (Process): New argument Packages_To_Check
261 (Process_Project_Tree_Phase_1): Ditto
263 2011-10-13 Arnaud Charlet <charlet@adacore.com>
265 * gcc-interface/Makefile.in: Fix typo.
267 2011-10-13 Ed Schonberg <schonberg@adacore.com>
269 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
270 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
271 Use sloc of defining identifier of farmal type declaration,
272 as sloc of generated internal entity, to prevent misplaced
275 2011-10-13 Ed Schonberg <schonberg@adacore.com>
277 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
278 is fully defined before checking that it is a numeric type.
280 2011-10-13 Ed Schonberg <schonberg@adacore.com>
282 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
283 association for component X has a box, then X is covered in the
284 aggregate even if there is not default value for X in the type
285 declaration, and X has to be default-initialized.
287 2011-10-13 Ed Schonberg <schonberg@adacore.com>
289 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
290 'Value): Mark literals as referenced only if reference is in
293 2011-10-13 Matthew Heaney <heaney@adacore.com>
295 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
297 2011-10-13 Olivier Hainque <hainque@adacore.com>
299 * sigtramp.h: New file. Prototype and spec of the signal
300 trampoline to be called by an established handler to provide
301 dwarf call frame info before the real signal processing code.
302 * sigtramp-ppcvxw.c: New file. Implementation of the signal
303 trampoline for ppc-vxworks.
304 * init.c (vxworks section): Use it for ppc.
306 2011-10-13 Thomas Quinot <quinot@adacore.com>
308 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
309 (Check_Future_Identifier): New subprogram,
310 factors duplicated code from Par.Ch2.P_Identifier and
311 Par.Ch3.P_Defining_Identifier.
313 2011-10-13 Thomas Quinot <quinot@adacore.com>
315 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
316 if we fail to initialize CV attributes or CV.
318 2011-10-13 Thomas Quinot <quinot@adacore.com>
320 * s-tasren.adb (Timed_Selective_Wait, case
321 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
322 we know abortion is already deferred.
324 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
326 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
327 (Build_Master_Renaming (function)): Removed.
328 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
329 (Expand_Full_Type_Declaration): Alphabetize
330 variables. Reformatting of code and comments. Rewrite the
331 section on processing of anonymous access-to-task types in
333 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
334 (Build_Master_Renaming): Moved to exp_ch9.
335 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
336 (Build_Master_Entity): Add formal parameter
337 Use_Current. Reformatting of code and comments.
338 (Build_Master_Renaming): Moved from exp_ch3.
339 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
340 exp_ch3. Update comment on usage.
341 (Build_Master_Entity):
342 Add formal parameter Use_Current. Update comment on usage.
343 (Build_Master_Renaming): Moved from exp_ch3.
344 * sem_ch3.adb (Access_Definition): Remove redundant code to
345 create a _master and a renaming.
347 2011-10-13 Ed Schonberg <schonberg@adacore.com>
349 * lib-xref.adb: Do no emit reference to overridden operation,
350 if it is internally generated.
352 2011-10-13 Vincent Celier <celier@adacore.com>
354 * bindgen.adb: Remove any processing related to g-trasym
355 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
356 * mlib-prj.adb: Remove any processing related to g-trasym.
358 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
360 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
361 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
362 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
363 (ADA_FLAGS_TO_PASS): Likewise.
364 (COMMON_FLAGS_TO_PASS): New.
365 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
366 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
367 (gnatlib): Use COMMON_FLAGS_TO_PASS.
368 (ada.install-common): Likewise.
369 (install-gnatlib): Likewise.
370 (install-gnatlib-obj): Likewise.
371 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
372 (gnat-cross): Delete.
373 (gnatboot): Likewise.
374 (gnatboot2): Likewise.
375 (gnatboot3): Likewise.
376 (gnatstage1): Likewise.
377 (gnatstage2): Likewise.
378 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
379 (MOST_ADAFLAGS): Likewise.
380 (LOOSE_CFLAGS): Likewise.
381 (gnat-cross): Likewise.
382 (GNATLIBFLAGS): Add -W -Wall.
383 (GNATLIBCFLAGS_FOR_C): Likewise.
384 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
385 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
387 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
389 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
390 (push_range_check_info): Likewise.
391 (gnat_to_gnu) <N_Code_Statement>: Likewise.
392 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
393 (gnat_invariant_expr): Likewise.
394 * gcc-interface/utils.c (compute_related_constant): Likewise.
395 (max_size): Fix handling of SAVE_EXPR.
396 (remove_conversions): Fix formatting.
398 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
400 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
401 (DECL_INDUCTION_VAR): New macro.
402 (SET_DECL_INDUCTION_VAR): Likewise.
403 * gcc-interface/gigi.h (convert_to_index_type): Declare.
404 (gnat_invariant_expr): Likewise.
405 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
406 parameter, set DECL_LOOP_PARM_P on it.
407 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
408 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
409 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
410 (struct range_check_info_d): New type.
411 (struct loop_info_d): Likewise.
412 (gnu_loop_stack): New stack.
413 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
414 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
415 is set, do not test DECL_RENAMED_OBJECT.
416 (push_range_check_info): New function.
417 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
418 the label. Reference the label and the iteration variable from it.
419 Build the special induction variable in the unsigned version of the
420 size type, if it is larger than the base type. And attach it to the
421 iteration variable if the latter isn't by-ref. In the iteration scheme
422 case, initialize the invariant conditions in front of the loop if
423 deemed profitable. Use gnu_loop_stack.
424 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
425 <N_Raise_Constraint_Error>: Always process the reason. In the range
426 check and related cases, and if loop unswitching is enabled, compute
427 invariant conditions and push this information onto the stack.
428 Do not translate again the condition if it has been already translated.
429 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
430 DECL_LOOP_PARM_P isn't set.
431 (convert_to_index_type): New function.
432 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
433 to convert the index from the base index type to sizetype.
434 (gnat_invariant_expr): New function.
436 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
438 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
439 two parallel arrays to hold standard builtin declarations, and
440 replace it with a function based interface that can support
441 creating builtins on the fly in the future.
442 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
443 (gnat_to_gnu): Ditto.
445 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
448 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
449 * gcc-interface/utils.c (global_context): New variable.
450 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
451 that are either public external or at top level. Use "No" macro.
452 (end_subprog_body): Call decl_function_context.
453 (rest_of_subprog_body_compilation): Likewise.
455 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
457 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
458 (rest_of_subprog_body_compilation): Likewise.
459 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
460 test for useless conversions by means of gnat_useless_type_conversion.
461 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
462 (language_function): Add named_ret_val and other_ret_val.
463 (f_named_ret_val): New macro.
464 (f_other_ret_val): Likewise.
465 (gigi): Call rest_of_subprog_body_compilation.
466 (struct nrv_data): New structure.
467 (is_nrv_p): New predicate.
468 (prune_nrv_r): New helper function.
469 (prune_nrv_in_block): New function.
470 (finalize_nrv_r): New helper function.
471 (finalize_nrv): New function.
472 (return_value_ok_for_nrv_p): New predicate.
473 (build_return_expr): If optimization is enabled, record candidates for
474 the Named Return Value optimization.
475 (build_function_stub): Call rest_of_subprog_body_compilation.
476 (Subprogram_Body_to_gnu): If optimization is enabled and there are
477 candidates, finalize the Named Return Value optimization.
478 Call rest_of_subprog_body_compilation.
479 (call_to_gnu): At the end, if a return value is needed, simplify the
480 result before wrapping it up in a COMPOUND_EXPR.
481 * gcc-interface/utils.c (end_subprog_body): Split into...
482 (rest_of_subprog_body_compilation): ...this. New function.
483 (gnat_useless_type_conversion): Likewise.
485 2011-10-06 Thomas Quinot <quinot@adacore.com>
487 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
488 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
489 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
490 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
491 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
492 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
493 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
494 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
496 2011-10-06 Ed Schonberg <schonberg@adacore.com>
498 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
501 2011-10-06 Matthew Heaney <heaney@adacore.com>
503 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
504 (Dequeue_Only_High_Priority): Protected procedure now implemented.
506 2011-10-06 Vincent Celier <celier@adacore.com>
508 * g-trasym.adb: Replace old implementation with the default
509 implementation that returns list of addresses as "0x...".
510 * g-trasym.ads: Update the list of platforms with the full
511 capability. Indicate that there is a default implementation
513 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
514 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
515 is now a default implementation for all platforms without the full
518 2011-10-06 Robert Dewar <dewar@adacore.com>
520 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
521 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
522 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
523 reorganization (use conditional expressions).
525 2011-10-06 Robert Dewar <dewar@adacore.com>
527 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
528 floating divide by zero.
530 2011-10-06 Ed Schonberg <schonberg@adacore.com>
532 * sem_ch6.adb: Limited interfaces that are not immutably limited
533 are OK in return statements.
535 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
537 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
538 change to powerpc section.
540 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
542 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
545 2011-09-27 Ed Schonberg <schonberg@adacore.com>
547 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
548 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
549 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
551 * a-coorma.ads: Minor reformmating.
552 * einfo.ads: Improve the comment describing the
553 Directly_Designated_Type function.
554 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
556 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
559 2011-09-27 Robert Dewar <dewar@adacore.com>
561 * a-comutr.ads: Minor reformatting.
563 2011-09-27 Ed Schonberg <schonberg@adacore.com>
565 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
566 iterators to multiway trees.
568 2011-09-27 Yannick Moy <moy@adacore.com>
570 * debug.adb (d.D): New option for strict Alfa mode.
571 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
572 permissions as strictly as possible.
573 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
574 Alfa mode, now, interpret ranges of base types like GNAT does; in
575 strict mode, simply change the range of the implicit base Itype.
576 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
578 2011-09-27 Robert Dewar <dewar@adacore.com>
580 * exp_ch9.adb: Minor comment fixes.
582 2011-09-27 Ed Schonberg <schonberg@adacore.com>
584 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
587 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
589 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
590 instead of Directly_Designated_Type in the indirect array case.
592 2011-09-27 Robert Dewar <dewar@adacore.com>
594 * exp_util.adb, exp_aggr.adb: Minor reformatting.
596 2011-09-27 Ed Schonberg <schonberg@adacore.com>
598 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
599 on subtype declarations.
600 * exp_aggr.adb: Minor comment update.
602 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
604 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
605 test in the N_Explicit_Dereference case. Fold double logical
606 negation in the special loop case and conditionalize it on
607 Variable_Ref being true.
609 2011-09-27 Ed Schonberg <schonberg@adacore.com>
611 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
612 single protected object and the selector is a discriminant or an
613 entry family, this is a non-overloaded candidate interpretation,
614 and possible primitive operations of the type must not be
617 2011-09-27 Arnaud Charlet <charlet@adacore.com>
619 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
621 2011-09-27 Pascal Obry <obry@adacore.com>
623 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
624 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
625 Add dummy definitions for pthread_rwlock_t
626 and pthread_rwlockattr_t on all POSIX platforms.
627 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
629 (Finalize_Lock): Likewise.
630 (Write_Lock): Likewise.
633 2011-09-27 Tristan Gingold <gingold@adacore.com>
635 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
638 2011-09-27 Pascal Obry <obry@adacore.com>
640 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
641 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
642 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
643 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
644 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
645 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
646 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
647 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
648 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
649 s-taprop-posix.adb: Revert previous changes.
650 (Lock): Now a record containing the two possible lock
651 (mutex and read/write) defined in OS_Interface.
652 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
654 (Initialize_Protection): Likewise.
656 (Lock_Read_Only): Likewise.
659 2011-09-27 Pascal Obry <obry@adacore.com>
661 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
662 OS_Interface.pthread_rwlock_t.
664 2011-09-27 Robert Dewar <dewar@adacore.com>
666 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
667 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
668 sem_ch5.adb, sem_util.adb: Minor reformatting.
670 2011-09-27 Pascal Obry <obry@adacore.com>
672 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
673 (Finalize_Lock)[RW_Lock]: Likewise.
674 (Write_Lock)[RW_Lock]: Likewise.
675 (Unlock)[RW_Lock]: Likewise.
676 (Read_Lock): Define L as RW_Lock (instead of Lock).
677 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
678 routine for r/w lock.
679 (Finalize_Lock)[RW_Lock]: Likewise.
680 (Write_Lock)[RW_Lock]: Likewise.
681 (Unlock)[RW_Lock]: Likewise.
682 (Read_Lock): Define L as RW_Lock (instead of Lock).
684 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
685 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
686 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
687 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
688 routine for standard lock.
689 (Finalize_Lock)[RW_Lock]: Likewise.
690 (Write_Lock)[RW_Lock]: Likewise.
691 (Unlock)[RW_Lock]: Likewise.
692 (Read_Lock): Define L as RW_Lock (instead of Lock).
693 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
694 in the record definition.
695 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
696 lock for 'R' locking policy.
697 (Initialize_Protection): Likewise.
699 (Lock_Read_Only): Likewise.
701 * s-taspri-posix.ads (RW_Lock): New type defined as
702 OS_Interface.pthread_rwlock_t.
704 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
705 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
706 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
707 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
709 2011-09-27 Pascal Obry <obry@adacore.com>
711 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
713 2011-09-27 Pascal Obry <obry@adacore.com>
715 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
716 s-osinte-hpux.ads, s-osinte-irix.ads,
717 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
719 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
720 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
721 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
722 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
723 pthread_rwlock_destroy, pthread_rwlock_rdlock,
724 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
726 2011-09-27 Pascal Obry <obry@adacore.com>
728 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
729 (RE_Id): Add RE_Lock_Read_Only.
730 (RE_Unit_Table): Likewise.
731 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
732 to lift restriction on first character. Handle now the
733 Name_Concurrent_Readers_Locking where policy character is set to
735 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
737 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
738 read only lock for function in protected object.
739 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
740 this routine is now used.
742 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
744 * s-atocou-x86.adb (Decrement): Use %;.
745 (Increment): Likewise.
747 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
749 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
750 dereference of the pointer to the storage area. Remove useless type
751 conversions and factor out common code.
753 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
755 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
756 variable and use it throughout.
757 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
758 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
759 first step. Also convert to the unpadded type as a last step.
761 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
763 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
764 DECL_CHAIN in comment.
765 * gcc-interface/trans.c (gigi): Likewise.
766 (Attribute_to_gnu): Likewise.
767 (build_function_stub): Likewise.
768 (gnat_to_gnu): Likewise.
769 * gcc-interface/utils.c (create_subprog_decl): Likewise.
770 (convert_vms_descriptor64): Likewise.
771 (convert_vms_descriptor32): Likewise.
773 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
775 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
776 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
777 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
778 the type of the record is TYPE_READONLY.
780 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
781 Robert Dewar <dewar@adacore.com>
783 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
784 OUT formal parameter which is of an null-exclusion access subtype.
786 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
788 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
789 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
790 (gnat_to_gnu_param): Likewise.
791 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
792 maybe_unconstrained_array instead of doing the work manually.
793 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
794 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
795 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
796 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
797 (gnat_stabilize_reference): Likewise.
799 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
801 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
802 (SET_TYPE_NULL_BOUNDS): Likewise.
803 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
804 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
805 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
807 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
808 check that the initializer is a valid constant expression for use in
809 initializing a static variable. Add missing guard.
810 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
811 (convert_to_fat_pointer): In the null fat pointer case, build a valid
812 pointer for the bounds.
813 * gcc-interface/utils2.c (compare_fat_pointers): New function.
814 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
816 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
818 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
819 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
820 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
821 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
822 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
823 to the indirect case.
824 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
825 the TREE_THIS_NOTRAP flag.
827 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
829 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
830 iteration scheme, always generate the do-while form if optimization
831 is enabled. Use more straightforward test at the end.
833 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
835 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
836 XNEW instead of xmalloc. Do not build useless pointer type.
837 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
838 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
839 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
841 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
843 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
844 the alignment if this doesn't prevent BLKmode access to the object.
846 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
848 * gcc-interface/Makefile.in (darwin): Do not issue the
849 '-flat_namespace' linker flag during Ada build.
850 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
851 default shared library options.
853 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
855 * gcc-interface/decl.c (annotate_value): Look up expression for
856 insertion in the cache at the end.
858 2011-09-19 Arnaud Charlet <charlet@adacore.com>
860 * gcc-interface/Make-lang.in: Update dependencies.
862 2011-09-19 Steve Baird <baird@adacore.com>
864 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
865 configuration pragma names so that Is_Configuration_Pragma_Name
866 will return True for Name_Annotate. Make corresponding change in
867 Pragma_Id enumeration type. This is needed to allow an Annotate
868 pragma to occur in a configuration pragma file (typically,
870 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
871 * gnat_rm.texi: Note that pragma Annotate may be used as a
872 configuration pragma.
874 2011-09-19 Ed Schonberg <schonberg@adacore.com>
876 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
877 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
879 2011-09-19 Yannick Moy <moy@adacore.com>
881 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
882 for expansion of set membership.
883 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
884 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
885 visible for use in Alfa expansion.
886 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
887 variable in Alfa mode.
889 2011-09-19 Thomas Quinot <quinot@adacore.com>
891 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
893 2011-09-19 Thomas Quinot <quinot@adacore.com>
895 * exp_ch9.adb: Minor reformatting.
897 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
899 * freeze.adb (Build_Renamed_Body): Generic subprograms
900 instantiations cannot be poperly inlined by the compiler, do
901 not set the Body_To_Inline attribute in such cases.
902 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
903 inlining-related flags from the generic subprogram declaration.
905 2011-09-19 Thomas Quinot <quinot@adacore.com>
907 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
908 (Build_Stub_Type): Remove, instead copy components from
909 System.Partition_Interface.RACW_Stub_Type.
910 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
911 (Copy_Component_List): New subprogram.
913 2011-09-19 Yannick Moy <moy@adacore.com>
915 * lib-xref.adb (Generate_Reference): Ignore references to
916 constants in Standard.
918 2011-09-19 Robert Dewar <dewar@adacore.com>
920 * err_vars.ads, errout.ads: Minor reformatting.
922 2011-09-19 Robert Dewar <dewar@adacore.com>
924 * aspects.ads (Impl_Defined_Aspects): New array
925 * lib-writ.adb (No_Dependences): New name for No_Dependence
926 * restrict.adb (No_Dependences): New name for No_Dependence
927 (Check_Restriction_No_Specification_Of_Aspect): New
929 (Set_Restriction_No_Specification_Of_Aspect): New procedure
930 (Restricted_Profile_Result): New variable
931 (No_Specification_Of_Aspects): New variable
932 (No_Specification_Of_Aspect_Warning): New variable
933 * restrict.ads (No_Dependences): New name for No_Dependence
934 (Check_Restriction_No_Specification_Of_Aspect): New procedure
935 (Set_Restriction_No_Specification_Of_Aspect): New procedure
936 * s-rident.ads: Add restriction
937 No_Implementation_Aspect_Specifications, this is also added to
938 the No_Implementation_Extensions profile.
939 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
940 No_Implementation_Defined_Aspects
941 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
942 * sem_prag.adb (Analyze_Aspect_Specifications): Check
943 No_Implementation_Aspects
944 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
945 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
947 2011-09-19 Yannick Moy <moy@adacore.com>
949 * lib-xref.adb (Generate_Reference): Take into account multiple
950 renamings for Alfa refs.
952 2011-09-19 Thomas Quinot <quinot@adacore.com>
954 * g-socthi-mingw.adb: Minor reformatting.
956 2011-09-19 Yannick Moy <moy@adacore.com>
958 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
959 expansion to False in mode Alfa
961 2011-09-19 Pascal Obry <obry@adacore.com>
963 * mingw32.h: Remove obsolete code needed for old versions
966 2011-09-19 Robert Dewar <dewar@adacore.com>
968 * errout.ads: Minor reformatting.
970 2011-09-19 Ed Schonberg <schonberg@adacore.com>
972 * sem_ch6.adb (Analyze_Expression_Function): When the expression
973 function is transformed into a declaration and a body, insert
974 body at the end of the declarative part, to prevent premature
975 freeze actions, and preserve original specification in the
976 subprogram declaration.
978 2011-09-19 Vincent Celier <celier@adacore.com>
980 * projects.texi: Minor editing.
982 2011-09-19 Robert Dewar <dewar@adacore.com>
984 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
985 exp_aggr.adb: Minor reformatting.
987 2011-09-19 Yannick Moy <moy@adacore.com>
989 * lib-xref.adb (Generate_Reference): Change entity referenced
990 to underlying object if any, or else reference to the HEAP.
992 2011-09-15 Arnaud Charlet <charlet@adacore.com>
994 * gcc-interface/Make-lang.in: Update dependencies.
996 2011-09-15 Robert Dewar <dewar@adacore.com>
998 * tree_io.ads: Minor reformatting.
999 * a-intnam.ads: Fix bad header.
1001 2011-09-15 Thomas Quinot <quinot@adacore.com>
1003 * a-exexpr-gcc.adb: Minor reformatting.
1005 2011-09-15 Yannick Moy <moy@adacore.com>
1007 * sem_ch6.adb: Propagate information that an expression function comes
1008 from source (otherwise references to this entity are not stored).
1010 2011-09-15 Robert Dewar <dewar@adacore.com>
1012 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1013 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1014 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1016 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1018 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1019 if the expression function is not a completion, create a
1020 new specification for the generated declaration, and keep the
1021 original specification in the generated body. Shorter code also
1022 ensures that proper warnings are generated for unused formals
1025 2011-09-15 Sergey Rybin <rybin@adacore.com>
1027 * tree_io.ads: Update ASIS_Version_Number because of the changes
1028 in the tree structures for expression functions.
1030 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1032 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1033 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1034 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1035 (CLOCK_REALTIME): Fix wrong value on some OSes.
1036 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1038 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1040 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1041 to unconstrained array case, deal with each branch of a COND_EXPR.
1042 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1043 a COND_EXPR in the initializer, if present.
1045 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1047 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1048 of an addressable type.
1049 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1050 Deal with those cases for which creating a temporary is mandatory.
1052 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1054 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1055 this is a real formal parameter before testing whether it is by ref.
1057 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1059 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1060 (build_call_1_expr): Likewise.
1061 (build_call_2_expr): Likewise.
1062 (build_call_n_expr): New prototype.
1063 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1064 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1065 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1066 (Exception_Handler_to_gnu_zcx): Likewise.
1067 (gnat_to_gnu): Likewise.
1068 (build_binary_op_trapv): Likewise.
1069 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1070 (build_call_1_expr): Likewise.
1071 (build_call_2_expr): Likewise.
1072 (build_call_n_expr): New function.
1073 (build_call_raise): Use build_call_n_expr.
1074 (build_call_raise_range): Likewise.
1075 (build_call_raise_column): Likewise.
1076 (build_call_alloc_dealloc_proc): Likewise.
1077 (maybe_wrap_malloc): Likewise.
1078 (maybe_wrap_free): Likewise.
1080 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1082 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1084 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1085 the result type is null if ENABLE_CHECKING. Set operation_type at the
1086 end unconditionally if not set in the previous cases.
1087 Use build2 and void_type_node for MODIFY_EXPR.
1088 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1090 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1092 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1093 precision when converting to or from an integral type whose precision
1094 is not equal to its size.
1096 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1098 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1100 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1102 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1104 * system-darwin-ppc64.ads: New file.
1106 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1108 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1111 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1113 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1114 size switches to the link phase for shared libs.
1116 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1118 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1119 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1121 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1123 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1124 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1125 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1127 (TOOLS_FLAGS_TO_PASS): New.
1128 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1130 2011-09-06 Robert Dewar <dewar@adacore.com>
1132 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1133 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1135 2011-09-06 Robert Dewar <dewar@adacore.com>
1137 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1138 * s-rident.ads: New restriction No_Implementation_Units
1139 (this restriction is also part of the profile
1140 No_Implementation_Extensions)
1141 * sem_ch10.adb (Analyze_With_Clause): Add check for
1142 No_Implementation_Units restriction.
1144 2011-09-06 Jerome Guitton <guitton@adacore.com>
1146 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1149 2011-09-06 Thomas Quinot <quinot@adacore.com>
1151 * s-solita.adb: Minor reformatting.
1153 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1155 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1156 is a rewriting of an expression function does not freeze previous
1159 2011-09-06 Robert Dewar <dewar@adacore.com>
1161 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1163 2011-09-06 Tristan Gingold <gingold@adacore.com>
1165 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1166 powerpc-wrs-vxworksae.
1168 2011-09-06 Thomas Quinot <quinot@adacore.com>
1170 * s-os_lib.ads (Spawn): Minor documentation clarification,
1171 Success is True for a zero exit status.
1173 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1175 * sem_ch5.adb: Add message for common iterator error.
1177 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1179 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1180 selected component discriminated by a current instance, replace
1181 the constraint with a reference to the target object, regardless
1182 of whether the context is an init_proc.
1184 2011-09-06 Robert Dewar <dewar@adacore.com>
1186 * exp_attr.adb: Descriptor_Size is never static.
1188 2011-09-06 Robert Dewar <dewar@adacore.com>
1190 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1192 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1194 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1197 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1199 * sem_res.adb (Resolve): An expression that is the body of an
1200 expression function does not freeze.
1202 2011-09-06 Matthew Heaney <heaney@adacore.com>
1204 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1205 a-cuprqu.adb: Changed copyright notice to indicate current
1208 2011-09-06 Vincent Celier <celier@adacore.com>
1210 * prj.adb: Minor spelling error fix in comment
1211 * sem_res.adb: Minor reformatting
1213 2011-09-06 Pascal Obry <obry@adacore.com>
1215 * sysdep.c (winflush_nt): Removed as not needed anymore.
1216 (winflush_95): Likewise.
1217 (winflush_init): Likewise.
1218 (winflush_function): Likewise.
1219 (getc_immediate_common): Remove call to winflush_function.
1221 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1223 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1224 processing for Descriptor_Size.
1225 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1226 to account for its broader usage.
1227 * sem_attr.adb (Analyze_Attribute): Change the error detection
1228 circuitry for Descriptor_Size as the attribute is now applicable
1231 2011-09-06 Robert Dewar <dewar@adacore.com>
1233 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1235 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1237 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1238 in a parameter association must not set the Referenced flag on
1240 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1242 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1244 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1246 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1248 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1249 gnatlink-re): Speed up by using -j0.
1251 2011-09-06 Yannick Moy <moy@adacore.com>
1253 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1254 Set_Corresponding_Aspect when creating pragma from aspect.
1255 (Add_Predicates): Use new field Corresponding_Aspect.
1256 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1257 name when present, for the purpose of issuing error messages;
1258 remove local procedure Error_Pragma_Arg_Alternate_Name.
1259 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1261 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1264 2011-09-06 Robert Dewar <dewar@adacore.com>
1266 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1268 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1270 * exp_ch6.adb (Build_Heap_Allocator): Add new
1271 local variable Desig_Typ. Code and comment reformatting. Add
1272 machinery to ensure that the allocation uses a fat pointer when
1273 the type of the return object is a constrained array and the
1274 function return type is an unconstrained array.
1276 2011-09-06 Vincent Celier <celier@adacore.com>
1278 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1279 parameters in subprograms.
1281 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1283 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1285 2011-09-06 Thomas Quinot <quinot@adacore.com>
1287 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1288 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1290 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1291 is null, destroy task specific data, to make API consistent with
1292 other platforms, and thus compatible with the shared version
1294 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1295 Document the above assumption.
1297 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1299 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1300 variable for type of return value when return type is
1301 unconstrained and context is an assignment.
1303 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1305 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1306 class-wide operation if expansion is not enabled.
1308 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1310 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1313 2011-09-06 Yannick Moy <moy@adacore.com>
1315 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1316 Aspect_Invariant): Do not issue error at this point on illegal
1317 pragma placement, as this is checked later on when analyzing
1318 the corresponding pragma.
1319 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1320 similar to Error_Pragma_Arg, except the source name of the
1321 aspect/pragma to use in warnings may be equal to parameter
1322 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1323 message to distinguish source name of pragma/aspect, and whether
1324 the illegality resides in the type being public, or being private
1325 without a public declaration
1327 2011-09-06 Thomas Quinot <quinot@adacore.com>
1329 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1330 size check (fd_set is implemented differently on that platform).
1332 2011-09-06 Thomas Quinot <quinot@adacore.com>
1334 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1335 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1336 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1337 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1338 (ATCB_Allocation): New subpackage of
1339 System.Tasking.Primitive_Operations, shared across all targets
1340 with full tasking runtime.
1341 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1343 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1344 taking care of establishing a local temporary ATCB if the one
1345 being deallocated is Self, to avoid a reference to the freed
1346 ATCB in Abort_Undefer.
1348 2011-09-06 Thomas Quinot <quinot@adacore.com>
1350 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1351 terminated, mark it for deallocation upon termination.
1352 (Terminate_Task): Call Free_Task again if the task is marked
1353 for automatic deallocation upon termination.
1355 2011-09-06 Robert Dewar <dewar@adacore.com>
1357 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1358 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1359 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1360 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1361 a-intnam-solaris.ads, a-intnam-tru64.ads,
1362 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1363 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1364 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1365 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1366 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1367 Add new profile No_Implementation_Extensions
1368 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1369 profile No_Implementation_Extensions
1370 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1371 Check violation of restriction No_Implementation_Identifiers
1372 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1373 Add entry for Name_No_Implementation_Extensions
1375 2011-09-06 Robert Dewar <dewar@adacore.com>
1377 * impunit.ads: Minor reformatting.
1379 2011-09-06 Robert Dewar <dewar@adacore.com>
1381 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1383 2011-09-06 Pascal Obry <obry@adacore.com>
1385 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1388 2011-09-06 Robert Dewar <dewar@adacore.com>
1390 * g-socket.adb: Minor reformatting
1392 2011-09-06 Javier Miranda <miranda@adacore.com>
1394 * ali.adb (Scan_ALI): Add missing support to load references of
1395 entities imported from other languages.
1396 * ali.ads (Xref_Record): Adding new fields to store the language and
1397 name of an imported entity.
1398 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1401 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1403 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1404 is allowed on a full type declaration if it is the completion of
1405 a private declarations.
1406 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1407 aspect is allowed on a full type declaration in the private part
1410 2011-09-06 Robert Dewar <dewar@adacore.com>
1412 * sem_ch8.ads: Minor reformatting
1414 2011-09-06 Thomas Quinot <quinot@adacore.com>
1416 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1417 Guard against socket values that are not in [0;FD_SETSIZE[
1419 2011-09-06 Robert Dewar <dewar@adacore.com>
1421 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1424 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1426 * s-linux-alpha.ads: Minor reformatting
1427 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1428 Use sizeof instead of corresponding C defines in s-oscons template.
1430 2011-09-06 Vadim Godunko <godunko@adacore.com>
1432 * a-convec.ads, a-iteint.ads: Minor reformatting.
1434 2011-09-06 Vincent Celier <celier@adacore.com>
1436 * projects.texi: Add menus and @node lines.
1438 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1440 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1441 where the return type is an unconstrained array and the context
1442 is an assignment. Optimize the case when the target of the
1443 assignment is a selected component.
1445 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1447 * s-solita.adb: Update comments.
1449 2011-09-06 Pascal Obry <obry@adacore.com>
1451 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1452 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1453 * s-oscons-tmplt.c: Add support for generating pthread related
1454 types size on GNU/Linux as done for Darwin.
1455 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1457 2011-09-06 Robert Dewar <dewar@adacore.com>
1459 * exp_ch6.adb: Fix minor typo.
1461 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1463 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1464 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1465 (Double_Size_Of): Alphabetized. Update the comment on usage.
1466 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1467 (Nearest_Multiple_Rounded_Up): New routine.
1468 (Size_Of): Update comment on usage. The generated expression now
1469 accounts for alignment gaps by rounding the size of the type to the
1470 nearest multiple rounded up of the type's alignment.
1472 2011-09-06 Robert Dewar <dewar@adacore.com>
1474 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1476 2011-09-06 Steve Baird <baird@adacore.com>
1478 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1479 derived subprograms in checking for presence of an
1480 Extra_Accessibility_Of_Result formal parameter.
1481 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1482 checking for presence of an Extra_Accessibility_Of_Result formal
1484 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1485 case where the Parameter_Associatiations attribute is already set,
1486 but set to an empty list.
1487 (Needs_Result_Accessibility_Level):
1488 Unconditionally return False. This is a temporary
1489 change, disabling the Extra_Accessibility_Of_Result
1491 (Expand_Simple_Function_Return): Check for
1492 Extra_Accessibility_Of_Result parameter's presence instead of
1493 testing Ada_Version when generating a runtime accessibility
1494 check which makes use of the parameter.
1496 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1498 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1499 expression in a given case alternative must be attached to the
1500 statement list of the ccrresponding case statement alternative
1501 They cannot be propagated ahead of the case statement, because
1502 the validity of the expression that generated the action may
1503 hold only for that alternative.
1505 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1507 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1508 (Alignment_Of): Remove the code for strict alignment targets.
1509 (Double_Alignment_Of): Removed.
1510 (Double_Size_Of): New routine.
1511 (Make_Finalize_Address_Stmts): Change the
1512 calculation of the dope's size. Update relevant comments.
1513 (Size_Of): New routine.
1515 2011-09-06 Steve Baird <baird@adacore.com>
1517 * einfo.ads (Extra_Accessibility): Update associated comment to use
1518 the term "present" correctly ("present" just means that it is not
1519 an error to query the value of the attribute - it does not imply
1520 that the value must be non-null).
1521 (Extra_Constrained): Ditto.
1522 (Is_Visible_Formal): Ditto.
1523 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1524 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1525 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1526 * exp_ch6.adb (Expand_Call): The callee may require an
1527 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1528 < Ada_2012. This can occur if the callee is exported from a Gnat
1529 runtimes unit. Also improve a comment.
1531 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1533 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1534 (Alignment_Of): Rename formal parameter Some_Typ
1535 to Typ, update related comment. Use the allocator alignment on
1536 strict alignment targets such as SPARC.
1537 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1540 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1542 * sem_ch9.adb (Check_Interfaces): Test
1543 Is_Limited_Type rather than Is_Limited_Record when checking that
1544 the partial view of a synchronized full view must be limited.
1546 2011-09-06 Emmanuel Briot <briot@adacore.com>
1548 * g-comlin.adb (Free): Fix memory leak.
1550 2011-09-06 Robert Dewar <dewar@adacore.com>
1552 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1554 2011-09-06 Steve Baird <baird@adacore.com>
1556 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1557 (Ada2012) cases described in AI05-0234 where the accessibility
1558 level of a function result is "determined by the point of
1559 call", an implicit parameter representing that accessibility
1560 level is passed in. Extra_Accessibilty_Of_Result yields this
1561 additional formal parameter. Extra_Accessibility_Of_Result
1562 is analogous to the existing Extra_Accessibility
1563 function used in the implementation of access parameters.
1564 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1565 Extra_Accessibility_Of_Result attribute.
1566 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1567 (Set_Extra_Accessibility_Of_Result): New procedure.
1568 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1569 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1570 an accessibility level literal to Natural; introduce a nested
1571 function, Make_Level_Literal, to do this.
1572 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1573 determines whether a given function (or access-to-function
1574 type) needs to have an implicitly-declared accessibility-level
1575 parameter added to its profile.
1576 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1577 previously declared in the body of Exp_Ch6.
1578 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1580 (Has_Unconstrained_Access_Discriminants): New Function; a
1581 predicate on subtype entities which returns True if the given
1582 subtype is unconstrained and has one or more access discriminants.
1583 (Expand_Call): When expanding a call to a function which takes an
1584 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1585 actual parameter value. In the case of a function call which is
1586 used to initialize an allocator, this may not be possible because
1587 the Etype of the allocator may not have been set yet. In this
1588 case, we defer passing in the parameter and handle it later in
1589 Expand_Allocator_Expression.
1590 (Expand_Simple_Function_Return): When returning from a function which
1591 returns an unconstrained subtype having at least one access
1592 discriminant, generate the accessibility check needed to ensure that
1593 the function result will not outlive any objects designated by its
1595 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1597 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1598 is used to initialize an allocator, we may need to pass in "the
1599 accessibility level determined by the point of call" (AI05-0234)
1600 to the function. Expand_Call, where such actual parameters are
1601 usually generated, is too early in this case because the Etype of
1602 the allocator (which is used in determining the level to be passed
1603 in) may not have been set yet when Expand_Call executes. Instead,
1604 we generate code to pass in the appropriate actual parameter
1605 in Expand_Allocator_Expression.
1606 * sem_ch6.adb (Create_Extra_Formals): Create
1607 the new Extra_Accessibility_Of_Result formal if
1608 Needs_Result_Accessibility_Level returns True. This includes the
1609 introduction of a nested procedure, Check_Against_Result_Level.
1611 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1613 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
1616 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1618 * s-finmas.adb (Set_Finalize_Address): Explain the reason
1619 for the synchronization. Move the test for null from
1620 s-stposu.Allocate_Any_Controlled to this routine since the check
1621 needs to be protected too.
1622 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
1623 synchronization code.
1624 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
1625 explaining the context in which this routine is used.
1626 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
1627 to s-finmas.Set_Finalize_Address.
1629 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1631 * einfo.ads: Document that itypes have no parent field.
1633 2011-09-05 Robert Dewar <dewar@adacore.com>
1635 * rtsfind.adb (Check_CRT): Check for overloaded entity
1636 * rtsfind.ads: Document that entities to be found by rtsfind
1637 cannot be overloaded
1638 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
1639 (Lock_Entries_With_Status): New name for Lock_Entries with two
1640 arguments (changed to meet rtsfind no overloading rule).
1642 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1644 * s-finmas.adb (Set_Finalize_Address (Address,
1645 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1646 (Set_Finalize_Address (in out Finalization_Master,
1647 Finalize_Address_Ptr): Add synchronization code.
1648 * s-finmas.ads (Set_Finalize_Address (Address,
1649 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1650 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
1651 Set_Finalize_Address for the heterogeneous case.
1653 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1655 * sem_ch3.adb: Undo previous change, not suitable after all.
1657 2011-09-05 Robert Dewar <dewar@adacore.com>
1659 * einfo.ads: Minor comment clarification.
1661 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1663 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
1664 no longer needs to search through the entities of the return
1665 statement scope to find the _chain.
1666 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
1667 (Analyze_Block_Statement): Add local variable
1668 Is_BIP_Return_Statement. Add machinery to install all entities
1669 produced by the expansion of the return object declaration.
1670 (Install_Return_Entities): New routine.
1671 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
1673 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1675 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
1676 of subunit is incomplete.
1677 (Analyze_Proper_Body): If parent spec is not available, do not
1680 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1682 * sem_disp.adb (Find_Controlling_Arg): Add checks for
1683 interface type conversions, that are expanded into dereferences.
1685 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1687 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1688 Examine the parameter and return profile of a subprogram and swap
1689 any incomplete types coming from a limited context with their
1690 corresponding non-limited views.
1691 (Exchange_Limited_Views): New routine.
1693 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1695 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
1696 of internal entity to the subtype declaration, so that when
1697 entities are subsequently exchanged in a package body, the tree
1698 remains properly formatted for ASIS.
1700 2011-09-05 Johannes Kanig <kanig@adacore.com>
1702 * g-comlin.adb (Set_Usage): Additional optional argument to set help
1704 (Display_Help): display the user given help message, if available.
1706 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1708 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
1709 is legal if the original node is an identifier that is a
1710 parameterless function call.
1712 2011-09-05 Pascal Obry <obry@adacore.com>
1714 * prj-nmsc.adb: Minor reformatting.
1715 Add support for standalone aggregate library.
1716 (Check_Stand_Alone_Library): Handle standalone aggregate library.
1717 * projects.texi: Fix documentation for aggregate library projects.
1719 2011-09-05 Robert Dewar <dewar@adacore.com>
1721 * sem_ch6.adb: Minor reformatting.
1723 2011-09-05 Matthew Gingell <gingell@adacore.com>
1725 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
1726 stack guard page on PPC Linux. This patch ensures the 64K guard page at
1727 the bottom of the stack is not overwritten.
1729 2011-09-05 Thomas Quinot <quinot@adacore.com>
1731 * exp_intr.adb, s-tasini.adb: Minor reformatting.
1733 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1735 * sem_ch3.adb (Access_Definition): If an access type declaration
1736 appears in a child unit, the scope of whatever anonymous type
1737 may be generated is the child unit itself.
1739 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1741 * sem_ch6.adb (Analyze_Expression_Function): Do not set
1742 Comes_From_Source on rewritten body.
1743 (Analyze_Subprogram_Body_Helper): Check that the original node for
1744 the body comes from source, when determining whether expansion
1745 of a protected operation is needed.
1747 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1749 * exp_aggr.adb (Replace_Type): If the target of the assignment is
1750 a selected component and the right-hand side is a self-referential
1751 access, the proper prefix of the rewritten attribute is a copy
1752 of the left-hand side, not of its prefix.
1754 2011-09-05 Robert Dewar <dewar@adacore.com>
1756 * sem_ch5.adb: Minor reformatting.
1757 * sem_ch3.adb: Minor code clean up.
1759 2011-09-05 Jose Ruiz <ruiz@adacore.com>
1761 * exp_ch9.adb (Make_Initialize_Protection): The fact that
1762 restriction No_Dynamic_Attachment is in effect or not should
1763 not influence the default priority associated to a protected
1764 object. With this change, when the restriction is in effect (as
1765 is the case for the Ravenscar profile) the default priority of
1766 a protected object with an interrupt handler is in the range of
1767 interrupt priorities (Default_Interrupt_Priority) as required
1770 2011-09-05 Arnaud Charlet <charlet@adacore.com>
1772 * a-iteint.ads: Fix header.
1774 2011-09-05 Vincent Celier <celier@adacore.com>
1776 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
1777 with a directory separator to avoid output such as:
1778 "/path/to/objauto.cgpr" has been deleted.
1780 2011-09-05 Robert Dewar <dewar@adacore.com>
1782 * sem_ch3.adb: Minor reformatting.
1784 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1786 * sem_ch5.adb: Better error message.
1788 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1790 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
1791 (Expand_Array_Aggregate): Detect a special case of an aggregate
1792 which contains tasks in the context of an unexpanded return
1793 statement of a build-in-place function.
1794 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
1795 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
1796 which contains tasks and expand it now that the original simple
1797 return statement has been rewritten.
1798 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
1799 reformatting. Do not create a chain for an extended return
1800 statement if one is already available.
1801 (Has_Activation_Chain): New routine.
1803 2011-09-05 Marc Sango <sango@adacore.com>
1805 * sem_ch3.adb (Analyze_Object_Declaration): Remove
1806 the wrong test and add the correct test to detect the violation
1807 of illegal use of unconstrained string type in SPARK mode.
1809 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1811 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
1812 message on an iterator over an array.
1814 2011-09-05 Robert Dewar <dewar@adacore.com>
1816 * lib-xref-alfa.adb: Minor reformatting.
1818 2011-09-05 Robert Dewar <dewar@adacore.com>
1820 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
1821 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
1823 2011-09-05 Gary Dismukes <dismukes@adacore.com>
1825 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
1827 2011-09-05 Johannes Kanig <kanig@adacore.com>
1829 * lib-xref-alfa.adb: Update comments.
1831 2011-09-05 Thomas Quinot <quinot@adacore.com>
1833 * sem_res.adb: Minor reformatting
1835 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1837 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
1838 present, create them now. Needed in case the return type was
1839 a limited view in the function declaration.
1840 (Make_Build_In_Place_Call_In_Allocator): If return type contains
1841 tasks, build the activation chain for it. Pass a reference to
1842 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
1843 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
1844 with build_in_place calls.
1845 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
1846 incomplete, inatialize its Corresponding_Record_Type component.
1847 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
1850 2011-09-05 Johannes Kanig <kanig@adacore.com>
1852 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
1855 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1857 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
1858 appears within a package specification and the token after "IS"
1859 is not a parenthesis, assume that this is an unparenthesized
1860 expression function, even if the token appears in a line by
1862 * par.adb: Clarify use of Labl field of scope stack in error
1865 2011-09-05 Bob Duff <duff@adacore.com>
1867 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
1868 conversions instead of normal type conversions in all cases where a
1869 type conversion would be illegal. In particular, use unchecked
1870 conversions when the operand types are private.
1872 2011-09-05 Johannes Kanig <kanig@adacore.com>
1874 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
1875 objects of task type or protected type.
1877 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1879 * sem_ch6.adb (Analyze_Expression_Function): If the expression
1880 function comes from source, indicate that so does its rewriting,
1881 so it is compatible with any subsequent expansion of the
1882 subprogram body (e.g. when it is a protected operation).
1883 * sem_ch4.adb: minor reformatting
1885 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1887 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
1888 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
1889 may lead to wrong ancestor package in the case of instantiated subunit
1890 bodies. If a subunit is instantiated, follow the chain of instantiations
1891 rather than the stub structure.
1893 2011-09-02 Robert Dewar <dewar@adacore.com>
1895 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1896 * gcc-interface/Make-lang.in: Update dependencies.
1898 2011-09-02 Marc Sango <sango@adacore.com>
1900 * sem_ch3.adb (Analyze_Object_Declaration): Change
1901 comment and add additional check to differentiate constant of
1902 type string from others unconstrained type.
1904 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1906 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
1907 present in incomplete type declarations to refine the error
1908 message the full declaration is in the same unit.
1909 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
1910 an incomplete type, set the Premature_Use for additional message.
1911 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
1912 and Premature_Use is set, place additional information at the
1913 point of premature use.
1915 2011-09-02 Bob Duff <duff@adacore.com>
1917 * sem_ch6.adb: (Check_Post_State): Suppress warning
1918 "postcondition refers only to pre-state" when the expression has not
1919 yet been analyzed, because it causes false alarms. This can happen when
1920 the postcondition contains a quantified expression, because those are
1921 analyzed later. This is a temporary/partial fix.
1922 (Process_Post_Conditions): Minor: change wording of warning.
1924 2011-09-02 Marc Sango <sango@adacore.com>
1926 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
1927 illegal use of unconstrained string type in SPARK mode.
1928 * sem_res.adb (Analyze_Operator_Symbol): Set the
1929 right place where the string operand of concatenation should be
1930 violate in SPARK mode.
1932 2011-09-02 Robert Dewar <dewar@adacore.com>
1934 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
1935 exp_ch3.adb: Minor reformatting.
1937 2011-09-02 Vincent Celier <celier@adacore.com>
1939 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
1940 as the compiler driver so Is_Compilable returns True for sources.
1941 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
1944 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1946 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
1947 condition, a reference to a controlling formal must be interpreted
1948 as having the class-wide type (or an access to such) so that the
1949 inherited condition can be properly applied to any overriding
1950 operation (see ARM12 6.6.1 (7)).
1952 2011-09-02 Tristan Gingold <gingold@adacore.com>
1954 * init.c (__gnat_is_vms_v7): Fix case and add prototype
1957 2011-09-02 Javier Miranda <miranda@adacore.com>
1959 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
1960 initializing expression of a class-wide interface object declaration
1961 if its type is limited.
1963 2011-09-02 Johannes Kanig <kanig@adacore.com>
1965 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
1966 literals, take into account the type name; the type is *not*
1967 the scope for an enumeration literal.
1969 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1971 * sem_ch6.adb (Check_Overriding_Indicator): add special check
1972 to reject an overriding indicator on a user-defined Adjust
1973 subprogram for a limited controlled type.
1975 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1977 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
1978 for an actual that is a function call returning an unconstrained
1979 limited controlled type.
1981 2011-09-02 Tristan Gingold <gingold@adacore.com>
1983 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
1985 2011-09-02 Johannes Kanig <kanig@adacore.com>
1987 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
1988 from "HEAP" to __HEAP Change comment that refers to that variable
1989 * put_alfa.adb: Change comment that refers to that variable
1991 2011-09-02 Robert Dewar <dewar@adacore.com>
1993 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
1995 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1997 * exp_util.adb (Extract_Renamed_Object): Renamed to
1998 Find_Renamed_Object. This routine has been reimplemented and now uses
1999 tree traversal to locate a renamed object.
2000 (Is_Aliased): Replace call to Extract_Renamed_Object with
2001 Find_Renamed_Object.
2003 2011-09-02 Tristan Gingold <gingold@adacore.com>
2005 * init.c: (__gnat_is_vms_v7): New function.
2007 2011-09-02 Olivier Hainque <hainque@adacore.com>
2009 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2010 that have a misaligned backchain, necessarily bogus.
2012 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2014 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2015 TSS routine Finalize_Address when compiling in Alfa mode.
2016 (Expand_Freeze_Record_Type): Do not create TSS routine
2017 Finalize_Address when compiling in Alfa mode.
2018 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2019 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2021 (Expand_N_Allocator): Do not produce a call to
2022 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2023 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2024 produce a call to primitive Set_Finalize_Address in Alfa mode because
2025 Finalize_Address is not built.
2026 * exp_ch7.adb (Build_Finalization_Master): Do not create
2027 finalization masters in Afa mode since they are not needed.
2028 (Build_Finalizer): Do not create scope and library-level
2029 finalizers in Alfa mode since they are not needed.
2030 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2031 "new" and "free" when applied to controlled objects in Alfa mode since
2034 2011-09-02 Vincent Celier <celier@adacore.com>
2036 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2037 only library names with the syntax of Ada identifiers, to avoid errors
2038 when compiling the binder generated files.
2039 * projects.texi: Document restriction on SAL library names
2041 2011-09-02 Thomas Quinot <quinot@adacore.com>
2043 * a-chtgbo.adb: Minor comment fix.
2045 2011-09-02 Robert Dewar <dewar@adacore.com>
2047 * lib-xref.adb: Minor reformatting
2049 2011-09-02 Vincent Celier <celier@adacore.com>
2051 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2052 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2053 --version and --help in usage.
2054 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2056 2011-09-02 Bob Duff <duff@adacore.com>
2058 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2059 compilers don't understand it.
2061 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2063 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2064 underlying subtype rather than its base type on the call to
2065 Build_Record_Or_Elementary_Input_Function, so that any
2066 constraints on a discriminated subtype will be available for
2067 doing the check required by AI05-0192.
2068 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2069 If the prefix subtype of the 'Input attribute is a constrained
2070 discriminated subtype, then check each constrained discriminant value
2071 against the corresponding value read from the stream.
2073 2011-09-02 Yannick Moy <moy@adacore.com>
2075 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2076 warnings on suspicious contracts, and enable them with -gnatwa.
2078 2011-09-02 Robert Dewar <dewar@adacore.com>
2080 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2083 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2085 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2086 which ensure that restriction No_Dynamic_Attachment has not been
2088 (Make_Initialize_Protection): Protected types with attach or
2089 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2090 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2091 which ensures that restriction No_Dynamic_Attachment has not been
2093 * sem_attr.adb: (Eval_Attribute): Transform
2094 VAX_Float_Type'First and 'Last into references to
2095 the temporaries which store the corresponding bounds. The
2096 transformation is needed since the back end cannot evaluate
2097 'First and 'Last on VAX.
2098 (Is_VAX_Float): New routine.
2100 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2102 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2103 generic unit is not intrinsic and has an explicit convention,
2104 the instance inherits it.
2106 2011-09-02 Robert Dewar <dewar@adacore.com>
2108 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2109 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2111 2011-09-02 Thomas Quinot <quinot@adacore.com>
2113 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2114 Guard against a prefix that is an N_Has_Entity but has no
2117 2011-09-02 Yannick Moy <moy@adacore.com>
2119 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2122 2011-09-02 Yannick Moy <moy@adacore.com>
2124 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2125 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2127 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2128 procedure looking for suspicious postconditions.
2129 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2130 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2131 options -gnatw.t and -gnatw.T.
2133 2011-09-02 Pascal Obry <obry@adacore.com>
2135 * prj.adb: Minor code refactoring. Move check for null project in
2137 * projects.texi: Fix minor typos.
2139 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2141 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2142 of iteration is an expression, its value must be captured in a
2143 renaming declaration, so that modification of the elements is
2144 propagated to the original container.
2146 2011-09-02 Pascal Obry <obry@adacore.com>
2148 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2149 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2150 prj-tree.adb: Minor reformatting and style fixes.
2152 2011-09-02 Robert Dewar <dewar@adacore.com>
2154 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2155 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2156 No_Implicit_Aliasing
2157 (Analyze_Attribute, case Address): ditto
2158 (Analyze_Attribute, case Unrestricted_Access): ditto
2159 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2160 No_Implicit_Aliasing restriction.
2161 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2163 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2165 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2166 is an unchecked conversion, apply test to its expression.
2168 2011-09-02 Javier Miranda <miranda@adacore.com>
2170 * sem_ch3.adb (Check_Abstract_Overriding): When
2171 traversing the chain of aliased subprograms avoid reporting a
2172 redundant error on the current entity.
2174 2011-09-02 Sergey Rybin <rybin@adacore.com>
2176 * gnat_ugn.texi: Minor clean up.
2178 2011-09-02 Bob Duff <duff@adacore.com>
2180 * s-htable.adb (Set_If_Not_Present): Use renaming
2181 instead of ":=", because the type Key is limited in the generic (even
2182 if not in the instances).
2184 2011-09-02 Robert Dewar <dewar@adacore.com>
2186 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2187 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2190 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2192 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2193 inherited component with the enclosing derived type. Code reformatting.
2195 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2197 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2198 return done when overflow checks are enabled, since comparisons against
2199 Lor and Hir should not be done when OK1 is False.
2201 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2203 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2204 Add new formal Master_Exp. When present, add that expression to the
2205 call as an extra actual.
2206 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2207 Fmaster_Actual and in the case of a BIP call initializing a return
2208 object of an enclosing BIP function set it to a
2209 new reference to the implicit finalization master
2210 formal of the enclosing function. Fmaster_Actual is
2211 then passed to the new formal Master_Exp on the call to
2212 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2213 initializations of Enclosing_Func to its declaration.
2215 2011-09-02 Thomas Quinot <quinot@adacore.com>
2217 * csets.ads: Minor reformatting
2219 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2221 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2222 the full view of a private type coming from an instantiation.
2223 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2224 loop to iterate over the declarations rather than use the
2225 First_Entity / Next_Entity scheme.
2227 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2229 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2230 X'range (N) into X'First (N) .. X'Last (N), do not share the
2231 dimension indicator N, if present. Even though it is a static
2232 constant, its source location may be modified when printing
2233 expanded code under -gnatDL, and node sharing will lead to chaos
2234 in Sprint on large files, by generating a sloc value that does
2235 not correspond to any source file.
2237 2011-09-02 Bob Duff <duff@adacore.com>
2239 * einfo.adb: (Has_Xref_Entry): Do not call
2240 Implementation_Base_Type. Lib.Xref has been
2241 rewritten to avoid the need for it, and it was costly.
2242 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2243 functions in support of efficient xref.
2244 * lib-xref-alfa.adb: Misc changes related to Key component of
2246 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2247 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2248 no longer does. This is the one place where it is needed.
2250 2011-09-02 Johannes Kanig <kanig@adacore.com>
2252 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2253 similar interface as the other Getopt function.
2255 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2257 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2258 a call to Set_Finalize_Address if there is no allocator available.
2259 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2260 a case of allocator expansion where the allocator is not expanded but
2261 needs a custom allocate routine. Code reformatting.
2262 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2263 Ren_Obj. Code reformatting.
2264 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2265 through the use of 'reference.
2266 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2267 as part of build-in-place expansion. They are intentionally marked as
2268 coming from source, but their parents are not.
2270 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2272 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2273 is the generated subprogram declaration for a child unit body
2274 that acts as spec, use the original body in the with_clause,
2275 to prevent binding errors.
2277 2011-09-02 Vincent Celier <celier@adacore.com>
2279 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2280 qualifier /MULTI_UNIT_INDEX=
2282 2011-09-02 Johannes Kanig <kanig@adacore.com>
2284 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2285 instead of calling the callback function
2287 2011-09-02 Robert Dewar <dewar@adacore.com>
2289 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2290 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2292 2011-09-02 Vincent Celier <celier@adacore.com>
2294 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2295 explicitly declared in an extending project, do not warn if a source
2296 for an inherited naming exception is not found.
2298 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2300 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2301 expansion is inactive.
2303 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2305 * sem_util.adb (Note_Possible_Modification): If the entity
2306 being modified is the renaming generated for an Ada2012 iterator
2307 element, the enclosing container or array is modified as well.
2309 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2311 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2312 Initialize): Define and initialize the
2313 mutex attributes and condition variable attributes locally.
2315 2011-09-02 Vincent Celier <celier@adacore.com>
2317 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2318 exception replaced in an extending project.
2319 (Check_Object): No error when the other source is locally removed.
2321 2011-09-02 Yannick Moy <moy@adacore.com>
2323 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2326 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2328 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2330 * gcc-interface/Make-lang.in: Update dependencies.
2332 2011-09-01 Robert Dewar <dewar@adacore.com>
2334 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2336 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2338 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2339 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2340 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2341 specific for systems where their glibc version does not define the
2342 routines to handle dynamically allocated CPU sets.
2344 2011-09-01 Vincent Celier <celier@adacore.com>
2346 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2347 prj-env.adb: Implement inheritance of naming exceptions in extending
2350 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2352 * gnatls.adb: Display simple message instead of content of
2355 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2357 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2358 access discriminant and anonymous access component scopes.
2359 (Inherit_Component): Reuse the itype of an access discriminant
2360 or anonymous access component by copying it in order to set the proper
2361 scope. This is done only when the parent and the derived type
2362 are in different scopes.
2363 (Set_Anonymous_Etype): New routine.
2365 2011-09-01 Robert Dewar <dewar@adacore.com>
2367 * a-convec.adb: Minor reformatting throughout.
2369 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2371 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2372 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2373 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2374 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2375 CPU_SET_S respectively because we are now using dynamically allocated
2376 CPU sets which are more portable across different glibc versions.
2377 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2378 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2379 masks dynamically according to the number of processors in the target
2381 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2382 respectively, so we need to pass the size of the masks as
2384 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2385 created cpu_set_t masks
2386 with the number of processors available in the target platform,
2387 instead of static bit arrays. It enhances portability because
2388 it uses the information from the target platform.
2389 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2390 are using a restricted run-time library, use the flag
2391 Configurable_Run_Time_Mode instead of Restricted_Profile.
2393 2011-09-01 Vincent Celier <celier@adacore.com>
2395 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2396 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2398 2011-09-01 Nicolas Roche <roche@adacore.com>
2400 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2401 on VxWorks in kernel mode.
2403 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2405 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2406 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2407 directly the bit array.
2408 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2409 the linux macros with the same name.
2410 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2411 wrappers around the CPU_ZERO and CPU_SET linux macros.
2413 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2415 * exp_ch7.adb (Find_Insertion_List): Removed.
2416 (Process_Transient_Objects): Insert the declarations of the hook
2417 access type and the hook object before the associated transient object.
2419 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2421 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2422 package System.Aux_Dec when using restricted run-time libraries which
2423 do not have this package.
2425 2011-09-01 Tristan Gingold <gingold@adacore.com>
2427 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2429 2011-09-01 Bob Duff <duff@adacore.com>
2431 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2432 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2434 2011-09-01 Thomas Quinot <quinot@adacore.com>
2436 * exp_ch5.adb: Minor reformatting
2437 * gnat_ugn.texi: Fix minor typos.
2438 * gcc-interface/Make-lang.in: Update dependencies.
2440 2011-09-01 Robert Dewar <dewar@adacore.com>
2442 * inline.adb, sem_aggr.adb: Minor reformatting.
2444 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2446 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2448 2011-09-01 Robert Dewar <dewar@adacore.com>
2450 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2452 2011-09-01 Bob Duff <duff@adacore.com>
2454 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2455 body" the same as "in inlined body", because visibility shouldn't
2458 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2460 * inline.adb (Add_Inlined_Body): Refine previous change.
2462 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2464 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2465 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2466 Test for case where call
2467 initializes an object of a return statement before testing for
2468 a constrained call, to ensure that all such cases get handled
2469 by simply passing on the caller's parameters. Also, in that
2470 case call Needs_BIP_Alloc_Form to determine whether to pass on
2471 the BIP_Alloc_Form parameter of the enclosing function rather
2472 than testing Is_Constrained. Add similar tests for the return
2473 of a BIP call to later processing to ensure consistent handling.
2474 (Needs_BIP_Alloc_Form): New utility function.
2475 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2476 a BIP_Alloc_Form formal with call to new utility function
2477 Needs_BIP_Alloc_Form.
2479 2011-09-01 Pascal Obry <obry@adacore.com>
2481 * prj-part.adb: Minor reformatting.
2483 2011-09-01 Vincent Celier <celier@adacore.com>
2485 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2486 half character in the unit name.
2488 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2490 * exp_ch4.adb: Minor code and comment reformatting.
2492 2011-09-01 Thomas Quinot <quinot@adacore.com>
2494 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2495 for Is_Limited_Type and Is_Tagged_Type in condition checking
2496 for by-reference type.
2497 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2498 subprograms may have a completion because of a previous
2499 Inline_Always clause, but the enclosing package must be marked
2500 inlined for the subprogram body to become visible to the backend.
2502 2011-09-01 Thomas Quinot <quinot@adacore.com>
2504 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2506 2011-09-01 Pascal Obry <obry@adacore.com>
2508 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2510 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2512 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2513 the formals of a subprogram stub that acts as a spec.
2515 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2517 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2518 type, declare a renaming for it, not an object declaration.
2520 2011-09-01 Yannick Moy <moy@adacore.com>
2522 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2523 Ignore_Errors to ignore failures to read ALI files when True.
2525 2011-09-01 Javier Miranda <miranda@adacore.com>
2527 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2528 constructor calls associated with non-tagged record types.
2530 2011-09-01 Robert Dewar <dewar@adacore.com>
2532 * g-socthi-vms.adb: Minor reformatting.
2534 2011-09-01 Nicolas Roche <roche@adacore.com>
2536 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2537 in order to avoid impact of imcompatible changes.
2538 * cstreams.c: Likewise
2540 * aux-io.c: Likewise
2542 2011-09-01 Yannick Moy <moy@adacore.com>
2544 * lib-writ.adb (Write_With_Lines): Always output complete information
2545 on "with" line in Alfa mode, as this is required by formal verification
2548 2011-09-01 Tristan Gingold <gingold@adacore.com>
2550 * g-socthi-vms.adb: Add comments.
2552 2011-09-01 Pascal Obry <obry@adacore.com>
2554 * prj.ads: Minor reformatting.
2556 2011-09-01 Vincent Celier <celier@adacore.com>
2558 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2559 exceptions in the config pragmas file.
2561 2011-09-01 Tristan Gingold <gingold@adacore.com>
2563 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2565 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2567 * exp_ch7.adb (Find_Insertion_List): New routine.
2568 (Process_Transient_Objects): Add code to handle the abnormal
2569 finalization of a controlled transient associated with a subprogram
2570 call. Since transients are cleaned up right after the associated
2571 context, an exception raised during a subprogram call may bypass the
2574 2011-09-01 Robert Dewar <dewar@adacore.com>
2576 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2579 2011-09-01 Robert Dewar <dewar@adacore.com>
2581 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2583 2011-09-01 Robert Dewar <dewar@adacore.com>
2585 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2587 2011-09-01 Thomas Quinot <quinot@adacore.com>
2589 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2590 GNATRTL_NONTASKING_OBJS.
2592 2011-09-01 Robert Dewar <dewar@adacore.com>
2594 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2595 possibility of this flag being set for formals in Ada 2012 mode.
2596 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2598 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2600 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2602 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2605 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2607 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2608 insertion node in a tree of nested Expression_With_Actions nodes.
2609 (Process_Transient_Object): In the case where a complex if statement
2610 has been converted into nested Expression_With_Actions nodes, the
2611 "hook" object and the associated access type must be inserted before
2612 the top most Expression_With_Actions.
2614 2011-09-01 Robert Dewar <dewar@adacore.com>
2616 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
2617 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
2619 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2621 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
2623 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2625 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
2627 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
2628 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
2629 in a similar way as we do for the Priority or Dispatching_Domain aspect.
2630 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
2631 Dispatching_Domains_Frozen): Move this local data to package
2632 System.Tasking because with the CPU aspect we need to have access
2633 to this data when creating the task in System.Tasking.Stages.Create_Task
2634 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
2635 Move these variables from the body of
2636 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
2637 we need to have access to this data when creating the task in
2638 System.Tasking.Stages.Create_Task.
2639 * s-taskin.adb (Initialize): Signal the allocation of the environment
2640 task to a CPU, if any, so that we know whether the CPU can be
2641 transferred to a different dispatching domain.
2642 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
2643 is being allocated belongs to the dispatching domain where the task
2644 lives. Signal the allocation of the task to a CPU, if any, so that we
2645 know whether the CPU can be transferred to a different dispatching
2648 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2650 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
2651 attributes Same_Storage and Overlaps_Storage.
2653 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2655 * exp_strm.adb: Remove with and use clause for Opt.
2656 (Build_Array_Input_Function): Remove the version-dependent generation
2657 of the return statement. The Ada 2005 tree is now the default.
2659 2011-09-01 Yannick Moy <moy@adacore.com>
2661 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
2662 it is never empty when compiling in Alfa mode.
2664 2011-09-01 Robert Dewar <dewar@adacore.com>
2666 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
2667 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
2668 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
2669 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
2671 2011-09-01 Matthew Heaney <heaney@adacore.com>
2673 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
2674 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
2675 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
2676 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
2677 unbounded queue container.
2678 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
2679 bounded queue container.
2680 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
2681 unbounded priority queue container.
2682 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
2683 bounded priority queue container.
2685 2011-08-31 Pascal Obry <obry@adacore.com>
2687 * a-direct.adb: Do not try to create an UNC path on Windows.
2688 (Create_Path): Skip leading computer name in UNC path if any.
2690 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2692 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
2693 version-dependent generation of the return statement. The Ada 2005 tree
2696 2011-08-31 Thomas Quinot <quinot@adacore.com>
2698 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
2699 types Stream_Element_Offset and Storage_Offset have a different native
2700 type depending on whether the platform is 32 or 64 bits. When
2701 exchanging them, always convert to 64 bits.
2703 2011-08-31 Yannick Moy <moy@adacore.com>
2705 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
2706 --force-alfa to gnat2why.
2708 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2710 * sem_ch12.adb (Save_References): If the node has aspects, save
2711 references within the corresponding expressions in a separate step,
2712 because the aspects are not directly in the tree for the declaration
2713 to which they belong.
2715 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2717 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
2718 in CodePeer mode, since representation clauses are partially ignored.
2719 * gcc-interface/Make-lang.in: Update dependencies.
2721 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2723 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2724 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
2725 to any dispatching domain.
2727 2011-08-31 Thomas Quinot <quinot@adacore.com>
2729 * exp_ch4.adb: Minor reformatting.
2731 2011-08-31 Bob Duff <duff@adacore.com>
2733 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
2734 on nodes for which it is not defined.
2735 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
2738 2011-08-31 Bob Duff <duff@adacore.com>
2740 * sem_ch3.adb (Process_Full_View): Disable legality check if
2741 In_Instance, to avoid spurious errors.
2742 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
2743 if In_Instance, to avoid spurious errors.
2745 2011-08-31 Pascal Obry <obry@adacore.com>
2747 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
2748 directory speparators.
2749 (Compose): Use Dir_Seps to handle both forms.
2750 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
2752 (Extension): Use Dir_Seps to handle both forms.
2754 2011-08-31 Pascal Obry <obry@adacore.com>
2756 * prj-conf.adb: Minor reformatting.
2758 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2760 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
2761 dispatching domain aspect.
2762 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
2764 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
2765 Dispatching_Domain aspect in a similar way as we do for the Priority
2767 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
2768 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
2770 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
2771 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
2772 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
2773 Dispatching_Domain and add it to the task definition.
2774 (Sig_Flags): Add Pragma_Dispatching_Domain.
2775 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
2776 support to find the types Dispatching_Domain and
2777 Dispatching_Domain_Access.
2778 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
2779 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
2780 query the availability of a pragma Dispatching_Domain.
2781 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
2782 the expander to pass the Dispatching_Domain when creating a task.
2783 (Name_Dispatching_Domain): Add this new name for a pragma.
2784 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
2785 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
2786 task has been allocated at creation time.
2787 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
2788 Ravenscar is always null.
2789 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
2790 the task has been allocated at creation time.
2791 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
2792 a specific dispatching domain.
2793 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
2794 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
2795 and CPU are specified for the task, and the CPU value is not contained
2796 within the range of processors for the domain.
2798 2011-08-31 Vincent Celier <celier@adacore.com>
2800 * make.adb (Original_Gcc) : New constant String_Access.
2801 (Gnatmake): For VM targets, do not use VM version of the compiler if
2802 --GCC= has been specified.
2804 2011-08-31 Thomas Quinot <quinot@adacore.com>
2806 * sem_ch5.adb: Minor reformatting.
2808 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2810 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
2813 2011-08-31 Bob Duff <duff@adacore.com>
2815 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
2816 the access type is private; we don't care about privacy in expansion.
2818 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2820 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
2821 subcomponents tnat may be limited, because they originate in view
2822 conflicts. If the original aggregate is legal and the actuals are
2823 legal, the aggregate itself is legal.
2825 2011-08-31 Matthew Heaney <heaney@adacore.com>
2827 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
2830 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2832 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
2835 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2837 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
2838 Interrupt_Priority aspects, force the analysis of the aspect expression
2839 (when building the equivalent pragma). Otherwise, its analysis is done
2840 too late, after the task or protected object has been created.
2841 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
2842 Analyze_Single_Task_Declaration): Remove the code to move the aspects
2843 to the object declaration because they are needed in the type
2846 2011-08-31 Robert Dewar <dewar@adacore.com>
2848 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
2849 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
2852 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2854 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
2855 if the corresponding type is malformed due to restriction violations.
2857 2011-08-31 Robert Dewar <dewar@adacore.com>
2859 * s-ransee.ads, s-ransee.adb: Minor reformatting.
2861 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2863 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
2864 would cause the generation of Set_Finalize_Address if the target is a
2865 VM and the designated type is not derived from [Limited_]Controlled.
2867 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2869 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
2871 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
2872 case of a compilation error.
2874 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2876 * init.c (__gnat_error_handler): Standardize the stack overflow or
2877 erroneous memory access message.
2878 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
2879 or erroneous memory access message.
2881 2011-08-31 Robert Dewar <dewar@adacore.com>
2883 * sem_ch4.adb: Minor reformatting.
2884 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
2886 2011-08-31 Thomas Quinot <quinot@adacore.com>
2888 * scos.ads: Minor documentation clarification.
2889 * put_scos.adb: Do not generate SCO unit header line for a unit that
2892 2011-08-31 Robert Dewar <dewar@adacore.com>
2894 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
2896 2011-08-31 Tristan Gingold <gingold@adacore.com>
2898 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
2899 hold variables between these following subprograms.
2900 (Build_Exception_Handler, Build_Object_Declarations,
2901 Build_Raise_Statement): Use the above type as parameter.
2902 Make the above adjustments.
2903 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
2905 2011-08-31 Pascal Obry <obry@adacore.com>
2907 * projects.texi: Minor reformatting.
2909 2011-08-31 Tristan Gingold <gingold@adacore.com>
2911 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
2912 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
2914 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2916 * exp_ch5.adb: Minor code cleanup.
2917 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
2918 prevent cascaded errors.
2919 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
2920 variable of an iterator specification in current scope.
2921 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
2922 postconditions on the stack, as they contain no return statements.
2924 2011-08-31 Yannick Moy <moy@adacore.com>
2926 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
2927 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
2928 call Qualify_Entity_Names.
2929 (Expand_Alfa): call Qualify_Entity_Names in more cases
2930 * lib-xref-alfa.adb: Take into account system package.
2931 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
2932 CodePeer mode in which we are interested in finding bugs even if
2933 compiler cannot compile source.
2934 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
2937 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2939 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
2940 denoted by the subtype mark to ensure getting the concurrent type in
2941 the case where the subtype mark denotes a private subtype of a
2942 concurrent type (needed when using -gnatc).
2943 (Process_Subtype): For the processing specific to type kinds, case on
2944 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
2945 subtype denotes a private subtype whose base type is nonprivate (needed
2946 for subtypes of private fulfilled by task types when compiling with
2949 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2951 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
2952 late primitives that override interface operations when the full
2953 expander is not active, to avoid blowups in Register_Primitive when
2954 types don't have associated secondary dispatch tables.
2956 2011-08-31 Yannick Moy <moy@adacore.com>
2958 * alfa_test.adb: Code clean up.
2960 2011-08-31 Marc Sango <sango@adacore.com>
2962 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
2963 by Comes_From_Source (Original_Node (N)) in order to treat also the
2964 nodes which have been rewritten.
2965 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
2966 explicit dereference and slice violation in spark mode on the nodes
2967 coming only from the source code.
2969 2011-08-31 Robert Dewar <dewar@adacore.com>
2971 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
2972 lib-xref-alfa.adb: Minor reformatting.
2974 2011-08-31 Matthew Heaney <heaney@adacore.com>
2976 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
2978 2011-08-31 Javier Miranda <miranda@adacore.com>
2980 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
2981 only for class-wide subprograms conflicting with entities of concurrent
2984 2011-08-31 Matthew Heaney <heaney@adacore.com>
2986 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
2989 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2991 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
2992 general description of the routine.
2994 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2996 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
2997 doubly-linked lists.
2999 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3001 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3002 check is needed for a left-hand side that is a dereference, and the
3003 base type is private without discriminants (whereas the full type does
3004 have discriminants), an extra retrieval of the underlying type may be
3005 needed in the case where the subtype is a record subtype whose base
3006 type is private. Update comments.
3008 2011-08-31 Javier Miranda <miranda@adacore.com>
3010 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3011 found check if there is a class-wide subprogram covering the primitive.
3013 2011-08-31 Yannick Moy <moy@adacore.com>
3015 * sem_res.adb: Further cases where full expansion test is needed,
3016 rather than expansion test.
3018 2011-08-31 Pascal Obry <obry@adacore.com>
3020 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3022 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3024 * exp_ch5.adb: Handle iterators over derived container types.
3026 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3028 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3029 (Has_Anonymous_Master): New routine.
3030 (Set_Has_Anonymous_Master): New routine.
3031 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3032 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3033 (Current_Anonymous_Master): New routine.
3034 (Current_Unit_First_Declaration): Removed.
3035 (Current_Unit_Scope): Removed.
3036 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3037 their objects on a per-unit heterogeneous finalization master.
3039 2011-08-31 Matthew Heaney <heaney@adacore.com>
3041 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3044 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3046 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3049 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3051 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3052 where the actual is an unexpanded call to 'Input.
3054 2011-08-31 Yannick Moy <moy@adacore.com>
3056 * sem_ch4.adb: Code clean up.
3058 2011-08-31 Yannick Moy <moy@adacore.com>
3060 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3062 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3064 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3065 and TSS primitive Finalize_Address if finalization is suppressed.
3066 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3067 primitive Finalize_Address if finalization is suppressed.
3069 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3071 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3072 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3073 sure that the underlying task has already been created before trying
3074 to change its affinity.
3075 (Set_CPU): Use the term processor instead of CPU, as we do in
3078 2011-08-31 Vincent Celier <celier@adacore.com>
3080 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3081 * prj-nmsc.adb (Process_Compiler): Process attribute
3082 Source_File_Switches.
3083 * prj.ads (Language_Config): New name list component
3084 Name_Source_File_Switches.
3085 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3087 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3089 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3090 discriminated component of an actual, expand at once to prevent
3091 ouf-of-order references with generated subtypes.
3093 2011-08-31 Yannick Moy <moy@adacore.com>
3095 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3096 reference to operator in Alfa xrefs.
3098 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3100 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3101 where the parent instance was frozen before the current instance due to
3102 the presence of a source body. Update calls to Insert_After_Last_Decl.
3103 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3104 Update the comment which illustrates the purpose of the routine.
3105 Package instances are now frozen by source bodies which appear after
3106 the instance. This ensures that entities coming from within the
3107 instance are available for use in the said bodies.
3108 (Install_Body): Add code to handle the case where the parent instance
3109 was frozen before the current instance due to the presence of a source
3110 body. Update calls to Insert_After_Last_Decl.
3112 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3114 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3116 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3118 2011-08-31 Yannick Moy <moy@adacore.com>
3120 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3122 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3123 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3124 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3125 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3126 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3127 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3128 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3129 ALFA in Alfa (we dropped acronym).
3130 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3131 operations in a case where it returned previously No_Elist.
3133 2011-08-31 Robert Dewar <dewar@adacore.com>
3135 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3136 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3137 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3138 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3139 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3140 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3143 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3145 * sem_ch12 (Check_Private_View): Revert previous change.
3146 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3147 conversion is in a generic instance.
3149 2011-08-31 Matthew Heaney <heaney@adacore.com>
3151 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3152 * a-chtgbo.adb (Free): Allow 0 as index value.
3154 2011-08-31 Matthew Heaney <heaney@adacore.com>
3156 * a-cborma.adb (Insert): Add comment to explain why no element
3159 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3161 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3162 spec discriminant is already a concurrent type, in which case just use
3163 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3165 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3167 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3168 system-linux-mips.ads, system-linux-mipsel.ads,
3169 system-linux-mips64el.ads, system-linux-ppc64.ads,
3170 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3172 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3174 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3175 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3176 (build_unary_op): Likewise.
3178 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3180 * raise-gcc.c: Do not include coretypes.h and tm.h.
3181 (setup_to_install): Remove test for compiler macro.
3182 * targext.c: Document use for the library.
3183 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3185 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3187 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3188 the expression to the nominal type if the latter is a record type with
3189 a variant part and the type of the former is a record type without one.
3191 2011-08-30 Yannick Moy <moy@adacore.com>
3193 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3194 expansion in Alfa mode.
3195 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3196 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3198 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3199 * sem_res.adb: Ditto.
3200 * gcc-interface/Make-lang.in: Update dependencies.
3202 2011-08-30 Thomas Quinot <quinot@adacore.com>
3204 * g-socket.ads: Minor documentation adjustment.
3206 2011-08-30 Robert Dewar <dewar@adacore.com>
3208 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3210 2011-08-30 Yannick Moy <moy@adacore.com>
3212 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3213 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3214 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3215 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3216 Revert change which introduced files for "light"
3217 expansion, to be replaced by a single file for Alfa expansion.
3219 2011-08-30 Robert Dewar <dewar@adacore.com>
3221 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3222 Minor code reorg/reformatting.
3224 2011-08-30 Yannick Moy <moy@adacore.com>
3226 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3227 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3228 used for testing full expansion, that is active expansion not in the
3229 reduced mode for Alfa
3230 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3231 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3232 of the verbose (Expander_Active and not ALFA_Mode)
3234 2011-08-30 Tristan Gingold <gingold@adacore.com>
3236 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3237 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3238 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3239 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3241 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3243 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3244 access conversions to check that the conversion is a rewritten node,
3245 rather than just having Comes_From_Source set to False, which wasn't
3248 2011-08-30 Robert Dewar <dewar@adacore.com>
3250 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3251 g-socket.ads: Minor reformatting.
3253 2011-08-30 Thomas Quinot <quinot@adacore.com>
3255 * sem_util.adb: Minor reformatting.
3257 2011-08-30 Tristan Gingold <gingold@adacore.com>
3259 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3260 to be compliant with the ABI.
3262 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3264 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3265 of a designated type when the related access type is an actual in an
3266 instance. This ensures that the full view of designated type is
3267 available when inside the body of the instance.
3269 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3271 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3272 in a position to be modified, a slice is treated like an indexed
3275 2011-08-30 Thomas Quinot <quinot@adacore.com>
3277 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3278 field tv_sec in struct timeval.
3280 2011-08-30 Yannick Moy <moy@adacore.com>
3282 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3283 blocks of code doing full expansion, previously only guarded by
3284 Expander_Active, by anding the test that ALFA_Mode is not set
3286 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3288 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3289 add the function to the list of private dependents, for subsequent
3290 legality check on Taft amendment types.
3291 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3292 Private_Dependents, as for other incomplete types.
3293 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3294 Taft-amendment type is used as the return type of a function.
3296 2011-08-30 Javier Miranda <miranda@adacore.com>
3298 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3299 which emits an error by a call to a new routine which report the error.
3300 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3301 entity does not cover an existing interface.
3302 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3304 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3305 protected procedures or entries whose mode is not conformant.
3306 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3307 an error by a call to a new routine which report the error.
3309 2011-08-30 Robert Dewar <dewar@adacore.com>
3311 * gnat_rm.texi: Minor change.
3312 * exp_attr_light.adb: Minor reformatting.
3314 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3316 * sem_ch3.adb: Patch inheritance of aspects in
3317 Complete_Private_Subtype, to avoid infinite loop.
3319 2011-08-30 Javier Miranda <miranda@adacore.com>
3321 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3322 been reported and a subprogram covering an interface primitive is not
3323 found then skip generating the internal entity. Done to avoid crashing
3325 (Check_Abstract_Overriding): Change text of error of wrong formal of
3326 protected subprogram or entry. Done for consistency to emit exactly the
3327 same error reported by Check_Synchronized_Overriding. In addition, the
3328 error is restricted to protected types (bug found working on AI05-0090)
3330 2011-08-30 Yannick Moy <moy@adacore.com>
3332 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3333 expansion in Alfa mode.
3334 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3335 * exp_light.adb, exp_light.ads: New package defining light expansion.
3336 * expander.adb (Expand): Call light expansion in Alfa mode
3337 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3339 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3341 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3342 * gnat1drv.adb (Adjust_Global_Switches): Comment
3344 2011-08-30 Yannick Moy <moy@adacore.com>
3346 * lib-xref-alfa.adb: Minor refactoring.
3348 2011-08-30 Yannick Moy <moy@adacore.com>
3350 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3352 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3353 expansion in Alfa mode.
3354 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3357 2011-08-30 Robert Dewar <dewar@adacore.com>
3359 * debug_a.adb: Update comment.
3361 2011-08-30 Robert Dewar <dewar@adacore.com>
3363 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3364 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3365 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3366 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3368 2011-08-30 Robert Dewar <dewar@adacore.com>
3370 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3373 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3375 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3376 Build_Finalization_Master by supplying an insertion node and enclosing
3377 scope. In its old version, the call did not generate a finalization
3379 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3380 recognize anonymous access-to-controlled components. Rewrite the
3381 machinery which creates finalization masters to service anonymous
3382 access-to-controlled components of a record type. In its current state,
3383 only one heterogeneous master is necessary to handle multiple anonymous
3385 (Freeze_Type): Comment reformatting.
3386 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3388 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3389 associates TSS primitive Finalize_Address with either the master itself
3390 or with the internal hash table depending on the mode of operation of
3393 2011-08-30 Javier Miranda <miranda@adacore.com>
3395 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3396 interface type then do not generate code to compare this component.
3397 Required since they have no components and their equality operator is
3400 2011-08-30 Steve Baird <baird@adacore.com>
3402 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3403 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3404 returns the (static) accessibility level of the object. Otherwise, the
3405 same as Type_Access_Level.
3406 (Dynamic_Accessibility_Level): New function; given an expression which
3407 could occur as the rhs of an assignment to a saooaaat (i.e., an
3408 expression of an access-to-object type), return the new value for the
3409 saooaaat's associated Extra_Accessibility object.
3410 (Effective_Extra_Accessibility): New function; same as
3411 Einfo.Extra_Accessibility except that object renames are looked through.
3413 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3414 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3416 (Effective_Extra_Accessibility): New function; see sem_util.ads
3418 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3419 (Extra_Accessibility): Update comments.
3420 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3421 except RM_Size field (which is only for types) is unaffected.
3423 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3424 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3426 (Init_Size): Add assertion that we are not trashing the
3427 Extra_Accessibility attribute of an object.
3428 (Init_Size_Align): Add assertion that we are not trashing the
3429 Extra_Accessibility attribute of an object.
3430 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3431 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3432 differently for the type of a (non-library-level) saooaaat depending
3433 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3434 is queried in this set of changes - everything else (in particular,
3435 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3436 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3437 The special treatment of library-level saooaaats is an optimization,
3438 not required for correctnesss. This is based on the observation that the
3439 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3440 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3442 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3443 false for the type of a saooaaat, declare and initialize its
3444 accessibility level object and set the Extra_Accessibility attribute
3445 of the saooaaat to refer to this object.
3446 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3447 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3448 calls to Effective_Extra_Accessibility in order to support
3449 renames of saooaaats.
3450 (Expand_N_Type_Conversion): Add new local function,
3451 Has_Extra_Accessibility, and call it when determining whether an
3452 accessibility check is needed.
3453 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3454 evaluate to True (without raising an exception).
3456 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3457 saooaaat, update its associated Extra_Accessibility object (if
3458 it has one). This includes an accessibility check.
3459 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3460 a saooaaat, update its Extra_Accessibility object too (if it
3462 (Expand_Call): Replace a couple of calls to Type_Access_Level
3463 with calls to Dynamic_Access_Level to handle cases where
3464 passing a literal (any literal) is incorrect.
3465 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3466 checks associated with "Saooaat := Some_Object'Access;"; this must
3467 be rejected if Some_Object is declared in a more nested scope
3469 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3470 assignment to a saooaaat even if Is_Local_Anonymous_Access
3471 returns False for its type (indicating a 2012-style saooaaat).
3473 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3474 (which is only appropriate for objects, not types) with a call
3475 of Init_Object_Size_Align in order to avoid trashing the
3476 Extra_Accessibility attribute of a rename (the two attributes
3479 (Valid_Conversion) Replace six calls to Type_Access_Level with
3480 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3481 Ada2012 non-library-level saooaaat, the former returns library level
3482 while the latter returns the (static) accessibility level of the
3483 saooaaat. A type conversion to the anonymous type of a saooaaat
3484 can only occur as part of an assignment to the saooaaat, so we
3485 know that such a conversion must be in a lhs context, so Deepest
3486 yields the result that we need. If such a conversion could occur,
3487 say, as the operand of an equality operator, then this might not
3488 be right. Also add a test so that static accessibilty checks are
3489 performed for converting to a saooaaat's type even if
3490 Is_Local_Anonymous_Access yields False for the type.
3492 2011-08-30 Javier Miranda <miranda@adacore.com>
3494 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3495 controls generation of a warning associated with late declaration of
3496 dispatching functions. Required to avoid generating spurious
3499 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3501 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3502 return object has an anonymous access type and the function's type is
3503 a named access type.
3504 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3505 conversions on implicit conversions, since such conversions can occur
3506 for anonymous access cases due to expansion. Issue error for attempt
3507 to rename an anonymous expression as an object of a named access type.
3508 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3509 to indicate whether this function should report errors on invalid
3511 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3512 the expression is of an anonymous access type and the expected type is
3513 a named general access type, rewrite the expression as a type
3514 conversion, unless this is an expression of a membership test.
3515 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3516 calling of Error_Msg_N on new formal Report_Errs.
3517 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3518 calling of Error_Msg_NE on new formal Report_Errs.
3519 (Valid_Conversion): Move declaration of this function to the package
3520 spec, to allow calls from membership test processing. For Ada 2012,
3521 enforce legality restrictions on implicit conversions of anonymous
3522 access values to general access types, disallowing such conversions in
3523 cases where the expression has a dynamic accessibility level (access
3524 parameters, stand-alone anonymous access objects, or a component of a
3525 dereference of one of the first two cases).
3526 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3527 in the context of a named general access expected type.
3528 * exp_ch4.adb Add with and use of Exp_Ch2.
3529 (Expand_N_In): Add processing for membership tests applied to
3530 expressions of an anonymous access type. First, Valid_Conversion is
3531 called to check whether the test is statically False, and then the
3532 conversion is expanded to test that the expression's accessibility
3533 level is no deeper than that of the tested type. In the case of
3534 anonymous access-to-tagged types, a tagged membership test is applied
3536 (Tagged_Membership): Extend to handle access type cases, applying the
3537 test to the designated types.
3538 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3539 accessibility level, and the actual is a 'Access applied to a current
3540 instance, pass the accessibility level of the type of the current
3541 instance rather than applying Object_Access_Level to the prefix. Add a
3542 ??? comment, since this level isn't quite right either (will eventually
3543 need to pass an implicit level parameter to init procs).
3545 2011-08-30 Bob Duff <duff@adacore.com>
3547 * s-taskin.ads: Minor comment fix.
3549 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3551 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3552 component and the selector is a dispatching operation, check if it is
3553 a prefixed call before rewriting as a parameterless function call.
3555 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3557 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3558 tsystem.h into $(RTSDIR) instead of rts.
3560 2011-08-29 Robert Dewar <dewar@adacore.com>
3562 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3564 * gcc-interface/Make-lang.in: Update dependencies.
3566 2011-08-29 Yannick Moy <moy@adacore.com>
3568 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3569 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3570 table to hold dereferences.
3571 (Add_ALFA_Xrefs): Take into account dereferences as special
3572 reads/writes to the variable "HEAP".
3573 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3574 (Generate_Dereference): New procedure to store a read/write dereferencew
3576 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3577 the special "HEAP" var.
3578 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3580 * sem_util.adb (Note_Possible_Modification): Store write dereference
3583 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3585 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3586 ensures that the level of the subpool access type is not deeper than
3587 that of the pool object.
3588 * sem_util.adb (Object_Access_Level): Expand to handle defining
3590 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3591 subpool handle name of a rewritten allocator.
3593 2011-08-29 Robert Dewar <dewar@adacore.com>
3595 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3597 2011-08-29 Thomas Quinot <quinot@adacore.com>
3599 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3600 values, we generate multiple triples of parameters in the TypeCode.
3601 Bump Choice_Index for each such triple so that a subsequent default
3602 choice is associated with the correct index in the typecode.
3604 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3606 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3608 (First, Last): Handle properly an iterator over a null container.
3610 2011-08-29 Bob Duff <duff@adacore.com>
3612 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
3613 processing if we run across a node with no Scope. This can happen if
3614 we're with-ing an library-level instance, and that instance got errors
3615 that caused "instantiation abandoned".
3616 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
3617 an exception instead of using Assert, so it won't go into an infinite
3618 loop, even when assertions are turned off.
3620 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3622 * a-coorse.adb: Proper handling of empty ordered sets.
3624 2011-08-29 Johannes Kanig <kanig@adacore.com>
3626 * debug.adb: Add comments.
3628 2011-08-29 Thomas Quinot <quinot@adacore.com>
3630 * a-except.adb, a-except-2005.adb: Minor comment rewording and
3633 2011-08-29 Yannick Moy <moy@adacore.com>
3635 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
3636 declaration for Itypes in Alfa mode.
3638 2011-08-29 Robert Dewar <dewar@adacore.com>
3640 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
3641 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3642 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
3645 2011-08-29 Tristan Gingold <gingold@adacore.com>
3647 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
3649 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
3650 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
3653 2011-08-29 Robert Dewar <dewar@adacore.com>
3655 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
3657 2011-08-29 Javier Miranda <miranda@adacore.com>
3659 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
3660 renamings of formal subprograms when the actual for a formal type is
3663 2011-08-29 Matthew Heaney <heaney@adacore.com>
3665 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
3668 2011-08-29 Matthew Heaney <heaney@adacore.com>
3670 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
3671 components of record type.
3672 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
3675 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3677 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
3678 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
3681 2011-08-29 Robert Dewar <dewar@adacore.com>
3683 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
3686 2011-08-29 Matthew Heaney <heaney@adacore.com>
3688 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
3689 components of record type.
3691 2011-08-29 Bob Duff <duff@adacore.com>
3693 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
3694 by the termination handler.
3696 2011-08-29 Yannick Moy <moy@adacore.com>
3698 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
3699 created in Alfa mode, instead of inserting artificial declarations of
3700 non-Itypes in the tree.
3701 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
3702 know if an Itype has a corresponding declaration, as defined in
3705 2011-08-29 Yannick Moy <moy@adacore.com>
3707 * gnat1drv.adb: Minor rewrite.
3709 2011-08-29 Bob Duff <duff@adacore.com>
3711 * s-tasuti.adb (Make_Passive): Work around race condition in
3712 Make_Independent, which can cause Wait_Count to be zero. So instead of
3713 asserting that Wait_Count > 0, and then decrementing it, decrement it
3714 only if Wait_Count > 0.
3715 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
3716 should be nonnegative, so declare them Natural instead of Integer.
3718 2011-08-29 Robert Dewar <dewar@adacore.com>
3720 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
3721 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
3722 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
3723 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
3724 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
3726 2011-08-29 Tristan Gingold <gingold@adacore.com>
3728 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
3730 2011-08-29 Vadim Godunko <godunko@adacore.com>
3732 * s-parint.ads: Minor comment clarification.
3734 2011-08-29 Vincent Celier <celier@adacore.com>
3736 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
3737 may be used as identifiers.
3739 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3741 * a-coinho.ads: Minor reformating.
3743 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3745 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
3746 container of a derived type.
3748 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3750 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3751 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
3753 2011-08-29 Pascal Obry <obry@adacore.com>
3755 * exp_disp.adb: Minor comment fix.
3756 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
3757 to avoid warnings when compiling with -Wall.
3758 (Make_Disp_Conditional_Select_Body): Likewise.
3759 (Make_Disp_Timed_Select_Body): Likewise.
3761 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3763 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
3764 an entity name, generate reference for it.
3766 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3768 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
3770 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
3771 the class-wide type.
3772 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
3774 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3776 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
3777 subtype for an object whose type is an unconstrained union.
3779 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3781 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
3782 is allowed in a component definition, by AI95-406.
3784 2011-08-29 Matthew Heaney <heaney@adacore.com>
3786 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
3788 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3790 * a-except-2005.adb: Alphabetize all routines.
3791 (Triggered_By_Abort): New routine.
3792 * a-except-2005.ads (Triggered_By_Abort): New routine.
3793 * a-except.adb Alphabetize all routines.
3794 (Triggered_By_Abort): New routine.
3795 * a-except.ads (Triggered_By_Abort): New routine.
3796 * exp_ch7.adb: Update all comments involving the detection of aborts in
3798 (Build_Object_Declarations): Do not generate code to detect the
3799 presence of an abort at the start of finalization code, use a runtime
3801 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
3803 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
3804 allocate a task on a subpool.
3805 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
3806 The flag disables all actions related to the maintenance of
3807 Finalize_Address_Table when subpools are not in use.
3808 (Allocate_Any_Controlled): Signal the machinery that subpools are in
3810 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
3811 performs costly task locking when subpools are not in use.
3813 2011-08-29 Yannick Moy <moy@adacore.com>
3815 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
3816 types and dispatching calls in Alfa mode.
3817 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
3818 correspondance between body and spec scopes, to reuse utility functions
3819 (Traverse_Declarations_Or_Statements): Protect access to body for stub
3820 by testing the presence of the library unit for the body
3821 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
3822 mode the expansion of accept statements is skipped
3823 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
3824 the unique entity corresponding to the one returned by
3825 Unique_Defining_Entity applied to the enclosing declaration of the
3828 2011-08-29 Bob Duff <duff@adacore.com>
3830 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
3831 gdb when x is not a node (it can be a node list, name_id, etc). pp is
3832 an alias for pn. ppp is an alias for pt.
3834 2011-08-29 Javier Miranda <miranda@adacore.com>
3836 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
3837 aggregate to take a consistent decision on the need to convert into
3838 assignments aggregates that initialize constant objects.
3840 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3842 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
3843 Build_Allocate_Deallocate_Proc in order to handle allocation of
3844 non-controlled objects on subpools.
3845 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
3846 to be end-user visible.
3847 * s-finmas.adb: Add with and use clause for System.HTable.
3848 Add an instantiation of Simple_HTable which provides a mapping between
3849 the address of a controlled object and the corresponding
3850 Finalize_Address used to clean up the object. The table is used when a
3851 master is operating in heterogeneous mode.
3852 (Attach): Explain why the input node is not verified on being already
3854 (Delete_Finalize_Address): New routine.
3855 (Detach): Add pragma Assert which ensures that a node is already
3857 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
3858 since nodes are no longer removed on traversal. Explain why node
3859 detachment is undesirable in this case.
3860 (Get_Finalize_Address): New routine.
3861 (Hash): New routine.
3862 (Is_Empty_List): Removed.
3863 (pm): Renamed to Print_Master. Add output for discriminant
3865 Comment reformatting.
3866 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3867 * s-finmas.ads: Various comments additions / improvements.
3868 Type Finalization_Master has a discriminant which determines the mode of
3870 (Delete_Finalize_Address): New routine.
3871 (Get_Finalize_Address): New routine.
3872 (pm): Renamed to Print_Master.
3873 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3874 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
3875 use clause for System.IO.
3876 (Allocate_Any_Controlled): Add machinery to set TSS primitive
3877 Finalize_Address depending on the mode of allocation and the mode of
3879 (Deallocate_Any_Controlled): Remove the relation pair object -
3880 Finalize_Address regardless of the master mode. Add comment explaining
3882 (Detach): Ensure that fields Prev and Next are null after detachment.
3883 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
3884 scheme to check whether the list of subpools is empty. There is no
3885 longer need to store the next subpool or advance the current pointer.
3886 (Is_Empty_List): New routine.
3887 (Print_Pool): New routine.
3888 (Print_Subpool): New routine.
3889 * s-stposu.ads: Various comments additions / improvements.
3890 Field Master of type Root_Subpool is now a heterogeneous collection.
3891 (Print_Pool): New routine.
3892 (Print_Subpool): New routine.
3894 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3896 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
3897 forms, using aspects of container types.
3898 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
3899 Has_Implicit_Dereference flags, that may be set on the partial view.
3900 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
3901 container type with an indexing aspect.
3902 (Analyze_Quantified_Expression): Analyze construct with expansion
3903 disabled, because it will be rewritten as a loop during expansion.
3904 (Try_Container_Indexing): The prefix itself may be a container type
3905 with an indexing aspect, as with a vector of vectors.
3906 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
3907 the original doamin of iteration, for name capture.
3908 (Analyze_Iterator_Specification): If the domain is an expression that
3909 needs finalization, create a separate declaration for it.
3910 For an iterator with "of" retrieve default iterator info from aspect of
3911 container type. For "in" iterator, retrieve type of Iterate function.
3912 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
3913 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
3914 analysis, to prevent spurious errors about late attributes.
3915 * sprint.adb: Handle quantified expression with either loop or iterator
3917 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
3920 2011-08-29 Vincent Celier <celier@adacore.com>
3922 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
3923 Binder or Linker of the main project file.
3925 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3927 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
3930 2011-08-29 Yannick Moy <moy@adacore.com>
3932 * exp_ch9.adb: Partial revert of previous change for Alfa mode
3934 2011-08-29 Yannick Moy <moy@adacore.com>
3936 * exp_ch11.adb: Minor expansion of comment.
3938 2011-08-29 Yannick Moy <moy@adacore.com>
3940 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
3942 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3944 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
3945 interpretation, set the type before resolving the operands, because
3946 legality checks on an exponention operand need to know the type of the
3949 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3951 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
3952 cleanups on a master if the instance is within a generic unit.
3953 Complement to the corresponding fix to inline.adb for K520-030.
3955 2011-08-29 Tristan Gingold <gingold@adacore.com>
3957 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
3959 * exp_intr.adb: Minor comment fix.
3961 2011-08-29 Bob Duff <duff@adacore.com>
3963 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
3964 Delay_Required was used as an uninitialized variable.
3966 2011-08-29 Robert Dewar <dewar@adacore.com>
3968 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
3969 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
3970 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
3972 2011-08-29 Thomas Quinot <quinot@adacore.com>
3974 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
3975 Remove unused variables.
3977 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3979 * sem_res.adb: Remove Build_Explicit_Dereference.
3980 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
3981 from sem_res.adb, used in analysis of additional constructs.
3982 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
3983 expansion of iterators.
3984 (Is_Object_Reference): Recognize variables rewritten as explicit
3985 dereferences in Ada2012.
3986 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
3987 Reversible_Iterator names, for expansion of Ada2012 iterators.
3988 * aspects.ads, aspects.adb (Find_Aspect): Utility.
3989 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
3990 linked list container.
3991 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
3992 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
3994 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3996 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
3999 2011-08-29 Vincent Celier <celier@adacore.com>
4001 * make.adb (Gnatmake): Get the maximum number of simultaneous
4002 compilation processes after the Builder switches has been scanned, as
4003 there may include -jnn.
4005 2011-08-29 Matthew Heaney <heaney@adacore.com>
4007 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4009 2011-08-29 Tristan Gingold <gingold@adacore.com>
4011 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4012 GNAT_DRIVER_COMMAND_LINE to 255.
4014 2011-08-29 Pascal Obry <obry@adacore.com>
4016 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4017 reformatting and style fix (class attribute casing).
4019 2011-08-29 Yannick Moy <moy@adacore.com>
4021 * exp_ch11.adb: Yet another case where expansion should be common
4022 between CodePeer and Alfa.
4024 2011-08-29 Yannick Moy <moy@adacore.com>
4026 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4028 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4030 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4031 incomplete type and its completion match.
4033 2011-08-29 Yannick Moy <moy@adacore.com>
4035 * exp_ch13.adb: Adjust previous change.
4037 2011-08-29 Robert Dewar <dewar@adacore.com>
4039 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4040 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4043 2011-08-29 Emmanuel Briot <briot@adacore.com>
4045 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4046 initialize aggregated projects.
4048 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4050 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4051 depth of candidates to resolve a potentially spurious ambiguity between
4052 two visible subprograms.
4054 2011-08-29 Yannick Moy <moy@adacore.com>
4056 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4058 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4059 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4062 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4064 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4067 2011-08-29 Thomas Quinot <quinot@adacore.com>
4069 * sem_res.adb: Minor reformatting.
4071 2011-08-29 Johannes Kanig <kanig@adacore.com>
4073 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4075 * gnat1drv.adb (Adjust_Global_Switches): Set
4076 Use_Expressions_With_Actions to False in ALFA mode.
4077 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4080 2011-08-29 Yannick Moy <moy@adacore.com>
4082 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4083 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4084 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4085 tagged types and dispatching calls in Alfa mode.
4087 2011-08-29 Javier Miranda <miranda@adacore.com>
4089 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4090 we do not report an error on an Empty node.
4092 2011-08-29 Geert Bosch <bosch@adacore.com>
4094 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4095 a-nlrear.o and a-nurear.o.
4097 2011-08-29 Robert Dewar <dewar@adacore.com>
4099 * freeze.adb: Minor code reorganization.
4101 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4102 sem_ch6.adb: Minor reformatting
4104 2011-08-29 Tristan Gingold <gingold@adacore.com>
4106 * s-except.ads, s-except.adb: Provide dummy body.
4108 2011-08-29 Yannick Moy <moy@adacore.com>
4110 * sem_warn.adb (Within_Postcondition): Take into account the case of
4111 an Ensures component in a Test_Case.
4113 2011-08-29 Tristan Gingold <gingold@adacore.com>
4115 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4116 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4117 System_Exceptions_Debug
4118 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4119 * a-except.adb: With and use System.Exceptions_Debug instead of
4121 * a-except-2005.adb: Likewise.
4122 * s-assert.adb: Likewise.
4123 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4124 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4125 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4126 s-excdeb. Update dependencies.
4127 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4128 as these no longer need external libraries.
4130 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4132 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4133 exponentiation operator on universal values in a context that requires
4136 2011-08-29 Tristan Gingold <gingold@adacore.com>
4138 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4139 before calling notify_handled_exception.
4140 * a-exextr.adb: Fix comment.
4142 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4144 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4145 Finalize_Address of the access type's finalization master.
4146 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4147 access type's finalization master. Add a guard to prevent
4148 Associated_Storage_Pool from being set on .NET/JVM.
4149 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4150 attribute Finalize_Address of the access type's finalization master.
4151 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4152 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4153 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4155 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4156 use clause for System.IO
4157 (Detach): Relax the assertion, to be reinstated later.
4158 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4159 Relax the assertion on Finalize_Address, to be reinstated later.
4160 (Is_Empty_List): New routine.
4161 (pm): New debug routine.
4162 (Set_Finalize_Address): New routine.
4163 * s-finmas.ads (pm): New debug routine.
4164 (Set_Finalize_Address): New routine.
4165 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4167 2011-08-29 Tristan Gingold <gingold@adacore.com>
4169 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4170 Remove convention C.
4172 2011-08-29 Tristan Gingold <gingold@adacore.com>
4174 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4175 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4176 (Finalize_TCB): Remove its finalization.
4177 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4178 * s-soflin.adb (NT_Exc_Stack): Remove
4179 (Get_Exc_Stack_Addr_NT): Likewise.
4180 (Get_Exc_Stack_Addr_Soft): Likewise.
4181 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4182 (Get_Exc_Stack_Addr): Likewise.
4183 (Get_Exc_Stack_Addr_Soft): Likewise
4184 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4185 (Exc_Stack_Ptr_T): Likewise.
4186 (Private_Data): Remove Exc_Stack_Ptr component.
4188 2011-08-29 Tristan Gingold <gingold@adacore.com>
4190 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4192 2011-08-29 Tristan Gingold <gingold@adacore.com>
4194 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4196 2011-08-29 Geert Bosch <bosch@adacore.com>
4198 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4199 L2_Norm, Swap_Column): New generic subprograms
4200 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4201 L2_Norm, Swap_Column): Implement new subprograms in order to
4202 eliminate dependency on BLAS and LAPACK libraries in
4203 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4204 version. Forward_Eliminate/Back_Substitute can be used to put a
4205 matrix in row echelon or reduced row echelon form using partial
4207 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4208 Swap_Column): Instantiate from System.Generic_Array_Operations.
4209 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4210 (Sqrt): Local function for simple computation of square root without
4211 adding dependencies on Generic_Elementary_Functions.
4212 (Swap): New subprogram to exchange floating point numbers.
4213 (Inverse): Reimplement using Jordan-Gauss elimination.
4214 (Jacobi): New procedure implementing Jacobi's method for computation
4215 of eigensystems, based on Rutishauser's implementation.
4216 (L2_Norm): Implement directly using the inner product.
4217 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4218 decreasing eigenvalue as required by the Ada RM.
4219 (Swap_Column): New helper procedure for Sort_Eigensystem.
4220 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4221 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4224 2011-08-29 Thomas Quinot <quinot@adacore.com>
4226 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4229 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4231 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4232 than the current node.
4233 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4234 Finalization_Master. The list headers have two fields instead of three.
4235 This should fix alignment issue but subpool allocations are now
4236 unusable. Alphabetize subprograms.
4237 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4238 the size of the header when converting the beginning of the object to
4239 a FM_Node. Set the master's Finalize_Address attribute if not already
4241 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4242 header when converting the beginning of the object to a FM_Node.
4244 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4246 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4247 reraise when compiling for CodePeer.
4249 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4251 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4252 now needed by a-convec.adb. Fix warning.
4254 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4256 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4257 processing of TSS routine Finalize_Address when compiling in
4260 2011-08-29 Thomas Quinot <quinot@adacore.com>
4262 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4263 sem_warn.adb: Minor reformatting.
4265 2011-08-29 Emmanuel Briot <briot@adacore.com>
4267 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4268 languages from aggregated projects.
4270 2011-08-29 Yannick Moy <moy@adacore.com>
4272 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4273 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4274 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4275 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4276 for stubs are traversed too when parameter is set
4277 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4278 (Traverse_Declarations_Or_Statements): Do the special traversing for
4279 stubs when required.
4280 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4281 return subprogram or package body from stub.
4282 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4283 stubs without prior subprogram decl.
4285 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4287 * gnat_ugn.texi: Fix typo.
4289 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4291 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4292 which accounts for size vs alignment issues and calculates the size of
4294 (Deallocate_Any_Controlled): Ditto.
4295 (Nearest_Multiple_Rounded_Up): New routine.
4297 2011-08-29 Tristan Gingold <gingold@adacore.com>
4299 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4300 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4301 (Set_Exception_Msg): Ditto.
4302 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4304 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4305 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4306 (Raise_With_Msg): Remove Cleanup_Flag.
4307 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4308 Clean_Flag and Private_Data components.
4310 2011-08-29 Yannick Moy <moy@adacore.com>
4312 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4314 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4315 of an explicitly declared type, so that the base types of the original
4316 type and this generated type are the same, and a "type" (not a subtype
4318 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4319 small" in Alfa mode, like in CodePeer mode.
4320 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4321 clauses in Alfa mode.
4323 2011-08-29 Javier Miranda <miranda@adacore.com>
4325 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4326 function to the package spec.
4327 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4328 internally generated bodies of null procedures locate the internally
4329 generated spec enforcing mode conformance.
4330 (Is_Interface_Conformant): Ensure that the controlling formal of the
4333 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4335 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4336 reject the pragma if it appears to apply to a formal subprogram.
4338 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4340 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4341 inner expression, to prevent double evaluation.
4343 2011-08-29 Tristan Gingold <gingold@adacore.com>
4345 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4347 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4348 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4349 (Raise_Current_Excep): Adjust call.
4350 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4352 2011-08-29 Thomas Quinot <quinot@adacore.com>
4354 * exp_disp.adb: Minor reformatting.
4356 2011-08-29 Tristan Gingold <gingold@adacore.com>
4358 * a-exexpr.adb (Setup_Exception): Removed.
4359 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4360 * a-except.adb (Exception_Propagation): Removed.
4361 * a-except-2005.adb (Setup_Exception): Removed.
4362 (Reraise): Remove call to Setup_Exception.
4363 (Reraise_Occurrence): Ditto.
4364 (Reraise_Occurrence_Always): Ditto.
4365 (Reraise_Occurrence_No_Defer): Ditto.
4366 (Transfer_Occurrence): Ditto.
4367 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4368 (Set_Exception_Msg): Ditto.
4370 2011-08-29 Robert Dewar <dewar@adacore.com>
4372 * a-convec.adb, exp_disp.adb: Minor reformatting.
4374 2011-08-29 Tristan Gingold <gingold@adacore.com>
4376 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4378 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4380 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4381 Exception_Handlers to No_List instead of Empty_List in the case where
4382 there are no handlers.
4384 2011-08-29 Tristan Gingold <gingold@adacore.com>
4386 * gcc-interface/gigi.h (enum standard_datatypes): Add
4387 ADT_reraise_zcx_decl
4388 (reraise_zcx_decl): New macro.
4389 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4390 (gigi): Set reraise_zcx_decl.
4391 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4392 (gnat_to_gnu): Handle N_Raise_Statement.
4394 2011-08-29 Robert Dewar <dewar@adacore.com>
4396 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4397 a-undesu.adb: Minor reformatting.
4399 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4401 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4402 table, accept an unfrozen untagged component if it is an actual for a
4403 formal incomplete type.
4404 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4405 provide new iterator forms over vectors.
4406 Introduce type Iterator in package body to implement operations of
4407 Reversible_Iterator interface.
4408 * a-iteint.ads: Make package pure so it is usable with new container
4409 packages, that are categorized Remote_Types.
4411 2011-08-29 Robert Dewar <dewar@adacore.com>
4413 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4415 2011-08-29 Bob Duff <duff@adacore.com>
4417 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4418 of <>, because this is the routine that checks for dimensionality
4419 errors (for example, for a two-dimensional array, (others => <>) should
4420 be (others => (others => <>)).
4422 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4424 * impunit.adb: Add new run-time units.
4425 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4426 s-stposu.ads, s-stposu.adb: Code clean up.
4427 Handle protected class-wide or task class-wide types
4428 Handle C/C++/CIL/Java types.
4429 * s-spsufi.adb, s-spsufi.ads: New files.
4431 2011-08-29 Yannick Moy <moy@adacore.com>
4433 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4434 library-level subprogram.
4435 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4437 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4439 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4441 * gnat_rm.texi: Update doc for Test_Case pragma.
4443 2011-08-29 Tristan Gingold <gingold@adacore.com>
4445 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4447 (GCC_Exception_Access): New type.
4448 (Unwind_DeleteException): New imported procedure
4449 (Foreign_Exception): Import it.
4450 (GNAT_GCC_Exception): Simply have the occurrence inside.
4451 (To_GCC_Exception): New function.
4452 (To_GNAT_GCC_Exception): New function.
4453 (GNAT_GCC_Exception_Cleanup): New procedure..
4454 (Propagate_GCC_Exception): New procedure.
4455 (Reraise_GCC_Exception): New procedure.
4456 (Setup_Current_Excep): New procedure.
4457 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4458 (Unwind_RaiseException): Ditto.
4459 (Unwind_ForcedUnwind): Ditto.
4461 (Begin_Handler): Change type of parameter.
4462 (End_Handler): Ditto. Now delete the exception if still present.
4463 (Setup_Key): Removed.
4464 (Is_Setup_And_Not_Propagated): Removed.
4465 (Set_Setup_And_Not_Propagated): Ditto.
4466 (Clear_Setup_And_Not_Propagated): Ditto.
4467 (Save_Occurrence_And_Private): Ditto.
4468 (EID_For): Add 'not null' constraint on parameter.
4469 (Setup_Exception): Does nothing.
4470 (Propagate_Exception): Simplified.
4471 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4472 re-raise is not expanded anymore.
4473 * s-except.ads (Foreign_Exception): New exception - placeholder for
4475 * raise-gcc.c (__gnat_setup_current_excep): Declare
4476 (CXX_EXCEPTION_CLASS): Define (not yet used)
4477 (GNAT_EXCEPTION_CLASS): Define.
4478 (is_handled_by): Handle foreign exceptions.
4479 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4481 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4483 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4485 2011-08-29 Thomas Quinot <quinot@adacore.com>
4487 * a-synbar-posix.adb: Minor reformatting.
4489 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4491 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4492 a-exetim-default.ads (Interrupt_Clocks_Supported,
4493 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4494 definitions to be compliant with AI-0171. The target systems do not
4495 support separate account for the execution time of interrupt handlers.
4497 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4499 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4500 in the barrier to put first the easiest to evaluate (and the one which
4501 will be True more often). More efficient.
4503 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4505 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4507 2011-08-29 Bob Duff <duff@adacore.com>
4509 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4510 attributes that are now aspects, as specified by AI05-0229-1.
4511 * sem_ch13.adb (Analyze_Aspect_Specifications,
4512 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4513 pragmas or attribute references, as appropriate.
4515 2011-08-29 Robert Dewar <dewar@adacore.com>
4517 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4518 a-synbar-posix.ads: Minor reformatting.
4520 2011-08-29 Yannick Moy <moy@adacore.com>
4522 * snames.ads-tmpl: Add name Force.
4524 2011-08-29 Pascal Obry <obry@adacore.com>
4526 * prj-nmsc.adb: Minor reformatting.
4528 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4530 * a-exetim.ads (Interrupt_Clocks_Supported,
4531 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4532 definitions to be compliant with AI-0171.
4534 2011-08-29 Robert Dewar <dewar@adacore.com>
4536 * a-ngelfu.adb: Add comments.
4538 2011-08-29 Geert Bosch <bosch@adacore.com>
4540 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4541 the closest machine number to Pi / 2.0.
4543 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4545 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4546 package Ada.Synchronous_Barriers.
4547 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4548 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4549 default implementation using protected objects and another one
4550 a-synbar-posix using POSIX barriers as the underlying support.
4551 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4552 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4553 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4554 Clean up dependencies.
4555 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4557 2011-08-29 Robert Dewar <dewar@adacore.com>
4559 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4560 exp_dist.adb: Minor code reorganization.
4563 2011-08-29 Thomas Quinot <quinot@adacore.com>
4565 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4566 primitive operation must support external streaming if it is not a
4567 controlling access result.
4569 2011-08-29 Thomas Quinot <quinot@adacore.com>
4571 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4573 2011-08-29 Bob Duff <duff@adacore.com>
4575 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4576 restriction on allocators, as required by AI05-0013-1.
4577 * restrict.ads: Minor comment fix.
4579 2011-08-29 Tristan Gingold <gingold@adacore.com>
4581 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4582 (To_Jmpbuf_Address): Ditto
4583 (builtin_longjmp): Ditto
4585 2011-08-29 Thomas Quinot <quinot@adacore.com>
4587 * sem_res.adb: Minor reformatting.
4589 2011-08-29 Vincent Celier <celier@adacore.com>
4591 * make.adb (Gnatmake): Move special processing for VM targets after the
4592 call to Get_Target_Parameters.
4594 2011-08-29 Thomas Quinot <quinot@adacore.com>
4596 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4598 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4600 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4601 where an anonymous access discriminant of a limited designated type
4602 appears in a non-immutably limited discriminated type and issue an
4603 error message. Add local variable Desig_T and replace all occurrences
4606 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4608 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4609 implementation is compliant to RM D.15(15/2) after the modification
4610 imposed by AI05-0094-1 (binding interpretation).
4612 2011-08-29 Robert Dewar <dewar@adacore.com>
4614 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
4615 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
4617 2011-08-29 Thomas Quinot <quinot@adacore.com>
4619 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
4620 the scope name, do not report a missing label as a style violation (it
4621 will be diagnosed as an illegality).
4622 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
4623 variant records: Get_Enum_Lit_From_Pos already returns a usage
4624 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
4625 on Expr in Integer_Literal case so that it can be used by
4628 2011-08-29 Tristan Gingold <gingold@adacore.com>
4630 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
4632 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
4633 (Build_Abort_Block_Handler): New function to build an Abort_Signal
4635 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
4636 Build_Abort_Block_Handler to build the exception handler. Do not
4637 undefer aborts for the Abort_Signal exception handler if back-end
4638 exception mechanism.
4639 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
4640 back_end exceptions for all others and abort_signal.
4641 * s-except.ads (ZCX_By_Default): New constant.
4642 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
4643 (Raise_Exception_Always): Ditto.
4644 (Raise_From_Signal_Handler): Ditto.
4645 (Raise_With_Location_And_Msg): Ditto.
4646 (Raise_With_Msg): Ditto.
4648 (Reraise_Occurence): Ditto.
4649 (Reraise_Occurrence_Always): Ditto.
4650 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
4651 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
4653 2011-08-29 Thomas Quinot <quinot@adacore.com>
4655 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
4657 2011-08-29 Robert Dewar <dewar@adacore.com>
4659 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
4660 Minor code reorganization.
4662 2011-08-29 Bob Duff <duff@adacore.com>
4664 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
4665 2012, not just Ada 2005.
4667 2011-08-29 Vincent Celier <celier@adacore.com>
4669 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
4670 with a project file or with gprbuid, if -gnatep= is specified, the
4671 builder may need to be invoked with -x.
4673 2011-08-29 Tristan Gingold <gingold@adacore.com>
4675 * a-exexpr-gcc.adb: Minor comment fix.
4677 2011-08-29 Robert Dewar <dewar@adacore.com>
4679 * sem_ch8.adb: Minor reformatting.
4681 2011-08-29 Bob Duff <duff@adacore.com>
4683 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
4684 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
4685 treating "some" as unreserved in earlier Ada versions. This is now
4686 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
4687 rather than Name_Some, since Tok_Some is now recognized as reserved.
4688 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
4690 * scans.ads: Minor comment fixes.
4691 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
4692 for other language versions.
4693 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
4694 treating "some" as unreserved in earlier Ada versions. This is now
4695 handled in Snames.Is_Keyword_Name.
4696 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
4698 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
4699 unreserved in earlier Ada versions. This is now handled in
4700 Snames.Is_Keyword_Name.
4701 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
4702 words as for other language versions.
4703 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
4704 Ada 2012, not just Ada 2005.
4706 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4708 * sem_ch13.adb: Additional semantic checks for aspects involved in
4711 2011-08-29 Matthew Heaney <heaney@adacore.com>
4713 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
4714 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
4715 Container parameter.
4716 (Ancestor_Find): ditto.
4718 2011-08-29 Thomas Quinot <quinot@adacore.com>
4720 * par-endh.adb: Minor reformatting.
4722 2011-08-29 Tristan Gingold <gingold@adacore.com>
4724 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
4725 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
4726 (Adjust_N_CLeanups_For): Remove.
4727 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
4729 (Propgate_Exception): Adjust.
4730 * raise-gcc.c: Add a few static/const.
4731 (Adjust_N_Cleanups_For): Remove declaration.
4732 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
4734 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4736 * sem_ch8.adb: Use type of function return when rewriting as object
4739 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4741 * sem_type.adb: Minor reformatting.
4743 2011-08-29 Robert Dewar <dewar@adacore.com>
4745 * makeutl.adb: Minor reformatting.
4747 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4749 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
4750 function call of a limited type, the expansion of the renaming is
4751 complicated by the presence of various temporaries and subtypes that
4752 capture constraints of the renamed object.
4753 Rewrite node as an object declaration, whose expansion is simpler.
4754 Given that the object is limited there is no copy involved and no
4757 2011-08-29 Robert Dewar <dewar@adacore.com>
4759 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
4760 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
4762 2011-08-29 Tristan Gingold <gingold@adacore.com>
4764 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
4765 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
4766 system-linux-hppa.ads, system-linux-s390.ads,
4767 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
4768 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
4769 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
4770 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
4771 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
4772 system-solaris-sparc.ads, system-lynxos-x86.ads,
4773 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
4774 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
4775 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
4776 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
4777 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
4778 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
4779 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
4780 * opt.ads: Adjust comment.
4781 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
4782 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
4783 * system.ads: Move GCC_ZCX_Support to obsolete entries.
4785 2011-08-29 Emmanuel Briot <briot@adacore.com>
4787 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
4788 file name is specified on the gnatmake or gprbuild command line, and
4789 before we search for that file in the project.
4791 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4793 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
4794 used to determine whether a possible interpretation for an overloadable
4795 entity is declared within the current instantiation and should be
4796 included in the candidate set.
4798 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4800 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
4802 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4804 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
4805 access subtype is access_to_subprogram, when applying checks for
4808 2011-08-29 Matthew Heaney <heaney@adacore.com>
4810 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
4811 for sibling when common parent.
4813 2011-08-29 Thomas Quinot <quinot@adacore.com>
4815 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
4818 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4820 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
4821 for the return type when in ASIS mode.
4823 2011-08-29 Vincent Celier <celier@adacore.com>
4825 * make.adb (Gnatmake): Get the default search dirs, then the target
4826 parameters after getting the Builder switches, as the Builder switches
4827 may include --RTS= and that could change the default search dirs.
4829 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4831 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
4832 Make_Final_Call. Move the processing for class-wide types before the
4833 processing for derivations from [Limited_]Controlled.
4834 (Make_Final_Call): Move the processing for class-wide types before the
4835 processing for derivations from [Limited_]Controlled.
4836 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
4837 Add code to account for alignments larger than the list header. Add a
4838 comment illustrating the structure of the allocated object + padding +
4840 (Deallocate_Any_Controlled): Add code to account for alignments larger
4841 than the list header.
4843 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4845 * sinfo.ads, sinfo.adb: New node kind
4846 N_Formal_Incomplete_Type_Definition, related flags.
4847 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
4848 Parse formal incomplete types.
4849 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
4851 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
4852 Formal incomplete types do not need completion.
4853 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
4854 Validate_Incomplete_Type_Instance): New procedures to handle formal
4856 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
4857 that corresponds to a formal incomplete type.
4858 * sprint.adb: Handle formal incomplete type declarations.
4859 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
4862 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4864 * a-fihema.ads, a-fihema.adb: Unit removed.
4865 * a-undesu.ads, a-undesu.adb: New unit implementing
4866 Ada.Unchecked_Deallocate_Subpool.
4867 * einfo.adb: Remove Associated_Collection from the node usage.
4868 Add Finalization_Master to the node usage.
4869 (Associated_Collection): Removed.
4870 (Finalization_Master): New routine.
4871 (Set_Associated_Collection): Removed.
4872 (Set_Finalization_Master): New routine.
4873 (Write_Field23_Name): Remove Associated_Collection from the output. Add
4874 Finalization_Master to the output.
4875 * einfo.ads: Remove attribute Associated_Collection and its uses in
4877 Add new attribute Finalization_Master along with its uses in entitites.
4878 (Associated_Collection): Removed along with its pragma import.
4879 (Finalization_Master): New routine along with a pragma import.
4880 (Set_Associated_Collection): Removed along with its pragma import.
4881 (Set_Finalization_Master): New routine along with a pragma import.
4882 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
4883 Build_Finalization_Collection with Build_Finalization_Master.
4884 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
4885 before the bodies of the predefined routines. Add comment explaining
4886 this. Replace call to Build_Finalization_Collection with
4887 Build_Finalization_Master.
4888 (Freeze_Type): Replace call to Build_Finalization_Collection with
4889 Build_Finalization_Master.
4890 (Make_Finalize_Address_Body): Comment reformatting.
4891 (Make_Predefined_Primitive_Specs): Code reformatting.
4892 (Stream_Operation_OK): Update comment mentioning finalization
4893 collections. Replace RE_Finalization_Collection with
4894 RE_Finalization_Master.
4895 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
4896 Associated_Collection with Finalization_Master. Replace call to
4897 Build_Finalization_Collection with Build_Finalization_Master.
4898 (Expand_Allocator_Expression): Replace call to Associated_Collection
4899 with Finalization_Master. Replace call to Set_Associated_Collection with
4900 Set_Finalization_Master. Remove the generation of
4901 Set_Finalize_Address_Ptr.
4902 (Expand_N_Allocator): Replace call to Associated_Collection with
4903 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
4904 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
4905 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
4906 comment on usage. Replace call to Needs_BIP_Collection with
4907 Needs_BIP_Finalization_Master Remplace BIP_Collection with
4908 BIP_Finalization_Master. Update all comments which mention finalization
4909 collections. Replace Associated_Collection with
4910 Finalization_Master. Replace Build_Finalization_Collection with
4911 Build_Finalization_Master.
4912 (BIP_Formal_Suffix): Update BIP_Collection's case.
4913 (Build_Heap_Allocator): Update the related comment. Rename local
4914 variable Collect to Fin_Mas_Id and update its occurrences. Update
4915 comments which mention finalization collections. Replace
4916 Set_Associated_Collection with Set_Finalization_Master.
4917 (Expand_Call): Update the code which detects a special piece of library
4919 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
4920 Add_Collection_Actual_To_Build_In_Place_Call with
4921 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
4922 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
4923 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
4924 Add_Collection_Actual_To_Build_In_Place_Call with
4925 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4926 (Make_Build_In_Place_Call_In_Assignment): Replace call to
4927 Add_Collection_Actual_To_Build_In_Place_Call with
4928 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4929 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4930 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
4931 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4932 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
4933 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
4934 Replace call to Set_Associated_Collection with Set_Finalization_Master.
4935 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
4936 Replace the call to Associated_Collection with Finalization_Master.
4937 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
4938 Update the way finalization master names are generated. Update the
4939 retrieval of the correct access type which will carry the pool and
4941 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
4942 (Make_Finalize_Address_Body): Abstract types do not need
4943 Finalize_Address. Code reformatting.
4944 (Make_Finalize_Address_Stmts): Update comment on usage.
4945 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4946 (Process_Declarations): Update comments.
4947 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
4948 Build_Finalization_Master. Update associated comment.
4949 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4950 * exp_ch13.adb: Update comments which mention finalization collections.
4951 (Expand_N_Free_Statement): Replace the call to Associated_Collection
4952 with Finalization_Master.
4953 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
4954 create calls to routines Allocate_Any_Controlled and
4955 Deallocate_Any_Controlled.
4956 (Find_Finalize_Address): New routine.
4957 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
4959 (Requires_Cleanup_Actions): Update the comment on freeze node
4961 * exp_util.ads: Remove comment on generated code for
4962 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
4963 is better to simply look in the body.
4964 * freeze.adb (Freeze_All): Update the comment of finalization
4965 collections. Replace the call to Associated_Collection with
4966 Finalization_Master. Replace the call to Build_Finalization_Collection
4967 with Build_Finalization_Master.
4968 * impunit.adb: Add a-undesu and s-stposu to the list of units.
4969 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
4971 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
4972 Ada.Finalization. Add processing for children of System.Storage_Pools.
4973 * rtsfind.ads: Remove the naming of second level children of
4975 Remove Ada_Finalization_Heap_Management from the list of units.
4976 Remove subtype Ada_Finalization_Child.
4977 Remove the following subprogram entities:
4981 RE_Finalization_Collection
4982 RE_Finalization_Collection_Ptr
4983 RE_Set_Finalize_Address_Ptr
4985 Add the naming of second level children of System.Storage_Pools.
4986 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
4988 Add subtype System_Storage_Pools_Child.
4989 Add the following subprogram entities to System.Finalization_Masters:
4991 RE_Finalization_Master
4992 RE_Finalization_Master_Ptr
4994 Add the following subprogram entities to System.Storage_Pools.Subpools:
4996 RE_Allocate_Any_Controlled
4997 RE_Deallocate_Any_Controlled
4998 RE_Root_Storage_Pool_With_Subpools
5002 Move the following subprogram entities from
5003 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5005 RE_Add_Offset_To_Address
5010 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5011 Set_Associated_Collection with Set_Finalization_Master.
5012 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5013 BIP_Finalization_Master is created.
5014 * s-finmas.adb: New unit System.Finalization_Masters.
5015 * s-finmas.ads: New unit System.Finalization_Masters.
5016 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5017 * s-stposu.ads, s-stposu.adb: New unit implementing
5018 System.Storage_Pools.Subpools.
5020 2011-08-29 Bob Duff <duff@adacore.com>
5022 * tbuild.adb: Add assertion.
5024 2011-08-29 Thomas Quinot <quinot@adacore.com>
5026 * s-pooglo.adb: Minor reformatting.
5028 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5030 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5031 an indexed component of a packed array whose element type is a record
5032 with a representation clause different from that of the right-hand
5033 side, generate a temporary to minimuze the number of bit-field
5034 operations generated.
5036 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5038 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5039 declarations, and thus are likely insertion points for actions.
5041 2011-08-29 Bob Duff <duff@adacore.com>
5043 * einfo.ads: Minor comment fix.
5045 2011-08-29 Robert Dewar <dewar@adacore.com>
5047 * frontend.adb, gnat1drv.adb: Minor reformatting.
5049 2011-08-29 Tristan Gingold <gingold@adacore.com>
5051 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5052 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5053 space in front of the header.
5055 2011-08-29 Johannes Kanig <kanig@adacore.com>
5057 * frontend.adb (Frontend): Exit after creating Standard package when
5058 -gnatd.H is present.
5059 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5062 2011-08-29 Robert Dewar <dewar@adacore.com>
5064 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5065 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5066 snames.ads-tmpl: Minor reformatting.
5068 2011-08-29 Philippe Gil <gil@adacore.com>
5070 * prj.adb (Reset_Units_In_Table): New procedure.
5071 Reset units to avoid access to freed memory.
5073 2011-08-29 Thomas Quinot <quinot@adacore.com>
5075 * get_scos.adb: When reading a P statement SCO without a pragma name
5076 (from an older ALI file), ensure that the Pragma_Name component is set
5077 to Unknown_Pragma (not left uninitialized).
5079 2011-08-29 Vincent Celier <celier@adacore.com>
5081 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5082 modified to compute correctly the object path of a SAL project that is
5083 extending another library project.
5084 (Write_Path_File): New procedure.
5085 * makeutl.ads (Directories): New table moved from Buildgpr
5086 (Get_Directories): New procedure moved from Buildgpr
5087 (Write_Path_File): New procedure
5088 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5089 paths before binding SALs, instead of Set_Ada_Paths.
5090 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5092 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5093 (Current_Source_Path_File_Of): New function
5094 (Set_Current_Object_Path_File_Of): New procedure
5095 (Current_Source_Object_File_Of): New function
5096 (Set_Current_Object_Path_File_Of): New procedure
5097 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5098 (Current_Source_Path_File_Of): New function
5099 (Set_Current_Object_Path_File_Of): New procedure
5100 (Current_Source_Object_File_Of): New function
5101 (Set_Current_Object_Path_File_Of): New procedure
5103 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5105 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5106 packed entity, use a bit-field assignment only if there is no change of
5109 2011-08-29 Thomas Quinot <quinot@adacore.com>
5111 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5112 Is_RTU instead of using Chars comparisons.
5114 2011-08-29 Thomas Quinot <quinot@adacore.com>
5116 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5117 temporary object if the actual is constrained, and the discriminants
5118 read from the stream don't match.
5120 2011-08-29 Tristan Gingold <gingold@adacore.com>
5122 * sem_attr.adb, exp_attr.adb: Add handling of
5123 Attribute_System_Allocator_Alignment
5124 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5125 Attribute_System_Allocator_Alignment.
5126 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5127 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5128 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5129 get_target_system_allocator_alignment.
5131 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5133 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5136 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5138 * exp_ch3.adb (In_Runtime): Fix typo.
5140 2011-08-29 Bob Duff <duff@adacore.com>
5142 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5144 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5146 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5147 and a separate tag assignment is generated, ensure that the tag
5148 assignment is analyzed.
5150 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5152 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5153 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5154 of statement lists that may contain local declarations.
5155 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5156 duplicate the triggering statements needed for the expansion of this
5157 construct, when the trigger is a dispatching call to a synchronized
5160 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5162 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5163 * bindgen.adb: Add comments.
5164 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5167 2011-08-29 Robert Dewar <dewar@adacore.com>
5169 * exp_attr.adb: Minor reformatting.
5170 Minor code reorganization and commenting.
5171 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5174 2011-08-29 Thomas Quinot <quinot@adacore.com>
5176 * get_scos.adb: Ignore chaining indicators not currently supported
5179 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5181 * system.ads: Minor editing.
5183 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5185 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5187 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5188 Attribute_Elab_Subp_Body.
5189 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5190 * sem_util.adb: Update comments.
5192 2011-08-29 Thomas Quinot <quinot@adacore.com>
5194 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5195 pragma name for each SCO statement corresponding to a pragma.
5197 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5199 * opt.ads: Minor editing.
5201 2011-08-29 Yannick Moy <moy@adacore.com>
5203 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5204 that only made sense for CodePeer mode.
5206 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5208 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5209 which is no longer used.
5210 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5211 handling of the 64-bit division check.
5212 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5214 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5217 2011-08-29 Thomas Quinot <quinot@adacore.com>
5219 * get_scos.adb: Minor reformatting.
5221 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5223 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5224 statement list is wrapped in a block, the block is explicitly analyzed
5225 in order to properly redecorate the entities and create a servicing
5228 2011-08-29 Tristan Gingold <gingold@adacore.com>
5230 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5231 (Set_Zero_Cost_Handling): Remove.
5233 2011-08-29 Thomas Quinot <quinot@adacore.com>
5235 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5237 2011-08-29 Geert Bosch <bosch@adacore.com>
5239 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5240 instruction, as the latter may produce -0.0, which is not a valid VAX
5242 (Neg_G): Likewise for VAX F float.
5244 2011-08-29 Robert Dewar <dewar@adacore.com>
5246 * exp_util.adb: Minor reformatting.
5248 2011-08-29 Yannick Moy <moy@adacore.com>
5250 * sem_ch3.adb: Minor comment update.
5252 2011-08-29 Thomas Quinot <quinot@adacore.com>
5254 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5257 2011-08-29 Thomas Quinot <quinot@adacore.com>
5259 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5260 current statement sequence on a generic instantiation or a subprogram
5263 2011-08-29 Robert Dewar <dewar@adacore.com>
5265 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5268 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5270 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5271 Correct the check which involves the freeze node of a controlled or
5272 access-to-controlled type.
5274 2011-08-29 Geert Bosch <bosch@adacore.com>
5276 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5278 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5281 2011-08-29 Yannick Moy <moy@adacore.com>
5283 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5284 for every index type and component type that is not a subtype_mark.
5285 (Process_Subtype): Set Etype of subtype.
5287 2011-08-29 Robert Dewar <dewar@adacore.com>
5289 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5290 reorganization. Minor reformatting.
5292 2011-08-29 Steve Baird <baird@adacore.com>
5294 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5295 for CodePeer and ALFA modes.
5297 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5299 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5300 that comes from an enclosing scope if it is not the renaming of an
5301 actual, to handle properly a spurious ambiguity in an instance.
5303 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5305 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5306 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5307 use it instead of the Esize of the first parameter.
5308 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5310 <Size>: Likewise. Call it for composite types on the RM size.
5312 2011-08-29 Yannick Moy <moy@adacore.com>
5314 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5315 * sem_util.adb (Unique_Name): Correct behaviour for names of
5318 2011-08-29 Yannick Moy <moy@adacore.com>
5320 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5321 verification mode, analyze pragma expression for correctness, for
5322 pre/post on library-level subprogram, as it is not expanded later.
5324 2011-08-29 Yannick Moy <moy@adacore.com>
5326 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5327 in formal verification.
5329 2011-08-29 Thomas Quinot <quinot@adacore.com>
5331 * sem_util.adb: Minor reformatting.
5332 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5334 * par_sco.ads, par_sco.adb: Update comments.
5336 2011-08-29 Yannick Moy <moy@adacore.com>
5338 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5339 associated getter/setter.
5340 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5342 2011-08-29 Vincent Celier <celier@adacore.com>
5344 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5345 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5346 with declarations for Language_Kind and Dependency_Kind for Ada.
5347 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5348 (Process_Compiler): Take into account the new attributes Dependency_Kind
5350 (Check_Configuration): Check if language kind is unit based, not if the
5351 language name is Ada.
5352 (Process_Exceptions_Unit_Based): Ditto
5353 (Add_Language): Remove default additions of language and dependency kind
5354 * prj.ads: Minor comment change
5355 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5357 2011-08-29 Johannes Kanig <kanig@adacore.com>
5359 * debug.adb: Update comments.
5361 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5363 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5364 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5365 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5366 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5367 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5369 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5371 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5372 (GNATLIBCFLAGS_FOR_C): Replace
5373 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5374 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5375 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5376 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5378 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5380 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5382 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5384 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5386 2011-08-05 Nicolas Roche <roche@adacore.com>
5388 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5389 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5391 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5393 2011-08-05 Matthew Heaney <heaney@adacore.com>
5395 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5396 subprogram bodies declared out-of-order.
5398 2011-08-05 Yannick Moy <moy@adacore.com>
5400 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5401 entities directly in package Standard, otherwise skip the standard
5404 2011-08-05 Robert Dewar <dewar@adacore.com>
5406 * a-cbmutr.adb: Minor reformatting
5407 (Allocate_Node): refactor node allocation algorithm
5409 2011-08-05 Robert Dewar <dewar@adacore.com>
5411 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5412 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5414 (Analyze_Pragma, case Check_Policy): Ditto.
5415 * sem_prag.ads (Check_Disabled): New function
5416 * snames.ads-tmpl: Add Name_Disable.
5418 2011-08-05 Robert Dewar <dewar@adacore.com>
5420 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5421 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5423 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5425 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5426 that appears in a generic formal part and applies to a formal
5429 2011-08-05 Robert Dewar <dewar@adacore.com>
5431 * a-cbmutr.ads: Minor reformatting.
5433 2011-08-05 Matthew Heaney <heaney@adacore.com>
5435 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5436 to check count, check sign of value instead.
5437 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5438 (Copy_Subtree): allocate copy of source element
5439 (Equal_Subtree): compare elements, not access objects
5441 2011-08-05 Vincent Celier <celier@adacore.com>
5443 * gnat_ugn.texi: Fix VMS alternative.
5445 2011-08-05 Thomas Quinot <quinot@adacore.com>
5447 * sem_ch11.adb: Add comment.
5449 2011-08-05 Robert Dewar <dewar@adacore.com>
5451 * exp_util.adb: Minor comment fix.
5453 2011-08-05 Robert Dewar <dewar@adacore.com>
5455 * scng.adb (Error_Unterminated_String): Improve flag position when
5458 2011-08-05 Matthew Heaney <heaney@adacore.com>
5460 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5462 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5463 multiway tree containers.
5465 2011-08-05 Robert Dewar <dewar@adacore.com>
5467 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5468 * stylesw.adb: Implement -gnatyC to control comment spacing
5469 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5471 * usage.adb: Add line for -gnatyC.
5473 2011-08-05 Robert Dewar <dewar@adacore.com>
5475 * gnat_ugn.texi: Document -gnatyC.
5476 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5477 synonym for COMMENTS2).
5479 2011-08-05 Robert Dewar <dewar@adacore.com>
5481 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5482 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5483 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5484 a-comutr.ads, lib-xref.adb: Minor reformatting.
5486 2011-08-05 Robert Dewar <dewar@adacore.com>
5488 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5489 warning if there is an exception handler present.
5491 2011-08-05 Pascal Obry <obry@adacore.com>
5493 * a-iteint.ads: Fix copyright year.
5495 2011-08-05 Thomas Quinot <quinot@adacore.com>
5497 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5498 statement SCO for a USE clause or a representation clause.
5500 2011-08-05 Yannick Moy <moy@adacore.com>
5502 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5503 between body and spec for stub.
5504 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5505 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5506 pragma precondition or postcondition, for which the enclosing
5507 subprogram or package in the AST is not the desired one, return empty.
5509 2011-08-05 Thomas Quinot <quinot@adacore.com>
5511 * g-expect.adb: Minor reformatting.
5513 2011-08-05 Bob Duff <duff@adacore.com>
5515 * a-fihema.adb: Comment out OS_Lib.
5517 2011-08-05 Matthew Heaney <heaney@adacore.com>
5519 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5520 (unbounded multiway tree containers) and a-iteint.ads.
5521 * a-comutr.ads, a-comutr.adb:
5522 This is the new Ada 2012 unit for unbounded multiway tree containers
5523 * a-cimutr.ads, a-cimutr.adb
5524 This is the new Ada 2012 unit for indefinite multiway tree containers
5525 * a-iteint.ads: New file.
5527 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5529 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5531 2011-08-05 Bob Duff <duff@adacore.com>
5533 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5535 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5537 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5539 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5540 general indexing aspects of Ada2012. Called when analyzing indexed
5541 components when other interpretations fail.
5542 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5543 in an expression context where overloading is meaningful. This excludes
5544 the occurrence in an aspect specification (efficiency only).
5545 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5546 related to iterators can be set by an attribute specification, but
5548 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5549 Constant_Indexing and Variable_Indexing.
5550 (Check_Indexing_Functions): New procedure to perform legality checks.
5551 Additional semantic checks at end of declarations.
5553 2011-08-05 Sergey Rybin <rybin@adacore.com>
5555 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5556 order of calling Tree_Write/Tree_Read routines made for aspects.
5558 2011-08-05 Bob Duff <duff@adacore.com>
5560 * a-fihema.adb (Finalize): Fix race condition.
5562 2011-08-05 Yannick Moy <moy@adacore.com>
5564 * sem_ch12.adb (Analyze_Package_Instantiation,
5565 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5568 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5570 * sem_type.adb (Specific_Type): in an instance, the type-specific
5571 operand of an equality check that involves null may have a private
5572 type. Use full view to determine legality of construct.
5574 2011-08-05 Vincent Celier <celier@adacore.com>
5576 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5577 delete or close the file when the call to gnatmake was successful.
5579 2011-08-05 Yannick Moy <moy@adacore.com>
5581 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5582 Global_Discard_Names.
5584 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5586 * sinfo.ads: comments on use of entity field for aspect specifications.
5588 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5590 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5591 node is not itself an entity but a selected component, it is a
5592 rewritten parameterless call to an en enclosing synchronized operation,
5593 and this expansion will be performed again in the instance, so there is
5594 no global information to preserve.
5596 2011-08-05 Javier Miranda <miranda@adacore.com>
5598 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5599 for renamings of predefined primitives.
5600 (In_Predef_Prims_DT): New subprogram.
5602 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5604 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5605 possible interpretation of name is a reference type, add an
5606 interpretation that is the designated type of the reference
5607 discriminant of that type.
5608 * sem_res.adb (resolve): If the interpretation imposed by context is an
5609 implicit dereference, rewrite the node as the deference of the
5610 reference discriminant.
5611 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
5612 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
5613 parent type or base type.
5614 * sem_ch4.adb (Process_Indexed_Component,
5615 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
5616 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
5617 Check for implicit dereference.
5618 (List_Operand_Interps): Indicate when an implicit dereference is
5620 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
5622 2011-08-05 Thomas Quinot <quinot@adacore.com>
5624 * scos.ads: Update documentation of SCO table. Pragma statements can now
5625 be marked as disabled (using 'p' instead of 'P' as the statement kind).
5626 * par_sco.ads, par_sco.adb: Implement the above change.
5627 (Process_Decisions_Defer): Generate a P decision for the first parameter
5628 of a dyadic pragma Debug.
5629 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
5631 * put_scos.adb: Code simplification based on above change.
5633 2011-08-05 Robert Dewar <dewar@adacore.com>
5635 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
5636 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5637 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
5638 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
5640 2011-08-05 Bob Duff <duff@adacore.com>
5642 * a-stunau.ads, g-spipat.adb: Update comments.
5644 2011-08-05 Bob Duff <duff@adacore.com>
5646 * a-fihema.ads: Minor comment fix.
5647 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
5649 (Attach, Detach): Remove some unnecessary code.
5650 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
5652 2011-08-05 Bob Duff <duff@adacore.com>
5654 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
5655 allocation for Objects component. This simplifies the code somewhat. It
5656 is also a little more efficient in the not-so-unusual case where there
5657 are no controlled objects allocated.
5658 Make Finalization_Started flag atomic.
5659 (Finalize): Avoid unnecessary detachment of items from the list.
5660 (pcol): Minor cleanup.
5662 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5664 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
5665 package whose name is the same as that of the generic unit, or its
5668 2011-08-05 Bob Duff <duff@adacore.com>
5670 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
5671 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
5672 Minor comment fixes.
5674 2011-08-05 Arnaud Charlet <charlet@adacore.com>
5676 * make.adb (Linking_Phase): No longer need to set source search path
5677 before calling gnatlink in CodePeer mode.
5678 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
5679 gcc in CodePeer mode, since the binder generated file no longer has a
5681 * switch.ads, switch.adb (Is_Language_Switch): Removed.
5682 * switch-c.adb: Update comment.
5684 2011-08-05 Thomas Quinot <quinot@adacore.com>
5686 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
5688 2011-08-05 Nicolas Roche <roche@adacore.com>
5690 * gnat_ugn.texi: Fix minor syntax error issue.
5692 2011-08-05 Vincent Celier <celier@adacore.com>
5694 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5695 delete or close the file when the call to gnatmake returns a non
5696 successful return code.
5698 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5700 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
5701 check, indicate that the copy of the original node does not come from
5702 source, to prevent an infinite recursion of the expansion.
5704 2011-08-05 Johannes Kanig <kanig@adacore.com>
5706 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
5707 VC generation for subprogram bodies.
5709 2011-08-05 Yannick Moy <moy@adacore.com>
5712 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
5713 the base type with the smallest allowed base type.
5715 2011-08-05 Sergey Rybin <rybin@adacore.com>
5717 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
5720 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5722 * sem_ch12.ads: minor comment updates.
5724 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5726 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
5727 instantiation and a formal package the compiler generates a package
5728 renaming declaration so that the generic name within the declaration
5729 is interpreted as a renaming of the instance. At the end of a formal
5730 package declaration, this renaming must become invisible.
5732 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5734 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
5735 comparison and rely on concrete entities instead.
5737 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5739 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
5740 and discriminants, to indicate that the type has an access discriminant
5741 that supports implicit dereference.
5742 * snames.ads-tmpl: Add names of aspects and attributes related to
5743 Ada2012 iterators: constant_indexing, default_iterator,
5744 iterator_element, implicit_dereference, variable_indexing.
5745 * aspects.ads, aspects.adb: entries for iterator-related aspects.
5746 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
5747 iterator-related aspects.
5748 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
5750 2011-08-05 Sergey Rybin <rybin@adacore.com>
5752 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
5753 metrics in gnatmetric to cover new kinds of coupling mentrics.
5755 2011-08-05 Steve Baird <baird@adacore.com>
5757 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
5758 of calling the user-defined main subprogram.
5759 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
5760 is set) Call_Main_Subprogram ahead of, as opposed to
5762 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
5763 generation of a "with" of the user-defined main subprogram.
5764 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
5765 (which is now called from Gen_Main instead).
5767 2011-08-05 Emmanuel Briot <briot@adacore.com>
5769 * projects.texi: Added reference to the Makefile package.
5771 2011-08-05 Thomas Quinot <quinot@adacore.com>
5773 * exp_ch7.adb: Minor comment rewording.
5775 2011-08-05 Ed Falis <falis@adacore.com>
5777 * env.c: Fix comment.
5779 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5781 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
5782 character comparison and rely on concrete entities instead.
5784 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5786 * sem_ch3.adb: (Check_Private_Overriding): better error message,
5787 suggested by AI95-0068.
5789 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5791 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
5792 the two potential initialization calls. This accounts for any
5793 access-before-elaboration checks which may precede the initialization
5795 (Next_Suitable_Statement): New routine. Returns the next real statement
5796 after the input node while skipping generated checks.
5797 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
5798 with comment on usage.
5799 Do not generate Elaborate_All when the trigger is a finalization call
5800 coming from a type init proc.
5801 (Check_Elab_Call): Propagate the initialization procedure context to
5802 subsequent calls to Check_A_Call.
5803 (Check_Internal_Call_Continue): Propagate the initialization procedure
5804 context to subsequent calls to Check_Elab_Call.
5805 (Is_Finalization_Procedure): New routine. Returns True if the input
5806 entity denotes a [Deep_]Finalize routine.
5807 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
5808 along with comment on usage.
5810 2011-08-05 Vadim Godunko <godunko@adacore.com>
5812 * s-atocou.ads: Add list of supported platforms.
5814 2011-08-05 Yannick Moy <moy@adacore.com>
5816 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
5818 * opt.ads (Disable_ALI_File): new Boolean flag
5819 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
5821 2011-08-05 Ed Falis <falis@adacore.com>
5823 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
5824 environ is properly defined.
5826 2011-08-05 Vincent Celier <celier@adacore.com>
5828 * make.adb (Compilation_Phase): Exit immediately when all objects have
5829 been found up to date, to avoid multiple exit messages.
5830 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
5831 same project for languages with no compiler.
5832 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
5834 2011-08-05 Robert Dewar <dewar@adacore.com>
5836 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
5837 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
5838 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
5839 s-atocou-builtin.adb: Minor reformatting.
5841 2011-08-05 Yannick Moy <moy@adacore.com>
5843 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
5844 if the node to wrap is a pragma check, this node and enclosed
5845 expression are not expanded, so do not apply any transformations here.
5846 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
5847 introducing transient scopes.
5849 2011-08-05 Jose Ruiz <ruiz@adacore.com>
5851 * adaint.c (__gnat_set_writable, __gnat_set_readable,
5852 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
5853 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
5854 routine is available, so we use the default implementation of these
5856 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
5857 support for copying attributes on VxWorks 6.
5859 2011-08-05 Yannick Moy <moy@adacore.com>
5861 * debug.adb: Remove use of -gnatd.D.
5862 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
5863 * opt.ads: Simplify variables for ALFA mode, to keep one only
5864 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
5867 2011-08-05 Vincent Celier <celier@adacore.com>
5869 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
5870 Builder'Default_Switches.
5872 2011-08-05 Vincent Celier <celier@adacore.com>
5874 * makeusg.adb: Add lines for --create-map-file switches.
5876 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5878 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
5879 profile is incomplete and the full view is available, replace it with
5881 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
5882 incomplete, freezing the subprogram is delayed until the full view is
5884 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
5885 fixed-point multiplication operator and the predefined operator is
5886 resolved in favor of the user-defined one.
5888 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5890 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
5893 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5895 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
5896 whether a type lacks user-defined Read or Write operations, or has a
5897 component that lacks them.
5898 * sem_attr.adb (Check_Stream_Attribute): if restriction
5899 No_Default_Stream_Attributes is active, verify that all subcomponent
5900 types of the target have user-defined stream operations, and report
5902 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
5903 * exp_strm.adb: Build_Elementary_Input_Call,
5904 Build_Elementary_Write_Call): remove checks for restriction
5905 No_Default_Stream_Attributes, now checked in semantics.
5907 2011-08-04 Vincent Celier <celier@adacore.com>
5909 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
5910 switches on the command line, look for all valid --RTS switches in the
5911 Builder switches and for each language use the first runtime name found
5912 to invoke gprconfig.
5913 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
5914 command line and there is no auto-configuration.
5915 (Runtime_Name_Set_For): New function.
5917 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5919 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
5920 elaborate initialization expression for variable Abort when processing
5921 a package body or a declaration.
5922 (Create_Finalizer): Propagate the package context when creating the
5923 exception-related variables.
5924 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
5925 For_Package along with usage comment.
5927 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5929 * gcc-interface/Makefile.in: Clean up targets.
5930 Enable new package for atomic counters and copy-on-write implementation
5931 of unbounded strings on x86 platforms.
5932 * gcc-interface/Make-lang.in: Update dependencies.
5934 2011-08-04 Robert Dewar <dewar@adacore.com>
5936 * exp_ch7.adb: Minor reformatting.
5938 2011-08-04 Robert Dewar <dewar@adacore.com>
5940 * exp_strm.adb: Minor reformatting.
5942 2011-08-04 Vadim Godunko <godunko@adacore.com>
5944 * s-atocou.adb: Replace by dummy version and use on targets where atomic
5945 operations are not supported.
5946 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
5947 * s-atocou-x86.adb: New file.
5948 * Makefile.rtl: Add s-atocou.o file
5950 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5952 * make.adb (Compile): Move setting of CodePeer_Mode to ...
5953 (Compilation_Phase): ... here.
5954 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
5956 2011-08-04 Thomas Quinot <quinot@adacore.com>
5958 * Make-generated.in: Fix minor typo in comment.
5960 2011-08-04 Thomas Quinot <quinot@adacore.com>
5962 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
5965 2011-08-04 Robert Dewar <dewar@adacore.com>
5967 * a-coinho.adb: Minor reformatting.
5969 2011-08-04 Robert Dewar <dewar@adacore.com>
5971 * a-coinho.ads: Minor reformatting.
5973 2011-08-04 Vadim Godunko <godunko@adacore.com>
5975 * s-atocou.ads, s-atocou.adb: New files.
5976 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
5977 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
5978 direct use of GCC's atomic builtins and replace them by use of new
5979 atomic counter package.
5981 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5983 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
5985 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5987 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
5988 with a call to Get_External_Tag.
5989 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
5990 subprogram usage. Remove the guard against package declarations and
5991 bodies since Build_Cleanup_Statements is no longer invoked in that
5993 (Build_Components): Initialize Tagged_Type_Stmts when the context
5994 contains at least one library-level tagged type.
5995 (Build_Finalizer): New local variables Has_Tagged_Types and
5996 Tagged_Type_Stmts along with associated comments on usage. Update the
5997 logic to include tagged type processing.
5998 (Create_Finalizer): Insert all library-level tagged type unregistration
5999 code before the jump block circuitry.
6000 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6001 (Expand_N_Package_Declaration): Remove the call to
6002 Build_Cleanup_Statements.
6003 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6004 unregister the external tag of a tagged type.
6005 (Processing_Actions): Reimplemented to handle tagged types.
6006 (Process_Declarations): Detect the declaration of a library-level
6007 tagged type and carry out the appropriate actions.
6008 (Unregister_Tagged_Types): Removed. The machinery has been directly
6009 merged with Build_Finalizer.
6011 2011-08-04 Robert Dewar <dewar@adacore.com>
6013 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6014 gnatls.adb, exp_ch3.adb: Minor reformatting.
6016 2011-08-04 Marc Sango <sango@adacore.com>
6018 * sem_attr.adb (Analyze_Attribute): Replace the message
6019 "invisible attribute of}" of the spark restriction violation in
6020 attribute reference by the simple message "invisible attribute of type".
6021 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6022 two insertion characters: '&' and '}'.
6024 2011-08-04 Vadim Godunko <godunko@adacore.com>
6026 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6027 * a-coinho.ads, a-coinho.adb: New file.
6028 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6030 2011-08-04 Nicolas Roche <roche@adacore.com>
6032 * alfa_test.adb: Not all ali files are containing alfa information even
6033 if compiled with -gnatd.F. So suppress warning about missing ALFA
6036 2011-08-04 Yannick Moy <moy@adacore.com>
6038 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6040 * put_alfa.adb: Check that scope name is not empty.
6042 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6044 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6045 Needs_Elementary_Stream_Operation, to determine whether user-defined
6046 Read and Write attributes are available for the elementary components
6047 of the given type. If only the predefined attributes are available,
6048 then when restriction No_Default_Stream_Attributes is active the
6049 predefined stream attributes for the composite type cannot be created.
6051 2011-08-04 Robert Dewar <dewar@adacore.com>
6053 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6054 Put routines in alpha order
6056 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6058 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6059 * gcc-interface/Make-lang.in: Update dependencies.
6061 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6063 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6064 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6067 2011-08-04 Robert Dewar <dewar@adacore.com>
6069 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6070 lib-xref-alfa.adb: Minor reformatting.
6072 2011-08-04 Marc Sango <sango@adacore.com>
6074 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6075 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6076 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6079 2011-08-04 Tristan Gingold <gingold@adacore.com>
6081 * bindgen.adb (Gen_Adainit_C): Remove.
6082 (Gen_Adafinal_C): Ditto.
6083 (Gen_Elab_Externals_C): Ditto.
6084 (Gen_Elab_Calls_C): Ditto.
6085 (Gen_Elab_Order_C): Ditto.
6086 (Gen_Elab_Defs_C): Ditto.
6087 (Gen_Finalize_Library_C): Ditto.
6088 (Gen_Finalize_Library_Defs_C): Ditto.
6089 (Gen_Main_C): Ditto.
6090 (Gen_Output_File_C): Ditto.
6091 (Gen_Restrictions_C): Ditto.
6092 (Gen_Versions_C): Ditto.
6093 (Write_Info_Ada_C): Ditto.
6094 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6095 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6096 Always call Gen_Output_File_Ada.
6097 * gnatlink.adb (Begin_Info): Now a constant.
6099 (Ada_Bind_File): Remove
6100 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6101 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6102 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6103 * opt.ads (Ada_Bind_File): Remove.
6105 2011-08-04 Thomas Quinot <quinot@adacore.com>
6107 * projects.texi: Document target-specific directory in default project
6110 2011-08-04 Thomas Quinot <quinot@adacore.com>
6112 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6115 2011-08-04 Yannick Moy <moy@adacore.com>
6117 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6118 opt.ads, lib-xref.ads: Code clean up.
6120 2011-08-04 Yannick Moy <moy@adacore.com>
6122 * gnat_rm.texi: Update description of Test_Case
6123 * gnat_ugn.texi: Typo.
6125 2011-08-04 Ed Falis <falis@adacore.com>
6127 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6129 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6131 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6132 it is of type Root_Controlled. This action eliminates fields Prev and
6133 Next from type equality.
6135 2011-08-04 Yannick Moy <moy@adacore.com>
6137 * lib-xref-alfa.adb: Correct typo.
6139 2011-08-04 Matthew Heaney <heaney@adacore.com>
6141 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6144 2011-08-04 Yannick Moy <moy@adacore.com>
6146 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6147 (Analyze_Pragma): allow static string expression for name of Test_Case,
6148 instead of simply string literals.
6149 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6152 2011-08-04 Vincent Celier <celier@adacore.com>
6154 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6155 case suffixes to find truncated main sources.
6157 2011-08-04 Tristan Gingold <gingold@adacore.com>
6159 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6160 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6161 (Compute_Current_Task): Ditto.
6163 2011-08-04 Tristan Gingold <gingold@adacore.com>
6165 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6167 2011-08-04 Yannick Moy <moy@adacore.com>
6169 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6170 library-level constant.
6171 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6172 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6173 used as selector of parameter association, in ALFA mode.
6175 2011-08-04 Robert Dewar <dewar@adacore.com>
6177 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6178 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6181 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6183 * make.adb (Linking_Phase): Set source search path before calling
6184 gnatlink in CodePeer mode.
6186 2011-08-04 Javier Miranda <miranda@adacore.com>
6188 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6189 Remove code which takes care of building TSDs.
6190 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6191 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6192 the accessibility check in VM targets.
6193 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6194 (Building_Static_DT): Now returns false for VM targets.
6195 (Build_VM_TSDs): Removed.
6196 (Expand_Interface_Conversion): Generate missing runtime check for
6197 conversions to interface types whose target type is unknown at compile
6199 (Make_VM_TSD): Add missing code to disable the generation of calls to
6200 Check_TSD if the tagged type is not defined at library level, or not
6201 has a representation clause specifying its external tag, or -gnatdQ is
6203 * exp_disp.ads (Build_VM_TSDs): Removed.
6204 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6205 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6206 register primitives in the dispatch tables in VM targets.
6207 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6208 initialization of class-wide interface objects in VM targets.
6209 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6212 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6214 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6215 when dotnet-ld cannot be found.
6217 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6219 * bindgen.adb: Simplify significantly generation of binder body file in
6221 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6222 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6225 2011-08-04 Yannick Moy <moy@adacore.com>
6227 * sem_prag.adb, sem.ads: Code cleanup.
6229 2011-08-04 Tristan Gingold <gingold@adacore.com>
6231 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6232 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6233 results if possible.
6234 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6235 * gnat_ugn.texi: Update dynamic stack usage section.
6237 2011-08-04 Steve Baird <baird@adacore.com>
6239 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6240 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6241 contains only a call to the user-defined main subprogram.
6242 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6243 call the "wrapper" subprogram instead of directly
6244 calling the user-defined main subprogram.
6246 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6248 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6249 alternatives of a case statement for controlled objects. Rename local
6250 variable A to Dead_Alt.
6251 (Expand_N_If_Statement): Check the then and else statements of an if
6252 statement for controlled objects. Check the then statements of all
6253 elsif parts of an if statement for controlled objects.
6254 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6256 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6257 detects a loop associated with the expansion of an array object.
6258 Augment the processing of the loop statements to account for a possible
6259 wrap done by Process_Statements_For_Controlled_Objects.
6260 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6261 statements and abortable part of an asynchronous select for controlled
6263 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6264 conditional entry call for controlled objects.
6265 (Expand_N_Selective_Accept): Check the alternatives of a selective
6266 accept for controlled objects.
6267 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6268 alternatives of a timed entry call for controlled objects.
6269 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6270 exception handler for controlled objects.
6271 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6272 Add formal parameter Nested_Constructs along with its associated
6274 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6275 Requires_Cleanup_Actions.
6276 (Process_Statements_For_Controlled_Objects): New routine.
6277 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6278 routine. Inspect a node which contains a non-handled sequence of
6279 statements for controlled objects. If such an object is found, the
6280 statements are wrapped in a block.
6282 2011-08-04 Bob Duff <duff@adacore.com>
6284 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6285 need to compare with Class_Wide_Type (T2), in order to get at the
6286 original class-wide type node.
6287 * sem_type.ads (Covers): Improve the comment.
6288 * einfo.ads (Class_Wide_Type): Improve the comment.
6289 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6290 the type of the Deref.
6292 2011-08-04 Yannick Moy <moy@adacore.com>
6294 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6295 separate declarations.
6296 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6297 check identifier of pragma argument.
6298 (Chain_TC): check that no other test case associated to the same entity
6299 share the same name.
6300 (Check_Test_Case): disallow test case inside subprogram body
6301 (Analyze_Pragma): correct call to check identifier and not argument
6302 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6303 function gets name from test case pragma.
6305 2011-08-04 Yannick Moy <moy@adacore.com>
6307 * gnat_rm.texi: Document new pragma and aspect.
6308 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6309 (No_Duplicates_Allowed): new constant array defining whether duplicates
6310 aspects of each kind can appear on the same declaration.
6311 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6312 field, which points to a node holding the previous Spec_PPC_List.
6313 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6314 through the indirection with Contract.
6315 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6316 * par-prag.adb (Prag): do nothing on Test_Case pragma
6317 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6319 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6320 component Ensures of Test_Case.
6321 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6322 (Analyze_Generic_Subprogram_Declaration,
6323 Analyze_Subprogram_Instantiation,
6324 Analyze_Abstract_Subprogram_Declaration,
6325 Analyze_Subprogram_Body_Helper,
6326 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6327 insert contract in subprogram node at point of definition
6329 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6330 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6331 corresponding pragma
6332 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6333 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6334 similar to the analysis of pre/post
6335 (Derive_Subprogram): insert contract in subprogram node at point of
6337 * sem_prag.adb, sem_prag.ads
6338 (Check_Arg_Is_String_Literal, Check_Identifier):
6339 new checking procedures to be called in treatment of pragmas
6340 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6341 pragma is well-formed. This does not check currently that 'Result is
6342 used only in the Ensures component of a Test_Case.
6343 (Analyze_Pragma): add case for Test_Case
6344 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6345 components of a Test_Case.
6346 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6347 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6348 pragma, treated as spec expressions.
6349 (Sig_Flags): add value -1 for Test_Case.
6350 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6351 Get_Requires_From_Test_Case_Pragma): getters for both expression
6352 components of a Test_Case.
6353 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6354 indirection between an entry or [generic] subprogram entity and its
6355 pre/post + test-cases.
6356 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6357 get/set for fields of an N_Contract node.
6358 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6359 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6360 names and pragma for Test_Case.
6361 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6363 2011-08-04 Vincent Celier <celier@adacore.com>
6365 * gnat_ugn.texi: Improve documentation of gnatmake switch
6366 --source-info-file=.
6368 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6370 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6371 type). Initialize Atyp to the appropriate type which is later checked
6372 for completion. Rewrite the assertion associated with private type
6375 2011-08-04 Ed Falis <falis@adacore.com>
6377 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6378 initialize the number of CPUs.
6380 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6382 * sem_type.adb (Disambiguate): New subsidiary routine
6383 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6384 equality on an anonymous access type whose designated type is private
6385 does not lead to an ambiguity with the universal access equality
6386 operator in the body or child units of the defining package. The same
6387 is true for a multiplication operator on a private type completed with
6390 2011-08-04 Javier Miranda <miranda@adacore.com>
6392 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6393 (Normalize_Scalars_Config): Removed.
6395 (Register_Opt_Config_Switches): Remove registering config values of
6396 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6397 (Restore_Opt_Config_Switches): Remove code which restores the values of
6398 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6399 Init_Or_Norm_Scalars.
6400 (Save_Opt_Config_Switches): Remove code which saves values of
6401 Init_Or_Norm_Scalars and Normalize_Scalars.
6402 (Set_Opt_Config_Switches): Remove code which restores config values of
6403 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6404 Init_Or_Norm_Scalars.
6406 2011-08-04 Yannick Moy <moy@adacore.com>
6408 * frontend.adb (Frontend): remove previous patch to avoid full
6409 qualification in ALFA mode.
6410 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6411 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6412 unique name for an entity, which could be used to identify the entity
6413 across compilation units.
6415 2011-08-04 Thomas Quinot <quinot@adacore.com>
6418 (Initialize_Default_Project_Path): Add target specific directory
6419 ($prefix/$target/lib/gnat) in front of project path in all cases
6420 (making gnatmake's behaviour consistent with gprbuild).
6421 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6422 Pass target name from Sdefault to project subsystem.
6423 * gnatls.adb: Show new target specific default project directory.
6425 2011-08-04 Johannes Kanig <kanig@adacore.com>
6427 * cstand.adb: Add Information to Identifier in Standard
6428 (Identifer_For): Set Entity to the corresponding entity
6430 2011-08-04 Sergey Rybin <rybin@adacore.com>
6432 * gnat_ugn.texi: Update doc on gnatcheck.
6434 2011-08-04 Yannick Moy <moy@adacore.com>
6436 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6439 2011-08-04 Yannick Moy <moy@adacore.com>
6441 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6442 performing expansion.
6443 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6444 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6445 it is not called in ALFA mode.
6447 2011-08-04 Emmanuel Briot <briot@adacore.com>
6449 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6450 after all, so removed.
6452 2011-08-04 Sergey Rybin <rybin@adacore.com>
6454 * vms_data.ads: Add missing VMS qualifiers.
6456 2011-08-04 Emmanuel Briot <briot@adacore.com>
6458 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6459 the list of files on the command line after processing it through
6462 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6464 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6465 processing for .NET/JVM. These targets can now benefit from
6466 Raise_From_Controlled_Operation and they share the same processing with
6468 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6469 These targets need transient scopes in order to properly finalize short
6470 lived controlled objects.
6471 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6472 NET/JVM. These targets can now benefit from
6473 Raise_From_Controlled_Operation and they share the same processing with
6476 2011-08-04 Geert Bosch <bosch@adacore.com>
6478 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6480 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6482 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6483 Expand_Record_Aggregate, to determine whether aggregate must be
6484 expanded into assignments. This is the case if the ancestor part is
6485 private, regarless of the setting of the flag Has_Private_Ancestor.
6487 2011-08-04 Ed Falis <falis@adacore.com>
6489 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6491 2011-08-04 Bob Duff <duff@adacore.com>
6493 * sinfo.ads: Fix comment.
6495 2011-08-04 Steve Baird <baird@adacore.com>
6497 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6498 choose a package name in much the same way as is
6499 done for JGNAT when VM_Target /= No_VM, except that
6500 a slightly more distinctive prefix string is used.
6502 2011-08-04 Emmanuel Briot <briot@adacore.com>
6504 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6505 gnatmake command line.
6506 This behavior was never documented (and was supported only because of
6507 an early bug in the code). This case might lead to ambiguous cases
6508 (between unit names and truncated base names without suffixes).
6510 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6512 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6513 Remove the external tag of a tagged type from the internal hash table.
6514 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6515 expanded usage of the routine. Strenghten the check for Is_Master. Add
6516 processing for tagged types.
6517 (Build_Finalizer): Create all the necessary lists used in finalizer
6518 creation when the processed context is a package that may contain
6520 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6521 Requires_Cleanup_Actions.
6522 (Expand_N_Package_Body): Package bodies may need clean up code
6523 depending on whether they contain tagged types.
6524 (Expand_N_Package_Declaration): Package declarations may need clean up
6525 code depending on whether they contain tagged types.
6526 (Unregister_Tagged_Types): New routine. Search through a list of
6527 declarations or statements, looking for non-abstract Ada tagged types.
6528 For each such type, generate code to unregister the external tag.
6529 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6530 Requires_Cleanup_Actions.
6531 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6532 through a list of declarations or statements looking for non-abstract
6533 Ada tagged types or controlled objects.
6534 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6535 Requires_Cleanup_Actions.
6536 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6537 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6540 2011-08-04 Vincent Celier <celier@adacore.com>
6542 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6543 has Ada sources, not project Project, because if the root project
6544 Project has no sources of its own, all projects will be deemed without
6547 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6549 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6550 of the No_Param_Proc acc-to-subp type used for initialization of
6551 __gnat_finalize_library_objects so that it's declared at library level
6552 rather than nested inside of the adainit routine.
6554 2011-08-04 Javier Miranda <miranda@adacore.com>
6556 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6557 if the tagged type has a representation clause which specifies its
6560 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6562 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6563 Remove previous procedure with that name.
6564 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6566 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6567 subtype mark, the ancestor cannot have unknown discriminants.
6568 (Resolve_Record_Aggregate): if the type has invisible components
6569 because of a private ancestor, the aggregate is illegal.
6571 2011-08-04 Vincent Celier <celier@adacore.com>
6573 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6574 account switches -gnat2005, -gnat12 and -gnat2012.
6576 2011-08-04 Bob Duff <duff@adacore.com>
6578 * s-tasdeb.ads: Minor comment fix.
6580 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6582 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6584 * switch.ads, switch.adb (Is_Language_Switch): New function.
6586 2011-08-04 Vincent Celier <celier@adacore.com>
6588 * switch-c.adb: Minor comment addition.
6590 2011-08-04 Vincent Celier <celier@adacore.com>
6592 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6593 ending with '=' is followed by a space (missing file name).
6595 2011-08-04 Pascal Obry <obry@adacore.com>
6597 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6599 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6601 * sem_ch12.adb (Analyze_Associations): New routine
6602 Check_Overloaded_Formal_Subprogram to reject a formal package when
6603 there is a named association or a box initialisation for an overloaded
6604 formal subprogram of the corresponding generic.
6606 2011-08-04 Yannick Moy <moy@adacore.com>
6608 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6609 * get_alfa.adb, put_alfa.adb: Read and write new component of
6611 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
6613 2011-08-04 Pascal Obry <obry@adacore.com>
6615 * urealp.adb: Minor reformatting.
6617 2011-08-04 Tristan Gingold <gingold@adacore.com>
6619 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
6620 Handle the case when Cleanup_Protected_Object returns Empty.
6622 2011-08-04 Yannick Moy <moy@adacore.com>
6624 * frontend.adb (Frontend): only qualify names in non-ALFA mode
6626 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6628 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
6629 call, ignore functions.
6631 2011-08-04 Geert Bosch <bosch@adacore.com>
6633 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
6636 2011-08-04 Emmanuel Briot <briot@adacore.com>
6638 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
6639 as an index for Builder'Switches. This conforms to the documentation.
6640 * make.adb (Insert_Project_Sources): avoid duplicate code
6642 2011-08-04 Emmanuel Briot <briot@adacore.com>
6644 * makeutl.adb (Complete_Mains): if the user has passed a relative file
6645 name on the command line (for instance "../dummy"), never assume it can
6648 2011-08-04 Tristan Gingold <gingold@adacore.com>
6650 * bindgen.adb: Remove code the reference or create the
6651 Break_Start/__gnat_break_start procedure.
6652 * s-stalib.adb (Break_Start): Removed.
6654 2011-08-04 Emmanuel Briot <briot@adacore.com>
6656 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
6657 shared with gprbuild.
6659 2011-08-04 Yannick Moy <moy@adacore.com>
6661 * par-ch4.adb (P_Primary): preferentially issue an error message about
6662 a missing parenthesis arount a conditional or case expression in Ada
6663 2012 mode, if we detect that the alignment is not correct for a
6666 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6668 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
6669 tag-to-class-wide conversion as needing finalization actions.
6670 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
6671 a tag-to-class-wide conversion as needing finalization actions.
6672 (Is_Finalizable_Transient): The result of a tag-to-class-wide
6673 conversion does not need finalization actions.
6674 (Is_Tag_To_CW_Conversion): New routine.
6675 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
6676 whether an object is the result of a tag-to-class-wide conversion.
6678 2011-08-04 Yannick Moy <moy@adacore.com>
6680 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
6681 the left-hand-side and right-hand-side of a conjunct are inserted when
6682 translating a pre- or postcondition
6683 * sem_ch6.adb: Correct typo in comment
6685 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6687 * gnat_rm.texi: Ravenscar does not prohibit dependence on
6688 Unchecked_Conversion and Unchecked_Deallocation.
6690 2011-08-04 Thomas Quinot <quinot@adacore.com>
6692 * make.adb: Minor reformatting.
6694 2011-08-04 Emmanuel Briot <briot@adacore.com>
6696 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
6697 sources in the project and its imported projects, but not in the whole
6700 2011-08-04 Emmanuel Briot <briot@adacore.com>
6702 * make.adb: Remove debug trace.
6704 2011-08-04 Vincent Celier <celier@adacore.com>
6706 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
6707 path in canonical form, to be able to compare path names on platforms
6708 such as Windows or Darwin.
6710 2011-08-04 Thomas Quinot <quinot@adacore.com>
6712 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
6713 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
6714 * scos.ads: Update documentation accordingly.
6715 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
6718 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6720 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
6721 attribute only if prefix type is scalar.
6723 2011-08-04 Emmanuel Briot <briot@adacore.com>
6725 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
6726 in gnatmake for specifying mains on the command line that do not belong
6727 to the main project. These mains must currently all belong to the same
6729 (Ultimate_Extension_Of): removed, since duplicated
6730 Ultimate_Extending_Project.
6732 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6734 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
6736 (CodePeer_Mode_String): New.
6737 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
6739 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
6740 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
6741 mode, since no useful elaboration subprogram is needed by CodePeer.
6742 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
6743 In this mode, compile binder file with -gnatC and do stop after this
6746 2011-08-04 Vincent Celier <celier@adacore.com>
6748 * exp_ch7.adb: Minor comment fix.
6750 2011-08-04 Robert Dewar <dewar@adacore.com>
6752 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
6753 exp_ch4.adb, makeutl.adb: Minor reformatting.
6755 2011-08-04 Emmanuel Briot <briot@adacore.com>
6757 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
6758 Create several new subprograms to move code out of Make. This makes the
6759 code more readable, removes code duplication, and is a preparation work
6760 for adding support for aggregate projects.
6762 2011-08-04 Tristan Gingold <gingold@adacore.com>
6764 * s-po32gl.ads, s-po32gl.adb: New files.
6765 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
6766 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
6767 (Build_Finalization_Collection): Use it.
6768 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
6769 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
6771 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
6772 * gcc-interface/Make-lang.in: Update dependencies.
6774 2011-08-04 Emmanuel Briot <briot@adacore.com>
6776 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
6779 2011-08-04 Emmanuel Briot <briot@adacore.com>
6781 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
6782 command line is not a file name, also check whether it could be a unit
6785 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6787 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
6788 the header of the finalization routine.
6789 If the unit has no finalizer but is a body whose spec has one, then
6790 generate the decrement of the elaboration entity only.
6791 If the unit has a finalizer and is a spec, then do not generate the
6792 decrement of the elaboration entity.
6793 (Gen_Finalize_Library_C): Likewise.
6795 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6797 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
6798 (Bounds_Size_Expression): Removed.
6799 (Double_Alignment_Of): New subsidiary routine.
6800 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
6801 for a hole in the dope vector of unconstrained arrays due to different
6802 index and element alignments.
6804 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6806 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
6807 raise program_error because body has not been seen yet.
6809 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6811 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
6814 2011-08-04 Vincent Celier <celier@adacore.com>
6816 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
6818 2011-08-04 Yannick Moy <moy@adacore.com>
6820 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
6821 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
6823 2011-08-04 Thomas Quinot <quinot@adacore.com>
6825 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
6826 instantiation in RCI.
6828 2011-08-04 Emmanuel Briot <briot@adacore.com>
6830 * make.adb: Share more code with gprbuild
6832 2011-08-04 Emmanuel Briot <briot@adacore.com>
6834 * projects.texi: Added documentation for the IDE'Gnat project file
6837 2011-08-04 Nicolas Roche <roche@adacore.com>
6839 * gnat_rm.texi: Minor editing.
6841 2011-08-04 Javier Miranda <miranda@adacore.com>
6843 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
6844 and the library case for VM targets.
6845 (Gen_Adainit_Ada): Likewise.
6847 2011-08-04 Robert Dewar <dewar@adacore.com>
6849 * g-altive.ads: Minor comment updates.
6850 * prj-nmsc.adb: Minor reformatting.
6852 2011-08-04 Javier Miranda <miranda@adacore.com>
6855 (Normalize_Scalars_Config): Value of the configuration switch set by
6856 pragma Normalize_Scalars when it appears in the gnat.adc file.
6857 (Normalize_Scalars): New field for record Config_Switches_Type. Used
6858 to save and restore settings of this pragma.
6860 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
6861 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
6863 2011-08-04 Vincent Celier <celier@adacore.com>
6865 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
6867 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6869 * makeutl.adb: Minor reformatting.
6871 2011-08-04 Olivier Hainque <hainque@adacore.com>
6873 * g-altive.ads: Update comments to reflect that only the soft
6874 binding is available today.
6876 2011-08-04 Robert Dewar <dewar@adacore.com>
6878 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
6879 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
6880 * gcc-interface/Make-lang.in: Update dependencies.
6882 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6884 * prj-env.adb: Remove local debug traces.
6886 2011-08-04 Yannick Moy <moy@adacore.com>
6888 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
6889 was used instead of Hi_OK, which could cause a read of an uninitialized
6890 value later on. Detected while working on the new warning.
6891 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
6893 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
6894 in more cases, in order to detect more unreferenced values.
6895 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
6896 object for expression, if any.
6898 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6900 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
6901 the operand types instead of the Esize.
6903 2011-08-04 Steve Baird <baird@adacore.com>
6905 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
6906 enable CodePeer_Mode.
6907 * bindusg.adb (Display): Add help message describing -P binder switch.
6908 * gnat_ugn.texi: Document -P binder switch.
6909 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
6910 user-defined main program directly.
6911 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
6912 user-defined main program in the context clause of the package body.
6914 2011-08-04 Yannick Moy <moy@adacore.com>
6916 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
6917 duplicate of Defining_Entity
6918 (Get_Unique_Entity_For_Decl): rename function into
6919 Unique_Defining_Entity
6920 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
6921 (Formal_Proof_On): remove synthesized flag
6922 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6923 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
6924 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
6925 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
6926 Annotate (Formal_Proof)
6928 2011-08-04 Emmanuel Briot <briot@adacore.com>
6930 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
6931 source files with non-standard naming schemes, in imported projects
6933 2011-08-04 Emmanuel Briot <briot@adacore.com>
6935 * makeutl.adb (Complete_Mains): when a multi-unit source file is
6936 specified on the gprbuild command line, we need to compile all units
6937 within that file, not just the first one we find
6938 Fix error message for mains that are not found.
6940 2011-08-04 Thomas Quinot <quinot@adacore.com>
6942 * sem_ch6.adb: Update comment.
6943 * sem_ch12.adb: Minor reformatting.
6945 2011-08-04 Bob Duff <duff@adacore.com>
6947 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
6948 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
6949 race condition whose symptom is to fail to lock Parent. That, in turn,
6950 causes Parent.Awake_Count to be accessed without locking Parent, which
6951 causes another race condition whose symptom is that Parent.Awake_Count
6952 can be off by 1 (either too high or too low). The solution is to lock
6953 Parent unconditionally, and then lock Acceptor, before reading
6954 Acceptor.Terminate_Alternative.
6956 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6958 * debug.adb: Update comment.
6960 2011-08-04 Robert Dewar <dewar@adacore.com>
6962 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
6963 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
6964 exp_ch6.adb: Minor reformatting.
6966 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6968 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
6971 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6973 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
6975 2011-08-04 Thomas Quinot <quinot@adacore.com>
6977 * sinfo.ads: Minor reformatting.
6979 2011-08-04 Emmanuel Briot <briot@adacore.com>
6981 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
6982 even if there is no location.
6984 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6986 * sem_res.adb, sem_ch4.adb: move check for restriction
6987 No_Task_Hierarchy to resolve_allocator.
6989 2011-08-04 Thomas Quinot <quinot@adacore.com>
6991 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
6992 This flag of N_Pragma nodes is not used, remove it as well as all of
6993 the associated circuitry.
6995 2011-08-04 Javier Miranda <miranda@adacore.com>
6997 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
6998 runtime check on duplicated externa tags
6999 * debug.adb Document switch -gnatdQ.
7001 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7003 * a-fihema.ads: Minor typo fix.
7005 2011-08-04 Yannick Moy <moy@adacore.com>
7007 * sem_ch10.adb: Minor comment update.
7009 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7011 * einfo.adb: Update the node field usage to reflect the renaming of
7012 Return_Flag to Return_ Flag_Or_Transient_Decl.
7013 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7014 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7015 (Write_Field15_Name): Change Return_Flag to
7016 Return_Flag_Or_Transient_Decl.
7017 * einfo.ads: Rename node field Return_Flag to
7018 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7019 occurrences in entities.
7020 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7021 associated Inline pragma.
7022 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7023 associated Inline pragma.
7024 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7026 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7027 Return_Flag and Set_Return_Flag.
7028 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7029 objects generated for controlled transients declared inside an
7030 Exception_With_Actions. Update the calls to Return_Flag.
7031 (Process_Object_Declaration): Add code to add a null guard for hook
7032 objects generated for controlled transients declared inside an
7033 Exception_With_Actions. Update related comment.
7034 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7035 objects generated for controlled transients declared inside an
7036 Exception_With_Actions. Update the calls to Return_Flag.
7037 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7039 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7041 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7042 positional aggregate.
7044 2011-08-04 Vincent Celier <celier@adacore.com>
7046 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7047 SLOC only for pragmas.
7049 2011-08-04 Emmanuel Briot <briot@adacore.com>
7051 * projects.texi: Minor typo fix.
7053 2011-08-04 Emmanuel Briot <briot@adacore.com>
7055 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7056 on case-sensitive file systems.
7058 2011-08-04 Thomas Quinot <quinot@adacore.com>
7060 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7061 nested in a disabled pragma.
7062 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7063 enclosing pragma, if any, for X decisions.
7065 2011-08-04 Thomas Quinot <quinot@adacore.com>
7067 * sem_prag.adb: Minor reformatting.
7069 2011-08-04 Vincent Celier <celier@adacore.com>
7071 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7072 allowed in no run time mode.
7074 2011-08-04 Vincent Celier <celier@adacore.com>
7076 * make.adb (Check): When -gnatc is used, check for the source file
7077 inside the ALI file with a canonical case file name.
7079 2011-08-04 Emmanuel Briot <briot@adacore.com>
7081 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7082 overriding the separator.
7084 2011-08-04 Robert Dewar <dewar@adacore.com>
7086 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7087 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7089 2011-08-04 Robert Dewar <dewar@adacore.com>
7091 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7093 2011-08-04 Yannick Moy <moy@adacore.com>
7095 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7096 'Result only appears in postcondition of function.
7098 2011-08-04 Thomas Quinot <quinot@adacore.com>
7100 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7101 external tag, include the value of the external tag in the exception
7104 2011-08-04 Yannick Moy <moy@adacore.com>
7106 * sem_attr.adb (Result): modify error message for misplaced 'Result
7108 2011-08-04 Sergey Rybin <rybin@adacore.com>
7110 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7111 clear that the second argument must be an identifier.
7113 2011-08-04 Thomas Quinot <quinot@adacore.com>
7115 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7116 -fpreserve-control-flow, insert an IF statement on the barrier
7117 condition to ensure that a conditional branch instruction is generated.
7119 2011-08-04 Emmanuel Briot <briot@adacore.com>
7121 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7122 (Processing_Flags.Ignore_Missing_With): new flag.
7124 2011-08-04 Emmanuel Briot <briot@adacore.com>
7126 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7127 Source_List_File on case-insensitive systems where the file is actually
7128 on a case-sensitive file system (NFS,...).
7130 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7132 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7133 function return contains a controlled [extension] aggregate and the
7134 return statement is not part of a handled sequence of statements, wrap
7135 the return in a block. This ensures that all controlled temporaries
7136 generated during aggregate resolution will be picked up by the
7137 finalization machinery.
7139 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7141 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7142 components, freeze type before resolution, to ensure that default
7143 initializations are present for all components.
7144 * sem_res.adb (Resolve_Actuals): the designated object of an
7145 accces-to-constant type is a legal actual in a call to an
7146 initialization procedure.
7148 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7150 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7151 N_Unchecked_Type_Conversion to the possible containers of a renamed
7154 2011-08-04 Yannick Moy <moy@adacore.com>
7156 * par-ch13.adb (Aspect_Specifications_Present): recognize
7157 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7158 is issued in Strict mode.
7159 * par.adb: Fix typos in comments.
7161 2011-08-04 Yannick Moy <moy@adacore.com>
7163 * sem_attr.adb (Result): modify error message to take into account Post
7164 aspect when compiling Ada 2012 (or newer) code.
7166 2011-08-04 Nicolas Roche <roche@adacore.com>
7168 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7169 remove need for GCC exceptions.
7171 2011-08-04 Vincent Celier <celier@adacore.com>
7173 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7174 project, not the source file name.
7175 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7176 excluded, continue looking. This excluded source will only be returned
7177 if there is no other source with the same base name that is not locally
7180 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7182 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7183 private and one of the operands is a real literal, use a qualified
7184 expression rather than a conversion which is not meaningful to the
7187 2011-08-04 Yannick Moy <moy@adacore.com>
7189 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7190 corresponding aspect X'Class are allowed, proceed with analysis of the
7191 aspect instead of skipping it.
7193 2011-08-04 Tristan Gingold <gingold@adacore.com>
7195 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7196 This will allow to have an Ada implementation for the subprogram.
7198 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7200 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7201 completion and aspects are present, apply them to the entity for the
7202 type which is currently the partial view, but which is the one that
7204 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7205 applies to a partial view, indicate that the full view has predicates
7206 and delayed aspects.
7207 (Replace_Type_Reference): Handle properly predicates that apply to the
7208 full view of a private completion.
7210 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7212 * layout.adb (Layout_Type): For composite types, do not set Esize.
7213 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7215 (Size_Known): Look at the RM size of components instead of the Esize.
7216 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7217 issue warning and activate Implicit_Packing.
7218 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7219 if the Esize is not known.
7220 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7221 for elementary types only.
7222 (Analyze_Record_Representation_Clause): Look at the RM size instead
7223 of the Esize to issue errors.
7224 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7226 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7228 Look at the RM size instead of the Esize for types if the latter is
7230 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7232 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7234 * sem_type.adb: proper handling of equality not involving anonymous
7237 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7239 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7240 Vis_Decls. When creating a library-level finalizer for a package spec,
7241 both the declaration and body of the finalizer are inserted either in
7242 the visible or private declarations of the package spec.
7244 2011-08-04 Javier Miranda <miranda@adacore.com>
7246 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7247 use of the full-view of a type when invoking Is_Ancestor.
7248 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7249 the full-view of private parents is requested, then use also the
7250 full-view of the parent of the first derivation.
7252 2011-08-04 Tristan Gingold <gingold@adacore.com>
7254 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7255 instead of the locally imported procedure.
7256 * s-taprop-mingw.adb (Enter_Task): Ditto.
7257 * s-valrea.adb (Scan_Real): Ditto.
7258 * s-imgrea.adb (Set_Image_Real): Ditto.
7259 * s-flocon.ads: Make the package pure.
7261 2011-08-04 Thomas Quinot <quinot@adacore.com>
7263 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7264 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7265 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7266 New subprogram, moved here from...
7267 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7268 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7269 rewriting of the last argument into a procedure call statement here...
7270 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7273 2011-08-04 Thomas Quinot <quinot@adacore.com>
7275 * par_sco.adb: Minor reformatting.
7277 2011-08-04 Robert Dewar <dewar@adacore.com>
7279 * erroutc.adb: Minor reformatting.
7281 2011-08-04 Thomas Quinot <quinot@adacore.com>
7283 * par_sco.adb: Comment update.
7285 2011-08-04 Tristan Gingold <gingold@adacore.com>
7287 * s-flocon.ads: New file.
7288 * g-flocon.ads: Now a renaming of s-flocon.
7289 * Makefile.rtl: Add s-flocon.o
7291 2011-08-04 Javier Miranda <miranda@adacore.com>
7293 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7294 constrained, do not attempt to build a subtype of it.
7296 2011-08-04 Yannick Moy <moy@adacore.com>
7298 * errout.ads Change comments: remove 'R'M as an example where quotes
7299 are needed; add ALFA as another case where quotes are not needed
7300 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7301 case where quotes are not needed.
7302 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7303 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7304 Remove all occurrences of 'A'L'F'A
7306 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7308 * sem_ch13.adb: check legality of invariant pragma.
7310 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7312 * bindgen.adb: Add comments.
7314 2011-08-04 Yannick Moy <moy@adacore.com>
7316 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7318 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7319 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7321 2011-08-04 Robert Dewar <dewar@adacore.com>
7323 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7324 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7325 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7327 2011-08-04 Thomas Quinot <quinot@adacore.com>
7329 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7331 2011-08-04 Thomas Quinot <quinot@adacore.com>
7334 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7337 2011-08-04 Robert Dewar <dewar@adacore.com>
7339 * einfo.ads, exp_ch4.adb: Minor reformatting.
7341 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7343 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7345 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7347 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7348 type in all cases to compute list of primitive operations, because full
7349 view may be an itype that is not attached to the list of declarations.
7351 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7353 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7354 library has already been finalized.
7355 (Gen_Adafinal_C): Likewise.
7356 (Gen_Adainit_Ada): Generate an early return if the library has
7357 already been elaborated.
7358 (Gen_Adainit_C): Likewise.
7359 (Gen_Output_File_Ada): Generate an elaboration flag.
7360 (Gen_Output_File_C): Likewise.
7362 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7364 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7365 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7366 built in the first place.
7367 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7368 for CodePeer because Finalize_Address was not built to begin with.
7369 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7371 2011-08-04 Pascal Obry <obry@adacore.com>
7373 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7374 filenames, this ensures unicity of filenames across processes.
7376 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7378 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7379 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7380 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7381 Add False as the actual to From_Abort in the generated call to
7382 Raise_From_Controlled_Operation.
7384 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7386 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7387 so that the ali file name can be retrieved from outside of this package.
7388 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7389 doing nothing in the general case, but used to update the object file
7390 timestamp if directly generated by the backend.
7391 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7392 to a later time than the ali file one.
7394 2011-08-04 Yannick Moy <moy@adacore.com>
7396 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7397 entities whose body contains an Annotate pragma which forces formal
7399 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7400 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7401 Mark_Non_ALFA_Subprogram to pass in a message and node.
7402 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7403 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7404 surrounding subprogram.
7405 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7406 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7407 as not in ALFA is annotated with Formal_Proof being On, then an error
7408 is issued based on the additional parameters for message and node.
7409 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7410 * gcc-interface/Make-lang.in: Update dependencies.
7412 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7414 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7415 Finalize_Address when CodePeer is enabled.
7417 2011-08-04 Pascal Obry <obry@adacore.com>
7419 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7420 the latter returns a pointer to a static buffer which is deallocated
7421 at the end of the routine.
7423 2011-08-04 Yannick Moy <moy@adacore.com>
7425 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7426 after index creation; mark unconstrained base array type generated as
7427 being in/not in ALFA as well
7428 (Make_Index): mark subtype created as in/not in ALFA
7429 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7430 over a loop as in/not in ALFA, depending on its type and form of loop
7433 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7435 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7436 directly to False on .NET and JVM.
7438 2011-08-04 Yannick Moy <moy@adacore.com>
7440 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7441 constraint that subtype must come from source code to be in ALFA, so
7442 that anonymous subtypes can be in ALFA too.
7444 2011-08-04 Yannick Moy <moy@adacore.com>
7446 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7447 reference for ALFA mode.
7448 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7449 procedure public so as to use it from formal verification back-end.
7451 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7453 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7454 invalid checks of the Parameter, making Remove_Switch not working
7457 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7459 * targparm.ads: Update header: no run-time exception is needed on this
7462 2011-08-04 Vincent Celier <celier@adacore.com>
7464 * a-fihema.adb: Use System.IO instead of GNAT.IO
7466 2011-08-04 Thomas Quinot <quinot@adacore.com>
7468 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7469 are forbidden in Compiler_Unit mode.
7471 2011-08-04 Robert Dewar <dewar@adacore.com>
7473 * sem_util.adb: Minor reformatting.
7475 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7477 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7478 library-level finalizers.
7479 (Gen_Finalize_Library_C): Update the import string for library-level
7481 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7482 library-level finalizer.
7483 * exp_ch7.adb: Remove with and use clauses for Stringt.
7484 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7485 Spec_Decl. Add local variable Body_Id. The names of library-level
7486 finalizers are now manually fully qualified and are no longer external.
7487 A single name is now capable of servicing .NET, JVM and non-VM targets.
7488 Pragma Export is no longer required to provide visibility for the name.
7489 (Create_Finalizer_String): Removed.
7490 (New_Finalizer_Name): New routine which mimics New_..._Name.
7492 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7494 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7495 elaboration counter to Standard_Short_Integer.
7496 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7497 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7498 (Gen_Elab_Externals_C): Likewise.
7500 2011-08-04 Ed Falis <falis@adacore.com>
7502 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7503 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7504 system-vxworks-mips.ads, system-vxworks-x86.ads
7505 (Always_Compatible_Rep): set to False for all VxWorks targets.
7507 2011-08-04 Robert Dewar <dewar@adacore.com>
7509 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7510 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7511 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7512 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7513 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7514 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7515 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7516 Minor reformatting and code reorganization.
7518 2011-08-04 Emmanuel Briot <briot@adacore.com>
7520 * projects.texi: Added doc for aggregate projects.
7522 2011-08-04 Emmanuel Briot <briot@adacore.com>
7524 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7525 Add support for overriding the Project_Path in aggregate projects.
7527 2011-08-04 Robert Dewar <dewar@adacore.com>
7529 * a-cofove.ads: Minor reformatting.
7531 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7533 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7534 on the generated code.
7535 (Build_Finalize_Statements): Update the comment on the generated code.
7536 (Build_Initialize_Statements): Update the comment on the generated code.
7537 (Build_Object_Declarations): Add local variable Result. The object
7538 declarations are now built in sequence.
7539 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7542 2011-08-04 Robert Dewar <dewar@adacore.com>
7544 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7546 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7548 * einfo.ads (Elaboration_Entity): Document new definition and use.
7549 (Elaboration_Entity_Required): Adjust to above change.
7550 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7551 * exp_ch12.adb: And with and use for Snames.
7552 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7553 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7554 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7555 <Check_Unit_Name>: Deal with N_Expanded_Name.
7556 <Attribute_Elaborated>: Extend to all unit names.
7557 * sem_elab.adb: And with and use for Uintp.
7558 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7559 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7560 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7561 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7562 from Gen_Adainit_Ada.
7563 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7564 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7565 case, do not call System.Standard_Library.Adafinal; instead call
7566 finalize_library if needed.
7567 (Gen_Adafinal_C): Likewise.
7568 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7569 non-main program case.
7570 (Gen_Adainit_C): Generate a couple of external declarations here.
7571 In the main program case, set SSL.Finalize_Library_Objects.
7572 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7573 (Gen_Elab_Calls_C): Likewise.
7574 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7575 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7576 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7578 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7579 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7581 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7582 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7583 of external declarations. Call Gen_Finalize_Library_C.
7585 2011-08-04 Emmanuel Briot <briot@adacore.com>
7587 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7588 Compute_Compilation_Phases): new subprogram.
7589 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7590 The number of mains as well as the various compilation phases that
7591 need to be run are now project tree specific, since various
7592 aggregated trees might have different requirements. In particular,
7593 they do not all require bind or link phases.
7595 2011-08-04 Emmanuel Briot <briot@adacore.com>
7597 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7598 (Project_Tree_Appdata): New type.
7599 It is now possible to associate application-specific data to a project
7600 tree. In particular, this is used in the gprbuild builder to avoid a
7601 number of global tables and htables, especially now that there can be
7602 several project trees loaded at once because of aggregate projects.
7603 (Debug_Name): new procedure.
7604 * projects.texi: Clarify syntax of "**" for Source_Dirs
7606 2011-08-03 Emmanuel Briot <briot@adacore.com>
7608 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7609 the "roots" for a main.
7610 (Fill_From_Project): add support for aggregate projects. Main units
7611 in aggregated projects are now automatically added in the list of
7612 files to build (although this fails later on in gprbuild, because
7613 these files are not using the root proejct tree, so this needs
7615 * gcc-interface/Make-lang.in: Update dependencies.
7617 2011-08-03 Yannick Moy <moy@adacore.com>
7619 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
7620 conditional expression in ALFA.
7621 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
7622 expressions as not in ALFA.
7624 2011-08-03 Robert Dewar <dewar@adacore.com>
7626 * a-cofove.adb: Minor reformatting.
7628 2011-08-03 Emmanuel Briot <briot@adacore.com>
7630 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
7631 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
7633 These packages are more logically placed in the Queue package, since
7634 they manipulate the queue. It is also likely that they can be adapted
7635 for gnatmake, thus sharing more code.
7636 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
7637 that we could move the above.
7639 2011-08-03 Emmanuel Briot <briot@adacore.com>
7641 * errutil.adb (Finalize): clean up the list of error messages on exit.
7642 Calling this subprogram multiple times will no longer show duplicate
7643 error messages on stderr.
7645 2011-08-03 Emmanuel Briot <briot@adacore.com>
7647 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
7648 Getopt_Switches when we have already define a command line
7651 2011-08-03 Yannick Moy <moy@adacore.com>
7653 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
7654 in ALFA. Instead, they are considered as assertions to prove.
7655 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
7656 nodes as not in ALFA. Instead, include conditional expressions in ALFA
7657 if they have no ELSE part, or if they occur in pre- and postconditions,
7658 where the Condition cannot have side-effects in ALFA
7659 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
7660 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
7661 Instead, include type conversion between scalar types in ALFA.
7662 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
7663 if-and-only-if its type is in ALFA.
7665 2011-08-03 Thomas Quinot <quinot@adacore.com>
7667 * scos.adb, get_scos.adb, put_scos.adb
7668 New code letter for decisions: G (entry guard)
7670 (Traverse_Subprogram_Body): Rename to...
7671 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
7672 (Traverse_Protected_Body): New subprogram
7673 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
7674 protected bodies and entry bodies.
7676 2011-08-03 Yannick Moy <moy@adacore.com>
7678 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
7679 entities with get/set subprograms, which is set on procedure entities
7680 generated by the compiler for a postcondition.
7681 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
7682 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
7683 entity for a declaration
7684 (Get_Unique_Entity_For_Decl): new function returning an entity which
7685 represents a declaration, so that matching spec and body have the same
7688 2011-08-03 Robert Dewar <dewar@adacore.com>
7690 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
7691 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
7693 2011-08-03 Yannick Moy <moy@adacore.com>
7695 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
7696 library-level because retriction No_Implicit_Dynamic_Code in the
7697 front-end prevents its definition as a local subprogram
7698 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
7699 for reuse in other contexts
7700 (Traverse_Declarations_Or_Statements,
7701 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7702 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
7703 procedures take a callback parameter to be called on all declarations
7705 (Traverse_All_Compilation_Units): new generic function to traverse a
7706 compilation unit and call a callback parameter on all declarations
7708 2011-08-03 Javier Miranda <miranda@adacore.com>
7710 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
7711 in Java since they are always enclosed in a namespace that
7712 differentiates them, and overloaded entities are supported by the VM.
7714 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7716 * checks.adb (Determine_Range): If a computed bound of an operation is
7717 outside the range of the base type of the expression, and overflow
7718 checks are enabled, the result is unknown and cannot be used for any
7719 subsequent constant folding.
7720 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
7721 unknown, so is the result of the comparison.
7723 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7725 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
7726 From_Abort. When finalization was triggered by an abort, propagate
7727 Standard'Abort_Signal rather than Program_Error.
7728 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
7730 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
7731 From_Abort. When finalization was triggered by an abort, propagate
7732 Standard'Abort_Signal rather than Program_Error.
7733 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
7735 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
7736 Abort_Id. Update the calls to Build_Object_Declarations and
7737 Build_Raise_Statement to include Abort_Id.
7738 (Build_Adjust_Statements): New local variable Abort_Id. Update the
7739 calls to Build_Object_Declarations and Build_Raise_Statement to include
7741 (Build_Finalize_Statements): New local variable Abort_Id. Update the
7742 calls to Build_Object_Declarations and Build_Raise_Statement to include
7744 (Build_Components): Create an entity for Abort_Id when exceptions are
7745 allowed on the target.
7746 (Build_Finalizer): New local variable Abort_Id.
7747 (Build_Initialize_Statements): New local variable Abort_Id. Update the
7748 calls to Build_Object_Declarations and Build_Raise_Statement to include
7750 (Build_Object_Declarations): Add new formal Abort_Id. Create the
7751 declaration of flag Abort_Id to preserve the original abort status
7752 before finalization code is executed.
7753 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
7754 runtime routine Raise_From_Controlled_Operation.
7755 (Create_Finalizer): Update the call to Build_Raise_Statement to include
7756 Abort_Id. Update the call to Build_Object_Declarations to include
7757 Abort_Id. Update the layout of the finalizer body.
7758 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
7759 (Process_Transient_Objects): New local variable Abort_Id. Remove the
7760 clunky code to create all flags and objects related to
7761 exception propagation and replace it with a call to
7762 Build_Object_Declarations. Update the call to Build_Raise_Statement to
7764 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
7765 Add new formal Abort_Id and associated comment on its use.
7766 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
7768 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
7769 Remove the clunky code to create all flags and objects related to
7770 exception propagation and replace it with a call to
7771 Build_Object_Declarations. Update the call to Build_Raise_Statement.
7773 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7775 * s-tassta.adb: Fix minor typos.
7777 2011-08-03 Robert Dewar <dewar@adacore.com>
7779 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
7780 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
7782 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7784 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
7785 to packages. This ensures that the finalizer body will not end up
7786 inside the freeze node.
7787 (Process_Declarations): Add code to detect whether a freeze node has a
7788 nested finalization collection.
7790 2011-08-03 Pascal Obry <obry@adacore.com>
7792 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
7793 (Current_Session): Return a not null access to Session_Type.
7794 (Default_Session): Likewise.
7796 2011-08-03 Robert Dewar <dewar@adacore.com>
7798 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
7799 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
7801 2011-08-03 Pascal Obry <obry@adacore.com>
7803 * g-awk.ads: Minor comment fix.
7805 2011-08-03 Sergey Rybin <rybin@adacore.com>
7807 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7808 the tree structure related to discriminant constraints.
7809 Original_Discriminant cannot be used any more for computing the
7810 defining name for the reference to a discriminant.
7812 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7814 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
7815 function is not visibly tagged, this is not a dispatching call and
7816 therfore is not Tag_Indeterminate, even if the function is marked as
7817 dispatching on result.
7819 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7821 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
7822 (Expand_N_Free_Statement): Add a guard to protect against run-times
7823 which do not support controlled types.
7824 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
7825 against run-times which do not support controlled types.
7826 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
7827 against run-times which do not support controlled types.
7828 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
7829 against run-times which do not support controlled types.
7830 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
7831 protect against run-times which do not support controlled types.
7833 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7835 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
7836 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
7838 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7840 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
7841 modified in the source, to prevent spurious warnings when compiling
7844 2011-08-03 Thomas Quinot <quinot@adacore.com>
7846 * a-except-2005.adb: Minor reformatting.
7848 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7850 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
7851 is a renaming declaration in the private part of a package, do not emit
7852 a warning that the with_clause could be moved because the renaming may
7853 be used in the body or in a child unit.
7855 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7857 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7858 Propagate the Comes_From_Source attribute from the original return
7859 object to the renaming.
7861 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7863 * exp_ch7.adb (Build_Raise_Statement): Do not call
7864 Raise_From_Controlled_Operation when this routine is not present in
7865 the run-time library.
7866 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
7867 libraries (Ravenscar), tasks are non-terminating, and protected objects
7868 and tasks can only appear at library level, so we do not want
7869 finalization of protected objects nor tasks.
7870 * exp_intr.adb: Minor clarification in comment.
7871 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
7872 Gen_Output_File_C): Remove references to finalization of library-level
7873 objects when using restricted run-time libraries.
7875 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7877 * sem_ch3.adb (Build_Discriminant_Constraints): Set
7878 Original_Discriminant only if the parent type is a generic formal.
7880 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7882 * exp_ch13.adb: Add with and use clause for Targparm;
7883 (Expand_N_Free_Statement): Prevent the generation of a custom
7884 Deallocate on .NET/JVM targets since this requires pools and address
7886 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
7887 .NET/JVM targets, attach the newly allocated object to the access
7888 type's finalization collection. Do not generate a call to
7889 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
7890 exist in the runtime.
7891 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
7892 create a custom Allocate for object that do not require initialization.
7893 Attach a newly allocated object to the access type's finalization
7894 collection on .NET/JVM.
7895 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
7896 assignment of controlled types on .NET/JVM. The two hidden pointers
7897 Prev and Next and stored and later restored after the assignment takes
7899 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
7900 kludge for .NET/JVM to recognize a particular piece of code coming from
7901 Heap_Management and change the call to Finalize into Deep_Finalize.
7902 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
7903 finalization collections on .NET/JVM only for types derived from
7904 Controlled. Separate the association of storage pools with a collection
7905 and only allow it on non-.NET/JVM targets.
7906 (Make_Attach_Call): New routine.
7907 (Make_Detach_Call): New routine.
7908 (Process_Object_Declarations): Suppress the generation of
7909 build-in-place return object clean up code on .NET/JVM since it uses
7911 * exp_ch7.ads (Make_Attach_Call): New routine.
7912 (Make_Detach_Call): New routine.
7913 * exp_intr.adb Add with and use clause for Targparm.
7914 (Expand_Unc_Deallocation): Detach a controlled object from a collection
7915 on .NET/JVM targets.
7916 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
7917 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
7918 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
7919 names used in finalization.
7921 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7923 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
7924 (Attach, Detach): Lock the current task when chaining an object onto a
7927 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7929 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
7930 Rewritten to create the message strings when the exception is not
7931 raised by an abort during finalization.
7932 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
7933 Raise_From_Controlled_Operation and update its associated comment.
7934 * a-fihema.ads, a-fihema.adb: New GNAT unit.
7935 Ada.Finalization.Heap_Management provides key functionality
7936 associated with controlled objects on the heap, their creation,
7937 finalization and reclamation. Type Finalization_Collection is
7938 effectively a wrapper which sits ontop of a storage pool and performs
7939 all necessary bookkeeping for all the objects it contains. Each
7940 access-to-controlled or access-to-class-wide type receives a collection
7941 as part of its expansion. The compiler generates buffer code and
7942 invokes Allocate / Deallocate to create and destroy allocated
7944 * a-finali.adb ("="): Removed.
7945 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
7946 fields Prev and Next.
7947 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
7948 A library unit with at least one controlled object on the library level
7949 has a special finalizer which is invoked by the binder. To signal this,
7950 ali files carry field PF.
7951 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
7952 associated comment on field usage.
7953 * a-tags.adb (Get_RC_Offset): Removed.
7954 (Needs_Finalization): New routine.
7955 * a-tags.ads: Update the structure of the GNAT dispatch tables.
7956 Dispatch tables now carry field Needs_Finalization which provides
7957 runtime indication whether a type is controlled or has controlled
7958 components or both. Remove field RC_Offset.
7959 (Get_RC_Offset): Removed along with its associated pragma Export.
7960 Since tagged types with controlled components no longer carry hidden
7961 field _controller, the special mechanism to retrieve its location is no
7963 (Needs_Finalization): New routine.
7964 * atree.ads, atree.adb (Elist24): New routine.
7965 (Set_Elist24): New routine.
7966 * atree.h: Add a define clause for Elist24.
7967 * bindgen.adb New library-level variable Lib_Final_Built.
7968 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
7969 presence of a VM target, the routine generates calls to the proper
7970 library finalization routine.
7971 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
7972 targets. Set the correct library finalization routine depending on
7973 whether the library has controlled objects or this is a VM compilation.
7974 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
7975 to library-level finalizers of compiled units in reverse order of
7976 elaboration. It also produces exception management code and reraises a
7977 potential exception after all units have been finalized.
7978 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
7979 library-level finalizers of compiled units in reverse order of
7981 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
7982 definitions of all library-level finalizers available to the compilation
7983 (Gen_Main_Ada): Directly call Adafinal which now contails all target
7985 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
7986 System.Standard_Library.Adafinal directly. If the library needs
7987 finalization actions, create the sequence of finalization calls.
7988 (Gen_Output_File_Ada): Alphabetize local variables and constants.
7989 Generate a with clause for System.Soft_Links when compiling for a VM.
7990 Remove the code which imports System.Standard_Library.Adafinal as
7991 Do_Finalize. Generate the library finalization routine.
7992 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
7993 If the library needs finalization actions, create all the definitions
7994 of library- level finalizers.
7995 (Has_Finalizer): New routine. Determines whether at least one compiled
7996 unit has a library-level finalizer.
7997 Add type Qualification_Mode.
7998 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
7999 * einfo.adb: New usage of field 15 as Return_Flag.
8000 Remove Finalization_Chain_Entity from the usages of field 19.
8001 Remove Associated_Final_Chain from the usages of field 23.
8002 New usage of field 23 as Associated_Collection.
8003 New usage of field 24 as Finalizer.
8004 New usage of flag 252 as Is_Processed_Transient.
8005 (Associated_Final_Chain): Removed.
8006 (Associated_Collection): New routine.
8007 (Finalization_Chain_Entity): Removed.
8008 (Finalizer): New routine.
8009 (Is_Finalizer): New routine.
8010 (Is_Processed_Transient): New routine.
8011 (Return_Flag): New routine.
8012 (Set_Associated_Final_Chain): Removed.
8013 (Set_Associated_Collection): New routine.
8014 (Set_Finalization_Chain_Entity): Removed.
8015 (Set_Finalizer): New routine.
8016 (Set_Is_Processed_Transient): New routine.
8017 (Set_Return_Flag): New routine.
8018 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8020 (Write_Field8_Name): Alphabetize the output.
8021 (Write_Field11_Name): Alphabetize the output.
8022 (Write_Field12_Name): Alphabetize the output.
8023 (Write_Field13_Name): Alphabetize the output.
8024 (Write_Field14_Name): Alphabetize the output.
8025 (Write_Field15_Name): Alphabetize the output.
8026 (Write_Field16_Name): Alphabetize the output.
8027 (Write_Field17_Name): Alphabetize the output.
8028 (Write_Field18_Name): Alphabetize the output.
8029 (Write_Field19_Name): Alphabetize the output. Remove the output of
8030 Finalization_Chain_Entity.
8031 (Write_Field20_Name): Alphabetize the output.
8032 (Write_Field21_Name): Alphabetize the output.
8033 (Write_Field22_Name): Alphabetize the output.
8034 (Write_Field23_Name): Alphabetize the output. Remove the output of
8035 Associated_Final_Chain. Add output for Associated_Collection.
8036 (Write_Field24_Name): Alphabetize the output.
8037 (Write_Field25_Name): Add output for Finalizer.
8038 (Write_Field26_Name): Alphabetize the output.
8039 (Write_Field27_Name): Alphabetize the output.
8040 (Write_Field28_Name): Alphabetize the output.
8041 * einfo.ads: Add new field description for Associated_Collection and
8043 Remove Associated_Final_Chain and its uses in nodes.
8044 Remove Finalization_Chain_Entity and its uses in nodes.
8045 Add new field description for Finalizer and its uses in nodes.
8046 Add new synthesized attribute Is_Finalizer.
8047 Add new flag description for Is_Processed_Transient and its uses in
8049 Add new field description for Return_Flag and its uses in nodes.
8050 (Associated_Final_Chain): Removed along with its pragma Inline.
8051 (Associated_Collection): New routine and pragma Inline.
8052 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8053 (Finalizer): New routine and pragma Inline.
8054 (Is_Finalizer): New routine and pragma Inline.
8055 (Is_Processed_Transient): New routine and pragma Inline.
8056 (Return_Flag): New routine and pragma Inline.
8057 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8058 (Set_Associated_Collection): New routine and pragma Inline.
8059 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8060 (Set_Finalizer): New routine and pragma Inline.
8061 (Set_Is_Processed_Transient): New routine and pragma Inline.
8062 (Set_Return_Flag): New routine and pragma Inline.
8063 * exp_aggr.adb: Alphabetize subprograms.
8064 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8065 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8066 associated comments. Remove local variables External_Final_List and
8068 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8069 Ancestor. Remove the retrieval of finalization lists. Update the call to
8071 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8072 lists. Update the call to Late_Expansion.
8073 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8074 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8075 (Gen_Assign): Remove the retrieval of the finalization list used to
8076 build the assignment. Update the calls to Make_Init_Call and
8078 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8079 Remove the mechanism to determine attachment levels and finalization
8080 list retrieval. Remove the processing for coextensions.
8081 (Init_Controller): Removed. Controllers no longer exist.
8082 (Late_Expansion): Remove formals Flist and Obj along with their
8083 associated comments. Update the calls to Build_Record_Aggr_Code and
8084 Build_Array_Aggr_Code.
8085 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8086 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8087 appear in entry bodies, protected subprograms and task bodies.
8088 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8089 * exp_ch3.adb (Add_Final_Chain): Removed.
8090 (Build_Array_Init_Proc): Alphabetize local variables.
8091 (Build_Assignment): Alphabetize local variables. Update the call to
8093 (Build_Class_Wide_Master): Rename local variables to better reflect
8095 (Build_Discriminant_Assignments): Code reformatting.
8096 (Build_Init_Call_Thru): Code reformatting.
8097 (Build_Init_Procedure): Code reformatting. Generate a special version
8098 of Deep_Finalize which is capable of finalizing all initialized
8099 components and ignore the rest.
8100 (Build_Init_Statements): Rename local variables to better reflect their
8102 Reimplement the mechanism to include the creation and update of an index
8103 variable called a "counter". It is used as a bookmark for tracing
8104 initialized and non-initialized components.
8105 (Build_Initialization_Call): Remove local variable Controller_Typ.
8106 Alphabetize all local variables. Remove the initialization of the
8107 record controller and update the call to Make_Init_Call.
8108 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8109 New local variable Counter.
8110 (Constrain_Array): Alphabetize.
8111 (Expand_Freeze_Array_Type): Create a collection instead of a
8113 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8114 Finalize_Address which is used in conjunction with allocated controlled
8116 (Expand_N_Object_Declaration): Remove the creation of a finalization
8117 list for anonymous access types. Update the calls to Make_Init_Call and
8119 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8120 retrieval of finalization lists. Remove the expansion of the record
8121 controller. Create TSS primitive Finalize_Address used in conjunction
8122 with controlled objects on the heap. Create finalization collections
8123 for access-to-controlled record components.
8124 (Expand_Record_Controller): Removed.
8125 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8126 class-wide types now requires additional processing. Create
8127 finalization collections for access-to-controlled types.
8128 (Increment_Counter): New routine.
8129 (Make_Counter): New routine.
8130 (Make_Eq_If): Remove the mention of Name_uController.
8131 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8132 types coming from System.Finalization_Root.
8133 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8134 (Predefined_Primitive_Bodies): There is no longer need to skip types
8135 coming from System.Finalization_Root.
8136 (Stream_Operation_OK): Do not generate stream routines for
8137 type Ada.Finalization.Heap_Management.Finalization_Collection.
8138 * exp_ch3.ads: Alphabetize subprograms.
8139 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8140 Add with and use clause for Lib.
8141 (Complete_Coextension_Finalization): Removed.
8142 (Complete_Controlled_Allocation): New routine. Create a finalization
8143 collection for anonymous access-to-controlled types. Create a custom
8144 Allocate which interfaces with the back end and the machinery in
8146 (Expand_Allocator_Expression): Add necessary calls to
8147 Complete_Controlled_Allocation. Remove the retrieval of finalization
8148 lists. Update the calls to Make_Adjust_Call. Generate a call to
8149 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8150 the associated collection.
8151 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8152 Code clean up. Remove the retrieval of finalization lists and
8154 Update the call to Make_Init_Call. Generate a call to
8155 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8156 the associated collection.
8157 (Get_Allocator_Final_List): Removed. Finalization lists are not
8159 (Suitable_Element): Remove the mention of Name_uController.
8160 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8161 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8162 the left hand side, carry out the assignment and adjust the left hand
8164 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8165 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8166 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8167 BIP_Collection and BIPcollection.
8168 (Build_Heap_Allocator): New routine used to allocate the return object
8169 of a build-in-place function onto a collection.
8170 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8171 (Expand_Call): Do not replace direct calls to Deep routines with their
8173 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8174 and update their occurrences. Add a special return flag to monitor the
8175 [ab]normal execution of the function. The flag is set right before the
8177 Rewrite the mechanism used to allocate a build-in-place return object
8178 on the heap or on a storage pool.
8179 (Is_Direct_Deep_Call): New routine.
8180 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8181 build-in-place function call instead of a final list. Build a call to
8182 Set_Finalize_Address_Ptr to decorate the associated collection.
8183 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8184 order to name the build-in-place function call's result for later
8185 finalization. Add a collection to a build-in-place function call
8186 instead of a final list.
8187 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8188 build-in-place function call instead of a final list. Remove the code
8189 which moves one final list and transforms it into the actual in a
8190 nested build-in-place call.
8191 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8192 build-in-place function call instead of a final list.
8193 (Move_Final_List): Removed.
8194 (Needs_BIP_Collection): New routine.
8195 (Needs_BIP_Final_List): Removed.
8196 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8197 enumeration type BIP_Formal_Kind.
8198 Update the related comment.
8199 (Needs_BIP_Collection): New routine.
8200 (Needs_BIP_Final_List): Removed.
8201 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8202 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8203 majority of subprograms in this unit. Add Name_Finalize_Address to
8204 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8205 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8206 statements for an array type.
8207 (Build_Adjust_Statements): Create the adjust statements for a record
8209 (Build_Cleanup_Statements): New routine. A procedure which given any
8210 construct containing asynchronous calls, references to _master, or is a
8211 task body, a task allocation or a protected body produces the necessary
8212 runtime calls to clean up these constructs.
8213 (Build_Exception_Handler): New routine.
8214 (Build_Final_List): Removed.
8215 (Build_Finalization_Collection): New routine. A core procedure which
8216 creates a collection to service heap allocated controlled objects
8217 associated with an access-to-controlled type.
8218 (Build_Finalize_Statements): Create the finalization statements for a
8220 (Build_Finalizer): New routine. A core procedure which given any
8221 construct with declarations and/or statements detects all objects which
8222 need any type of clean up (controlled objects, protected objects) and
8223 generates all necessary code to clean up the said objects in the proper
8225 (Build_Finalizer_Call): New routine.
8226 (Build_Initialize_Statements): Create the initialization statements for
8227 an array type. The generated routine contains code to finalize partially
8229 (Build_Object_Declarations): New routine.
8230 (Build_Raise_Statement): New routine.
8231 (Clean_Simple_Protected_Objects): Removed.
8232 (Controller_Component): Removed.
8233 (Enclosing_Function): New routine.
8234 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8235 either declarations or statements or both.
8236 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8237 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8239 (Find_Final_List): Removed.
8240 (Global_Flist_Ref): Removed.
8241 (In_Finalization_Root): Removed.
8242 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8243 scope in terms of tree nodes. Process all transient variables within
8245 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8246 generated after the adjust.
8247 (Make_Attach_Call): Removed.
8248 (Make_Call): New routine.
8249 (Make_Clean): Removed.
8250 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8252 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8254 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8256 (Make_Final_Call): Modified to simply create a call to either
8257 Deep_Finalize or Finalize.
8258 (Make_Finalize_Address_Body): New routine.
8259 (Make_Finalize_Address_Stmts): New routine. A function which produces
8260 TSS primitive Finalize_Address used in conjunction with heap allocated
8262 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8263 (Make_Init_Call): Rewritten. There is no longer an attach call
8264 generated after initialization.
8265 (Make_Local_Deep_Finalize): New routine.
8266 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8267 (Make_Transient_Block): Remove the finalization list retrieval and
8269 (Needs_Finalization): Moved to Exp_Util.
8270 (Parent_Field_Type): New routine.
8271 (Preprocess_Components): New routine.
8272 (Process_Transient_Objects): New routine.
8273 (Wrap_HSS_In_Block): New routine.
8274 (Wrap_Transient_Declaration): Remove finalization list management and
8275 controller insertion.
8276 (Wrap_Transient_Expression): Code reformatting.
8277 (Wrap_Transient_Statement): Code reformatting.
8278 * exp_ch7.ads (Build_Final_List): Removed.
8279 (Build_Finalization_Collection): New routine.
8280 (Build_Raise_Statement): New routine.
8281 (Controller_Component): Removed.
8282 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8283 (Find_Final_List): Removed.
8284 (In_Finalization_Root): Removed.
8285 (Is_Simple_Protected_Type): Update related comment.
8286 (Make_Adjust_Call): New parameter profile and associated comments.
8287 (Make_Attach_Call): Removed.
8288 (Make_Final_Call): New parameter profile and associated comments.
8289 (Make_Finalize_Address_Body): New routine.
8290 (Make_Init_Call): New parameter profile and associated comments.
8291 (Make_Local_Deep_Finalize): New routine.
8292 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8293 (Needs_Finalization): Moved to Exp_Util.
8294 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8295 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8296 (Find_Protection_Type): Moved to Exp_Util.
8297 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8298 (Make_DT): Update sequence of dispatch table initialization. Remove the
8299 initialization of field RC_Offset. Add initialization of field Needs_
8301 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8302 Reimplement how an object is first finalized, then deallocated.
8303 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8305 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8306 Register TSS_Finalize_Address with type TSS_Names.
8307 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8308 procedure provides the interface between an allocation / deallocation
8309 and the support machinery in Ada.Finalization.Heap_Management.
8310 (Find_Init_Call): Code reformatting.
8311 (Find_Init_Call_In_List): Code reformatting.
8312 (Find_Protection_Type): Moved from Exp_Ch9.
8313 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8314 (Has_Controlled_Coextensions): Removed.
8315 (Has_Controlled_Objects): New routine.
8316 (In_Library_Level_Package_Body): New routine.
8317 (Insert_Action_After): New routine.
8318 (Is_Finalizable_Transient): New routine. This predicate determines
8319 whether an object declaration is one of the many variants of controlled
8321 (Is_Null_Access_BIP_Func_Call): New routine.
8322 (Is_Non_BIP_Func_Call): New routine.
8323 (Is_Related_To_Func_Return): New routine.
8324 (Needs_Finalization): Moved from Exp_Ch7.
8325 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8326 (Find_Protection_Type): Moved from Exp_Ch9.
8327 (Has_Controlled_Coextensions): Removed.
8328 (Has_Controlled_Objects): New routine.
8329 (In_Library_Level_Package_Body): New routine.
8330 (Insert_Action_After): New routine.
8331 (Is_Finalizable_Transient): New routine.
8332 (Is_Null_Access_BIP_Func_Call): New routine.
8333 (Is_Non_BIP_Func_Call): New routine.
8334 (Is_Related_To_Func_Return): New routine.
8335 (Needs_Finalization): Moved from Exp_ch7.
8336 * expander.adb (Expand): Add a case for N_Free_Statement.
8337 * freeze.adb (Freeze_All): Replace the generation of a finalization
8338 list with a collection for access-to-controlled types.
8339 (Freeze_Entity): Code reformatting.
8340 (Freeze_Record_Type): Remove the freezing of a record controller
8342 (Freeze_Subprogram): Code reformatting.
8343 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8345 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8346 has a library-level finalizer.
8347 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8348 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8349 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8350 files. Add a-fihema to the list of object files.
8352 Alphabetize the associations in type Is_Parameterless_Attribute.
8353 * rtsfind.ads: Ada.Finalization_List.Controller and
8354 System.Finalization_Implementation are no longer a GNAT unit.
8355 Update the range of type Ada_Finalization_Child. Remove the following
8356 recoverable entities:
8358 RE_Attach_To_Final_List
8362 RE_Finalizable_Ptr_Ptr
8363 RE_Global_Final_List
8364 RE_Limited_Record_Controller
8367 RE_Record_Controller
8368 RE_Simple_List_Controller
8370 Add the following recoverable entities:
8372 RE_Add_Offset_To_Address
8376 RE_Exception_Identity
8377 RE_Finalization_Collection
8378 RE_Finalization_Collection_Ptr
8379 RE_Needs_Finalization
8380 RE_Save_Library_Occurrence
8381 RE_Set_Finalize_Address_Ptr
8382 RE_Set_Storage_Pool_Ptr
8384 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8386 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8387 (First_Stored_Discriminant): Remove the mention of Name_uController.
8388 * sem_aux.ads: Comment reformatting.
8389 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8390 to redecorate an already existing class-wide type.
8391 (Decorate_Tagged_Type): New parameter profile and associated comment.
8392 Create a "shadow class-wide type" for a shadow entity.
8393 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8394 of the final chain along with the associated comment.
8395 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8396 Full_Desig and set it to the full view of the designated type.
8397 Initialize the finalization collection to empty.
8398 (Build_Derived_Record_Type): Alphabetize local variables. Code
8400 (Collect_Fixed_Components): Remove the mention of Name_uController.
8401 (Create_Constrained_Components): Remove the mention of Name_uController.
8402 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8403 class-wide type of a shadow entity.
8404 (Process_Full_View): Update the machinery which marks type
8405 Limited_Controlled's entity as limited.
8406 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8407 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8408 list, instead make a collection build-in-place formal.
8409 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8410 a designated type in order to establish a match between the renaming
8411 and the renamed entity.
8412 (Find_Selected_Component): Add guard to prevent spurious exceptions
8413 from being raised on .NET/JVM.
8414 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8415 to the list of primitive that need special processing. Update arrays
8416 C_Names and D_Names.
8417 (Replace_Types): Handle class-wide types.
8418 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8419 different parameter profile, look at the first formal.
8420 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8421 use clauses for Exp_Util.
8422 * sem_res.adb: Remove with and use clauses for Elists.
8423 (Propagate_Coextensions): Removed.
8424 (Resolve_Allocator): Do not propagate the list of coextensions from one
8425 allocator to another.
8426 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8427 Deaccessed_T to Desig_Typ.
8428 (Enter_Name): Remove the mention of Name_uController.
8429 (Gather_Components): Remove the mention of Name_uController.
8430 (Incomplete_Or_Private_View): New routine.
8431 (Is_Coextension_Root): Removed.
8432 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8433 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8434 (Is_Coextension_Root): Removed.
8435 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8436 Controlled types are now derived from a null tagged record. Remove
8437 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8438 * sinfo.adb (Coextensions): Removed.
8439 (Set_Coextensions): Removed.
8440 * sinfo.ads: Remove Coextensions from the explanation of node fields
8441 and its uses in nodes.
8442 Update the field usage of N_Allocator.
8443 (Coextensions): Removed along with its pragma Inline.
8444 (Set_Coextensions): Removed along with its pragma Inline.
8445 * snames.ads-tmpl: Remove names
8450 Name_uLocal_Final_List
8451 Name_Finalization_Root
8458 Name_Finalize_Address
8459 * s-pooglo.adb (Allocate): Add overriding indicator.
8460 (Deallocate): Add overriding indicator.
8461 (Storage_Size): Add overriding indicator.
8462 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8463 than Finalize_Global_List.
8464 (Null_Finalize_Global_List): Removed.
8465 (Save_Library_Occurrence): New routine.
8466 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8467 initialization. Add variable Finalize_Library_Objects along with its
8468 pragma Export. Add variables Library_Exception and
8469 Library_Exception_Set along with their pragma Export.
8470 (Null_Finalize_Global_List): Removed.
8471 (Save_Library_Occurrence): New routine.
8472 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8473 rather than Finalize_Global_List.
8474 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8475 of the constructed node.
8477 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8479 * link.c: Include "auto-host.h" before system headers.
8481 2011-08-03 Vincent Celier <celier@adacore.com>
8483 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8484 that are not extended. Do not check if a library project that is
8485 extended should be regenerated. Do not add to table Library_Paths the
8486 libraries that are in extended projects. Link only with libraries that
8487 are in libray projects that are not extended.
8488 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8489 for a library project that is extended.
8491 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8493 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8494 conforming subprogram renamings that appear to be completions if they
8495 are not fully conformant.
8496 Such renamings are homographs but not completions.
8497 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8498 names in a subprogram renaming that appears in an instance.
8500 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8502 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8503 not immutably limited, build actual subtype from expression to provide
8504 proper bounds to caller.
8506 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8508 * sem_ch8.adb: Minor comment correction.
8510 2011-08-03 Thomas Quinot <quinot@adacore.com>
8512 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8513 returning a limited array, use an extended return statement.
8515 2011-08-03 Vincent Celier <celier@adacore.com>
8517 * make.adb (Initialize): If --subdirs= is used, but no project file is
8518 specified, attempt to create the specify subdir if it does not already
8519 exist and use it as the object directory as if -D had been specified.
8521 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8523 * s-tpopsp-vms.adb: New file.
8524 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8525 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8527 2011-08-03 Emmanuel Briot <briot@adacore.com>
8529 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8532 2011-08-03 Yannick Moy <moy@adacore.com>
8534 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8535 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8536 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8537 detect that an array has static bounds.
8539 2011-08-03 Thomas Quinot <quinot@adacore.com>
8541 * exp_dist.adb: Minor reformatting.
8543 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8545 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8546 (ATCB_Key): Removed, not always used.
8548 2011-08-03 Emmanuel Briot <briot@adacore.com>
8550 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8551 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8552 most remaining global variables.
8554 2011-08-03 Robert Dewar <dewar@adacore.com>
8556 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8557 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8560 2011-08-03 Javier Miranda <miranda@adacore.com>
8562 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8563 that must be passed by copy in VM targets.
8565 2011-08-03 Emmanuel Briot <briot@adacore.com>
8567 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8568 duplicates a similar htable now in the project tree.
8570 2011-08-03 Claire Dross <dross@adacore.com>
8572 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8573 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8574 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8575 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8576 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8577 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8578 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8581 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8583 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8584 (ATCB_Key): Removed, not always used.
8585 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8587 * s-tpopsp-tls.adb: New file.
8588 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8589 x86/x64/ia64/powerpc/sparc Linux.
8591 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8593 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8594 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8596 2011-08-03 Thomas Quinot <quinot@adacore.com>
8598 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8599 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8600 Fix type selection for mapping integer types to PolyORB types.
8602 2011-08-03 Bob Duff <duff@adacore.com>
8604 * sem_ch7.adb: Minor comment clarification.
8606 2011-08-03 Bob Duff <duff@adacore.com>
8608 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8609 an error analyzing a choice, skip further processing. Further
8610 processing could cause a crash or cascade errors.
8612 2011-08-03 Emmanuel Briot <briot@adacore.com>
8614 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
8615 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
8616 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
8617 prj-env.ads (Shared_Project_Tree_Data): new type
8618 An aggregate project and its aggregated trees need to share the common
8619 data structures used for lists of strings, packages,... This makes the
8620 code simpler since otherwise we have to pass the root tree (also used
8621 for the configuration file data) in addition to the current project
8622 tree. This also avoids ambiguities as to which tree should be used.
8623 And finally this saves a bit of memory.
8624 (For_Every_Project_Imported): new parameter Tree.
8625 Since aggregated projects are using a different tree, we need to let
8626 the caller know which tree to use to manipulate the returned project.
8628 2011-08-03 Robert Dewar <dewar@adacore.com>
8630 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
8631 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
8632 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
8633 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
8635 2011-08-03 Javier Miranda <miranda@adacore.com>
8637 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
8638 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
8640 2011-08-03 Bob Duff <duff@adacore.com>
8642 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
8645 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
8647 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
8648 g-sehash.ads: Fix typo. Update header.
8650 2011-08-03 Thomas Quinot <quinot@adacore.com>
8652 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
8655 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8657 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
8658 prefixes of private types along with records, since the selector may be
8660 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
8661 private types along with records, since the selector may be a
8664 2011-08-03 Emmanuel Briot <briot@adacore.com>
8666 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
8668 2011-08-03 Javier Miranda <miranda@adacore.com>
8670 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
8671 Tagged_Type_Expansion.
8673 2011-08-03 Yannick Moy <moy@adacore.com>
8675 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
8676 violation when the argument of concatenation is the name of a
8679 2011-08-03 Emmanuel Briot <briot@adacore.com>
8681 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
8682 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
8683 (Process_Declarative_Items): new parameter Child_Env.
8685 2011-08-03 Yannick Moy <moy@adacore.com>
8687 * alfa.ads: Update format of ALFA section in ALI file in order to
8688 add a mapping from bodies to specs when both are present.
8689 (ALFA_Scope_Record): Add components for spec file/scope.
8690 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
8692 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
8693 collected, fill in the spec information when relevant.
8694 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
8697 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8699 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
8700 code unit to decide whether to add internally generated subprograms.
8702 2011-08-03 Javier Miranda <miranda@adacore.com>
8704 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
8705 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
8706 be handled by copy in VM targets.
8708 2011-08-03 Emmanuel Briot <briot@adacore.com>
8710 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
8711 code with Makeutl.Get_Switches.
8712 * prj-tree.adb: Update comment.
8714 2011-08-03 Thomas Quinot <quinot@adacore.com>
8716 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
8717 subprogram with a limited formal that does not support external
8720 2011-08-03 Yannick Moy <moy@adacore.com>
8722 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
8724 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
8725 not from current unit in two phases, because it is not possible to
8726 change the table while iterating over its content.
8727 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
8729 2011-08-03 Sergey Rybin <rybin@adacore.com>
8731 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
8732 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
8734 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8736 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
8737 and the component type is composite, this is ambiguous for predefined
8738 concatenation, but if the node is not overloaded and the entity is a use
8739 -defined function its profile can be used to resolve that aggregate.
8741 2011-08-03 Robert Dewar <dewar@adacore.com>
8743 * exp_ch4.adb: Minor code cleanup.
8745 2011-08-03 Thomas Quinot <quinot@adacore.com>
8747 * exp_dist.adb: Do not generate distribution stubs if serious errors
8748 have been diagnosed.
8750 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8752 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
8753 the first formal of a primitive operation, go to the base type to
8754 handle properly an access to a derived type with constrained
8756 * sem_type.adb (Disambiguate): an immediately visible operator hides a
8757 user-defined function that is only use-visible.
8759 2011-08-03 Robert Dewar <dewar@adacore.com>
8761 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
8762 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
8763 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
8764 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
8765 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
8766 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
8767 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
8768 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
8770 2011-08-03 Robert Dewar <dewar@adacore.com>
8772 * repinfo.adb (List_Mechanism): Add handling of
8773 Convention_Ada_Pass_By_XXX.
8774 * sem_mech.adb (Set_Mechanism): Ditto.
8775 * sem_prag.adb (Process_Convention): Add entries for
8776 Convention_Ada_Pass_By_XXX.
8777 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
8779 2011-08-03 Pascal Obry <obry@adacore.com>
8781 * makeutl.adb: Minor reformatting.
8783 2011-08-03 Vincent Celier <celier@adacore.com>
8786 (Get_File_Name) If the file cannot be found when there are no config
8787 pragmas file and May_Fail is True, return No_File instead of the file
8788 name, to be consistent.
8790 2011-08-03 Pascal Obry <obry@adacore.com>
8792 * adaint.c (__gnat_is_executable_file_attr): Avoid access
8795 2011-08-03 Javier Miranda <miranda@adacore.com>
8798 (Same_Representation): In VM targets the representation of arrays with
8799 aliased components differs from arrays with non-aliased components.
8801 2011-08-03 Emmanuel Briot <briot@adacore.com>
8803 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
8804 not systematically lower case attribute indexes that contain no "."
8805 Fix definition of several Naming attributes, which take
8806 a unit name as index and therefore should be case insensitive.
8807 Minor refactoring (reduce length of variable names).
8809 2011-08-03 Emmanuel Briot <briot@adacore.com>
8811 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
8813 2011-08-03 Emmanuel Briot <briot@adacore.com>
8815 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
8816 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
8817 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
8818 prj-tree.ads (Prj.Tree.Environment): new type.
8820 2011-08-03 Emmanuel Briot <briot@adacore.com>
8822 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
8823 prj-tree.adb, prj-tree.ads (Environment): new type.
8825 2011-08-03 Emmanuel Briot <briot@adacore.com>
8827 * prj-tree.ads: Remove unused variable.
8829 2011-08-03 Yannick Moy <moy@adacore.com>
8831 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8832 issuing messages related to SPARK restriction violation.
8834 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8836 * sem_ch6.adb: guard against error nodes in return statements.
8838 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8840 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
8841 a warning can only appear on a configuration file, so emit warning
8842 without further checks.
8844 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8846 * s-interr.ads: add overriding keyword.
8848 2011-08-03 Geert Bosch <bosch@adacore.com>
8850 * exp_attr.adb: Fix minor typo.
8852 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8854 * par-ch4.adb: improve error recovery.
8856 2011-08-03 Emmanuel Briot <briot@adacore.com>
8858 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
8859 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
8862 2011-08-03 Emmanuel Briot <briot@adacore.com>
8864 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
8865 "external" as an attribute name in aggregate projects.
8867 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8869 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
8870 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
8871 from 0, so we need to adjust.
8873 2011-08-03 Emmanuel Briot <briot@adacore.com>
8875 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
8876 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
8878 2011-08-03 Yannick Moy <moy@adacore.com>
8880 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
8881 restriction on overloaded entity if the entity is not an operator.
8883 2011-08-03 Yannick Moy <moy@adacore.com>
8885 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
8886 restrict.ads: Rename remaining Check_Formal_Restriction* into
8887 Check_SPARK_Restriction*.
8889 2011-08-03 Emmanuel Briot <briot@adacore.com>
8891 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
8892 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
8894 (Project_Empty): removed
8895 (Empty_Project): new parameter Qualifier
8896 This is used to have fields specific to aggregate projects, cleaner
8897 New field to store the list of aggregated projects.
8898 (Check_Aggregate_Project): removed
8899 (Process_Aggregated_Projects, Free): new subprograms.
8901 2011-08-03 Olivier Hainque <hainque@adacore.com>
8903 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
8905 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8907 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
8908 explicit dereference of an unconstrained type, create a constrained
8909 subtype for it, as is done for function calls that return an
8912 2011-08-03 Thomas Quinot <quinot@adacore.com>
8914 * g-pehage.adb (Finalize): Avoid possible double-free.
8916 2011-08-03 Steve Baird <baird@adacore.com>
8918 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
8919 Elab_Spec/Body attrs in CodePeer_Mode.
8921 2011-08-03 Javier Miranda <miranda@adacore.com>
8923 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
8924 low bound is not known at compile time but they have no others choice.
8925 Done because in this case the bounds can be obtained directly from the
8928 2011-08-03 Ed Falis <falis@adacore.com>
8930 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
8931 on VxWorks SMP. Remove unusable constant ANY_CPU.
8933 2011-08-03 Emmanuel Briot <briot@adacore.com>
8935 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
8936 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
8937 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
8938 Prj.Env.Initialize_Empty): new subprograms
8939 (Get_Env, Find_Project): remove parameter Target_Name.
8941 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8943 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
8944 as a condition for the delayed call to Derived_Subprograms done for the
8945 case of the rewriting of a derived type that constrains the
8946 discriminants of its parent type.
8947 Avoids redundant subprogram derivations for private subtype derivations.
8949 2011-08-03 Javier Miranda <miranda@adacore.com>
8951 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
8952 Build_Record_Aggr_Code.
8953 (Build_Record_Aggr_Code): Add missing support to initialize hidden
8954 discriminants in extension aggregates.
8956 2011-08-03 Emmanuel Briot <briot@adacore.com>
8958 * prj-pp.adb (Print): also output project qualifiers, since in
8959 particular "aggregate" is mandatory in an aggregate project.
8961 2011-08-03 Emmanuel Briot <briot@adacore.com>
8963 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
8964 (Debug_Output): new function.
8966 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8968 * gnat_ugn.texi: Document -Wstack-usage.
8969 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
8971 2011-08-03 Thomas Quinot <quinot@adacore.com>
8973 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
8974 have keyword LIMITED.
8976 2011-08-03 Yannick Moy <moy@adacore.com>
8978 * alfa.adb, alfa.ads, alfa_test.adb: New files.
8979 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
8980 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
8981 section (does not happen in compiler, only if code directly calls
8983 * get_alfa.adb, get_alfa.ads: New files.
8984 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
8986 * lib-xref-alfa.adb: New file.
8987 * lib-xref.adb, lib-xref.ads
8988 (Xref_Entry): redefine information needed in cross-references for ALFA.
8989 Push ALFA treatments in separated local package.
8990 (Enclosing_Subpragram_Or_Package): treat specially subprogram
8991 identifiers. Return entity of package body instead of spec. Return
8992 Empty for a scope with no location.
8993 (Generate_Reference): adapt to new components for ALFA information.
8994 Remove the need for D references on definitions.
8995 (Is_Local_Reference): moved to ALFA local package
8996 (Output_References): extract subfunction as Extract_Source_Name
8997 (Output_Local_References): remove procedure, replaced by filtering of
8998 cross-references in package ALFA and printing in Put_ALFA.
8999 (Write_Entity_Name): remove procedure
9000 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9001 print exact name of entity as it appears in source file
9002 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9003 * put_alfa.adb, put_alfa.ads: New files.
9004 * xref_lib.adb (Search_Xref): protect read of cross-references against
9005 reading other sections of the ALI file, in gnatxref
9006 (Search): protect read of cross-references against reading other
9007 sections of the ALI file, in gnatfind.
9008 * gcc-interface/Make-lang.in: Update dependencies.
9010 2011-08-03 Thomas Quinot <quinot@adacore.com>
9012 * sem_ch3.adb: Minor reformatting.
9014 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9016 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9017 raising an exception.
9019 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9021 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9022 type, always use 1 as the lower bound or string, even if lower bound of
9023 context is not static, to handle properly null strings in a non-static
9026 2011-08-03 Bob Duff <duff@adacore.com>
9028 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9029 always legal on the right-hand side of an assignment statement; there
9030 is always an applicable index constraint in this case. Therefore, the
9031 check for Pkind = N_Assignment_Statement is now unconditional -- it
9032 doesn't depend on whether Is_Constrained (Typ).
9034 2011-08-03 Robert Dewar <dewar@adacore.com>
9036 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9038 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9040 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9041 for an itype created within a generic unit.
9043 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9045 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9046 suppresses all inlining.
9048 2011-08-03 Robert Dewar <dewar@adacore.com>
9050 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9051 exp_aggr.adb: Minor reformatting.
9053 2011-08-03 Thomas Quinot <quinot@adacore.com>
9055 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9056 tagged assignment when discriminant checks are suppressed. This is
9057 useless and extremely costly in terms of static stack usage.
9059 2011-08-03 Bob Duff <duff@adacore.com>
9061 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9062 of generics, because this leads to the wrong entity in the wrong scope,
9063 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9065 (Process_Interface_Name): Follow Alias for instances of generics, to
9066 correct for the above change.
9068 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9070 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9071 is an integer literal it is always safe to replace the reference. In
9072 addition, if the reference appears in the generated code for an object
9073 declaration it is necessary to copy because otherwise the reference
9074 might be to the uninitilized value of the discriminant of the object
9077 2011-08-03 Pascal Obry <obry@adacore.com>
9079 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9080 ACL used, in this case we want to check for ending .exe, not .exe
9081 anywhere in the path.
9083 2011-08-03 Sergey Rybin <rybin@adacore.com>
9085 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9086 the tree structure (semantic decoration of references to record
9089 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9091 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9092 choices of a named array aggregate, bail out when any choices are
9093 marked as Errors_Posted.
9095 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9097 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9098 in which entity is frozen, to handle properly loop variables in
9101 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9103 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9104 subtype is not static, compute the upper bound using attributes, to
9105 handle properly index types that are not integer types.
9107 2011-08-03 Bob Duff <duff@adacore.com>
9109 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9110 Update copyright notice.
9112 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9114 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9115 Original_Discriminant if within an instance.
9116 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9118 2011-08-03 Thomas Quinot <quinot@adacore.com>
9120 * einfo.ads: Minor reformatting.
9122 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9124 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9125 composite type with an unfrozen subcomponent, in the profile of a
9126 primitive operation.
9128 2011-08-03 Robert Dewar <dewar@adacore.com>
9130 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9132 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9134 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9135 unconstrained type with discriminants is initialized with an aggregate,
9136 use the constrained subtype of the aggregate as the type of the object,
9137 because it is immutable, and this allows the back-end to generate no
9138 code for the object declaration.
9140 2011-08-03 Robert Dewar <dewar@adacore.com>
9142 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9143 comparison operand is variable, and turns out to be zero or negative.
9145 2011-08-03 Javier Miranda <miranda@adacore.com>
9148 (Expand_Dispatching_Constructor_Call): Disable expansion of
9149 code required for native targets. Done to avoid generating
9150 references to unavailable runtime entities in VM targets.
9152 (Expand_N_Object_Declaration): Add missing support to handle
9153 the explicit initialization of class-wide interface objects.
9156 2011-08-03 Matthew Heaney <heaney@adacore.com>
9158 * a-cobove.adb (Merge): Move source onto target, instead of using
9161 2011-08-03 Matthew Heaney <heaney@adacore.com>
9163 * a-cbdlli.adb (Splice): Move source items from first to last.
9165 2011-08-03 Yannick Moy <moy@adacore.com>
9167 * sem_util.ads: Add comment.
9169 2011-08-03 Javier Miranda <miranda@adacore.com>
9172 (Expand_Record_Aggregate): In VM targets disable the expansion into
9173 assignments of aggregates whose type is not known at compile time.
9175 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9177 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9178 protected entries and task entries, to build the proper renaming
9179 declaration for entry formals, used in debugging.
9180 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9181 parameters in the same way.
9183 2011-08-02 Robert Dewar <dewar@adacore.com>
9185 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9186 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9187 code reorganization.
9189 2011-08-02 Robert Dewar <dewar@adacore.com>
9191 * debug.adb: Debug flag d.P to suppress length comparison optimization
9192 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9193 comparison of Length by comparing First/Last instead.
9195 2011-08-02 Matthew Heaney <heaney@adacore.com>
9197 * a-cobove.ads: Code clean up.
9199 2011-08-02 Vincent Celier <celier@adacore.com>
9201 * adaint.c (file_names_case_sensitive_cache): New static int.
9202 (__gnat_get_file_names_case_sensitive): Cache the return value in
9203 file_names_case_sensitive_cache at the first invocation, to avoid
9204 multiple calls to getenv.
9206 2011-08-02 Bob Duff <duff@adacore.com>
9208 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9210 2011-08-02 Yannick Moy <moy@adacore.com>
9212 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9213 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9214 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9215 indicate that we are in a precondition or postcondition. This is used in
9216 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9217 decide whether to flag the spec or body of the current subprogram as
9220 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9222 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9224 * a-extiin.ads: New file.
9226 2011-08-02 Bob Duff <duff@adacore.com>
9228 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9229 now raises Name_Error instead of Use_Error in certain cases. The other
9230 parts of this AI were already implemented properly.
9232 2011-08-02 Vincent Celier <celier@adacore.com>
9234 * link.c: Only import "auto-host.h" when building the gnattools.
9236 2011-08-02 Yannick Moy <moy@adacore.com>
9238 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9239 which calls a local subprogram, so extract subprogram
9240 from Mark_Non_ALFA_Subprogram_Body.
9242 2011-08-02 Javier Miranda <miranda@adacore.com>
9245 (Extract_Dispatching_Call): If the type of the dispatching object is an
9246 access type then return an explicit dereference in the Object out-mode
9249 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9251 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9252 compatibility checks for all indexes of an array subtype, not just the
9253 first. Reset Has_Dynamic_Range_Check on the subtype before each
9254 potential check to ensure that Insert_Range_Checks will not elide any
9255 of the dynamic checks.
9257 2011-08-02 Yannick Moy <moy@adacore.com>
9259 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9260 SPARK restriction at parsing time.
9261 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9262 directive only if the SPARK restriction is set for this unit.
9264 2011-08-02 Yannick Moy <moy@adacore.com>
9266 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9267 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9268 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9269 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9270 Mark_Non_ALFA_Subprogram_Body.
9271 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9274 2011-08-02 Yannick Moy <moy@adacore.com>
9276 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9279 2011-08-02 Robert Dewar <dewar@adacore.com>
9281 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9282 exp_ch3.adb: Minor reformatting.
9284 2011-08-02 Emmanuel Briot <briot@adacore.com>
9286 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9287 files, not any regular file.
9288 (__gnat_locate_file_with_predicate): new subprogram.
9290 2011-08-02 Yannick Moy <moy@adacore.com>
9292 * sinfo.adb, sinfo.ads: Restrict the use of flags
9293 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9294 nodes, plus N_Subtype_Declaration for the 2nd one.
9296 2011-08-02 Sergey Rybin <rybin@adacore.com>
9298 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9299 - fix bugs in the description of Source_Trace;
9300 - get rid of UNIT_NAME;
9302 2011-08-02 Javier Miranda <miranda@adacore.com>
9305 (Build_Dispatching_Requeue): Adding support for VM targets
9306 since we cannot directly reference the Tag entity.
9307 * exp_sel.adb (Build_K): Adding support for VM targets.
9308 (Build_S_Assignment): Adding support for VM targets.
9310 (Default_Prim_Op_Position): In VM targets do not restrict availability
9311 of predefined interface primitives to compiling in Ada 2005 mode.
9312 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9313 restricted to compiling in Ada 2005 mode.
9314 (Make_VM_TSD): Generate code that declares and initializes the OSD
9315 record. Needed to support dispatching calls through synchronized
9318 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9319 primitives associated with synchronized interfaces.
9320 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9321 primitives associated with synchronized interfaces.
9323 2011-08-02 Yannick Moy <moy@adacore.com>
9325 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9326 statements hidden in SPARK if preceded by the HIDE directive
9327 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9328 exception handlers as hidden in SPARK if preceded by the HIDE directive
9329 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9330 if starting with the HIDE directive
9331 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9332 starting with the HIDE directive; mark the declarations in a private
9333 part as hidden in SPARK if the private part starts with the HIDE
9335 * restrict.adb, restrict.ads
9336 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9337 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9338 argument node belongs to a part which is hidden in SPARK
9339 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9340 parts in SPARK; protect the possibly costly call to
9341 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9342 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9343 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9344 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9346 (Scan): recognize special comment starting with '#' and followed by
9347 SPARK keyword "hide" as a HIDE directive.
9349 2011-08-02 Yannick Moy <moy@adacore.com>
9351 * types.ads, erroutc.ads: Minor reformatting.
9353 2011-08-02 Vincent Celier <celier@adacore.com>
9355 * link.c: Add response file support for cross platforms.
9357 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9359 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9360 in an association, set parent field of copy before partial analysis.
9361 * sem_res.adb (Resolve_Slice): create reference to itype only when
9362 expansion is enabled.
9364 2011-08-02 Yannick Moy <moy@adacore.com>
9366 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9367 for new flag denoting which subprogram bodies are in ALFA
9368 * restrict.adb, sem_ch7.adb: Update comment
9369 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9370 sem_ch9.adb, sem_res.adb: Add calls to
9371 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9372 * sem_ch6.adb (Analyze_Function_Return): add calls to
9373 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9374 middle of the body, and extended return.
9375 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9376 False when missing return.
9377 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9378 to True for subprograms whose spec is in ALFA. Remove later on the flag
9379 on the entity used for a subprogram body when there exists a separate
9381 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9382 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9383 False, otherwise do nothing.
9385 2011-08-02 Robert Dewar <dewar@adacore.com>
9387 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9389 2011-08-02 Yannick Moy <moy@adacore.com>
9391 * sem_ch4.ads: minor formatting.
9393 2011-08-02 Yannick Moy <moy@adacore.com>
9395 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9396 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9397 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9398 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9399 opt.ads: cleanup of SPARK mode
9401 2011-08-02 Yannick Moy <moy@adacore.com>
9403 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9405 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9406 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9408 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9409 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9410 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9411 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9413 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9415 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9416 functions whose return type is not in ALFA.
9417 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9419 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9420 parameter's type is not in ALFA.
9421 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9424 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9426 * sem_ch6 (Analyze_Expression_Function): treat the function as
9427 Inline_Always, and introduce a subprogram declaration for it when it is
9429 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9430 expression functions, so that the back-end can determine whether they
9431 can in fact be inlined.
9432 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9433 a function body comes from an expression function.
9435 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9437 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9438 null exclusions to test Can_Never_Be_Null on the anonymous access types
9439 of the formals rather than testing the formals themselves. Exclude this
9440 check in cases where the Old_Formal is marked as a controlling formal,
9441 to avoid issuing spurious errors for bodies completing dispatching
9442 operations (due to the flag not getting set on controlling access
9443 formals in body specs).
9444 (Find_Corresponding_Spec): When checking full and subtype conformance of
9445 subprogram bodies in instances, pass Designated and E in that order, for
9446 consistency with the expected order of the formals (New_Id followed by
9449 2011-08-02 Robert Dewar <dewar@adacore.com>
9451 * sem_ch8.adb: Minor reformatting.
9453 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9455 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9456 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9457 primitive operations of class-wide actuals.
9459 2011-08-02 Javier Miranda <miranda@adacore.com>
9461 * exp_atag.ads, exp_atag.adb
9462 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9463 since its value is implicitly passed in argument Typ.
9464 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9465 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9466 Build_Common_Dispatching_Select_Statements.
9468 2011-08-02 Robert Dewar <dewar@adacore.com>
9470 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9471 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9474 2011-08-02 Robert Dewar <dewar@adacore.com>
9476 * sem_res.adb: Minor reformatting.
9477 * sem_prag.adb: Minor reformatting.
9479 2011-08-02 Javier Miranda <miranda@adacore.com>
9481 * exp_atag.adb, exp_atags.ads
9482 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9483 by the tagged type Entity. Required to use this routine in the VM
9484 targets since we do not have available the Tag entity in the VM
9487 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9488 Ada.Tags has not been previously loaded.
9490 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9491 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9493 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9494 view of enclosing scopes. Required to handle enclosing scopes that
9495 are synchronized types whose full view is a task type.
9497 (Build_VM_TSDs): Minor code improvement to avoid generating and
9498 analyzing lists with empty nodes.
9499 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9500 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9501 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9502 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9503 (Make_Select_Specific_Data_Table): Add support for VM targets.
9504 (Make_VM_TSD): Generate code to initialize the SSD structure of
9507 2011-08-02 Yannick Moy <moy@adacore.com>
9509 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9510 cross-references section in ALI.
9511 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9512 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9514 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9515 subprogram or package entity of a node
9516 (Is_Local_Reference_Type): new function returns True for references
9517 selected in local cross-references.
9518 (Lt): function extracted from Lt in Output_References
9519 (Write_Entity_Name): function extracted from Output_References
9520 (Generate_Definition): generate reference with type 'D' for definition
9521 of objects (object declaration and parameter specification), with
9522 appropriate locations and units, for use in local cross-references.
9523 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9524 references of type 'I' for initialization in object definition.
9525 (Output_References): move part of function Lt and procedure
9526 Write_Entity_Name outside of the body. Ignore references of types 'D'
9527 and 'I' introduced for local cross-references.
9528 (Output_Local_References): new procedure to output the local
9529 cross-references sections.
9530 (Lref_Entity_Status): new array defining whether an entity is a local
9531 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9532 with 'I' type when initialization expression is present.
9533 * get_scos.adb, get_scos.ads: Correct comments and typos
9535 2011-08-02 Javier Miranda <miranda@adacore.com>
9537 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9539 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9541 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9544 2011-08-02 Vincent Celier <celier@adacore.com>
9546 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9547 (No_Space_Img): New function
9548 (Find_Excluded_Sources): When reading from a file, record the file name
9549 and the line number for each excluded source.
9550 (Mark_Excluded_Sources): When reporting an error, if the excluded
9551 sources were read from a file, include file name and line number in
9554 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9556 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9558 2011-08-02 Robert Dewar <dewar@adacore.com>
9560 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9562 2011-08-02 Javier Miranda <miranda@adacore.com>
9564 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9565 generation of TSDs to the DOTNET compiler.
9566 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9567 generation of TSDs to the DOTNET compiler.
9569 2011-08-02 Javier Miranda <miranda@adacore.com>
9571 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9572 record of all the tagged types declared inside library level package
9573 declarations, library level package bodies or library level subprograms.
9574 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9575 associated with a given tagged type.
9576 (Build_VM_TSDs): New subprogram.
9577 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9578 compilation units that are subprograms.
9579 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9580 compilation units that are package bodies.
9581 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9582 units that are a package declaration or a package instantiation.
9583 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9584 reorganization to improve the error generated by the frontend when the
9585 function Ada.Tags.Secondary_Tag is not available.
9586 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9587 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9589 2011-08-02 Javier Miranda <miranda@adacore.com>
9591 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9593 2011-08-02 Robert Dewar <dewar@adacore.com>
9595 * s-imenne.ads: Minor reformatting.
9597 2011-08-02 Robert Dewar <dewar@adacore.com>
9599 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9600 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9601 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9603 2011-08-02 Robert Dewar <dewar@adacore.com>
9605 * einfo.ads (Materialize_Entity): Document this is only for renamings
9606 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9607 required debug information in the case where we transform the object
9608 declaration into a renaming declaration.
9609 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9611 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9614 2011-08-02 Robert Dewar <dewar@adacore.com>
9616 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9617 Suppress_Init_Procs.
9618 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9619 Suppress_Initialization/Initialization_Suppressed.
9620 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9621 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9622 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9623 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9625 2011-08-02 Robert Dewar <dewar@adacore.com>
9627 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9630 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9632 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9633 only have inheritable classwide pre/postconditions.
9635 2011-08-02 Javier Miranda <miranda@adacore.com>
9637 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9638 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9639 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9640 checks if the external tag of a type is the same as the external tag
9641 of some other declaration.
9643 2011-08-02 Thomas Quinot <quinot@adacore.com>
9645 * s-taskin.ads: Minor reformatting.
9647 2011-08-02 Emmanuel Briot <briot@adacore.com>
9649 * g-comlin.adb (Display_Help): swap the order in which it prints the
9650 short help and the general usage.
9652 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9654 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9655 the aspect declarations and attach them to the generic copy for
9656 subsequent analysis.
9657 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9658 declarations of the generic tree to the new subprogram declarations.
9659 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9660 conditions that apply to a subprogram instance.
9662 2011-08-02 Robert Dewar <dewar@adacore.com>
9664 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9666 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9668 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9669 private type with a tagged full view is not derived in the immediate
9670 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9672 2011-08-02 Robert Dewar <dewar@adacore.com>
9674 * exp_ch4.adb: Minor reformatting.
9676 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9678 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9679 Ada2012 iterator, the loop will be rewritten during expansion into a
9680 while loop with a cursor and an element declaration. Do not analyze the
9681 body in this case, because if the container is for indefinite types the
9682 actual subtype of the elements will only be determined when the cursor
9683 declaration is analyzed.
9685 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9687 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9688 size/alignment related attributes in CodePeer_Mode.
9690 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9692 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9693 Prepend_Element, since this can result in the operation getting the
9694 wrong slot in the full type's dispatch table if the full type has
9695 inherited operations. The incomplete type's operation will get added
9696 to the proper position in the full type's primitives
9697 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9698 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9699 dispatching operations, since there are cases where nonprimitive
9700 subprograms can get added to the list of incomplete dependents (such
9701 as subprograms in nested packages).
9702 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9703 private part when determining whether to add a primitive with a
9704 parameter of a tagged incomplete type to the Private_Dependents list.
9705 Such primitives can also occur in the visible part, and should not have
9706 been excluded from being private dependents.
9707 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9708 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9709 list of a Taft-amendment incomplete type is a primitive before issuing
9710 an error that the full type must appear in the same unit. There are
9711 cases where nonprimitives can be in the list (such as subprograms in
9713 * sem_disp.adb (Derives_From): Use correct condition for checking that
9714 a formal's type is derived from the type of the corresponding formal in
9715 the parent subprogram (the condition was completely wrong). Add
9716 checking that was missing for controlling result types being derived
9717 from the result type of the parent operation.
9719 2011-08-02 Yannick Moy <moy@adacore.com>
9721 * errout.adb (First_Node): minor renaming
9722 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9725 2011-08-02 Yannick Moy <moy@adacore.com>
9727 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9728 before accessing operands.
9729 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9730 decide whether an initialization expression respects SPARK rules, as
9731 the plain node is the expanded one. This allows for more valid warnings
9733 * gnat_rm.texi: Minor update.
9735 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9737 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9740 2011-08-02 Robert Dewar <dewar@adacore.com>
9742 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9744 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9746 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9747 loop statements and the element renaming declaration with a block when
9748 the element type is controlled.
9750 2011-08-02 Yannick Moy <moy@adacore.com>
9752 * sinfo.ads: Minor formatting.
9754 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9756 * sem_aggr.adb (Add_Association): if the association has a box and no
9757 expression, use the Sloc of the aggregate itself for the new
9759 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9762 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9764 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9765 When a container is provided via a function call, generate a renaming
9766 of the function result. This avoids the creation of a transient scope
9767 and the premature finalization of the container.
9768 * exp_ch7.adb (Is_Container_Cursor): Removed.
9769 (Wrap_Transient_Declaration): Remove the supression of the finalization
9770 of the list controller when the declaration denotes a container cursor,
9773 2011-08-02 Yannick Moy <moy@adacore.com>
9775 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9776 node is from source, instead of the original node being from source.
9778 (Resolve_Array_Aggregate): refine the check for a static expression, to
9779 recognize also static ranges
9780 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9781 Array_Type_Declaration): postpone the test for the type being a subtype
9782 mark after the type has been resolved, so that component-selection and
9783 expanded-name are discriminated.
9784 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9785 to distinguish the case of an iteration scheme, so that an error is
9786 issed on a non-static range in SPARK except in an iteration scheme.
9787 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9788 In_Iter_Schm = True.
9789 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9790 user-defined operators so that they are allowed in renaming
9792 (Find_Selected_Component): refine the check for prefixing of operators
9793 so that they are allowed in renaming. Move the checks for restrictions
9794 on selector name after analysis discriminated between
9795 component-selection and expanded-name.
9796 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9797 concatenation argument of string type if it is static.
9798 * sem_util.adb, sem_util.ads
9799 (Check_Later_Vs_Basic_Declarations): add a new function
9800 Is_Later_Declarative_Item to decice which declarations are allowed as
9801 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9802 mode, add that renamings are considered as later items.
9803 (Enclosing_Package): new function to return the enclosing package
9804 (Enter_Name): correct the rule for homonyms in SPARK
9805 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9806 from source (result of expansion) to avoid issuing wrong warnings.
9808 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9810 * errout.adb: On anything but an expression First_Node returns its
9813 2011-08-02 Pascal Obry <obry@adacore.com>
9815 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9817 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9819 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9820 Set the associated loop as the related expression of internally
9822 * exp_ch7.adb (Is_Container_Cursor): New routine.
9823 (Wrap_Transient_Declaration): Supress the finalization of the list
9824 controller when the declaration denotes a container cursor.
9826 2011-08-02 Yannick Moy <moy@adacore.com>
9828 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9830 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9831 expression is a simple expression. This check cannot be performed in
9832 the semantics, so just drop it.
9833 (P_Index_Or_Discriminant_Constraint): move check that the index or
9834 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9835 semantics. Other cases were previously checked in the semantics.
9836 * par-ch4.adb (P_Name): move checks that a selector name is not
9837 character literal or an operator symbol to Find_Selected_Component in
9839 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9840 declarations are not placed after later declarations in a separate
9841 procedure in Sem_Util (possibly not the best choice?), to be used both
9842 during parsing, for Ada 83 mode, and during semantic analysis, for
9844 * par-endh.adb (Check_End): move check that end label is not missing
9845 to Process_End_Label in the semantics
9846 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9847 the special case for SPARK restriction
9848 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9849 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9850 parameter Force to issue the error message even on internal node (used
9851 for generated end label). Call Check_Restriction to check when an error
9852 must be issued. In SPARK mode, issue an error message even if the
9853 restriction is not set.
9854 (Check_Restriction): new procedure with an additional out parameter to
9855 inform the caller that a message has been issued
9856 * sem_aggr.adb: Minor modification of message
9857 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9858 instead of issuing an error message directly
9859 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9860 declarations are not placed after later declarations, by calling
9861 Check_Later_Vs_Basic_Declarations
9862 (Analyze_Subtype_Declaration): move here the check that an index or
9863 discriminant constraint must be a subtype mark. Change the check that
9864 a subtype of String must start at one so that it works on subtype marks.
9865 * sem_ch4.adb (Analyze_Call): move here the check that a named
9866 association cannot follow a positional one in a call
9867 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9868 instead of issuing an error message directly
9869 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9870 selector name is not a character literal or an operator symbol. Move
9871 here the check that the prefix of an expanded name cannot be a
9872 subprogram or a loop statement.
9873 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9874 procedure called from parsing and semantics to check that basic
9875 declarations are not placed after later declarations
9876 (Process_End_Label): move here the check that end label is not missing
9878 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9880 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9881 representation clause in codepeer mode, since it confuses CodePeer and
9882 does not bring useful info.
9884 2011-08-02 Ed Falis <falis@adacore.com>
9886 * init.c: initialize fp hw on MILS.
9888 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9890 * errout.adb (First_Node): for bodies, return the node itself (small
9891 optimization). For other nodes, do not check source_unit if the node
9892 comes from Standard.
9894 2011-08-02 Robert Dewar <dewar@adacore.com>
9896 * exp_ch3.adb: Minor comment additions.
9897 * sem_ch13.adb: Minor reformatting.
9899 2011-08-02 Pascal Obry <obry@adacore.com>
9901 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9903 2011-08-02 Robert Dewar <dewar@adacore.com>
9905 * sem_attr.adb: Minor reformatting.
9907 2011-08-02 Robert Dewar <dewar@adacore.com>
9909 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9910 (Has_Default_Component_Value): Removed
9911 * einfo.ads Comment updates
9912 (Has_Default_Aspect): Replaces Has_Default_Value
9913 (Has_Default_Component_Value): Removed
9915 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9917 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9918 (Get_Simple_Init_Val): Handle Default_Value aspect
9919 (Needs_Simple_Initialization): Handle Default_Value aspect
9920 * exp_ch3.ads: Needs_Simple_Initialization
9921 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9922 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9924 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9925 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9926 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9928 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9930 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9931 package containing iteration primitives.
9932 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9934 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9936 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9937 "of", pre-analyze expression in case it is a function call with
9938 finalization actions that must be placed ahead of the loop.
9939 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9940 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9942 2011-08-02 Geert Bosch <bosch@adacore.com>
9944 * cstand.adb (Create_Float_Types): Only consider C's long double for
9945 Long_Long_Float, in addition to double.
9947 2011-08-02 Robert Dewar <dewar@adacore.com>
9949 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9950 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9951 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9954 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9956 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9959 2011-08-02 Javier Miranda <miranda@adacore.com>
9961 * einfo.ads, einfo.adb
9962 (Original_Access_Type): Move this attribute to Node26 since there was
9963 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9964 which causes conflicts and breaks the generation of the .NET compiler.
9965 (Interface_Name): Add missing documentation on JGNAT only uses of
9968 2011-08-02 Geert Bosch <bosch@adacore.com>
9970 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9971 (Find_Back_End_Float_Type): Likewise
9972 (Create_Back_End_Float_Types): Likewise
9973 (Create_Float_Types): Likewise
9974 (Register_Float_Type): Likewise
9975 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9976 Nlist and split out type selection in new local Find_Base_Type function.
9977 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9979 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9981 2011-08-02 Robert Dewar <dewar@adacore.com>
9983 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9985 * opt.ads: Minor comment change.
9986 * sem_ch12.adb: Minor code reorganization.
9988 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9990 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9991 subtype's list of rep items to the list on the full subtype in the case
9992 where the lists are the same.
9994 2011-08-02 Geert Bosch <bosch@adacore.com>
9996 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9997 using the one from System.Strings, which also deallocates all strings.
9999 2011-08-02 Geert Bosch <bosch@adacore.com>
10001 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10003 * gcc-interface/Make-lang.in: Update dependencies.
10005 2011-08-02 Olivier Hainque <hainque@adacore.com>
10007 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10010 2011-08-02 Javier Miranda <miranda@adacore.com>
10012 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10013 associated with anonymous access to subprograms.
10015 2011-08-02 Geert Bosch <bosch@adacore.com>
10018 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10019 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10020 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10021 (Add_Symbol_Definition): Move to switch-c.adb
10022 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10023 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10024 (Add_Symbol_Definition): Move to switch-c.adb.
10025 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10027 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10028 Move to warnsw.adb.
10029 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10030 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10031 Move to warnsw.adb.
10032 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10033 (Add_Symbol_Definition): Moved from Prepcomp.
10034 * switch-c.ads: Update copyright notice. Use String_List instead of
10035 Argument_List, removing dependency on System.OS_Lib.
10037 2011-08-02 Yannick Moy <moy@adacore.com>
10039 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10040 mode on initialization expression which does not respect SPARK
10042 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10043 if the tree referenced by its argument represents an initialization
10044 expression in SPARK, suitable for initializing an object in an object
10047 2011-08-02 Javier Miranda <miranda@adacore.com>
10049 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10050 internally generated access to subprogram with its associated protected
10052 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10054 2011-08-02 Geert Bosch <bosch@adacore.com>
10056 * cstand.adb (Register_Float_Type): Print information about type to
10057 register, if the Debug_Flag_Dot_B is set.
10058 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10059 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10060 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10061 with a requested precision of more than Max_Digits digits and no more
10062 than Max_Base_Digits digits, if a range specification is present and the
10063 Predefined_Float_Types list has a suitable type to derive from.
10064 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10065 case of type completion with pragma Import
10067 (Process_Import_Predefined_Type): Processing to complete a type
10068 with pragma Import. Currently supports floating point types only.
10069 (Set_Convention_From_Pragma): Do nothing without underlying type.
10070 (Process_Convention): Guard against absence of underlying type,
10071 which may happen when importing incomplete types.
10072 (Process_Import_Or_Interface): Handle case of importing predefined
10073 types. Tweak error message.
10075 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10077 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10078 functions to previous change. Reorganize code slightly.
10080 2011-08-02 Geert Bosch <bosch@adacore.com>
10082 * back_end.ads (Register_Type_Proc): New call back procedure type for
10083 allowing the back end to provide information about available types.
10084 (Register_Back_End_Types): New procedure to register back end types.
10085 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10087 * cstand.adb (Back_End_Float_Types): New list for floating point types
10088 supported by the back end.
10089 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10090 (Copy_Float_Type): New procedure to make new copies of predefined types.
10091 (Register_Float_Type): New call back procedure to populate the BEFT list
10092 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10093 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10094 (Create_Float_Types): New procedure to create entities for floating
10095 point types predefined in Standard, and put these and any remaining
10096 BEFTs on the Predefined_Float_Types list.
10097 * stand.ads (Predefined_Float_Types): New list for predefined floating
10098 point types that do not have declarations in package Standard.
10100 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10102 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10103 entity node for the unit containing the parameter.
10104 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10105 (Add_Inlined_Subprogram): Likewise.
10106 * gcc-interface/Make-lang.in: Update dependencies.
10108 2011-08-02 Thomas Quinot <quinot@adacore.com>
10110 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10113 2011-08-02 Geert Bosch <bosch@adacore.com>
10115 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10117 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10119 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10120 computed value of Base_Type.
10122 2011-08-02 Yannick Moy <moy@adacore.com>
10124 * restrict.adb (Check_Restriction): issue an error for any use of
10125 class-wide, even if the No_Dispatch restriction is not set.
10126 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10127 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10128 when completing a private extension, the type named in the private part
10129 is not the same as that named in the visible part.
10130 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10131 of an inherited primitive operations of a tagged type or type extension
10132 that returns the tagged type.
10133 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10134 function which returns True for an implicit operation inherited by the
10135 derived type declaration for the argument type.
10136 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10139 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10141 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10142 Process_Bounds, to perform analysis with expansion of a range or an
10143 expression that is the iteration scheme for a loop.
10144 (Analyze_Iterator_Specification): If domain of iteration is given by a
10145 function call with a controlled result, as is the case if call returns
10146 a predefined container, ensure that finalization actions are properly
10148 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10150 2011-08-02 Javier Miranda <miranda@adacore.com>
10152 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10153 * gcc-interface/Make-lang.in: Update dependencies.
10155 2011-08-02 Javier Miranda <miranda@adacore.com>
10157 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10158 determine if the analysis is performed using N or Original_Node (N).
10159 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10160 functionality of routine Is_Variable avoids code duplication.
10161 * checks.adb (Determine_Range): Handle temporaries generated by
10162 Remove_Side_Effects.
10164 2011-08-02 Javier Miranda <miranda@adacore.com>
10166 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10167 expansion of the condition. Required since the previous analysis was
10168 done with expansion disabled (see Resolve_Quantified_Expression) and
10169 hence checks were not inserted and record comparisons have not been
10172 2011-08-02 Ed Falis <falis@adacore.com>
10174 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10177 2011-08-02 Bob Duff <duff@adacore.com>
10179 * opt.ads: Minor comment fix.
10181 2011-08-02 Bob Duff <duff@adacore.com>
10183 * sem_ch12.adb (Analyze_Package_Instantiation,
10184 Analyze_Subprogram_Instantiation): Turn off style checking while
10185 analyzing an instance. Whatever style checks that apply to the generic
10186 unit should apply, so it makes no sense to apply them in an instance.
10187 This was causing trouble when compiling an instance of a runtime
10188 unit that violates the -gnatyO switch.
10189 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10190 one of the two case statements, causing spurious errors.
10192 2011-08-02 Robert Dewar <dewar@adacore.com>
10194 * uname.adb: Minor reformatting.
10195 * gnatcmd.adb: Minor reformatting.
10196 * exp_attr.adb: Minor reformatting.
10198 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10200 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10201 No_Dispatching_Calls, do not look for the Assign primitive, because
10202 predefined primitives are not created in this case.
10204 2011-08-02 Bob Duff <duff@adacore.com>
10206 * stylesw.ads: Minor comment fixes.
10208 2011-08-02 Robert Dewar <dewar@adacore.com>
10210 * freeze.adb (Add_To_Result): New procedure.
10212 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10214 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10215 time, if the specific run-time routines for handling streams of strings
10216 are not available, use the default mechanism.
10218 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10220 * s-regpat.ads: Fix typo.
10222 2011-08-02 Vincent Celier <celier@adacore.com>
10224 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10225 not null, call it to create the in memory config project file without
10226 parsing an existing default config project file.
10228 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10230 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10232 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10234 * sem_elim.adb: an abstract subprogram does not need an eliminate
10235 pragma for its descendant to be eliminable.
10237 2011-08-02 Ed Falis <falis@adacore.com>
10239 * init.c: revert to handling before previous checkin for VxWorks
10240 * s-intman-vxworks.adb: delete unnecessary declarations related to
10241 using Ada interrupt facilities for handling signals.
10242 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10243 * s-intman-vxworks.ads: Import __gnat_install_handler as
10244 Initialize_Interrupts.
10245 * s-taprop-vxworks.adb: Delete Signal_Mask.
10246 (Abort_Handler): change construction of mask to unblock exception
10249 2011-08-02 Jerome Guitton <guitton@adacore.com>
10251 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10252 Debug_Raise_Exception before propagation starts.
10254 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10256 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10257 to Restriction_Check_Required.
10258 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10259 * sem_res.adb (Resolve_Call): Likewise.
10260 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10262 2011-08-02 Bob Duff <duff@adacore.com>
10264 * stylesw.ads: Update comment.
10265 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10266 * errout.ads: Remove obsolete comment.
10268 2011-08-02 Javier Miranda <miranda@adacore.com>
10270 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10271 (Set_Is_Safe_To_Reevaluate): new procedure.
10272 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10273 assignment is allowed on safe-to-reevaluate variables.
10274 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10275 temporary created to remove side effects in expressions that use
10276 the secondary stack as safe-to-reevaluate.
10277 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10278 variables that are not true constants.
10280 2011-08-02 Robert Dewar <dewar@adacore.com>
10282 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10283 sem_res.adb, sem_ch6.adb: Minor reformatting.
10285 2011-08-02 Jerome Guitton <guitton@adacore.com>
10287 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10289 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10291 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10292 not set Overridden_Operation if subprogram is an initialization
10295 2011-08-02 Yannick Moy <moy@adacore.com>
10297 * par-ch6.adb: Correct obsolete name in comments
10298 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10299 which takes two message arguments (existing function takes one), with
10300 second message used for continuation.
10301 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10302 block statements that originate from a source block statement, not
10303 generated block statements
10304 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10305 symmetry with procedure case
10306 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10307 function to issue an error in formal mode if a package specification
10308 contains more than one tagged type or type extension.
10309 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10310 parameters matching formals of tagged types are objects (or ancestor
10311 type conversions of objects), not general expressions. Issue an error
10312 on view conversions that are not involving ancestor conversion of an
10314 (Resolve_Type_Conversion): in formal mode, issue an error on the
10315 operand of an ancestor type conversion which is not an object
10316 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10317 procedure so that it works also for actuals of function calls
10318 (Is_Actual_Tagged_Parameter): new function which determines if its
10319 argument is an actual parameter of a formal of tagged type in a
10321 (Is_SPARK_Object_Reference): new function which determines if the tree
10322 referenced by its argument represents an object in SPARK
10324 2011-08-02 Robert Dewar <dewar@adacore.com>
10326 * sem_ch3.adb: Minor reformatting
10327 Minor comment addition
10328 Minor error msg text change
10330 2011-08-02 Javier Miranda <miranda@adacore.com>
10332 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10333 function. Used to be more precise when we generate a variable plus one
10334 assignment to remove side effects in the evaluation of the Bound
10336 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10337 of the bound expression to force its re-analysis and thus expand the
10338 associated transient scope (if required). Code cleanup replacing the
10339 previous code that declared the constant entity by an invocation to
10340 routine Force_Evaluation which centralizes this work in the frontend.
10342 2011-08-02 Robert Dewar <dewar@adacore.com>
10344 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10345 (Base_Type): Now uses improved Is_Base_Type function
10346 * einfo.ads (Base_Type): Inline this function
10348 2011-08-02 Robert Dewar <dewar@adacore.com>
10350 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10351 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10353 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10355 * gcc-interface/Make-lang.in: Update dependencies.
10356 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10359 2011-08-02 Yannick Moy <moy@adacore.com>
10361 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10362 non-simple expression used in delta constraint
10363 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10364 index constraint which is not a subtype mark
10365 * par.adb: With and use Restrict
10366 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10367 mode on component type which is not a subtype mark and default
10368 expression on component
10369 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10370 of string which does not have a lower index bound equal to 1
10371 (Array_Type_Declaration): issue an error in formal mode on index or
10372 component type which is not a subtype mark, and on aliased keyword on
10374 (Derived_Type_Declaration): issue an error in formal mode on interface,
10375 limited or abstract type
10376 (Record_Type_Declaration): issue an error in formal mode on interface
10377 (Record_Type_Definition): issue an error in formal mode on tagged types
10378 and type extensions not declared in the specification of a library unit
10379 package; on null non-tagged record; on variant part
10381 2011-08-02 Vincent Celier <celier@adacore.com>
10383 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10384 not declared for qualified library project when Library_Name is not
10385 declared, but Library_Dir is.
10387 2011-08-02 Robert Dewar <dewar@adacore.com>
10389 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10390 pragmas (affects aspects [Component_]Default_Value
10391 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10392 component type for the resolution
10394 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10396 * einfo.adb (Base_Type): Tune implementation for speed.
10398 2011-08-02 Robert Dewar <dewar@adacore.com>
10400 * freeze.adb: Minor reformatting.
10402 2011-08-02 Thomas Quinot <quinot@adacore.com>
10404 * scos.ads: Update comments.
10406 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10408 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10409 base type, because the parent may be a subtype of a private type whose
10410 convention is established in a private part.
10412 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10414 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10415 statement in a block when the expansion of the return expression has
10416 created a finalization chain.
10417 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10418 with the parent node.
10419 Add N_Extended_Return_Statement to handle the case where a transient
10420 object declaration appears in the Return_Object_Declarations list of
10421 an extended return statement.
10423 2011-08-02 Matthew Gingell <gingell@adacore.com>
10425 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10426 unused parameter 'name'.
10428 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10430 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10431 inherited operation, check whether its alias, which is the source
10432 operastion that it renames, has been marked eliminated.
10434 2011-08-02 Javier Miranda <miranda@adacore.com>
10436 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10437 in-mode parameter whose type is an access type since it can be used to
10438 modify its designated object. Enforce code that handles as safe an
10439 access type that is not access-to-constant but it is the result of a
10440 previous removal of side-effects.
10441 (Remove_Side_Effects): Minor code reorganization of cases which require
10442 no action. Done to incorporate documentation on new cases uncovered
10443 working in this ticket: no action needed if this routine was invoked
10444 too early and the nodes are not yet decorated.
10445 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10446 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10447 were issued with actuals that are implicitly provided by
10450 2011-08-02 Robert Dewar <dewar@adacore.com>
10452 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10454 2011-08-02 Yannick Moy <moy@adacore.com>
10456 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10457 to issue an error in formal mode on attribute not supported in this mode
10458 (Analyze_Attribute): issue errors on standard attributes not supported
10460 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10461 comment, and issue error in formal mode on modulus which is not a power
10463 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10465 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10467 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10468 operator on modular type (except 'not').
10470 2011-08-02 Robert Dewar <dewar@adacore.com>
10472 * gnat_rm.texi: Minor reformatting.
10474 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10476 * s-osinte-linux.ads: Minor comment update and reformatting.
10477 * i-cexten.ads: Make this unit pure, as for its parent.
10478 Will allow its usage in more contexts if needed.
10480 2011-08-02 Robert Dewar <dewar@adacore.com>
10482 * s-utf_32.ads: Minor comment fix.
10484 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10486 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10487 operation of a tagged synchronized type, handle the case where the
10488 controlling argument is overloaded.
10490 2011-08-02 Yannick Moy <moy@adacore.com>
10492 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10493 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10494 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10495 SPARK mode and formal verification mode on processing SPARK restriction
10496 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10497 requiring consistency checking.
10499 2011-08-02 Robert Dewar <dewar@adacore.com>
10501 * sem_res.adb: Minor reformatting.
10503 2011-08-02 Robert Dewar <dewar@adacore.com>
10505 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10506 a-cforse.ads: Remove unneeded with of Ada.Containers
10507 Remove commented out pragma Inline's
10508 Move specifications of new subprograms to the actual specs
10510 2011-08-02 Yannick Moy <moy@adacore.com>
10512 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10513 a-cforse.ads: Update comments.
10515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10517 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10519 2011-08-02 Robert Dewar <dewar@adacore.com>
10521 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10522 a-cforse.ads, a-cofove.ads: Minor reformatting.
10524 2011-08-02 Claire Dross <dross@adacore.com>
10526 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10527 a-cofove.ads: Add comments.
10529 2011-08-02 Yannick Moy <moy@adacore.com>
10531 * gnat_rm.texi: Document formal containers.
10533 2011-08-02 Emmanuel Briot <briot@adacore.com>
10535 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10536 are empty sections.
10538 2011-08-02 Robert Dewar <dewar@adacore.com>
10540 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10543 2011-08-02 Robert Dewar <dewar@adacore.com>
10545 * aspects.adb: New aspects Default_Value and Default_Component_Value
10546 New format of Aspect_Names table checks for omitted entries
10547 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10548 handling of boolean aspects for derived types.
10549 New aspects Default_Value and Default_Component_Value
10550 New format of Aspect_Names table checks for omitted entries
10551 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10552 (Has_Default_Value): New flag
10553 (Has_Default_Component_Value): New flag
10554 (Has_Default_Value): New flag
10555 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10557 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10558 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10559 Default_Value and Default_Component_Value
10560 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10561 New aspects Default_Value and Default_Component_Value
10562 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10563 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10565 2011-08-02 Vincent Celier <celier@adacore.com>
10567 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10568 inherit library kind.
10570 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10572 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10573 Minor reformatting.
10575 2011-08-02 Robert Dewar <dewar@adacore.com>
10577 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10579 2011-08-02 Yannick Moy <moy@adacore.com>
10581 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10583 2011-08-02 Robert Dewar <dewar@adacore.com>
10585 * impunit.adb: Add comment.
10587 2011-08-02 Yannick Moy <moy@adacore.com>
10589 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10590 qualification of aggregates in formal mode
10591 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10593 (Resolve_Aggregate): complete the test that an aggregate is adequately
10594 qualified in formal mode
10596 2011-08-02 Pascal Obry <obry@adacore.com>
10598 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10599 * mlib-prj.adb: Supress warning when compiling binder generated file.
10600 (Build_Library): Supress all warnings when compiling the binder
10603 2011-08-02 Yannick Moy <moy@adacore.com>
10605 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10607 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10608 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10609 Add with/use clauses to make Check_Formal_Restriction visible
10611 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10613 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10614 in-parameters when type of the generic formal is private in the generic
10615 spec and non-private in the body.
10617 2011-08-02 Claire Dross <dross@adacore.com>
10619 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10620 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10621 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10622 * impunit.adb, Makefile.rtl: Take new files into account.
10624 2011-08-02 Robert Dewar <dewar@adacore.com>
10626 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10627 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10629 2011-08-02 Yannick Moy <moy@adacore.com>
10631 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10633 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10634 matching static array bounds, taking into account the special case of
10636 * sem_ch3.adb: Typo in comment.
10638 2011-08-02 Yannick Moy <moy@adacore.com>
10640 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10641 which issues an error in formal mode if its argument node is originally
10643 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10644 has a discriminant specification so that it does not include the case
10646 (Derived_Type_Declaration): move here the test that a derived type has a
10647 discriminant specification
10648 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10649 first element of a component association before accessing its choices
10650 (presence of component association is not enough)
10651 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10652 declaration is a library item before accessing the next element in a
10653 list, as library items are not member of lists
10654 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10655 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10656 Check_Formal_Restriction whenever possible.
10658 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10660 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10661 reference when needed.
10663 2011-08-02 Bob Duff <duff@adacore.com>
10665 * gnat_ugn.texi: Fix typo.
10667 2011-08-02 Vincent Celier <celier@adacore.com>
10669 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10670 archive file name. Do not use the full path name of archives for Open
10673 2011-08-02 Robert Dewar <dewar@adacore.com>
10675 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10676 Analyze_Aspect_Specifications
10678 (Analyze_Aspect_Specifications): New handling for boolean aspects
10679 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10680 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10681 sequence for Analyze_Aspect_Specifications
10682 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10683 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10685 2011-08-02 Robert Dewar <dewar@adacore.com>
10687 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10688 aspects, since these no longer exist.
10690 2011-08-02 Robert Dewar <dewar@adacore.com>
10692 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10693 semicolon, do not try to see if there are aspects following it.
10694 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10697 2011-08-02 Robert Dewar <dewar@adacore.com>
10699 * sem_ch8.adb, aspects.ads: Minor reformatting.
10701 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10703 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10704 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10706 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10708 2011-08-02 Yannick Moy <moy@adacore.com>
10710 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10711 mode on subprogram declaration outside of package specification, unless
10712 it is followed by a pragma Import
10713 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10714 Access_Type_Declaration): issue error in formal mode on access type
10715 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10717 (Analyze_Object_Declaration): issue error in formal mode on object
10718 declaration which does not respect SPARK restrictions
10719 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10720 declaration which does not respect SPARK restrictions
10721 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10722 error in formal mode on digits or delta constraint
10723 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10724 decimal fixed point type
10725 (Derived_Type_Declaration): issue error in formal mode on derived type
10726 other than type extensions of tagged record types
10727 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10728 with check on access definition
10729 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10730 mode on protected definition.
10731 (Analyze_Task_Definition): issue error in formal mode on task definition
10733 2011-08-02 Robert Dewar <dewar@adacore.com>
10735 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10737 2011-08-02 Javier Miranda <miranda@adacore.com>
10739 * sem_ch6.adb (Can_Override_Operator): New function.
10740 (Verify_Overriding_Indicator): Add missing code to check overriding
10741 indicator in operators. Fixes regression.
10742 (Check_Overriding_Indicator): Minor reformating after replacing the
10743 code that evaluates if the subprogram can override an operator by
10744 invocations to the above new function.
10746 (Write_Field26_Name): Add missing code to ensure that, following
10747 the documentation in einfo.ads, this field is not shown as attribute
10748 "Static_Initialization" on non-dispatching functions.
10750 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10752 * sem_res.adb (Resolve_Call): A call to
10753 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10754 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10755 i.e., when the second parameter is of type Time_Span.
10757 2011-08-02 Vincent Celier <celier@adacore.com>
10759 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10760 with an archive instead of -L<library dir> -l<library name>.
10762 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10764 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10765 mark the base types In_Use in addition to making the operations
10768 2011-08-02 Ed Falis <falis@adacore.com>
10770 * init.c: add and setup __gnat_signal_mask for the exception signals
10771 * s-inmaop-vxworks.adb: new file.
10772 * s-intman-vxworks.adb: remove unnecessary initializations and
10774 * s-intman-vxworks.ads: remove unnecessary variable
10775 * s-taprop-vxworks.adb: simplify signal initialization
10777 2011-08-02 Robert Dewar <dewar@adacore.com>
10779 * sem_ch8.adb: Minor code reorganization, comment updates.
10781 2011-08-02 Robert Dewar <dewar@adacore.com>
10783 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10784 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10786 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10787 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10789 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10791 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10792 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10793 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10794 use_type_clauses, to handle more efficiently use_type and use_all_type
10796 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10797 Ada2012 Use_All_Type clause.
10798 (Use_Class_Wide_Operations): new procedure.
10800 2011-08-02 Robert Dewar <dewar@adacore.com>
10802 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10803 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10804 expression to expression function.
10806 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10808 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10809 if types are compatible.
10811 2011-08-02 Yannick Moy <moy@adacore.com>
10813 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10814 returns True if its argument array types have same dimension and same
10815 static bounds at each index.
10816 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10817 OUT or IN OUT paramaters which are not view conversions in SPARK.
10818 (Resolve_Arithmetic_Op): issue an error in formal mode on
10819 multiplication or division with operands of fixed point types which are
10820 not qualified or explicitly converted.
10821 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10822 Boolean or array type (except String) operands.
10823 (Resolve_Equality_Op): issue an error in formal mode on equality
10824 operators for array types other than String with non-matching static
10826 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10827 for array types with non-matching static bounds. Factorize the code in
10828 Matching_Static_Array_Bounds.
10829 (Resolve_Qualified_Expression): issue an error in formal mode on
10830 qualified expressions for array types with non-matching static bounds.
10831 (Resolve_Type_Conversion): issue an error in formal mode on type
10832 conversion for array types with non-matching static bounds
10834 2011-08-02 Robert Dewar <dewar@adacore.com>
10836 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10840 * par-ch9.adb: save location of entry for proper error message.
10842 2011-08-02 Javier Miranda <miranda@adacore.com>
10844 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10845 (Use_Full_View) which permits this routine to climb through the
10846 ancestors using the full-view of private parents.
10847 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10848 Use_Full_View to true in calls to Is_Ancestor.
10849 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10850 true in call to Is_Ancestor.
10851 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10852 Use_Full_View to true in call to Is_Ancestor.
10853 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10854 call to Is_Ancestor.
10855 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10856 Use_Full_View to true in calls to Is_Ancestor.
10857 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10858 Make_Select_Specific_Data_Table, Register_Primitive,
10859 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10860 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10861 to true in call to Is_Ancestor.
10862 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10863 Use_Full_View to true in calls to Is_Ancestor.
10865 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10866 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10868 2011-08-02 Robert Dewar <dewar@adacore.com>
10870 * gnat_rm.texi: Minor reformatting.
10871 * sem_prag.adb: Minor reformatting.
10873 2011-08-02 Tristan Gingold <gingold@adacore.com>
10875 * vms_data.ads: Add VMS qualifier for -gnateP.
10877 2011-08-02 Robert Dewar <dewar@adacore.com>
10879 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10880 * par-ch7.adb (P_Package): Proper placement of aspects for package
10881 decl/instantiation.
10882 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10883 (End_Statements): Add Is_Sloc parameterr
10884 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10885 (Check_End): Ad Is_Sloc parameter
10886 (End_Statements): Add Is_Sloc parameterr
10888 2011-08-02 Vincent Celier <celier@adacore.com>
10890 * ug_words: Add VMS qualifier equivalent to -gnateP:
10891 /SYMBOL_PREPROCESSING.
10893 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10895 * gnat-style.texi: For hexadecimal numeric literals the typical
10896 grouping of digits is 4 to represent 2 bytes.
10897 A procedure spec which is split into several lines is indented two
10900 2011-08-02 Yannick Moy <moy@adacore.com>
10902 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10903 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10904 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10906 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10907 choice in array aggregate
10908 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10910 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10911 positional and named aggregate for record, or others in record
10912 aggregate, or multiple choice in record aggregate
10913 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10914 array operands to logical operations AND, OR and XOR do not have the
10915 same static lower and higher bounds
10916 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10918 2011-08-01 Robert Dewar <dewar@adacore.com>
10920 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10921 Replaces Last_Source_Node_In_Sequence.
10922 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10923 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10924 parens and blank in string (this was inconsistently implemented).
10926 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10927 blank in string (this was inconsistently implemented).
10929 (Set_Global_Switches): Set formal mode switches appropriately
10930 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10932 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10933 call Set_Error_Msg_Lang to set "spark" as language name.
10934 * par.adb: Remove unnecessary call to set formal language for errout
10935 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10936 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10938 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10939 calls to it, moved after resolution so that types are known
10940 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10941 result of concatenation is not of type String
10942 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10943 concatenation is not properly restricted
10944 * gnat_rm.texi: Add doc on pragma Spark_95.
10945 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10946 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10947 * gcc-interface/Make-lang.in: Update dependencies.
10949 2011-08-01 Javier Miranda <miranda@adacore.com>
10951 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10952 condition that detects if the overridden operation must replace an
10955 2011-08-01 Javier Miranda <miranda@adacore.com>
10957 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10958 code declarations inserted by Insert_Actions in each alternative of the
10959 N_Case_Expression node.
10961 2011-08-01 Robert Dewar <dewar@adacore.com>
10963 * sem_ch6.adb: Minor code reorganization.
10964 * sem_util.adb: Minor reformatting.
10966 2011-08-01 Pascal Obry <obry@adacore.com>
10968 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10969 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10971 2011-08-01 Yannick Moy <moy@adacore.com>
10973 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10974 literal or operator symbol which is prefixed
10975 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10976 mode on access attributes.
10977 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10978 that concatenation operands are properly restricted in formal mode
10979 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10980 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10981 result of the concatenation has a type different from String.
10982 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10983 Analyze_Quantified_Expression, Analyze_Slice,
10984 Analyze_Null): issue an error in formal mode on unsupported constructs
10986 (Analyze_Block_Statement): only issue error on source block statement
10987 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10988 function which returns the last node in a list of nodes for which
10989 Comes_From_Source returns True, if any
10990 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10991 Last_Source_Node_In_Sequence
10992 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10993 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10994 mode on unsupported constructs
10995 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10996 rest of the actions may be needed later on since the error is marked as
10998 * sinfo.ads: Typos in comments.
11000 2011-08-01 Pascal Obry <obry@adacore.com>
11002 * projects.texi: Minor editing.
11004 2011-08-01 Yannick Moy <moy@adacore.com>
11006 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11007 insertion character ~~
11008 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11009 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11010 with insertion character ~~
11011 (Set_Msg_Text): treat insertion character ~~
11012 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11013 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11014 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11015 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11016 errors related to the formal language restriction not serious
11017 (insertion character |).
11018 * par.adb (Par): set formal language for error messages if needed
11019 * sem_ch6.adb (Check_Missing_Return): take into account possible
11020 generated statements at the end of the function
11021 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11022 enumeration value to define a new pragma SPARK_95
11023 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11024 SPARK_Version): new type and variables to store the SPARK version
11026 (SPARK_Mode): return True when SPARK_Version is set
11027 * par-prag.adb: Correct indentation
11028 (Prag): take Pragma_SPARK_95 into account
11029 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11032 2011-08-01 Robert Dewar <dewar@adacore.com>
11034 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11035 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11036 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11038 2011-08-01 Pascal Obry <obry@adacore.com>
11040 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11041 Target_Name to Get_Path call.
11042 (Parse_Single_Project): Likewise.
11043 (Post_Parse_Context_Clause): Likewise.
11044 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11045 Call Initialise_Project_Path with the proper Target_Name.
11046 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11048 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11049 with the proper Target_Name.
11050 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11051 Part.Parse routine.
11052 (Parse_Project_And_Apply_Config): Likewise.
11053 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11054 This is fine as this part of the code is supporting only native
11056 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11057 is fine as this part of the code is supporting only native compilation.
11059 2011-08-01 Yannick Moy <moy@adacore.com>
11061 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11062 of homonym, unless the homonym is one of the cases allowed in SPARK
11063 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11064 package declaration occurring after a body.
11066 2011-08-01 Robert Dewar <dewar@adacore.com>
11068 * checks.adb, exp_ch4.adb: Minor reformatting.
11070 2011-08-01 Javier Miranda <miranda@adacore.com>
11072 * einfo.ads (Access_Disp_Table): Fix documentation.
11073 (Dispatch_Table_Wrappers): Fix documentation.
11075 2011-08-01 Pascal Obry <obry@adacore.com>
11077 * prj-env.adb, prj-env.ads: Minor reformatting.
11079 2011-08-01 Yannick Moy <moy@adacore.com>
11081 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11082 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11083 procedures out of these packages.
11084 * errout.ads, errout.adb
11085 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11086 procedures in of this package
11087 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11088 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11089 on misplaced later vs initial declarations, like in Ada 83
11090 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11091 formal mode on attribute of private type whose full type declaration
11093 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11094 package declaration inside a package specification
11095 (Analyze_Full_Type_Declaration): issue error in formal mode on
11096 controlled type or discriminant type
11097 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11098 user-defined operator means that it should come from the source
11099 (New_Overloaded_Entity): issue error in formal mode on overloaded
11101 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11103 2011-08-01 Thomas Quinot <quinot@adacore.com>
11105 * atree.adb: Minor reformatting.
11106 * checks.adb: Minor reformatting.
11108 2011-08-01 Vincent Celier <celier@adacore.com>
11110 * s-parame-vms-ia64.ads: Fix typo in comment
11112 * s-parame-vms-restrict.ads: Removed, unused.
11114 2011-08-01 Javier Miranda <miranda@adacore.com>
11117 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11119 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11120 * sem_ch3.ads, sem_ch3.adb
11121 (Is_Constant_Bound): New extended version of the subprogram that was
11122 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11123 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11124 * sem_aux.ads (Constant_Value): Fix typo in comment.
11125 * checks.adb (Generate_Index_Checks): New implementation which, for
11126 array objects with constant bounds, generates the runtime check
11127 referencing the bounds of the array type. For other cases this routine
11128 provides its previous behavior obtaining such values from the array
11130 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11132 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11133 we cannot have semantic interpretations of the new node.
11135 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11137 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11140 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11142 * sem_ch8.adb: Minor code editing.
11143 * s-vxwext.adb: Remove trailing space.
11144 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11145 consistency with other files.
11147 2011-08-01 Thomas Quinot <quinot@adacore.com>
11149 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11151 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11153 * par-ch10.adb: reject parameterized expressions as compilation unit.
11154 * sem_ch4.adb: handle properly conditional expression with overloaded
11155 then_clause and no else_clause.
11157 2011-08-01 Tristan Gingold <gingold@adacore.com>
11159 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11160 like done by System.Aux_DEC.
11161 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11163 2011-08-01 Yannick Moy <moy@adacore.com>
11165 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11166 missing label at end of declaration (subprogram or package)
11167 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11168 of positional and named parameter association
11169 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11170 Error_Msg_SP which adds a prefix to the error message giving the name
11171 of the formal language analyzed
11172 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11173 access result type in subprogram, unconstrained array as result type,.
11174 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11176 * sem_ch8.adb: Code clean up.
11178 2011-08-01 Javier Miranda <miranda@adacore.com>
11180 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11181 * einfo.ads (Access_Disp_Table): Fix documentation.
11182 (Dispatch_Table_Wrappers): Fix documentation.
11183 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11184 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11185 to enforce the documentation of this attribute.
11186 (Set_Is_Interface): Cleanup the assertion.
11187 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11188 the Underlying_Type entity before reading attribute Access_Disp_Table.
11189 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11190 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11191 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11192 the Underlying_Type entity before reading attribute Access_Disp_Table.
11193 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11194 Locate the Underlying_Type entity before reading attribute
11197 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11199 * s-poosiz.ads: Additional overriding indicators.
11201 2011-08-01 Yannick Moy <moy@adacore.com>
11203 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11205 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11206 parameter specification does not include a subtype mark.
11207 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11208 formal mode on abstract subprogram.
11209 (Analyze_Subprogram_Specification): issue error in formal mode on
11210 user-defined operator.
11211 (Process_Formals): issue error in formal mode on access parameter and
11212 default expression.
11213 * sem_ch9.adb (Analyze_Abort_Statement,
11214 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11215 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11216 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11217 Analyze_Requeue, Analyze_Selective_Accept,
11218 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11219 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11220 issue error in formal mode on user-defined raise statement.
11222 2011-08-01 Thomas Quinot <quinot@adacore.com>
11224 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11225 declaration being hidden when overriding an implicit inherited
11227 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11228 (-gnats), do not complain about a source file that contains only a
11231 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11233 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11234 variable if already set.
11236 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11238 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11239 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11240 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11241 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11242 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11243 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11244 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11245 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11246 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11247 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11248 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11249 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11250 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11251 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11252 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11253 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11254 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11255 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11256 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11257 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11258 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11259 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11260 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11261 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11262 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11263 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11264 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11265 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11266 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11267 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11268 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11269 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11270 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11271 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11272 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11273 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11274 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11275 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11276 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11277 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11278 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11279 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11280 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11281 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11282 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11283 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11284 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11285 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11286 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11287 Use GNAT instead of GNARL.
11289 2011-08-01 Bob Duff <duff@adacore.com>
11291 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11292 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11293 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11296 2011-08-01 Yannick Moy <moy@adacore.com>
11298 * debug.adb (d.D) reverve flag for the SPARK mode
11299 (d.E) reverve flag for SPARK generation mode
11300 (d.F) reverve flag for Why generation mode
11301 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11302 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11303 functions which return True when the corresponding modes are set
11304 (Formal_Language): return "spark" or "alfa" when in formal verification
11306 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11307 Error_Msg to prefix the error message with a tag giving the formal
11309 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11310 message with a tag giving the formal language
11311 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11313 (Analyze_Case_Statement): issue error in formal mode on case statement
11314 with a single "others" case alternative
11315 (Analyze_Exit_Statement): issue errors in formal mode on exit
11316 statements which do not respect SPARK restrictions
11317 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11318 (Check_Unreachable_Code): always issue an error (not a warning) in
11319 formal mode on unreachable code (concerns both code after an infinite
11320 loop and after an unconditional jump, both not allowed in SPARK)
11321 * sem_ch6.adb (Analyze_Return_Statement): add call to
11322 Set_Return_Present for a procedure containing a return statement
11323 (already done for functions in Analyze_Function_Return)
11324 (Analyze_Function_Return): issue error in formal mode on extended
11325 return or if return is not last statement in function
11326 (Check_Missing_Return): issue error in formal mode if function does
11327 not end with return or if procedure contains a return
11328 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11329 function to detect if there is an inner scope of its parameter S which
11332 2011-08-01 Thomas Quinot <quinot@adacore.com>
11334 * sem_ch6.ads: Minor reformatting.
11336 2011-08-01 Javier Miranda <miranda@adacore.com>
11338 * sem_util.adb (Abstract_Interface_List): Complete condition when
11339 processing private type declarations to avoid reading unavailable
11341 (Is_Synchronized_Tagged_Type): Complete condition when processing
11342 private extension declaration nodes to avoid reading unavailable
11345 2011-08-01 Thomas Quinot <quinot@adacore.com>
11347 * sem_ch3.adb: Minor reformatting.
11349 2011-08-01 Thomas Quinot <quinot@adacore.com>
11351 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11352 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11353 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11354 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11355 for VMS, instead parametrize the common implementation with
11356 System.Parameters declarations.
11358 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11360 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11362 2011-08-01 Tristan Gingold <gingold@adacore.com>
11364 * seh_init.c: Fix SEH handler installation on win64.
11366 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11368 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11369 double analysis of an anonymous access to subprogram, because it can
11370 lead to improper sharing of profiles and a back-end crash.
11372 2011-08-01 Robert Dewar <dewar@adacore.com>
11374 * make.adb, sem_ch4.adb: Minor reformatting.
11375 * gcc-interface/Make-lang.in: Update dependencies.
11376 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11378 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11380 * gnat_rm.texi: Fix definition of Long_Integer.
11382 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11384 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11385 to prevent storage exhaustion.
11386 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11387 finalized is a function body, insert the cleanup code before the final
11388 return statement, to prevent spurious warnings.
11389 * s-pooglo.ads: add overriding indicator.
11391 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11393 * sem_ch4.adb (Operator_Check): improve error message when both a
11394 with_clause and a use_clause are needed to make operator usage legal.
11395 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11396 determine whether a compilation unit is visible within an other,
11397 either through a with_clause in the current unit, or a with_clause in
11398 its library unit or one one of its parents.
11400 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11402 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11403 over an arbitrary expression of an array or container type.
11404 * lib-xref.adb: clarify comment.
11406 2011-08-01 Bob Duff <duff@adacore.com>
11408 * einfo.ads: Minor reformatting.
11409 * debug.adb: Minor comment improvement.
11411 2011-08-01 Javier Miranda <miranda@adacore.com>
11413 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11414 consider hidden subprograms as valid candidates.
11416 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11418 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11420 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11422 * gnat_ugn.texi: Fix typo.
11424 2011-08-01 Robert Dewar <dewar@adacore.com>
11426 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11427 lib-xref.adb: Minor reformatting
11429 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11431 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11432 when to generate a call to Move_Final_List.
11433 (Has_Controlled_Parts): Remove this function.
11435 2011-08-01 Geert Bosch <bosch@adacore.com>
11437 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11438 "," in choice list.
11440 2011-08-01 Thomas Quinot <quinot@adacore.com>
11442 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11443 explicit raise of a predefined exception as Comes_From_Source if the
11444 original N_Raise_Statement comes from source.
11446 2011-08-01 Robert Dewar <dewar@adacore.com>
11448 * sinfo.ads: Add comment.
11449 * sem_ch6.adb: Minor reformatting.
11451 2011-08-01 Robert Dewar <dewar@adacore.com>
11453 * freeze.adb (Freeze_Entity): Refine check for bad component size
11454 clause to avoid rejecting confirming clause when atomic/aliased present.
11456 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11458 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11459 better determine whether an entity reference is a write.
11460 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11462 * lib-xref.adb (Output_References): Do no suppress a read reference at
11463 the same location as an immediately preceeding modify-reference, to
11464 handle properly in-out actuals.
11466 2011-08-01 Tristan Gingold <gingold@adacore.com>
11468 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11470 2011-08-01 Quentin Ochem <ochem@adacore.com>
11472 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11473 heap to compute the result.
11475 2011-08-01 Robert Dewar <dewar@adacore.com>
11477 * atree.ads: Minor reformatting.
11479 2011-08-01 Emmanuel Briot <briot@adacore.com>
11481 * g-expect.adb (Get_Command_Output): Fix memory leak.
11483 2011-08-01 Geert Bosch <bosch@adacore.com>
11485 * cstand.adb (P_Float_Type): New procedure to print the definition of
11486 predefined fpt types.
11487 (P_Mixed_Name): New procedure to print a name using mixed case
11488 (Print_Standard): Use P_Float_Type for printing floating point types
11489 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11490 precision IEEE float.
11492 2011-08-01 Thomas Quinot <quinot@adacore.com>
11494 * sem_ch3.adb: Minor reformatting.
11496 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11498 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11499 the completion of a generic function, insert the new body rather than
11500 rewriting the original.
11502 2011-08-01 Yannick Moy <moy@adacore.com>
11504 * sinfo.ads, errout.ads: Typos in comments.
11506 2011-08-01 Robert Dewar <dewar@adacore.com>
11508 * par-endh.adb: Minor reformatting.
11510 2011-08-01 Robert Dewar <dewar@adacore.com>
11512 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11513 (Pre_Post_Aspects): New subtype.
11514 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11515 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11516 * par-ch7.adb (P_Package): Remove Decl parameter
11517 (P_Package): Handle new syntax for aspects (before IS)
11518 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11520 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11521 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11522 (P_Package): Remove Decl parameter
11523 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11525 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11527 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11528 * sinfo.ads: Document new syntax for aspects in packages etc.
11529 * sprint.adb: Handle new syntax of aspects before IS in package
11531 2011-08-01 Thomas Quinot <quinot@adacore.com>
11533 * atree.ads: Minor reformatting.
11534 * sem_prag.adb: Minor reformatting.
11536 2011-08-01 Robert Dewar <dewar@adacore.com>
11538 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11539 case expr alternative.
11541 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11543 * sem_ch12.adb: Fix typo.
11545 2011-08-01 Geert Bosch <bosch@adacore.com>
11547 * sem_prag.adb (Check_No_Link_Name): New procedure.
11548 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11549 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11550 instead of Standard_Long_Long_Float_Size global. Preparation for
11551 eventual removal of per type constants.
11552 * exp_util.ads (Get_Stream_Size): New function returning the stream
11553 size value of subtype E.
11554 * exp_util.adb (Get_Stream_Size): Implement new function.
11555 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11557 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11559 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11561 2011-08-01 Geert Bosch <bosch@adacore.com>
11563 * cstand.adb: Fix comments.
11564 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11565 count of arguments.
11567 2011-08-01 Robert Dewar <dewar@adacore.com>
11569 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11571 2011-08-01 Geert Bosch <bosch@adacore.com>
11573 * atree.ads: Fix comment.
11575 2011-08-01 Robert Dewar <dewar@adacore.com>
11577 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11578 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11579 * par.adb: Add with for Namet.Sp.
11580 * par-tchk.adb: Minor reformatting.
11582 2011-08-01 Vincent Celier <celier@adacore.com>
11584 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11585 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11586 of the init procedure of a SAL.
11587 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11590 2011-08-01 Thomas Quinot <quinot@adacore.com>
11592 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11595 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11597 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11599 2011-08-01 Thomas Quinot <quinot@adacore.com>
11601 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11602 conformant with its spec (return True only for types that have
11603 an overriding Initialize primitive operation that prevents them from
11604 having preelaborable initialization).
11605 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11606 initialization for controlled types in Ada 2005 or later mode.
11608 2011-08-01 Robert Dewar <dewar@adacore.com>
11610 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11612 (Same_Aspect): New function.
11613 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11614 Type_Invariant, Precondition, Postcondition.
11615 * snames.ads-tmpl: Add Name_Type_Invariant.
11617 2011-08-01 Robert Dewar <dewar@adacore.com>
11619 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11621 (Freeze_All_Ent): Fix error in handling inherited aspects.
11622 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11623 already analyzed, but don't skip entire processing of a declaration,
11624 that's wrong in some cases of declarations being rewritten.
11625 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11626 Don't delay for integer, string literals
11627 Treat predicates in usual manner for delay, remove special case code,
11629 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11630 (Build_Predicate_Function): Update saved expression in aspect
11631 (Build_Invariant_Procedure): Update saved expression in aspect
11632 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11633 of replacement of discriminant references if the reference is simple.
11635 2011-08-01 Robert Dewar <dewar@adacore.com>
11637 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11638 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11639 Static_Predicate and Dynamic_Predicate.
11640 (Build_Predicate_Function): Add processing for Static_Predicate
11641 and Dynamic_Predicate.
11642 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11643 (From_Static_Predicate): New flag
11644 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11646 2011-08-01 Robert Dewar <dewar@adacore.com>
11648 * usage.adb: Documentation cleanup for Ada version modes in usage.
11649 * expander.adb: Minor reformatting.
11651 2011-08-01 Robert Dewar <dewar@adacore.com>
11653 * atree.ads: Minor comment fix.
11654 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11655 a-witeio.ads, sem_prag.adb: Minor reformatting.
11657 2011-08-01 Doug Rupp <rupp@adacore.com>
11659 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11660 pointers. Use descrip.h header file for convenience. Add some
11663 2011-08-01 Robert Dewar <dewar@adacore.com>
11665 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11666 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11667 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11669 (Check_Aspect_At_End_Of_Declarations): New procedure
11670 (Analye_Aspect_Specification): Minor changes for above procedures
11671 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11672 specification node as well.
11674 2011-08-01 Pascal Obry <obry@adacore.com>
11676 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11677 Windows files. Use GetFilesAttributes() in this case to check for file
11678 existence instead of returning with an error code.
11680 2011-08-01 Vincent Celier <celier@adacore.com>
11682 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11683 High is above Source length.
11685 2011-08-01 Robert Dewar <dewar@adacore.com>
11687 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11689 2011-08-01 Robert Dewar <dewar@adacore.com>
11691 * aspects.ads (Boolean_Aspects): New subtype.
11692 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11693 for derived types in cases where the parent type and derived type have
11695 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11696 with aspects when parent type also has aspects.
11697 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11698 boolean expression at this point).
11699 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11700 accordance with final decision on the Ada 2012 feature.
11701 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11703 2011-08-01 Matthew Heaney <heaney@adacore.com>
11705 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11707 2011-08-01 Pascal Obry <obry@adacore.com>
11709 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11710 Fix Replace_Slice when High is above current string size.
11711 (Replace_Slice): Fix DL computation when High is above current
11714 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11716 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11718 2011-08-01 Matthew Heaney <heaney@adacore.com>
11720 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11723 2011-08-01 Pascal Obry <obry@adacore.com>
11725 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11728 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11730 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11731 access to protected subprograms in generic bodies.
11732 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11733 protected type, indicate that the convention of the subprogram is
11734 Convention_Protected, because it may be used in subsequent declarations
11735 within the protected declaration.
11737 2011-08-01 Vincent Celier <celier@adacore.com>
11739 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11740 and "final" procedures when the name of the library is "ada", to avoid
11741 duplicate symbols "adainit" and "adafinal" in executables.
11743 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11745 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11746 quantified expression that appears within a postcondition and uses the
11747 Ada2012 'Result attribute.
11749 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11751 * init.c (__gnat_error_handler): Cast reason to int.
11752 (__gnat_install_handler): Explain sa_sigaction use.
11754 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11756 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11757 subprogram has copy-in copy-out parameters, try to promote the mode of
11758 the return type if it is passed in registers.
11760 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11762 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11763 left operand as addressable.
11765 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11767 * gcc-interface/gigi.h (build_function_stub): Remove.
11768 (build_return_expr): Likewise.
11769 (convert_vms_descriptor): Declare.
11770 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11771 (build_function_stub): Move to...
11772 * gcc-interface/utils2.c (build_return_expr): Move to...
11773 * gcc-interface/trans.c (build_function_stub): ...here.
11774 (build_return_expr): ...here.
11775 (Subprogram_Body_to_gnu): Add local variable for language_function.
11776 Disconnect the parameter attributes cache, if any, once done with it.
11777 Call end_subprog_body only after setting the end_locus.
11778 Build the stub associated with the function, if any, at the very end.
11779 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11780 variables and streamline control flow.
11782 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11785 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11786 g-trasym-dwarf.adb.
11788 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11791 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11792 Assign to act.sa_sigaction.
11793 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11794 current->return_address to char * before arithmetic.
11796 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11798 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11799 Correct argument types.
11800 Extract code from reason.
11801 (__gnat_install_handler): Assign to act.sa_sigaction.
11803 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11805 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11806 (GNAT1_OBJS): ...here.
11808 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11811 * g-socthi-mingw.adb (Fill): Fix formatting.
11813 * gcc-interface/gigi.h: Move around comment.
11815 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11818 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11820 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11823 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11825 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11827 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11828 range comparison if Pmode is SImode.
11830 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11831 Eric Botcazou <ebotcazou@adacore.com>
11833 * adadecode.c: Wrap up in extern "C" block.
11834 * adadecode.h: Likewise.
11835 * adaint.c: Likewise. Remove 'const' keyword.
11836 * adaint.h: Likewise.
11837 * argv.c: Likewise.
11838 * atree.h: Likewise.
11840 * cstreams.c: Likewise.
11842 * exit.c: Likewise.
11844 * final.c: Likewise.
11845 * init.c: Likewise.
11846 * initialize.c: Likewise.
11847 * link.c: Likewise.
11848 * namet.h: Likewise.
11849 * nlists.h: Likewise.
11850 * raise.c: Likewise.
11851 * raise.h: Likewise.
11852 * repinfo.h: Likewise.
11853 * seh_init.c: Likewise.
11854 * targext.c: Likewise.
11855 * tracebak.c: Likewise.
11856 * uintp.h: Likewise.
11857 * urealp.h: Likewise.
11858 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11859 * xsinfo.adb: Likewise.
11860 * xsnamest.adb: Likewise.
11861 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11862 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11863 * gcc-interface/misc.c: Likewise.
11864 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11865 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11866 ada/targext.o here...
11867 (GNAT_ADA_OBJS): ...and not here.
11868 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11869 (GNATBIND_OBJS): Reorder.
11871 2011-07-07 Richard Henderson <rth@redhat.com>
11873 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11874 dwarf2out_frame_init.
11876 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11878 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11880 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11883 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11885 2011-07-06 Richard Guenther <rguenther@suse.de>
11887 * gcc-interface/misc.c (gnat_init): Merge calls to
11888 build_common_tree_nodes and build_common_tree_nodes_2.
11889 Re-initialize boolean_false_node.
11891 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11892 Olivier Hainque <hainque@adacore.com>
11893 Nicolas Setton <setton@adacore.com>
11895 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11896 the type according to the ARTIFICIAL_P parameter.
11897 (create_type_decl): Likewise.
11898 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11900 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11902 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11903 (gnatbind): Likewise.
11905 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11907 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11909 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11911 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11912 local variable throughout. Remove useless call to Base_Type.
11913 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11914 Take it also into account for the volatileness of the field. Set the
11915 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11917 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11919 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11920 on a dereference built for a by-ref object if it has an address clause.
11922 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11924 * einfo.ads (Address_Taken): Document use for the second argument of
11925 Asm_Input and Asm_Output attributes.
11926 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11927 argument is an entity name, then set Address_Taken on it.
11928 <Attribute_Asm_Output>: Likewise.
11929 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11930 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11931 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11932 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11934 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11936 PR middle-end/46500
11937 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11939 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11941 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11942 (ada/utils.o): Update dependencies.
11943 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11944 ../../../libcpp/libcpp.a.
11945 * gcc-interface/utils.c: Include common/common-target.h.
11946 (process_attributes): Use targetm_common.have_named_sections.
11948 2011-06-07 Richard Guenther <rguenther@suse.de>
11950 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11953 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11955 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11956 TREE_THIS_NOTRAP flag.
11958 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11960 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11963 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11965 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11966 constants whose full view has discriminants specially.
11968 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11970 * gcc-interface/utils.c: Include diagnostic.h.
11971 (gnat_write_global_declarations): Output debug information for all
11972 global type declarations before finalizing the compilation unit.
11973 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11975 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11977 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11979 2011-05-25 Kai Tietz <ktietz@redhat.com>
11981 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11982 initialization instead of const/none-const pointer assignment.
11984 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11986 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11987 $(EXTRA_GNAT1_OBJS).
11988 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11989 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11990 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11991 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11992 libcommon-target.a instead of prefix.o.
11994 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11997 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11999 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12001 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12002 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12003 instead of version.o.
12005 2011-05-18 Kai Tietz <ktietz@redhat.com>
12007 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12008 boolean_false_node instead of integer_zero_node.
12009 (convert_with_check): Likewise.
12010 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12012 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12014 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12015 type of the parameter is an unconstrained array, convert the actual to
12016 the type of the formal in the In Out and Out cases as well.
12018 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12020 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12021 call build_function_type_array or build_varargs_function_type_array
12023 (create_subprog_type): Don't call build_function_type; call
12024 build_function_type_vec instead.
12026 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12028 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12029 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12030 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12032 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12034 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12036 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12037 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12039 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12041 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12043 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12045 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12046 instead of accessing TYPE_ARG_TYPES directly.
12047 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12049 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12052 * gcc-interface/gigi.h (get_variant_part): Declare.
12053 * gcc-interface/decl.c (get_variant_part): Make global.
12054 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12055 types have the same constant size, are record types and T1 has a
12056 variant part while T2 doesn't.
12058 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12060 * gcc-interface/utils.c (begin_subprog_body): Do not call
12062 (end_subprog_body): Likewise.
12064 2011-05-04 Richard Guenther <rguenther@suse.de>
12066 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12068 (pos_to_constructor): Likewise.
12070 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12071 Eric Botcazou <ebotcazou@adacore.com>
12073 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12074 of build_function_type. Adjust calls to...
12075 (build_raise_check): ...this. Do not take a void_tree parameter.
12076 Call build_function_type_list instead of build_function_type.
12077 Fix head comment and swap couple of conditional blocks.
12079 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12081 * gnatvsn.ads (Library_Version): Bump to 4.7.
12082 (Current_Year): Bump to 2011.
12084 2011-04-29 Michael Matz <matz@suse.de>
12086 * gcc-interface/misc.c (gnat_handle_option): Set
12087 warn_maybe_uninitialized.
12089 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12091 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12092 the Watson/McCabe paper.
12094 2011-04-23 Jim Meyering <meyering@redhat.com>
12096 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12098 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12100 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12103 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12105 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12107 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12108 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12109 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12110 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12111 <all>: Do not set flags on the reused DECL node coming from an alias.
12112 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12113 don't need debug info here...
12114 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12115 (gigi): Adjust calls to create_subprog_decl.
12116 (build_raise_check): Likewise.
12117 (establish_gnat_vms_condition_handler): Likewise.
12118 (Compilation_Unit_to_gnu): Likewise.
12119 (gnat_to_gnu): Likewise.
12121 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12123 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12124 (NO_REORDER_ADAFLAGS): New variable.
12125 (EXTRA_GNATTOOLS): Always define.
12126 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12127 Clean up and adjust list of files compiled with special options.
12128 * gcc-interface/Make-lang.in: Likewise.
12129 (ada/decl.o): Cosmetical change.
12130 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12132 2011-04-20 Jim Meyering <meyering@redhat.com>
12134 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12136 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12138 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12139 $(CFLAGS) on the link line.
12141 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12143 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12144 padded type built for the return type if it is unconstrained.
12146 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12148 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12150 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12152 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12153 before calling TREE_CHAIN.
12154 * gcc-interface/misc.c (gnat_init_ts): New function.
12155 (LANG_HOOKS_INIT_TS): Define.
12157 2011-04-12 Martin Jambor <mjambor@suse.cz>
12159 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12160 instead of cgraph_node.
12162 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12164 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12165 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12168 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12170 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12171 of aggregate types that contain a placeholder.
12173 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12175 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12177 (handle_type_generic_attribute): Likewise.
12179 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12182 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12184 2011-04-04 Kai Tietz <ktietz@redhat.com>
12187 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12190 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12192 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12193 type case, do not strip a padding type around the array type.
12195 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12197 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12200 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12202 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12203 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12204 code for -feliminate-unused-debug-types.
12205 (gnat_post_options): Likewise.
12207 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12209 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12210 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12213 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12215 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12216 DECL_ARTIFICIAL flag on enumeration types.
12218 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12220 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12221 fat pointer types artificial unconditionally.
12222 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12225 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12227 * gcc-interface/gigi.h (get_dummy_type): Declare.
12228 (build_dummy_unc_pointer_types): Likewise.
12229 (finish_fat_pointer_type): Likewise.
12230 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12231 fat pointer type has been built, complete it in place.
12232 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12233 and thin pointers. Remove useless variable.
12234 (finish_fat_pointer_type): Make global and move to...
12235 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12236 (get_dummy_type): New function.
12237 (build_dummy_unc_pointer_types): Likewise.
12238 (gnat_pushdecl): Propage the name to the anonymous variants only.
12239 (update_pointer_to): Only adjust the pointer types in the unconstrained
12242 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12244 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12245 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12246 if this is a Taft amendment type and the full declaration is available.
12247 * gcc-interface/trans.c (process_type): Likewise.
12248 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12249 (process_freeze_entity): Likewise.
12250 * gcc-interface/utils.c (dummy_global): New static variable.
12251 (gnat_write_global_declarations): If there are types declared as used
12252 at the global level, insert them in the global hash table.
12254 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12256 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12257 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12258 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12260 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12261 flag of the type accordingly.
12262 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12264 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12266 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12267 finalizing types when updating the pointers to the designated type.
12268 <all>: Finalize the deferred types even if we didn't defer processing
12269 of incomplete types in this invocation.
12271 2011-04-01 Olivier Hainque <hainque@adacore.com>
12272 Nicolas Setton <setton@adacore.com>
12273 Eric Botcazou <ebotcazou@adacore.com>
12275 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12276 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12278 2011-03-28 Kai Tietz <ktietz@redhat.com>
12280 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12282 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12283 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12285 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12287 2011-03-28 Tristan Gingold <gingold@adacore.com>
12290 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12291 Use ada output of gnatbind.
12292 (ada/b_gnatb.adb): Ditto.
12293 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12294 (ada.mostlyclean, ada.stage1)
12295 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12296 (ada.stagefeedback): Adjust.
12297 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12298 Use ada output of gnatbind.
12299 (b_gnatm.adb): Ditto.
12300 (b_gnatl.o, b_gnatm.o): New rules.
12302 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12304 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12305 for the padded type built to support a specified size or alignment.
12307 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12309 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12310 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12311 unconditionally to the end of the unit when the designated type is
12313 <all>: Rename local variable. Attempt to un-defer types only and do it
12314 for limited_with'ed types as well.
12315 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12316 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12317 consistently and remove redundant call to finalize_from_with_types.
12319 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12321 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12322 subprograms without a previous spec declared in the same unit.
12323 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12324 subprograms at the end of the unit instead of at the beginning.
12325 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12326 isn't public for the special handling of non-inline functions nested
12327 inside inline external functions.
12329 2011-03-25 Jeff Law <law@redhat.com>
12331 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12333 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12335 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12336 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12337 to compute Set_Size_Depends_On_Discriminant.
12338 (Layout_Type): Call it on array types in back-end layout mode.
12339 * sem_util.adb (Requires_Transient_Scope): Return true for array
12340 types only if the size depends on the value of discriminants.
12341 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12342 type if the RHS is a call to a function that returns an unconstrained
12343 type with default discriminant.
12345 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12347 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12348 non-conversion to the nominal result type at the end.
12350 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12352 * gcc-interface/trans.c (create_temporary): New function taken from...
12353 (create_init_temporary): ...here. Call it.
12354 (call_to_gnu): Create the temporary for the return value early, if any.
12355 Create it for a function with copy-in/copy-out parameters if there is
12356 no target; in other cases of copy-in/copy-out, use another temporary.
12357 Push the new binding level lazily. Add and rename local variables.
12359 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12361 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12363 (set_rm_size): Likewise.
12365 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12367 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12368 for the padded type built in order to support a specified alignment.
12369 Fix incorrect formatting.
12371 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12374 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12376 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12378 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12379 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12380 to the end of the list. Adjust recursive call. Rename local variable.
12381 If REORDER is true, reorder components of the record type.
12382 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12383 components_to_record and adjust the parameter list.
12385 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12387 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12388 disabled, use the variable for bounds of loop iteration scheme.
12390 2011-03-21 Kai Tietz <ktietz@redhat.com>
12393 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12395 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12397 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12398 out whether the expression is read-only. Short-circuit placeholder
12399 case and rename a couple of local variables.
12401 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12403 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12404 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12405 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12406 (convert): Deal with conversions from a smaller form type specially.
12408 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12410 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12411 its argument, except for the special -I- switch.
12413 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12415 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12418 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12420 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12422 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12424 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12426 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12427 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12428 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12429 Do not generate the check directly, instead instantiate the template
12430 check present in the descriptor.
12431 (make_descriptor_field): Move around.
12432 (build_vms_descriptor32): Build a template check in the POINTER field.
12433 (build_vms_descriptor): Remove useless suffixes.
12434 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12436 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12439 * targext.c: Include target files if IN_RTS is defined.
12441 2011-01-26 Richard Guenther <rguenther@suse.de>
12444 * targext.c: Include config.h.
12445 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12448 2011-01-04 Pascal Obry <obry@adacore.com>
12449 Eric Botcazou <ebotcazou@adacore.com>
12451 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12453 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12455 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12456 end-of-case on the end label and its associated gotos, if any.
12458 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12460 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12461 expressions of the parameter cache within the statement group of
12462 the CICO mechanism.
12464 2011-01-04 Olivier Hainque <hainque@adacore.com>
12465 Eric Botcazou <ebotcazou@adacore.com>
12467 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12468 (set_end_locus_from_node): New function.
12469 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12470 make and the function end_locus.
12471 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12472 for the elaboration subprogram.
12473 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12474 set the end_locus of the expression as well.
12476 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12479 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12480 variables that are referenced in exception handlers volatile.
12484 Copyright (C) 2011 Free Software Foundation, Inc.
12486 Copying and distribution of this file, with or without modification,
12487 are permitted in any medium without royalty provided the copyright
12488 notice and this notice are preserved.
12490 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12491 - fix bugs in the description of Source_Trace;
12492 - get rid of UNIT_NAME;
12494 2011-08-02 Javier Miranda <miranda@adacore.com>
12497 (Build_Dispatching_Requeue): Adding support for VM targets
12498 since we cannot directly reference the Tag entity.
12499 * exp_sel.adb (Build_K): Adding support for VM targets.
12500 (Build_S_Assignment): Adding support for VM targets.
12502 (Default_Prim_Op_Position): In VM targets do not restrict availability
12503 of predefined interface primitives to compiling in Ada 2005 mode.
12504 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12505 restricted to compiling in Ada 2005 mode.
12506 (Make_VM_TSD): Generate code that declares and initializes the OSD
12507 record. Needed to support dispatching calls through synchronized
12510 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12511 primitives associated with synchronized interfaces.
12512 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12513 primitives associated with synchronized interfaces.
12515 2011-08-02 Yannick Moy <moy@adacore.com>
12517 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12518 statements hidden in SPARK if preceded by the HIDE directive
12519 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12520 exception handlers as hidden in SPARK if preceded by the HIDE directive
12521 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12522 if starting with the HIDE directive
12523 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12524 starting with the HIDE directive; mark the declarations in a private
12525 part as hidden in SPARK if the private part starts with the HIDE
12527 * restrict.adb, restrict.ads
12528 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12529 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12530 argument node belongs to a part which is hidden in SPARK
12531 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12532 parts in SPARK; protect the possibly costly call to
12533 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12534 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12535 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12536 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12538 (Scan): recognize special comment starting with '#' and followed by
12539 SPARK keyword "hide" as a HIDE directive.
12541 2011-08-02 Yannick Moy <moy@adacore.com>
12543 * types.ads, erroutc.ads: Minor reformatting.
12545 2011-08-02 Vincent Celier <celier@adacore.com>
12547 * link.c: Add response file support for cross platforms.
12549 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12551 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12552 in an association, set parent field of copy before partial analysis.
12553 * sem_res.adb (Resolve_Slice): create reference to itype only when
12554 expansion is enabled.
12556 2011-08-02 Yannick Moy <moy@adacore.com>
12558 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12559 for new flag denoting which subprogram bodies are in ALFA
12560 * restrict.adb, sem_ch7.adb: Update comment
12561 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12562 sem_ch9.adb, sem_res.adb: Add calls to
12563 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12564 * sem_ch6.adb (Analyze_Function_Return): add calls to
12565 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12566 middle of the body, and extended return.
12567 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12568 False when missing return.
12569 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12570 to True for subprograms whose spec is in ALFA. Remove later on the flag
12571 on the entity used for a subprogram body when there exists a separate
12573 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12574 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12575 False, otherwise do nothing.
12577 2011-08-02 Robert Dewar <dewar@adacore.com>
12579 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12581 2011-08-02 Yannick Moy <moy@adacore.com>
12583 * sem_ch4.ads: minor formatting.
12585 2011-08-02 Yannick Moy <moy@adacore.com>
12587 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12588 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12589 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12590 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12591 opt.ads: cleanup of SPARK mode
12593 2011-08-02 Yannick Moy <moy@adacore.com>
12595 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12597 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12598 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12600 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12601 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12602 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12603 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12605 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12607 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12608 functions whose return type is not in ALFA.
12609 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12611 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12612 parameter's type is not in ALFA.
12613 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12616 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12618 * sem_ch6 (Analyze_Expression_Function): treat the function as
12619 Inline_Always, and introduce a subprogram declaration for it when it is
12621 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12622 expression functions, so that the back-end can determine whether they
12623 can in fact be inlined.
12624 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12625 a function body comes from an expression function.
12627 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12629 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12630 null exclusions to test Can_Never_Be_Null on the anonymous access types
12631 of the formals rather than testing the formals themselves. Exclude this
12632 check in cases where the Old_Formal is marked as a controlling formal,
12633 to avoid issuing spurious errors for bodies completing dispatching
12634 operations (due to the flag not getting set on controlling access
12635 formals in body specs).
12636 (Find_Corresponding_Spec): When checking full and subtype conformance of
12637 subprogram bodies in instances, pass Designated and E in that order, for
12638 consistency with the expected order of the formals (New_Id followed by
12641 2011-08-02 Robert Dewar <dewar@adacore.com>
12643 * sem_ch8.adb: Minor reformatting.
12645 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12647 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12648 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12649 primitive operations of class-wide actuals.
12651 2011-08-02 Javier Miranda <miranda@adacore.com>
12653 * exp_atag.ads, exp_atag.adb
12654 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12655 since its value is implicitly passed in argument Typ.
12656 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12657 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12658 Build_Common_Dispatching_Select_Statements.
12660 2011-08-02 Robert Dewar <dewar@adacore.com>
12662 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12663 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12664 Minor reformatting.
12666 2011-08-02 Robert Dewar <dewar@adacore.com>
12668 * sem_res.adb: Minor reformatting.
12669 * sem_prag.adb: Minor reformatting.
12671 2011-08-02 Javier Miranda <miranda@adacore.com>
12673 * exp_atag.adb, exp_atags.ads
12674 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12675 by the tagged type Entity. Required to use this routine in the VM
12676 targets since we do not have available the Tag entity in the VM
12679 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12680 Ada.Tags has not been previously loaded.
12682 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12683 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12685 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12686 view of enclosing scopes. Required to handle enclosing scopes that
12687 are synchronized types whose full view is a task type.
12689 (Build_VM_TSDs): Minor code improvement to avoid generating and
12690 analyzing lists with empty nodes.
12691 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12692 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12693 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12694 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12695 (Make_Select_Specific_Data_Table): Add support for VM targets.
12696 (Make_VM_TSD): Generate code to initialize the SSD structure of
12699 2011-08-02 Yannick Moy <moy@adacore.com>
12701 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12702 cross-references section in ALI.
12703 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12704 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12706 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12707 subprogram or package entity of a node
12708 (Is_Local_Reference_Type): new function returns True for references
12709 selected in local cross-references.
12710 (Lt): function extracted from Lt in Output_References
12711 (Write_Entity_Name): function extracted from Output_References
12712 (Generate_Definition): generate reference with type 'D' for definition
12713 of objects (object declaration and parameter specification), with
12714 appropriate locations and units, for use in local cross-references.
12715 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12716 references of type 'I' for initialization in object definition.
12717 (Output_References): move part of function Lt and procedure
12718 Write_Entity_Name outside of the body. Ignore references of types 'D'
12719 and 'I' introduced for local cross-references.
12720 (Output_Local_References): new procedure to output the local
12721 cross-references sections.
12722 (Lref_Entity_Status): new array defining whether an entity is a local
12723 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12724 with 'I' type when initialization expression is present.
12725 * get_scos.adb, get_scos.ads: Correct comments and typos
12727 2011-08-02 Javier Miranda <miranda@adacore.com>
12729 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12731 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12733 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12736 2011-08-02 Vincent Celier <celier@adacore.com>
12738 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12739 (No_Space_Img): New function
12740 (Find_Excluded_Sources): When reading from a file, record the file name
12741 and the line number for each excluded source.
12742 (Mark_Excluded_Sources): When reporting an error, if the excluded
12743 sources were read from a file, include file name and line number in
12746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12748 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12750 2011-08-02 Robert Dewar <dewar@adacore.com>
12752 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12754 2011-08-02 Javier Miranda <miranda@adacore.com>
12756 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12757 generation of TSDs to the DOTNET compiler.
12758 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12759 generation of TSDs to the DOTNET compiler.
12761 2011-08-02 Javier Miranda <miranda@adacore.com>
12763 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12764 record of all the tagged types declared inside library level package
12765 declarations, library level package bodies or library level subprograms.
12766 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12767 associated with a given tagged type.
12768 (Build_VM_TSDs): New subprogram.
12769 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12770 compilation units that are subprograms.
12771 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12772 compilation units that are package bodies.
12773 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12774 units that are a package declaration or a package instantiation.
12775 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12776 reorganization to improve the error generated by the frontend when the
12777 function Ada.Tags.Secondary_Tag is not available.
12778 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12779 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12781 2011-08-02 Javier Miranda <miranda@adacore.com>
12783 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12785 2011-08-02 Robert Dewar <dewar@adacore.com>
12787 * s-imenne.ads: Minor reformatting.
12789 2011-08-02 Robert Dewar <dewar@adacore.com>
12791 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12792 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12793 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12795 2011-08-02 Robert Dewar <dewar@adacore.com>
12797 * einfo.ads (Materialize_Entity): Document this is only for renamings
12798 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12799 required debug information in the case where we transform the object
12800 declaration into a renaming declaration.
12801 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12803 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12804 Materialize_Entity.
12806 2011-08-02 Robert Dewar <dewar@adacore.com>
12808 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12809 Suppress_Init_Procs.
12810 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12811 Suppress_Initialization/Initialization_Suppressed.
12812 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12813 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12814 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12815 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12817 2011-08-02 Robert Dewar <dewar@adacore.com>
12819 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12820 Minor reformatting.
12822 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12824 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12825 only have inheritable classwide pre/postconditions.
12827 2011-08-02 Javier Miranda <miranda@adacore.com>
12829 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12830 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12831 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12832 checks if the external tag of a type is the same as the external tag
12833 of some other declaration.
12835 2011-08-02 Thomas Quinot <quinot@adacore.com>
12837 * s-taskin.ads: Minor reformatting.
12839 2011-08-02 Emmanuel Briot <briot@adacore.com>
12841 * g-comlin.adb (Display_Help): swap the order in which it prints the
12842 short help and the general usage.
12844 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12846 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12847 the aspect declarations and attach them to the generic copy for
12848 subsequent analysis.
12849 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12850 declarations of the generic tree to the new subprogram declarations.
12851 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12852 conditions that apply to a subprogram instance.
12854 2011-08-02 Robert Dewar <dewar@adacore.com>
12856 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12858 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12860 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12861 private type with a tagged full view is not derived in the immediate
12862 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12864 2011-08-02 Robert Dewar <dewar@adacore.com>
12866 * exp_ch4.adb: Minor reformatting.
12868 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12870 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12871 Ada2012 iterator, the loop will be rewritten during expansion into a
12872 while loop with a cursor and an element declaration. Do not analyze the
12873 body in this case, because if the container is for indefinite types the
12874 actual subtype of the elements will only be determined when the cursor
12875 declaration is analyzed.
12877 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12879 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12880 size/alignment related attributes in CodePeer_Mode.
12882 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12884 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12885 Prepend_Element, since this can result in the operation getting the
12886 wrong slot in the full type's dispatch table if the full type has
12887 inherited operations. The incomplete type's operation will get added
12888 to the proper position in the full type's primitives
12889 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12890 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12891 dispatching operations, since there are cases where nonprimitive
12892 subprograms can get added to the list of incomplete dependents (such
12893 as subprograms in nested packages).
12894 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12895 private part when determining whether to add a primitive with a
12896 parameter of a tagged incomplete type to the Private_Dependents list.
12897 Such primitives can also occur in the visible part, and should not have
12898 been excluded from being private dependents.
12899 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12900 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12901 list of a Taft-amendment incomplete type is a primitive before issuing
12902 an error that the full type must appear in the same unit. There are
12903 cases where nonprimitives can be in the list (such as subprograms in
12905 * sem_disp.adb (Derives_From): Use correct condition for checking that
12906 a formal's type is derived from the type of the corresponding formal in
12907 the parent subprogram (the condition was completely wrong). Add
12908 checking that was missing for controlling result types being derived
12909 from the result type of the parent operation.
12911 2011-08-02 Yannick Moy <moy@adacore.com>
12913 * errout.adb (First_Node): minor renaming
12914 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12917 2011-08-02 Yannick Moy <moy@adacore.com>
12919 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12920 before accessing operands.
12921 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12922 decide whether an initialization expression respects SPARK rules, as
12923 the plain node is the expanded one. This allows for more valid warnings
12925 * gnat_rm.texi: Minor update.
12927 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12929 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12932 2011-08-02 Robert Dewar <dewar@adacore.com>
12934 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12936 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12938 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12939 loop statements and the element renaming declaration with a block when
12940 the element type is controlled.
12942 2011-08-02 Yannick Moy <moy@adacore.com>
12944 * sinfo.ads: Minor formatting.
12946 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12948 * sem_aggr.adb (Add_Association): if the association has a box and no
12949 expression, use the Sloc of the aggregate itself for the new
12951 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12954 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12956 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12957 When a container is provided via a function call, generate a renaming
12958 of the function result. This avoids the creation of a transient scope
12959 and the premature finalization of the container.
12960 * exp_ch7.adb (Is_Container_Cursor): Removed.
12961 (Wrap_Transient_Declaration): Remove the supression of the finalization
12962 of the list controller when the declaration denotes a container cursor,
12965 2011-08-02 Yannick Moy <moy@adacore.com>
12967 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12968 node is from source, instead of the original node being from source.
12970 (Resolve_Array_Aggregate): refine the check for a static expression, to
12971 recognize also static ranges
12972 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12973 Array_Type_Declaration): postpone the test for the type being a subtype
12974 mark after the type has been resolved, so that component-selection and
12975 expanded-name are discriminated.
12976 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12977 to distinguish the case of an iteration scheme, so that an error is
12978 issed on a non-static range in SPARK except in an iteration scheme.
12979 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12980 In_Iter_Schm = True.
12981 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12982 user-defined operators so that they are allowed in renaming
12984 (Find_Selected_Component): refine the check for prefixing of operators
12985 so that they are allowed in renaming. Move the checks for restrictions
12986 on selector name after analysis discriminated between
12987 component-selection and expanded-name.
12988 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12989 concatenation argument of string type if it is static.
12990 * sem_util.adb, sem_util.ads
12991 (Check_Later_Vs_Basic_Declarations): add a new function
12992 Is_Later_Declarative_Item to decice which declarations are allowed as
12993 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12994 mode, add that renamings are considered as later items.
12995 (Enclosing_Package): new function to return the enclosing package
12996 (Enter_Name): correct the rule for homonyms in SPARK
12997 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12998 from source (result of expansion) to avoid issuing wrong warnings.
13000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13002 * errout.adb: On anything but an expression First_Node returns its
13005 2011-08-02 Pascal Obry <obry@adacore.com>
13007 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13009 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13011 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13012 Set the associated loop as the related expression of internally
13014 * exp_ch7.adb (Is_Container_Cursor): New routine.
13015 (Wrap_Transient_Declaration): Supress the finalization of the list
13016 controller when the declaration denotes a container cursor.
13018 2011-08-02 Yannick Moy <moy@adacore.com>
13020 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13022 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13023 expression is a simple expression. This check cannot be performed in
13024 the semantics, so just drop it.
13025 (P_Index_Or_Discriminant_Constraint): move check that the index or
13026 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13027 semantics. Other cases were previously checked in the semantics.
13028 * par-ch4.adb (P_Name): move checks that a selector name is not
13029 character literal or an operator symbol to Find_Selected_Component in
13031 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13032 declarations are not placed after later declarations in a separate
13033 procedure in Sem_Util (possibly not the best choice?), to be used both
13034 during parsing, for Ada 83 mode, and during semantic analysis, for
13036 * par-endh.adb (Check_End): move check that end label is not missing
13037 to Process_End_Label in the semantics
13038 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13039 the special case for SPARK restriction
13040 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13041 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13042 parameter Force to issue the error message even on internal node (used
13043 for generated end label). Call Check_Restriction to check when an error
13044 must be issued. In SPARK mode, issue an error message even if the
13045 restriction is not set.
13046 (Check_Restriction): new procedure with an additional out parameter to
13047 inform the caller that a message has been issued
13048 * sem_aggr.adb: Minor modification of message
13049 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13050 instead of issuing an error message directly
13051 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13052 declarations are not placed after later declarations, by calling
13053 Check_Later_Vs_Basic_Declarations
13054 (Analyze_Subtype_Declaration): move here the check that an index or
13055 discriminant constraint must be a subtype mark. Change the check that
13056 a subtype of String must start at one so that it works on subtype marks.
13057 * sem_ch4.adb (Analyze_Call): move here the check that a named
13058 association cannot follow a positional one in a call
13059 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13060 instead of issuing an error message directly
13061 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13062 selector name is not a character literal or an operator symbol. Move
13063 here the check that the prefix of an expanded name cannot be a
13064 subprogram or a loop statement.
13065 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13066 procedure called from parsing and semantics to check that basic
13067 declarations are not placed after later declarations
13068 (Process_End_Label): move here the check that end label is not missing
13070 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13072 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13073 representation clause in codepeer mode, since it confuses CodePeer and
13074 does not bring useful info.
13076 2011-08-02 Ed Falis <falis@adacore.com>
13078 * init.c: initialize fp hw on MILS.
13080 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13082 * errout.adb (First_Node): for bodies, return the node itself (small
13083 optimization). For other nodes, do not check source_unit if the node
13084 comes from Standard.
13086 2011-08-02 Robert Dewar <dewar@adacore.com>
13088 * exp_ch3.adb: Minor comment additions.
13089 * sem_ch13.adb: Minor reformatting.
13091 2011-08-02 Pascal Obry <obry@adacore.com>
13093 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13095 2011-08-02 Robert Dewar <dewar@adacore.com>
13097 * sem_attr.adb: Minor reformatting.
13099 2011-08-02 Robert Dewar <dewar@adacore.com>
13101 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13102 (Has_Default_Component_Value): Removed
13103 * einfo.ads Comment updates
13104 (Has_Default_Aspect): Replaces Has_Default_Value
13105 (Has_Default_Component_Value): Removed
13107 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13109 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13110 (Get_Simple_Init_Val): Handle Default_Value aspect
13111 (Needs_Simple_Initialization): Handle Default_Value aspect
13112 * exp_ch3.ads: Needs_Simple_Initialization
13113 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13114 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13116 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13117 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13118 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13120 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13122 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13123 package containing iteration primitives.
13124 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13126 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13128 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13129 "of", pre-analyze expression in case it is a function call with
13130 finalization actions that must be placed ahead of the loop.
13131 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13132 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13134 2011-08-02 Geert Bosch <bosch@adacore.com>
13136 * cstand.adb (Create_Float_Types): Only consider C's long double for
13137 Long_Long_Float, in addition to double.
13139 2011-08-02 Robert Dewar <dewar@adacore.com>
13141 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13142 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13143 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13144 Minor reformatting.
13146 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13148 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13151 2011-08-02 Javier Miranda <miranda@adacore.com>
13153 * einfo.ads, einfo.adb
13154 (Original_Access_Type): Move this attribute to Node26 since there was
13155 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13156 which causes conflicts and breaks the generation of the .NET compiler.
13157 (Interface_Name): Add missing documentation on JGNAT only uses of
13160 2011-08-02 Geert Bosch <bosch@adacore.com>
13162 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13163 (Find_Back_End_Float_Type): Likewise
13164 (Create_Back_End_Float_Types): Likewise
13165 (Create_Float_Types): Likewise
13166 (Register_Float_Type): Likewise
13167 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13168 Nlist and split out type selection in new local Find_Base_Type function.
13169 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13171 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13173 2011-08-02 Robert Dewar <dewar@adacore.com>
13175 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13177 * opt.ads: Minor comment change.
13178 * sem_ch12.adb: Minor code reorganization.
13180 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13182 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13183 subtype's list of rep items to the list on the full subtype in the case
13184 where the lists are the same.
13186 2011-08-02 Geert Bosch <bosch@adacore.com>
13188 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13189 using the one from System.Strings, which also deallocates all strings.
13191 2011-08-02 Geert Bosch <bosch@adacore.com>
13193 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13195 * gcc-interface/Make-lang.in: Update dependencies.
13197 2011-08-02 Olivier Hainque <hainque@adacore.com>
13199 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13202 2011-08-02 Javier Miranda <miranda@adacore.com>
13204 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13205 associated with anonymous access to subprograms.
13207 2011-08-02 Geert Bosch <bosch@adacore.com>
13210 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13211 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13212 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13213 (Add_Symbol_Definition): Move to switch-c.adb
13214 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13215 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13216 (Add_Symbol_Definition): Move to switch-c.adb.
13217 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13219 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13220 Move to warnsw.adb.
13221 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13222 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13223 Move to warnsw.adb.
13224 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13225 (Add_Symbol_Definition): Moved from Prepcomp.
13226 * switch-c.ads: Update copyright notice. Use String_List instead of
13227 Argument_List, removing dependency on System.OS_Lib.
13229 2011-08-02 Yannick Moy <moy@adacore.com>
13231 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13232 mode on initialization expression which does not respect SPARK
13234 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13235 if the tree referenced by its argument represents an initialization
13236 expression in SPARK, suitable for initializing an object in an object
13239 2011-08-02 Javier Miranda <miranda@adacore.com>
13241 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13242 internally generated access to subprogram with its associated protected
13244 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13246 2011-08-02 Geert Bosch <bosch@adacore.com>
13248 * cstand.adb (Register_Float_Type): Print information about type to
13249 register, if the Debug_Flag_Dot_B is set.
13250 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13251 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13252 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13253 with a requested precision of more than Max_Digits digits and no more
13254 than Max_Base_Digits digits, if a range specification is present and the
13255 Predefined_Float_Types list has a suitable type to derive from.
13256 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13257 case of type completion with pragma Import
13259 (Process_Import_Predefined_Type): Processing to complete a type
13260 with pragma Import. Currently supports floating point types only.
13261 (Set_Convention_From_Pragma): Do nothing without underlying type.
13262 (Process_Convention): Guard against absence of underlying type,
13263 which may happen when importing incomplete types.
13264 (Process_Import_Or_Interface): Handle case of importing predefined
13265 types. Tweak error message.
13267 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13269 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13270 functions to previous change. Reorganize code slightly.
13272 2011-08-02 Geert Bosch <bosch@adacore.com>
13274 * back_end.ads (Register_Type_Proc): New call back procedure type for
13275 allowing the back end to provide information about available types.
13276 (Register_Back_End_Types): New procedure to register back end types.
13277 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13279 * cstand.adb (Back_End_Float_Types): New list for floating point types
13280 supported by the back end.
13281 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13282 (Copy_Float_Type): New procedure to make new copies of predefined types.
13283 (Register_Float_Type): New call back procedure to populate the BEFT list
13284 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13285 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13286 (Create_Float_Types): New procedure to create entities for floating
13287 point types predefined in Standard, and put these and any remaining
13288 BEFTs on the Predefined_Float_Types list.
13289 * stand.ads (Predefined_Float_Types): New list for predefined floating
13290 point types that do not have declarations in package Standard.
13292 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13294 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13295 entity node for the unit containing the parameter.
13296 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13297 (Add_Inlined_Subprogram): Likewise.
13298 * gcc-interface/Make-lang.in: Update dependencies.
13300 2011-08-02 Thomas Quinot <quinot@adacore.com>
13302 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13305 2011-08-02 Geert Bosch <bosch@adacore.com>
13307 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13309 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13311 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13312 computed value of Base_Type.
13314 2011-08-02 Yannick Moy <moy@adacore.com>
13316 * restrict.adb (Check_Restriction): issue an error for any use of
13317 class-wide, even if the No_Dispatch restriction is not set.
13318 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13319 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13320 when completing a private extension, the type named in the private part
13321 is not the same as that named in the visible part.
13322 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13323 of an inherited primitive operations of a tagged type or type extension
13324 that returns the tagged type.
13325 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13326 function which returns True for an implicit operation inherited by the
13327 derived type declaration for the argument type.
13328 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13331 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13333 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13334 Process_Bounds, to perform analysis with expansion of a range or an
13335 expression that is the iteration scheme for a loop.
13336 (Analyze_Iterator_Specification): If domain of iteration is given by a
13337 function call with a controlled result, as is the case if call returns
13338 a predefined container, ensure that finalization actions are properly
13340 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13342 2011-08-02 Javier Miranda <miranda@adacore.com>
13344 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13345 * gcc-interface/Make-lang.in: Update dependencies.
13347 2011-08-02 Javier Miranda <miranda@adacore.com>
13349 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13350 determine if the analysis is performed using N or Original_Node (N).
13351 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13352 functionality of routine Is_Variable avoids code duplication.
13353 * checks.adb (Determine_Range): Handle temporaries generated by
13354 Remove_Side_Effects.
13356 2011-08-02 Javier Miranda <miranda@adacore.com>
13358 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13359 expansion of the condition. Required since the previous analysis was
13360 done with expansion disabled (see Resolve_Quantified_Expression) and
13361 hence checks were not inserted and record comparisons have not been
13364 2011-08-02 Ed Falis <falis@adacore.com>
13366 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13369 2011-08-02 Bob Duff <duff@adacore.com>
13371 * opt.ads: Minor comment fix.
13373 2011-08-02 Bob Duff <duff@adacore.com>
13375 * sem_ch12.adb (Analyze_Package_Instantiation,
13376 Analyze_Subprogram_Instantiation): Turn off style checking while
13377 analyzing an instance. Whatever style checks that apply to the generic
13378 unit should apply, so it makes no sense to apply them in an instance.
13379 This was causing trouble when compiling an instance of a runtime
13380 unit that violates the -gnatyO switch.
13381 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13382 one of the two case statements, causing spurious errors.
13384 2011-08-02 Robert Dewar <dewar@adacore.com>
13386 * uname.adb: Minor reformatting.
13387 * gnatcmd.adb: Minor reformatting.
13388 * exp_attr.adb: Minor reformatting.
13390 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13392 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13393 No_Dispatching_Calls, do not look for the Assign primitive, because
13394 predefined primitives are not created in this case.
13396 2011-08-02 Bob Duff <duff@adacore.com>
13398 * stylesw.ads: Minor comment fixes.
13400 2011-08-02 Robert Dewar <dewar@adacore.com>
13402 * freeze.adb (Add_To_Result): New procedure.
13404 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13406 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13407 time, if the specific run-time routines for handling streams of strings
13408 are not available, use the default mechanism.
13410 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13412 * s-regpat.ads: Fix typo.
13414 2011-08-02 Vincent Celier <celier@adacore.com>
13416 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13417 not null, call it to create the in memory config project file without
13418 parsing an existing default config project file.
13420 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13422 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13424 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13426 * sem_elim.adb: an abstract subprogram does not need an eliminate
13427 pragma for its descendant to be eliminable.
13429 2011-08-02 Ed Falis <falis@adacore.com>
13431 * init.c: revert to handling before previous checkin for VxWorks
13432 * s-intman-vxworks.adb: delete unnecessary declarations related to
13433 using Ada interrupt facilities for handling signals.
13434 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13435 * s-intman-vxworks.ads: Import __gnat_install_handler as
13436 Initialize_Interrupts.
13437 * s-taprop-vxworks.adb: Delete Signal_Mask.
13438 (Abort_Handler): change construction of mask to unblock exception
13441 2011-08-02 Jerome Guitton <guitton@adacore.com>
13443 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13444 Debug_Raise_Exception before propagation starts.
13446 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13448 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13449 to Restriction_Check_Required.
13450 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13451 * sem_res.adb (Resolve_Call): Likewise.
13452 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13454 2011-08-02 Bob Duff <duff@adacore.com>
13456 * stylesw.ads: Update comment.
13457 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13458 * errout.ads: Remove obsolete comment.
13460 2011-08-02 Javier Miranda <miranda@adacore.com>
13462 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13463 (Set_Is_Safe_To_Reevaluate): new procedure.
13464 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13465 assignment is allowed on safe-to-reevaluate variables.
13466 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13467 temporary created to remove side effects in expressions that use
13468 the secondary stack as safe-to-reevaluate.
13469 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13470 variables that are not true constants.
13472 2011-08-02 Robert Dewar <dewar@adacore.com>
13474 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13475 sem_res.adb, sem_ch6.adb: Minor reformatting.
13477 2011-08-02 Jerome Guitton <guitton@adacore.com>
13479 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13481 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13483 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13484 not set Overridden_Operation if subprogram is an initialization
13487 2011-08-02 Yannick Moy <moy@adacore.com>
13489 * par-ch6.adb: Correct obsolete name in comments
13490 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13491 which takes two message arguments (existing function takes one), with
13492 second message used for continuation.
13493 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13494 block statements that originate from a source block statement, not
13495 generated block statements
13496 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13497 symmetry with procedure case
13498 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13499 function to issue an error in formal mode if a package specification
13500 contains more than one tagged type or type extension.
13501 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13502 parameters matching formals of tagged types are objects (or ancestor
13503 type conversions of objects), not general expressions. Issue an error
13504 on view conversions that are not involving ancestor conversion of an
13506 (Resolve_Type_Conversion): in formal mode, issue an error on the
13507 operand of an ancestor type conversion which is not an object
13508 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13509 procedure so that it works also for actuals of function calls
13510 (Is_Actual_Tagged_Parameter): new function which determines if its
13511 argument is an actual parameter of a formal of tagged type in a
13513 (Is_SPARK_Object_Reference): new function which determines if the tree
13514 referenced by its argument represents an object in SPARK
13516 2011-08-02 Robert Dewar <dewar@adacore.com>
13518 * sem_ch3.adb: Minor reformatting
13519 Minor comment addition
13520 Minor error msg text change
13522 2011-08-02 Javier Miranda <miranda@adacore.com>
13524 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13525 function. Used to be more precise when we generate a variable plus one
13526 assignment to remove side effects in the evaluation of the Bound
13528 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13529 of the bound expression to force its re-analysis and thus expand the
13530 associated transient scope (if required). Code cleanup replacing the
13531 previous code that declared the constant entity by an invocation to
13532 routine Force_Evaluation which centralizes this work in the frontend.
13534 2011-08-02 Robert Dewar <dewar@adacore.com>
13536 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13537 (Base_Type): Now uses improved Is_Base_Type function
13538 * einfo.ads (Base_Type): Inline this function
13540 2011-08-02 Robert Dewar <dewar@adacore.com>
13542 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13543 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13545 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13547 * gcc-interface/Make-lang.in: Update dependencies.
13548 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13551 2011-08-02 Yannick Moy <moy@adacore.com>
13553 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13554 non-simple expression used in delta constraint
13555 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13556 index constraint which is not a subtype mark
13557 * par.adb: With and use Restrict
13558 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13559 mode on component type which is not a subtype mark and default
13560 expression on component
13561 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13562 of string which does not have a lower index bound equal to 1
13563 (Array_Type_Declaration): issue an error in formal mode on index or
13564 component type which is not a subtype mark, and on aliased keyword on
13566 (Derived_Type_Declaration): issue an error in formal mode on interface,
13567 limited or abstract type
13568 (Record_Type_Declaration): issue an error in formal mode on interface
13569 (Record_Type_Definition): issue an error in formal mode on tagged types
13570 and type extensions not declared in the specification of a library unit
13571 package; on null non-tagged record; on variant part
13573 2011-08-02 Vincent Celier <celier@adacore.com>
13575 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13576 not declared for qualified library project when Library_Name is not
13577 declared, but Library_Dir is.
13579 2011-08-02 Robert Dewar <dewar@adacore.com>
13581 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13582 pragmas (affects aspects [Component_]Default_Value
13583 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13584 component type for the resolution
13586 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13588 * einfo.adb (Base_Type): Tune implementation for speed.
13590 2011-08-02 Robert Dewar <dewar@adacore.com>
13592 * freeze.adb: Minor reformatting.
13594 2011-08-02 Thomas Quinot <quinot@adacore.com>
13596 * scos.ads: Update comments.
13598 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13600 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13601 base type, because the parent may be a subtype of a private type whose
13602 convention is established in a private part.
13604 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13606 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13607 statement in a block when the expansion of the return expression has
13608 created a finalization chain.
13609 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13610 with the parent node.
13611 Add N_Extended_Return_Statement to handle the case where a transient
13612 object declaration appears in the Return_Object_Declarations list of
13613 an extended return statement.
13615 2011-08-02 Matthew Gingell <gingell@adacore.com>
13617 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13618 unused parameter 'name'.
13620 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13622 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13623 inherited operation, check whether its alias, which is the source
13624 operastion that it renames, has been marked eliminated.
13626 2011-08-02 Javier Miranda <miranda@adacore.com>
13628 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13629 in-mode parameter whose type is an access type since it can be used to
13630 modify its designated object. Enforce code that handles as safe an
13631 access type that is not access-to-constant but it is the result of a
13632 previous removal of side-effects.
13633 (Remove_Side_Effects): Minor code reorganization of cases which require
13634 no action. Done to incorporate documentation on new cases uncovered
13635 working in this ticket: no action needed if this routine was invoked
13636 too early and the nodes are not yet decorated.
13637 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13638 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13639 were issued with actuals that are implicitly provided by
13642 2011-08-02 Robert Dewar <dewar@adacore.com>
13644 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13646 2011-08-02 Yannick Moy <moy@adacore.com>
13648 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13649 to issue an error in formal mode on attribute not supported in this mode
13650 (Analyze_Attribute): issue errors on standard attributes not supported
13652 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13653 comment, and issue error in formal mode on modulus which is not a power
13655 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13657 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13659 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13660 operator on modular type (except 'not').
13662 2011-08-02 Robert Dewar <dewar@adacore.com>
13664 * gnat_rm.texi: Minor reformatting.
13666 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13668 * s-osinte-linux.ads: Minor comment update and reformatting.
13669 * i-cexten.ads: Make this unit pure, as for its parent.
13670 Will allow its usage in more contexts if needed.
13672 2011-08-02 Robert Dewar <dewar@adacore.com>
13674 * s-utf_32.ads: Minor comment fix.
13676 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13678 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13679 operation of a tagged synchronized type, handle the case where the
13680 controlling argument is overloaded.
13682 2011-08-02 Yannick Moy <moy@adacore.com>
13684 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13685 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13686 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13687 SPARK mode and formal verification mode on processing SPARK restriction
13688 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13689 requiring consistency checking.
13691 2011-08-02 Robert Dewar <dewar@adacore.com>
13693 * sem_res.adb: Minor reformatting.
13695 2011-08-02 Robert Dewar <dewar@adacore.com>
13697 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13698 a-cforse.ads: Remove unneeded with of Ada.Containers
13699 Remove commented out pragma Inline's
13700 Move specifications of new subprograms to the actual specs
13702 2011-08-02 Yannick Moy <moy@adacore.com>
13704 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13705 a-cforse.ads: Update comments.
13707 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13709 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13711 2011-08-02 Robert Dewar <dewar@adacore.com>
13713 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13714 a-cforse.ads, a-cofove.ads: Minor reformatting.
13716 2011-08-02 Claire Dross <dross@adacore.com>
13718 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13719 a-cofove.ads: Add comments.
13721 2011-08-02 Yannick Moy <moy@adacore.com>
13723 * gnat_rm.texi: Document formal containers.
13725 2011-08-02 Emmanuel Briot <briot@adacore.com>
13727 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13728 are empty sections.
13730 2011-08-02 Robert Dewar <dewar@adacore.com>
13732 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13735 2011-08-02 Robert Dewar <dewar@adacore.com>
13737 * aspects.adb: New aspects Default_Value and Default_Component_Value
13738 New format of Aspect_Names table checks for omitted entries
13739 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13740 handling of boolean aspects for derived types.
13741 New aspects Default_Value and Default_Component_Value
13742 New format of Aspect_Names table checks for omitted entries
13743 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13744 (Has_Default_Value): New flag
13745 (Has_Default_Component_Value): New flag
13746 (Has_Default_Value): New flag
13747 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13749 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13750 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13751 Default_Value and Default_Component_Value
13752 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13753 New aspects Default_Value and Default_Component_Value
13754 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13755 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13757 2011-08-02 Vincent Celier <celier@adacore.com>
13759 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13760 inherit library kind.
13762 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13764 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13765 Minor reformatting.
13767 2011-08-02 Robert Dewar <dewar@adacore.com>
13769 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13771 2011-08-02 Yannick Moy <moy@adacore.com>
13773 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13775 2011-08-02 Robert Dewar <dewar@adacore.com>
13777 * impunit.adb: Add comment.
13779 2011-08-02 Yannick Moy <moy@adacore.com>
13781 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13782 qualification of aggregates in formal mode
13783 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13785 (Resolve_Aggregate): complete the test that an aggregate is adequately
13786 qualified in formal mode
13788 2011-08-02 Pascal Obry <obry@adacore.com>
13790 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13791 * mlib-prj.adb: Supress warning when compiling binder generated file.
13792 (Build_Library): Supress all warnings when compiling the binder
13795 2011-08-02 Yannick Moy <moy@adacore.com>
13797 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13799 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13800 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13801 Add with/use clauses to make Check_Formal_Restriction visible
13803 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13805 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13806 in-parameters when type of the generic formal is private in the generic
13807 spec and non-private in the body.
13809 2011-08-02 Claire Dross <dross@adacore.com>
13811 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13812 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13813 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13814 * impunit.adb, Makefile.rtl: Take new files into account.
13816 2011-08-02 Robert Dewar <dewar@adacore.com>
13818 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13819 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13821 2011-08-02 Yannick Moy <moy@adacore.com>
13823 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13825 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13826 matching static array bounds, taking into account the special case of
13828 * sem_ch3.adb: Typo in comment.
13830 2011-08-02 Yannick Moy <moy@adacore.com>
13832 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13833 which issues an error in formal mode if its argument node is originally
13835 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13836 has a discriminant specification so that it does not include the case
13838 (Derived_Type_Declaration): move here the test that a derived type has a
13839 discriminant specification
13840 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13841 first element of a component association before accessing its choices
13842 (presence of component association is not enough)
13843 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13844 declaration is a library item before accessing the next element in a
13845 list, as library items are not member of lists
13846 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13847 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13848 Check_Formal_Restriction whenever possible.
13850 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13852 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13853 reference when needed.
13855 2011-08-02 Bob Duff <duff@adacore.com>
13857 * gnat_ugn.texi: Fix typo.
13859 2011-08-02 Vincent Celier <celier@adacore.com>
13861 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13862 archive file name. Do not use the full path name of archives for Open
13865 2011-08-02 Robert Dewar <dewar@adacore.com>
13867 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13868 Analyze_Aspect_Specifications
13870 (Analyze_Aspect_Specifications): New handling for boolean aspects
13871 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13872 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13873 sequence for Analyze_Aspect_Specifications
13874 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13875 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13877 2011-08-02 Robert Dewar <dewar@adacore.com>
13879 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13880 aspects, since these no longer exist.
13882 2011-08-02 Robert Dewar <dewar@adacore.com>
13884 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13885 semicolon, do not try to see if there are aspects following it.
13886 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13889 2011-08-02 Robert Dewar <dewar@adacore.com>
13891 * sem_ch8.adb, aspects.ads: Minor reformatting.
13893 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13895 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13896 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13898 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13900 2011-08-02 Yannick Moy <moy@adacore.com>
13902 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13903 mode on subprogram declaration outside of package specification, unless
13904 it is followed by a pragma Import
13905 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13906 Access_Type_Declaration): issue error in formal mode on access type
13907 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13909 (Analyze_Object_Declaration): issue error in formal mode on object
13910 declaration which does not respect SPARK restrictions
13911 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13912 declaration which does not respect SPARK restrictions
13913 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13914 error in formal mode on digits or delta constraint
13915 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13916 decimal fixed point type
13917 (Derived_Type_Declaration): issue error in formal mode on derived type
13918 other than type extensions of tagged record types
13919 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13920 with check on access definition
13921 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13922 mode on protected definition.
13923 (Analyze_Task_Definition): issue error in formal mode on task definition
13925 2011-08-02 Robert Dewar <dewar@adacore.com>
13927 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13929 2011-08-02 Javier Miranda <miranda@adacore.com>
13931 * sem_ch6.adb (Can_Override_Operator): New function.
13932 (Verify_Overriding_Indicator): Add missing code to check overriding
13933 indicator in operators. Fixes regression.
13934 (Check_Overriding_Indicator): Minor reformating after replacing the
13935 code that evaluates if the subprogram can override an operator by
13936 invocations to the above new function.
13938 (Write_Field26_Name): Add missing code to ensure that, following
13939 the documentation in einfo.ads, this field is not shown as attribute
13940 "Static_Initialization" on non-dispatching functions.
13942 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13944 * sem_res.adb (Resolve_Call): A call to
13945 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13946 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13947 i.e., when the second parameter is of type Time_Span.
13949 2011-08-02 Vincent Celier <celier@adacore.com>
13951 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13952 with an archive instead of -L<library dir> -l<library name>.
13954 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13956 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13957 mark the base types In_Use in addition to making the operations
13960 2011-08-02 Ed Falis <falis@adacore.com>
13962 * init.c: add and setup __gnat_signal_mask for the exception signals
13963 * s-inmaop-vxworks.adb: new file.
13964 * s-intman-vxworks.adb: remove unnecessary initializations and
13966 * s-intman-vxworks.ads: remove unnecessary variable
13967 * s-taprop-vxworks.adb: simplify signal initialization
13969 2011-08-02 Robert Dewar <dewar@adacore.com>
13971 * sem_ch8.adb: Minor code reorganization, comment updates.
13973 2011-08-02 Robert Dewar <dewar@adacore.com>
13975 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13976 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13978 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13979 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13981 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13983 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13984 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13985 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13986 use_type_clauses, to handle more efficiently use_type and use_all_type
13988 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13989 Ada2012 Use_All_Type clause.
13990 (Use_Class_Wide_Operations): new procedure.
13992 2011-08-02 Robert Dewar <dewar@adacore.com>
13994 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13995 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13996 expression to expression function.
13998 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14000 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14001 if types are compatible.
14003 2011-08-02 Yannick Moy <moy@adacore.com>
14005 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14006 returns True if its argument array types have same dimension and same
14007 static bounds at each index.
14008 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14009 OUT or IN OUT paramaters which are not view conversions in SPARK.
14010 (Resolve_Arithmetic_Op): issue an error in formal mode on
14011 multiplication or division with operands of fixed point types which are
14012 not qualified or explicitly converted.
14013 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14014 Boolean or array type (except String) operands.
14015 (Resolve_Equality_Op): issue an error in formal mode on equality
14016 operators for array types other than String with non-matching static
14018 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14019 for array types with non-matching static bounds. Factorize the code in
14020 Matching_Static_Array_Bounds.
14021 (Resolve_Qualified_Expression): issue an error in formal mode on
14022 qualified expressions for array types with non-matching static bounds.
14023 (Resolve_Type_Conversion): issue an error in formal mode on type
14024 conversion for array types with non-matching static bounds
14026 2011-08-02 Robert Dewar <dewar@adacore.com>
14028 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14030 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14032 * par-ch9.adb: save location of entry for proper error message.
14034 2011-08-02 Javier Miranda <miranda@adacore.com>
14036 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14037 (Use_Full_View) which permits this routine to climb through the
14038 ancestors using the full-view of private parents.
14039 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14040 Use_Full_View to true in calls to Is_Ancestor.
14041 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14042 true in call to Is_Ancestor.
14043 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14044 Use_Full_View to true in call to Is_Ancestor.
14045 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14046 call to Is_Ancestor.
14047 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14048 Use_Full_View to true in calls to Is_Ancestor.
14049 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14050 Make_Select_Specific_Data_Table, Register_Primitive,
14051 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14052 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14053 to true in call to Is_Ancestor.
14054 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14055 Use_Full_View to true in calls to Is_Ancestor.
14057 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14058 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14060 2011-08-02 Robert Dewar <dewar@adacore.com>
14062 * gnat_rm.texi: Minor reformatting.
14063 * sem_prag.adb: Minor reformatting.
14065 2011-08-02 Tristan Gingold <gingold@adacore.com>
14067 * vms_data.ads: Add VMS qualifier for -gnateP.
14069 2011-08-02 Robert Dewar <dewar@adacore.com>
14071 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14072 * par-ch7.adb (P_Package): Proper placement of aspects for package
14073 decl/instantiation.
14074 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14075 (End_Statements): Add Is_Sloc parameterr
14076 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14077 (Check_End): Ad Is_Sloc parameter
14078 (End_Statements): Add Is_Sloc parameterr
14080 2011-08-02 Vincent Celier <celier@adacore.com>
14082 * ug_words: Add VMS qualifier equivalent to -gnateP:
14083 /SYMBOL_PREPROCESSING.
14085 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14087 * gnat-style.texi: For hexadecimal numeric literals the typical
14088 grouping of digits is 4 to represent 2 bytes.
14089 A procedure spec which is split into several lines is indented two
14092 2011-08-02 Yannick Moy <moy@adacore.com>
14094 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14095 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14096 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14098 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14099 choice in array aggregate
14100 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14102 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14103 positional and named aggregate for record, or others in record
14104 aggregate, or multiple choice in record aggregate
14105 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14106 array operands to logical operations AND, OR and XOR do not have the
14107 same static lower and higher bounds
14108 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14110 2011-08-01 Robert Dewar <dewar@adacore.com>
14112 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14113 Replaces Last_Source_Node_In_Sequence.
14114 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14115 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14116 parens and blank in string (this was inconsistently implemented).
14118 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14119 blank in string (this was inconsistently implemented).
14121 (Set_Global_Switches): Set formal mode switches appropriately
14122 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14124 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14125 call Set_Error_Msg_Lang to set "spark" as language name.
14126 * par.adb: Remove unnecessary call to set formal language for errout
14127 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14128 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14130 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14131 calls to it, moved after resolution so that types are known
14132 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14133 result of concatenation is not of type String
14134 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14135 concatenation is not properly restricted
14136 * gnat_rm.texi: Add doc on pragma Spark_95.
14137 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14138 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14139 * gcc-interface/Make-lang.in: Update dependencies.
14141 2011-08-01 Javier Miranda <miranda@adacore.com>
14143 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14144 condition that detects if the overridden operation must replace an
14147 2011-08-01 Javier Miranda <miranda@adacore.com>
14149 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14150 code declarations inserted by Insert_Actions in each alternative of the
14151 N_Case_Expression node.
14153 2011-08-01 Robert Dewar <dewar@adacore.com>
14155 * sem_ch6.adb: Minor code reorganization.
14156 * sem_util.adb: Minor reformatting.
14158 2011-08-01 Pascal Obry <obry@adacore.com>
14160 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14161 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14163 2011-08-01 Yannick Moy <moy@adacore.com>
14165 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14166 literal or operator symbol which is prefixed
14167 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14168 mode on access attributes.
14169 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14170 that concatenation operands are properly restricted in formal mode
14171 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14172 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14173 result of the concatenation has a type different from String.
14174 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14175 Analyze_Quantified_Expression, Analyze_Slice,
14176 Analyze_Null): issue an error in formal mode on unsupported constructs
14178 (Analyze_Block_Statement): only issue error on source block statement
14179 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14180 function which returns the last node in a list of nodes for which
14181 Comes_From_Source returns True, if any
14182 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14183 Last_Source_Node_In_Sequence
14184 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14185 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14186 mode on unsupported constructs
14187 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14188 rest of the actions may be needed later on since the error is marked as
14190 * sinfo.ads: Typos in comments.
14192 2011-08-01 Pascal Obry <obry@adacore.com>
14194 * projects.texi: Minor editing.
14196 2011-08-01 Yannick Moy <moy@adacore.com>
14198 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14199 insertion character ~~
14200 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14201 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14202 with insertion character ~~
14203 (Set_Msg_Text): treat insertion character ~~
14204 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14205 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14206 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14207 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14208 errors related to the formal language restriction not serious
14209 (insertion character |).
14210 * par.adb (Par): set formal language for error messages if needed
14211 * sem_ch6.adb (Check_Missing_Return): take into account possible
14212 generated statements at the end of the function
14213 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14214 enumeration value to define a new pragma SPARK_95
14215 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14216 SPARK_Version): new type and variables to store the SPARK version
14218 (SPARK_Mode): return True when SPARK_Version is set
14219 * par-prag.adb: Correct indentation
14220 (Prag): take Pragma_SPARK_95 into account
14221 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14224 2011-08-01 Robert Dewar <dewar@adacore.com>
14226 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14227 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14228 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14230 2011-08-01 Pascal Obry <obry@adacore.com>
14232 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14233 Target_Name to Get_Path call.
14234 (Parse_Single_Project): Likewise.
14235 (Post_Parse_Context_Clause): Likewise.
14236 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14237 Call Initialise_Project_Path with the proper Target_Name.
14238 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14240 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14241 with the proper Target_Name.
14242 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14243 Part.Parse routine.
14244 (Parse_Project_And_Apply_Config): Likewise.
14245 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14246 This is fine as this part of the code is supporting only native
14248 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14249 is fine as this part of the code is supporting only native compilation.
14251 2011-08-01 Yannick Moy <moy@adacore.com>
14253 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14254 of homonym, unless the homonym is one of the cases allowed in SPARK
14255 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14256 package declaration occurring after a body.
14258 2011-08-01 Robert Dewar <dewar@adacore.com>
14260 * checks.adb, exp_ch4.adb: Minor reformatting.
14262 2011-08-01 Javier Miranda <miranda@adacore.com>
14264 * einfo.ads (Access_Disp_Table): Fix documentation.
14265 (Dispatch_Table_Wrappers): Fix documentation.
14267 2011-08-01 Pascal Obry <obry@adacore.com>
14269 * prj-env.adb, prj-env.ads: Minor reformatting.
14271 2011-08-01 Yannick Moy <moy@adacore.com>
14273 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14274 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14275 procedures out of these packages.
14276 * errout.ads, errout.adb
14277 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14278 procedures in of this package
14279 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14280 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14281 on misplaced later vs initial declarations, like in Ada 83
14282 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14283 formal mode on attribute of private type whose full type declaration
14285 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14286 package declaration inside a package specification
14287 (Analyze_Full_Type_Declaration): issue error in formal mode on
14288 controlled type or discriminant type
14289 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14290 user-defined operator means that it should come from the source
14291 (New_Overloaded_Entity): issue error in formal mode on overloaded
14293 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14295 2011-08-01 Thomas Quinot <quinot@adacore.com>
14297 * atree.adb: Minor reformatting.
14298 * checks.adb: Minor reformatting.
14300 2011-08-01 Vincent Celier <celier@adacore.com>
14302 * s-parame-vms-ia64.ads: Fix typo in comment
14304 * s-parame-vms-restrict.ads: Removed, unused.
14306 2011-08-01 Javier Miranda <miranda@adacore.com>
14309 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14311 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14312 * sem_ch3.ads, sem_ch3.adb
14313 (Is_Constant_Bound): New extended version of the subprogram that was
14314 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14315 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14316 * sem_aux.ads (Constant_Value): Fix typo in comment.
14317 * checks.adb (Generate_Index_Checks): New implementation which, for
14318 array objects with constant bounds, generates the runtime check
14319 referencing the bounds of the array type. For other cases this routine
14320 provides its previous behavior obtaining such values from the array
14322 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14324 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14325 we cannot have semantic interpretations of the new node.
14327 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14329 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14332 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14334 * sem_ch8.adb: Minor code editing.
14335 * s-vxwext.adb: Remove trailing space.
14336 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14337 consistency with other files.
14339 2011-08-01 Thomas Quinot <quinot@adacore.com>
14341 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14343 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14345 * par-ch10.adb: reject parameterized expressions as compilation unit.
14346 * sem_ch4.adb: handle properly conditional expression with overloaded
14347 then_clause and no else_clause.
14349 2011-08-01 Tristan Gingold <gingold@adacore.com>
14351 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14352 like done by System.Aux_DEC.
14353 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14355 2011-08-01 Yannick Moy <moy@adacore.com>
14357 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14358 missing label at end of declaration (subprogram or package)
14359 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14360 of positional and named parameter association
14361 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14362 Error_Msg_SP which adds a prefix to the error message giving the name
14363 of the formal language analyzed
14364 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14365 access result type in subprogram, unconstrained array as result type,.
14366 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14368 * sem_ch8.adb: Code clean up.
14370 2011-08-01 Javier Miranda <miranda@adacore.com>
14372 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14373 * einfo.ads (Access_Disp_Table): Fix documentation.
14374 (Dispatch_Table_Wrappers): Fix documentation.
14375 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14376 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14377 to enforce the documentation of this attribute.
14378 (Set_Is_Interface): Cleanup the assertion.
14379 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14380 the Underlying_Type entity before reading attribute Access_Disp_Table.
14381 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14382 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14383 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14384 the Underlying_Type entity before reading attribute Access_Disp_Table.
14385 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14386 Locate the Underlying_Type entity before reading attribute
14389 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14391 * s-poosiz.ads: Additional overriding indicators.
14393 2011-08-01 Yannick Moy <moy@adacore.com>
14395 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14397 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14398 parameter specification does not include a subtype mark.
14399 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14400 formal mode on abstract subprogram.
14401 (Analyze_Subprogram_Specification): issue error in formal mode on
14402 user-defined operator.
14403 (Process_Formals): issue error in formal mode on access parameter and
14404 default expression.
14405 * sem_ch9.adb (Analyze_Abort_Statement,
14406 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14407 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14408 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14409 Analyze_Requeue, Analyze_Selective_Accept,
14410 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14411 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14412 issue error in formal mode on user-defined raise statement.
14414 2011-08-01 Thomas Quinot <quinot@adacore.com>
14416 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14417 declaration being hidden when overriding an implicit inherited
14419 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14420 (-gnats), do not complain about a source file that contains only a
14423 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14425 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14426 variable if already set.
14428 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14430 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14431 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14432 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14433 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14434 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14435 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14436 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14437 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14438 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14439 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14440 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14441 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14442 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14443 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14444 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14445 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14446 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14447 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14448 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14449 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14450 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14451 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14452 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14453 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14454 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14455 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14456 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14457 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14458 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14459 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14460 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14461 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14462 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14463 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14464 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14465 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14466 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14467 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14468 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14469 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14470 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14471 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14472 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14473 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14474 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14475 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14476 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14477 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14478 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14479 Use GNAT instead of GNARL.
14481 2011-08-01 Bob Duff <duff@adacore.com>
14483 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14484 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14485 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14488 2011-08-01 Yannick Moy <moy@adacore.com>
14490 * debug.adb (d.D) reverve flag for the SPARK mode
14491 (d.E) reverve flag for SPARK generation mode
14492 (d.F) reverve flag for Why generation mode
14493 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14494 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14495 functions which return True when the corresponding modes are set
14496 (Formal_Language): return "spark" or "alfa" when in formal verification
14498 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14499 Error_Msg to prefix the error message with a tag giving the formal
14501 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14502 message with a tag giving the formal language
14503 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14505 (Analyze_Case_Statement): issue error in formal mode on case statement
14506 with a single "others" case alternative
14507 (Analyze_Exit_Statement): issue errors in formal mode on exit
14508 statements which do not respect SPARK restrictions
14509 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14510 (Check_Unreachable_Code): always issue an error (not a warning) in
14511 formal mode on unreachable code (concerns both code after an infinite
14512 loop and after an unconditional jump, both not allowed in SPARK)
14513 * sem_ch6.adb (Analyze_Return_Statement): add call to
14514 Set_Return_Present for a procedure containing a return statement
14515 (already done for functions in Analyze_Function_Return)
14516 (Analyze_Function_Return): issue error in formal mode on extended
14517 return or if return is not last statement in function
14518 (Check_Missing_Return): issue error in formal mode if function does
14519 not end with return or if procedure contains a return
14520 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14521 function to detect if there is an inner scope of its parameter S which
14524 2011-08-01 Thomas Quinot <quinot@adacore.com>
14526 * sem_ch6.ads: Minor reformatting.
14528 2011-08-01 Javier Miranda <miranda@adacore.com>
14530 * sem_util.adb (Abstract_Interface_List): Complete condition when
14531 processing private type declarations to avoid reading unavailable
14533 (Is_Synchronized_Tagged_Type): Complete condition when processing
14534 private extension declaration nodes to avoid reading unavailable
14537 2011-08-01 Thomas Quinot <quinot@adacore.com>
14539 * sem_ch3.adb: Minor reformatting.
14541 2011-08-01 Thomas Quinot <quinot@adacore.com>
14543 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14544 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14545 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14546 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14547 for VMS, instead parametrize the common implementation with
14548 System.Parameters declarations.
14550 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14552 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14554 2011-08-01 Tristan Gingold <gingold@adacore.com>
14556 * seh_init.c: Fix SEH handler installation on win64.
14558 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14560 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14561 double analysis of an anonymous access to subprogram, because it can
14562 lead to improper sharing of profiles and a back-end crash.
14564 2011-08-01 Robert Dewar <dewar@adacore.com>
14566 * make.adb, sem_ch4.adb: Minor reformatting.
14567 * gcc-interface/Make-lang.in: Update dependencies.
14568 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14570 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14572 * gnat_rm.texi: Fix definition of Long_Integer.
14574 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14576 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14577 to prevent storage exhaustion.
14578 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14579 finalized is a function body, insert the cleanup code before the final
14580 return statement, to prevent spurious warnings.
14581 * s-pooglo.ads: add overriding indicator.
14583 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14585 * sem_ch4.adb (Operator_Check): improve error message when both a
14586 with_clause and a use_clause are needed to make operator usage legal.
14587 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14588 determine whether a compilation unit is visible within an other,
14589 either through a with_clause in the current unit, or a with_clause in
14590 its library unit or one one of its parents.
14592 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14594 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14595 over an arbitrary expression of an array or container type.
14596 * lib-xref.adb: clarify comment.
14598 2011-08-01 Bob Duff <duff@adacore.com>
14600 * einfo.ads: Minor reformatting.
14601 * debug.adb: Minor comment improvement.
14603 2011-08-01 Javier Miranda <miranda@adacore.com>
14605 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14606 consider hidden subprograms as valid candidates.
14608 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14610 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14612 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14614 * gnat_ugn.texi: Fix typo.
14616 2011-08-01 Robert Dewar <dewar@adacore.com>
14618 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14619 lib-xref.adb: Minor reformatting
14621 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14623 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14624 when to generate a call to Move_Final_List.
14625 (Has_Controlled_Parts): Remove this function.
14627 2011-08-01 Geert Bosch <bosch@adacore.com>
14629 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14630 "," in choice list.
14632 2011-08-01 Thomas Quinot <quinot@adacore.com>
14634 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14635 explicit raise of a predefined exception as Comes_From_Source if the
14636 original N_Raise_Statement comes from source.
14638 2011-08-01 Robert Dewar <dewar@adacore.com>
14640 * sinfo.ads: Add comment.
14641 * sem_ch6.adb: Minor reformatting.
14643 2011-08-01 Robert Dewar <dewar@adacore.com>
14645 * freeze.adb (Freeze_Entity): Refine check for bad component size
14646 clause to avoid rejecting confirming clause when atomic/aliased present.
14648 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14650 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14651 better determine whether an entity reference is a write.
14652 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14654 * lib-xref.adb (Output_References): Do no suppress a read reference at
14655 the same location as an immediately preceeding modify-reference, to
14656 handle properly in-out actuals.
14658 2011-08-01 Tristan Gingold <gingold@adacore.com>
14660 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14662 2011-08-01 Quentin Ochem <ochem@adacore.com>
14664 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14665 heap to compute the result.
14667 2011-08-01 Robert Dewar <dewar@adacore.com>
14669 * atree.ads: Minor reformatting.
14671 2011-08-01 Emmanuel Briot <briot@adacore.com>
14673 * g-expect.adb (Get_Command_Output): Fix memory leak.
14675 2011-08-01 Geert Bosch <bosch@adacore.com>
14677 * cstand.adb (P_Float_Type): New procedure to print the definition of
14678 predefined fpt types.
14679 (P_Mixed_Name): New procedure to print a name using mixed case
14680 (Print_Standard): Use P_Float_Type for printing floating point types
14681 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14682 precision IEEE float.
14684 2011-08-01 Thomas Quinot <quinot@adacore.com>
14686 * sem_ch3.adb: Minor reformatting.
14688 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14690 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14691 the completion of a generic function, insert the new body rather than
14692 rewriting the original.
14694 2011-08-01 Yannick Moy <moy@adacore.com>
14696 * sinfo.ads, errout.ads: Typos in comments.
14698 2011-08-01 Robert Dewar <dewar@adacore.com>
14700 * par-endh.adb: Minor reformatting.
14702 2011-08-01 Robert Dewar <dewar@adacore.com>
14704 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14705 (Pre_Post_Aspects): New subtype.
14706 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14707 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14708 * par-ch7.adb (P_Package): Remove Decl parameter
14709 (P_Package): Handle new syntax for aspects (before IS)
14710 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14712 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14713 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14714 (P_Package): Remove Decl parameter
14715 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14717 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14719 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14720 * sinfo.ads: Document new syntax for aspects in packages etc.
14721 * sprint.adb: Handle new syntax of aspects before IS in package
14723 2011-08-01 Thomas Quinot <quinot@adacore.com>
14725 * atree.ads: Minor reformatting.
14726 * sem_prag.adb: Minor reformatting.
14728 2011-08-01 Robert Dewar <dewar@adacore.com>
14730 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14731 case expr alternative.
14733 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14735 * sem_ch12.adb: Fix typo.
14737 2011-08-01 Geert Bosch <bosch@adacore.com>
14739 * sem_prag.adb (Check_No_Link_Name): New procedure.
14740 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14741 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14742 instead of Standard_Long_Long_Float_Size global. Preparation for
14743 eventual removal of per type constants.
14744 * exp_util.ads (Get_Stream_Size): New function returning the stream
14745 size value of subtype E.
14746 * exp_util.adb (Get_Stream_Size): Implement new function.
14747 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14749 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14751 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14753 2011-08-01 Geert Bosch <bosch@adacore.com>
14755 * cstand.adb: Fix comments.
14756 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14757 count of arguments.
14759 2011-08-01 Robert Dewar <dewar@adacore.com>
14761 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14763 2011-08-01 Geert Bosch <bosch@adacore.com>
14765 * atree.ads: Fix comment.
14767 2011-08-01 Robert Dewar <dewar@adacore.com>
14769 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14770 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14771 * par.adb: Add with for Namet.Sp.
14772 * par-tchk.adb: Minor reformatting.
14774 2011-08-01 Vincent Celier <celier@adacore.com>
14776 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14777 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14778 of the init procedure of a SAL.
14779 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14782 2011-08-01 Thomas Quinot <quinot@adacore.com>
14784 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14787 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14789 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14791 2011-08-01 Thomas Quinot <quinot@adacore.com>
14793 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14794 conformant with its spec (return True only for types that have
14795 an overriding Initialize primitive operation that prevents them from
14796 having preelaborable initialization).
14797 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14798 initialization for controlled types in Ada 2005 or later mode.
14800 2011-08-01 Robert Dewar <dewar@adacore.com>
14802 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14804 (Same_Aspect): New function.
14805 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14806 Type_Invariant, Precondition, Postcondition.
14807 * snames.ads-tmpl: Add Name_Type_Invariant.
14809 2011-08-01 Robert Dewar <dewar@adacore.com>
14811 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14813 (Freeze_All_Ent): Fix error in handling inherited aspects.
14814 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14815 already analyzed, but don't skip entire processing of a declaration,
14816 that's wrong in some cases of declarations being rewritten.
14817 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14818 Don't delay for integer, string literals
14819 Treat predicates in usual manner for delay, remove special case code,
14821 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14822 (Build_Predicate_Function): Update saved expression in aspect
14823 (Build_Invariant_Procedure): Update saved expression in aspect
14824 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14825 of replacement of discriminant references if the reference is simple.
14827 2011-08-01 Robert Dewar <dewar@adacore.com>
14829 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14830 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14831 Static_Predicate and Dynamic_Predicate.
14832 (Build_Predicate_Function): Add processing for Static_Predicate
14833 and Dynamic_Predicate.
14834 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14835 (From_Static_Predicate): New flag
14836 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14838 2011-08-01 Robert Dewar <dewar@adacore.com>
14840 * usage.adb: Documentation cleanup for Ada version modes in usage.
14841 * expander.adb: Minor reformatting.
14843 2011-08-01 Robert Dewar <dewar@adacore.com>
14845 * atree.ads: Minor comment fix.
14846 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14847 a-witeio.ads, sem_prag.adb: Minor reformatting.
14849 2011-08-01 Doug Rupp <rupp@adacore.com>
14851 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14852 pointers. Use descrip.h header file for convenience. Add some
14855 2011-08-01 Robert Dewar <dewar@adacore.com>
14857 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14858 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14859 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14861 (Check_Aspect_At_End_Of_Declarations): New procedure
14862 (Analye_Aspect_Specification): Minor changes for above procedures
14863 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14864 specification node as well.
14866 2011-08-01 Pascal Obry <obry@adacore.com>
14868 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14869 Windows files. Use GetFilesAttributes() in this case to check for file
14870 existence instead of returning with an error code.
14872 2011-08-01 Vincent Celier <celier@adacore.com>
14874 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14875 High is above Source length.
14877 2011-08-01 Robert Dewar <dewar@adacore.com>
14879 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14881 2011-08-01 Robert Dewar <dewar@adacore.com>
14883 * aspects.ads (Boolean_Aspects): New subtype.
14884 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14885 for derived types in cases where the parent type and derived type have
14887 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14888 with aspects when parent type also has aspects.
14889 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14890 boolean expression at this point).
14891 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14892 accordance with final decision on the Ada 2012 feature.
14893 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14895 2011-08-01 Matthew Heaney <heaney@adacore.com>
14897 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14899 2011-08-01 Pascal Obry <obry@adacore.com>
14901 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14902 Fix Replace_Slice when High is above current string size.
14903 (Replace_Slice): Fix DL computation when High is above current
14906 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14908 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14910 2011-08-01 Matthew Heaney <heaney@adacore.com>
14912 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14915 2011-08-01 Pascal Obry <obry@adacore.com>
14917 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14920 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14922 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14923 access to protected subprograms in generic bodies.
14924 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14925 protected type, indicate that the convention of the subprogram is
14926 Convention_Protected, because it may be used in subsequent declarations
14927 within the protected declaration.
14929 2011-08-01 Vincent Celier <celier@adacore.com>
14931 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14932 and "final" procedures when the name of the library is "ada", to avoid
14933 duplicate symbols "adainit" and "adafinal" in executables.
14935 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14937 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14938 quantified expression that appears within a postcondition and uses the
14939 Ada2012 'Result attribute.
14941 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14943 * init.c (__gnat_error_handler): Cast reason to int.
14944 (__gnat_install_handler): Explain sa_sigaction use.
14946 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14948 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14949 subprogram has copy-in copy-out parameters, try to promote the mode of
14950 the return type if it is passed in registers.
14952 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14954 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14955 left operand as addressable.
14957 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14959 * gcc-interface/gigi.h (build_function_stub): Remove.
14960 (build_return_expr): Likewise.
14961 (convert_vms_descriptor): Declare.
14962 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14963 (build_function_stub): Move to...
14964 * gcc-interface/utils2.c (build_return_expr): Move to...
14965 * gcc-interface/trans.c (build_function_stub): ...here.
14966 (build_return_expr): ...here.
14967 (Subprogram_Body_to_gnu): Add local variable for language_function.
14968 Disconnect the parameter attributes cache, if any, once done with it.
14969 Call end_subprog_body only after setting the end_locus.
14970 Build the stub associated with the function, if any, at the very end.
14971 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14972 variables and streamline control flow.
14974 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14977 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14978 g-trasym-dwarf.adb.
14980 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14983 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14984 Assign to act.sa_sigaction.
14985 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14986 current->return_address to char * before arithmetic.
14988 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14990 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14991 Correct argument types.
14992 Extract code from reason.
14993 (__gnat_install_handler): Assign to act.sa_sigaction.
14995 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14997 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14998 (GNAT1_OBJS): ...here.
15000 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15003 * g-socthi-mingw.adb (Fill): Fix formatting.
15005 * gcc-interface/gigi.h: Move around comment.
15007 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15010 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15012 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15015 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15017 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15019 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15020 range comparison if Pmode is SImode.
15022 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15023 Eric Botcazou <ebotcazou@adacore.com>
15025 * adadecode.c: Wrap up in extern "C" block.
15026 * adadecode.h: Likewise.
15027 * adaint.c: Likewise. Remove 'const' keyword.
15028 * adaint.h: Likewise.
15029 * argv.c: Likewise.
15030 * atree.h: Likewise.
15032 * cstreams.c: Likewise.
15034 * exit.c: Likewise.
15036 * final.c: Likewise.
15037 * init.c: Likewise.
15038 * initialize.c: Likewise.
15039 * link.c: Likewise.
15040 * namet.h: Likewise.
15041 * nlists.h: Likewise.
15042 * raise.c: Likewise.
15043 * raise.h: Likewise.
15044 * repinfo.h: Likewise.
15045 * seh_init.c: Likewise.
15046 * targext.c: Likewise.
15047 * tracebak.c: Likewise.
15048 * uintp.h: Likewise.
15049 * urealp.h: Likewise.
15050 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15051 * xsinfo.adb: Likewise.
15052 * xsnamest.adb: Likewise.
15053 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15054 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15055 * gcc-interface/misc.c: Likewise.
15056 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15057 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15058 ada/targext.o here...
15059 (GNAT_ADA_OBJS): ...and not here.
15060 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15061 (GNATBIND_OBJS): Reorder.
15063 2011-07-07 Richard Henderson <rth@redhat.com>
15065 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15066 dwarf2out_frame_init.
15068 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15070 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15072 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15075 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15077 2011-07-06 Richard Guenther <rguenther@suse.de>
15079 * gcc-interface/misc.c (gnat_init): Merge calls to
15080 build_common_tree_nodes and build_common_tree_nodes_2.
15081 Re-initialize boolean_false_node.
15083 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15084 Olivier Hainque <hainque@adacore.com>
15085 Nicolas Setton <setton@adacore.com>
15087 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15088 the type according to the ARTIFICIAL_P parameter.
15089 (create_type_decl): Likewise.
15090 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15092 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15094 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15095 (gnatbind): Likewise.
15097 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15099 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15101 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15103 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15104 local variable throughout. Remove useless call to Base_Type.
15105 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15106 Take it also into account for the volatileness of the field. Set the
15107 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15109 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15111 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15112 on a dereference built for a by-ref object if it has an address clause.
15114 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15116 * einfo.ads (Address_Taken): Document use for the second argument of
15117 Asm_Input and Asm_Output attributes.
15118 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15119 argument is an entity name, then set Address_Taken on it.
15120 <Attribute_Asm_Output>: Likewise.
15121 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15122 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15123 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15124 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15126 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15128 PR middle-end/46500
15129 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15131 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15133 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15134 (ada/utils.o): Update dependencies.
15135 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15136 ../../../libcpp/libcpp.a.
15137 * gcc-interface/utils.c: Include common/common-target.h.
15138 (process_attributes): Use targetm_common.have_named_sections.
15140 2011-06-07 Richard Guenther <rguenther@suse.de>
15142 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15145 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15147 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15148 TREE_THIS_NOTRAP flag.
15150 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15152 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15155 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15157 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15158 constants whose full view has discriminants specially.
15160 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15162 * gcc-interface/utils.c: Include diagnostic.h.
15163 (gnat_write_global_declarations): Output debug information for all
15164 global type declarations before finalizing the compilation unit.
15165 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15167 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15169 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15171 2011-05-25 Kai Tietz <ktietz@redhat.com>
15173 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15174 initialization instead of const/none-const pointer assignment.
15176 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15178 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15179 $(EXTRA_GNAT1_OBJS).
15180 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15181 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15182 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15183 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15184 libcommon-target.a instead of prefix.o.
15186 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15189 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15191 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15193 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15194 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15195 instead of version.o.
15197 2011-05-18 Kai Tietz <ktietz@redhat.com>
15199 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15200 boolean_false_node instead of integer_zero_node.
15201 (convert_with_check): Likewise.
15202 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15204 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15206 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15207 type of the parameter is an unconstrained array, convert the actual to
15208 the type of the formal in the In Out and Out cases as well.
15210 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15212 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15213 call build_function_type_array or build_varargs_function_type_array
15215 (create_subprog_type): Don't call build_function_type; call
15216 build_function_type_vec instead.
15218 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15220 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15221 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15222 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15224 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15226 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15228 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15229 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15231 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15233 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15235 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15237 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15238 instead of accessing TYPE_ARG_TYPES directly.
15239 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15241 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15244 * gcc-interface/gigi.h (get_variant_part): Declare.
15245 * gcc-interface/decl.c (get_variant_part): Make global.
15246 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15247 types have the same constant size, are record types and T1 has a
15248 variant part while T2 doesn't.
15250 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15252 * gcc-interface/utils.c (begin_subprog_body): Do not call
15254 (end_subprog_body): Likewise.
15256 2011-05-04 Richard Guenther <rguenther@suse.de>
15258 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15260 (pos_to_constructor): Likewise.
15262 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15263 Eric Botcazou <ebotcazou@adacore.com>
15265 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15266 of build_function_type. Adjust calls to...
15267 (build_raise_check): ...this. Do not take a void_tree parameter.
15268 Call build_function_type_list instead of build_function_type.
15269 Fix head comment and swap couple of conditional blocks.
15271 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15273 * gnatvsn.ads (Library_Version): Bump to 4.7.
15274 (Current_Year): Bump to 2011.
15276 2011-04-29 Michael Matz <matz@suse.de>
15278 * gcc-interface/misc.c (gnat_handle_option): Set
15279 warn_maybe_uninitialized.
15281 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15283 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15284 the Watson/McCabe paper.
15286 2011-04-23 Jim Meyering <meyering@redhat.com>
15288 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15290 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15292 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15295 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15297 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15299 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15300 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15301 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15302 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15303 <all>: Do not set flags on the reused DECL node coming from an alias.
15304 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15305 don't need debug info here...
15306 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15307 (gigi): Adjust calls to create_subprog_decl.
15308 (build_raise_check): Likewise.
15309 (establish_gnat_vms_condition_handler): Likewise.
15310 (Compilation_Unit_to_gnu): Likewise.
15311 (gnat_to_gnu): Likewise.
15313 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15315 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15316 (NO_REORDER_ADAFLAGS): New variable.
15317 (EXTRA_GNATTOOLS): Always define.
15318 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15319 Clean up and adjust list of files compiled with special options.
15320 * gcc-interface/Make-lang.in: Likewise.
15321 (ada/decl.o): Cosmetical change.
15322 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15324 2011-04-20 Jim Meyering <meyering@redhat.com>
15326 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15328 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15330 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15331 $(CFLAGS) on the link line.
15333 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15335 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15336 padded type built for the return type if it is unconstrained.
15338 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15340 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15342 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15344 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15345 before calling TREE_CHAIN.
15346 * gcc-interface/misc.c (gnat_init_ts): New function.
15347 (LANG_HOOKS_INIT_TS): Define.
15349 2011-04-12 Martin Jambor <mjambor@suse.cz>
15351 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15352 instead of cgraph_node.
15354 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15356 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15357 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15360 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15362 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15363 of aggregate types that contain a placeholder.
15365 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15367 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15369 (handle_type_generic_attribute): Likewise.
15371 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15374 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15376 2011-04-04 Kai Tietz <ktietz@redhat.com>
15379 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15382 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15384 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15385 type case, do not strip a padding type around the array type.
15387 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15389 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15392 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15394 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15395 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15396 code for -feliminate-unused-debug-types.
15397 (gnat_post_options): Likewise.
15399 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15401 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15402 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15405 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15407 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15408 DECL_ARTIFICIAL flag on enumeration types.
15410 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15412 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15413 fat pointer types artificial unconditionally.
15414 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15417 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15419 * gcc-interface/gigi.h (get_dummy_type): Declare.
15420 (build_dummy_unc_pointer_types): Likewise.
15421 (finish_fat_pointer_type): Likewise.
15422 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15423 fat pointer type has been built, complete it in place.
15424 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15425 and thin pointers. Remove useless variable.
15426 (finish_fat_pointer_type): Make global and move to...
15427 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15428 (get_dummy_type): New function.
15429 (build_dummy_unc_pointer_types): Likewise.
15430 (gnat_pushdecl): Propage the name to the anonymous variants only.
15431 (update_pointer_to): Only adjust the pointer types in the unconstrained
15434 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15436 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15437 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15438 if this is a Taft amendment type and the full declaration is available.
15439 * gcc-interface/trans.c (process_type): Likewise.
15440 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15441 (process_freeze_entity): Likewise.
15442 * gcc-interface/utils.c (dummy_global): New static variable.
15443 (gnat_write_global_declarations): If there are types declared as used
15444 at the global level, insert them in the global hash table.
15446 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15448 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15449 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15450 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15452 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15453 flag of the type accordingly.
15454 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15456 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15458 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15459 finalizing types when updating the pointers to the designated type.
15460 <all>: Finalize the deferred types even if we didn't defer processing
15461 of incomplete types in this invocation.
15463 2011-04-01 Olivier Hainque <hainque@adacore.com>
15464 Nicolas Setton <setton@adacore.com>
15465 Eric Botcazou <ebotcazou@adacore.com>
15467 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15468 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15470 2011-03-28 Kai Tietz <ktietz@redhat.com>
15472 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15474 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15475 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15477 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15479 2011-03-28 Tristan Gingold <gingold@adacore.com>
15482 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15483 Use ada output of gnatbind.
15484 (ada/b_gnatb.adb): Ditto.
15485 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15486 (ada.mostlyclean, ada.stage1)
15487 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15488 (ada.stagefeedback): Adjust.
15489 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15490 Use ada output of gnatbind.
15491 (b_gnatm.adb): Ditto.
15492 (b_gnatl.o, b_gnatm.o): New rules.
15494 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15496 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15497 for the padded type built to support a specified size or alignment.
15499 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15501 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15502 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15503 unconditionally to the end of the unit when the designated type is
15505 <all>: Rename local variable. Attempt to un-defer types only and do it
15506 for limited_with'ed types as well.
15507 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15508 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15509 consistently and remove redundant call to finalize_from_with_types.
15511 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15513 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15514 subprograms without a previous spec declared in the same unit.
15515 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15516 subprograms at the end of the unit instead of at the beginning.
15517 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15518 isn't public for the special handling of non-inline functions nested
15519 inside inline external functions.
15521 2011-03-25 Jeff Law <law@redhat.com>
15523 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15525 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15527 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15528 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15529 to compute Set_Size_Depends_On_Discriminant.
15530 (Layout_Type): Call it on array types in back-end layout mode.
15531 * sem_util.adb (Requires_Transient_Scope): Return true for array
15532 types only if the size depends on the value of discriminants.
15533 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15534 type if the RHS is a call to a function that returns an unconstrained
15535 type with default discriminant.
15537 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15539 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15540 non-conversion to the nominal result type at the end.
15542 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15544 * gcc-interface/trans.c (create_temporary): New function taken from...
15545 (create_init_temporary): ...here. Call it.
15546 (call_to_gnu): Create the temporary for the return value early, if any.
15547 Create it for a function with copy-in/copy-out parameters if there is
15548 no target; in other cases of copy-in/copy-out, use another temporary.
15549 Push the new binding level lazily. Add and rename local variables.
15551 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15553 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15555 (set_rm_size): Likewise.
15557 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15559 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15560 for the padded type built in order to support a specified alignment.
15561 Fix incorrect formatting.
15563 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15566 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15568 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15570 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15571 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15572 to the end of the list. Adjust recursive call. Rename local variable.
15573 If REORDER is true, reorder components of the record type.
15574 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15575 components_to_record and adjust the parameter list.
15577 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15579 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15580 disabled, use the variable for bounds of loop iteration scheme.
15582 2011-03-21 Kai Tietz <ktietz@redhat.com>
15585 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15587 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15589 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15590 out whether the expression is read-only. Short-circuit placeholder
15591 case and rename a couple of local variables.
15593 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15595 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15596 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15597 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15598 (convert): Deal with conversions from a smaller form type specially.
15600 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15602 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15603 its argument, except for the special -I- switch.
15605 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15607 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15610 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15612 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15614 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15616 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15618 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15619 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15620 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15621 Do not generate the check directly, instead instantiate the template
15622 check present in the descriptor.
15623 (make_descriptor_field): Move around.
15624 (build_vms_descriptor32): Build a template check in the POINTER field.
15625 (build_vms_descriptor): Remove useless suffixes.
15626 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15628 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15631 * targext.c: Include target files if IN_RTS is defined.
15633 2011-01-26 Richard Guenther <rguenther@suse.de>
15636 * targext.c: Include config.h.
15637 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15640 2011-01-04 Pascal Obry <obry@adacore.com>
15641 Eric Botcazou <ebotcazou@adacore.com>
15643 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15645 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15647 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15648 end-of-case on the end label and its associated gotos, if any.
15650 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15652 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15653 expressions of the parameter cache within the statement group of
15654 the CICO mechanism.
15656 2011-01-04 Olivier Hainque <hainque@adacore.com>
15657 Eric Botcazou <ebotcazou@adacore.com>
15659 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15660 (set_end_locus_from_node): New function.
15661 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15662 make and the function end_locus.
15663 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15664 for the elaboration subprogram.
15665 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15666 set the end_locus of the expression as well.
15668 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15671 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15672 variables that are referenced in exception handlers volatile.
15676 Copyright (C) 2011 Free Software Foundation, Inc.
15678 Copying and distribution of this file, with or without modification,
15679 are permitted in any medium without royalty provided the copyright
15680 notice and this notice are preserved.