1 2011-10-13 Geert Bosch <bosch@adacore.com>
3 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
4 * s-gearop.ads (L2_Norm): Change profile to be suitable for
6 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
9 2011-10-13 Robert Dewar <dewar@adacore.com>
11 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
12 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
13 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
14 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
15 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
16 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
18 2011-10-13 Geert Bosch <bosch@adacore.com>
20 * s-gearop.adb: Minor comment additions.
22 2011-10-13 Fedor Rybin <frybin@adacore.com>
24 * gnat_ugn.texi: Add gnattest section.
26 2011-10-13 Ed Schonberg <schonberg@adacore.com>
28 * freeze.adb: Do not create body of renaming if declaration has
31 2011-10-13 Olivier Hainque <hainque@adacore.com>
33 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
34 further, to the ppc+kernel case only.
36 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
38 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
39 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
40 Do not create a pool formal on .NET/JVM.
41 (Expand_N_Extended_Return_Statement): Alphabetize local
42 variables. Do not create a renaming of the build-in-place pool
43 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
44 Add the user-defined pool only on non-VM targets.
45 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
46 local variables. Do not add a pool actual on .NET/JVM.
47 * sem_ch6.adb: Add with and use clause for Targparm.
48 (Create_Extra_Formals): Add build-in-place pool formal only on
50 * rtsfind.ads: Alphabetize entries.
52 2011-10-13 Sergey Rybin <rybin@adacore.com>
54 * gnat_ugn.texi: Minor correction.
56 2011-10-13 Ed Schonberg <schonberg@adacore.com>
58 * sem_ch8.adb: Minor error message improvement.
60 2011-10-13 Robert Dewar <dewar@adacore.com>
62 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
64 2011-10-13 Gary Dismukes <dismukes@adacore.com>
66 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
67 of a for loop for an enumeration type with an enumeration rep
68 clause, which involves moving the original loop parameter into
69 a nested block, the loop parameter's entity must be removed from
70 the entity list of the loop scope.
72 2011-10-13 Bob Duff <duff@adacore.com>
74 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
75 that gets passed in the same cases where BIP_Alloc_Form is passed
76 (caller-unknown-size results). BIP_Storage_Pool is used when
77 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
78 to the user-defined storage pool is passed at the call site,
79 and this pool is used in callee to allocate the result.
80 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
81 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
82 the additional BIP_Storage_Pool actual.
83 (Expand_N_Extended_Return_Statement): Allocate the function
84 result using the user-defined storage pool, if BIP_Alloc_Form =
86 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
87 * exp_ch4.adb: Don't overwrite storage pool set by
88 Expand_N_Extended_Return_Statement.
89 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
90 for use in build-in-place function calls within allocators
91 where the access type has a user-defined storage pool.
93 2011-10-13 Sergey Rybin <rybin@adacore.com>
95 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
98 2011-10-13 Nicolas Roche <roche@adacore.com>
100 * gnatlink.adb: Ensure that -mrtp is passed when
101 runtime name ends with 'rtp'.
103 2011-10-13 Ed Schonberg <schonberg@adacore.com>
105 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
106 unchecked union type can be limited.
108 2011-10-13 Olivier Hainque <hainque@adacore.com>
110 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
111 the use of the signal trampoline for PPC in the sjlj case as well.
112 Add legitimate casts, preventing compile time warnings on the
113 (sighandler *) profile.
115 2011-10-13 Yannick Moy <moy@adacore.com>
117 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
118 analysis in Alfa mode.
120 2011-10-13 Ed Schonberg <schonberg@adacore.com>
122 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
123 expressions are legal limited return values if each one of their
124 dependent expressions are legal.
126 2011-10-13 Ed Schonberg <schonberg@adacore.com>
128 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
129 if the prefix of the call is a qualified expression, rewrite as
131 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
132 code statement is legal if it is a rewriting of a procedure call.
134 2011-10-13 Ed Schonberg <schonberg@adacore.com>
136 * exp_aggr.adb (Flatten): If a component association has a box,
137 assume that aggregate is not static.
138 (Safe_Aggregate): If a component association in a non-limited
139 aggregate has a box, assume that it cannot be expanded in place.
141 2011-10-13 Vincent Celier <celier@adacore.com>
143 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
144 Process_Project_Tree_Phase_1 with Packages_To_Check.
145 (Process_Project_And_Apply_Config): Ditto
146 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
147 Remove default for argument Packages_To_Check.
148 * prj-proc.adb (Recursive_Process): New argument
151 (Process_Project_Tree_Phase_1): Ditto.
152 (Recursive_Project.Process_Aggregated_Projects): Call
153 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
155 * prj-proc.ads (Process): New argument Packages_To_Check
156 (Process_Project_Tree_Phase_1): Ditto
158 2011-10-13 Arnaud Charlet <charlet@adacore.com>
160 * gcc-interface/Makefile.in: Fix typo.
162 2011-10-13 Ed Schonberg <schonberg@adacore.com>
164 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
165 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
166 Use sloc of defining identifier of farmal type declaration,
167 as sloc of generated internal entity, to prevent misplaced
170 2011-10-13 Ed Schonberg <schonberg@adacore.com>
172 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
173 is fully defined before checking that it is a numeric type.
175 2011-10-13 Ed Schonberg <schonberg@adacore.com>
177 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
178 association for component X has a box, then X is covered in the
179 aggregate even if there is not default value for X in the type
180 declaration, and X has to be default-initialized.
182 2011-10-13 Ed Schonberg <schonberg@adacore.com>
184 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
185 'Value): Mark literals as referenced only if reference is in
188 2011-10-13 Matthew Heaney <heaney@adacore.com>
190 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
192 2011-10-13 Olivier Hainque <hainque@adacore.com>
194 * sigtramp.h: New file. Prototype and spec of the signal
195 trampoline to be called by an established handler to provide
196 dwarf call frame info before the real signal processing code.
197 * sigtramp-ppcvxw.c: New file. Implementation of the signal
198 trampoline for ppc-vxworks.
199 * init.c (vxworks section): Use it for ppc.
201 2011-10-13 Thomas Quinot <quinot@adacore.com>
203 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
204 (Check_Future_Identifier): New subprogram,
205 factors duplicated code from Par.Ch2.P_Identifier and
206 Par.Ch3.P_Defining_Identifier.
208 2011-10-13 Thomas Quinot <quinot@adacore.com>
210 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
211 if we fail to initialize CV attributes or CV.
213 2011-10-13 Thomas Quinot <quinot@adacore.com>
215 * s-tasren.adb (Timed_Selective_Wait, case
216 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
217 we know abortion is already deferred.
219 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
221 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
222 (Build_Master_Renaming (function)): Removed.
223 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
224 (Expand_Full_Type_Declaration): Alphabetize
225 variables. Reformatting of code and comments. Rewrite the
226 section on processing of anonymous access-to-task types in
228 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
229 (Build_Master_Renaming): Moved to exp_ch9.
230 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
231 (Build_Master_Entity): Add formal parameter
232 Use_Current. Reformatting of code and comments.
233 (Build_Master_Renaming): Moved from exp_ch3.
234 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
235 exp_ch3. Update comment on usage.
236 (Build_Master_Entity):
237 Add formal parameter Use_Current. Update comment on usage.
238 (Build_Master_Renaming): Moved from exp_ch3.
239 * sem_ch3.adb (Access_Definition): Remove redundant code to
240 create a _master and a renaming.
242 2011-10-13 Ed Schonberg <schonberg@adacore.com>
244 * lib-xref.adb: Do no emit reference to overridden operation,
245 if it is internally generated.
247 2011-10-13 Vincent Celier <celier@adacore.com>
249 * bindgen.adb: Remove any processing related to g-trasym
250 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
251 * mlib-prj.adb: Remove any processing related to g-trasym.
253 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
255 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
256 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
257 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
258 (ADA_FLAGS_TO_PASS): Likewise.
259 (COMMON_FLAGS_TO_PASS): New.
260 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
261 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
262 (gnatlib): Use COMMON_FLAGS_TO_PASS.
263 (ada.install-common): Likewise.
264 (install-gnatlib): Likewise.
265 (install-gnatlib-obj): Likewise.
266 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
267 (gnat-cross): Delete.
268 (gnatboot): Likewise.
269 (gnatboot2): Likewise.
270 (gnatboot3): Likewise.
271 (gnatstage1): Likewise.
272 (gnatstage2): Likewise.
273 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
274 (MOST_ADAFLAGS): Likewise.
275 (LOOSE_CFLAGS): Likewise.
276 (gnat-cross): Likewise.
277 (GNATLIBFLAGS): Add -W -Wall.
278 (GNATLIBCFLAGS_FOR_C): Likewise.
279 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
280 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
282 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
284 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
285 (push_range_check_info): Likewise.
286 (gnat_to_gnu) <N_Code_Statement>: Likewise.
287 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
288 (gnat_invariant_expr): Likewise.
289 * gcc-interface/utils.c (compute_related_constant): Likewise.
290 (max_size): Fix handling of SAVE_EXPR.
291 (remove_conversions): Fix formatting.
293 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
295 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
296 (DECL_INDUCTION_VAR): New macro.
297 (SET_DECL_INDUCTION_VAR): Likewise.
298 * gcc-interface/gigi.h (convert_to_index_type): Declare.
299 (gnat_invariant_expr): Likewise.
300 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
301 parameter, set DECL_LOOP_PARM_P on it.
302 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
303 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
304 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
305 (struct range_check_info_d): New type.
306 (struct loop_info_d): Likewise.
307 (gnu_loop_stack): New stack.
308 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
309 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
310 is set, do not test DECL_RENAMED_OBJECT.
311 (push_range_check_info): New function.
312 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
313 the label. Reference the label and the iteration variable from it.
314 Build the special induction variable in the unsigned version of the
315 size type, if it is larger than the base type. And attach it to the
316 iteration variable if the latter isn't by-ref. In the iteration scheme
317 case, initialize the invariant conditions in front of the loop if
318 deemed profitable. Use gnu_loop_stack.
319 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
320 <N_Raise_Constraint_Error>: Always process the reason. In the range
321 check and related cases, and if loop unswitching is enabled, compute
322 invariant conditions and push this information onto the stack.
323 Do not translate again the condition if it has been already translated.
324 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
325 DECL_LOOP_PARM_P isn't set.
326 (convert_to_index_type): New function.
327 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
328 to convert the index from the base index type to sizetype.
329 (gnat_invariant_expr): New function.
331 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
333 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
334 two parallel arrays to hold standard builtin declarations, and
335 replace it with a function based interface that can support
336 creating builtins on the fly in the future.
337 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
338 (gnat_to_gnu): Ditto.
340 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
343 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
344 * gcc-interface/utils.c (global_context): New variable.
345 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
346 that are either public external or at top level. Use "No" macro.
347 (end_subprog_body): Call decl_function_context.
348 (rest_of_subprog_body_compilation): Likewise.
350 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
352 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
353 (rest_of_subprog_body_compilation): Likewise.
354 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
355 test for useless conversions by means of gnat_useless_type_conversion.
356 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
357 (language_function): Add named_ret_val and other_ret_val.
358 (f_named_ret_val): New macro.
359 (f_other_ret_val): Likewise.
360 (gigi): Call rest_of_subprog_body_compilation.
361 (struct nrv_data): New structure.
362 (is_nrv_p): New predicate.
363 (prune_nrv_r): New helper function.
364 (prune_nrv_in_block): New function.
365 (finalize_nrv_r): New helper function.
366 (finalize_nrv): New function.
367 (return_value_ok_for_nrv_p): New predicate.
368 (build_return_expr): If optimization is enabled, record candidates for
369 the Named Return Value optimization.
370 (build_function_stub): Call rest_of_subprog_body_compilation.
371 (Subprogram_Body_to_gnu): If optimization is enabled and there are
372 candidates, finalize the Named Return Value optimization.
373 Call rest_of_subprog_body_compilation.
374 (call_to_gnu): At the end, if a return value is needed, simplify the
375 result before wrapping it up in a COMPOUND_EXPR.
376 * gcc-interface/utils.c (end_subprog_body): Split into...
377 (rest_of_subprog_body_compilation): ...this. New function.
378 (gnat_useless_type_conversion): Likewise.
380 2011-10-06 Thomas Quinot <quinot@adacore.com>
382 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
383 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
384 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
385 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
386 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
387 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
388 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
389 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
391 2011-10-06 Ed Schonberg <schonberg@adacore.com>
393 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
396 2011-10-06 Matthew Heaney <heaney@adacore.com>
398 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
399 (Dequeue_Only_High_Priority): Protected procedure now implemented.
401 2011-10-06 Vincent Celier <celier@adacore.com>
403 * g-trasym.adb: Replace old implementation with the default
404 implementation that returns list of addresses as "0x...".
405 * g-trasym.ads: Update the list of platforms with the full
406 capability. Indicate that there is a default implementation
408 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
409 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
410 is now a default implementation for all platforms without the full
413 2011-10-06 Robert Dewar <dewar@adacore.com>
415 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
416 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
417 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
418 reorganization (use conditional expressions).
420 2011-10-06 Robert Dewar <dewar@adacore.com>
422 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
423 floating divide by zero.
425 2011-10-06 Ed Schonberg <schonberg@adacore.com>
427 * sem_ch6.adb: Limited interfaces that are not immutably limited
428 are OK in return statements.
430 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
432 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
433 change to powerpc section.
435 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
437 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
440 2011-09-27 Ed Schonberg <schonberg@adacore.com>
442 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
443 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
444 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
446 * a-coorma.ads: Minor reformmating.
447 * einfo.ads: Improve the comment describing the
448 Directly_Designated_Type function.
449 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
451 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
454 2011-09-27 Robert Dewar <dewar@adacore.com>
456 * a-comutr.ads: Minor reformatting.
458 2011-09-27 Ed Schonberg <schonberg@adacore.com>
460 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
461 iterators to multiway trees.
463 2011-09-27 Yannick Moy <moy@adacore.com>
465 * debug.adb (d.D): New option for strict Alfa mode.
466 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
467 permissions as strictly as possible.
468 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
469 Alfa mode, now, interpret ranges of base types like GNAT does; in
470 strict mode, simply change the range of the implicit base Itype.
471 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
473 2011-09-27 Robert Dewar <dewar@adacore.com>
475 * exp_ch9.adb: Minor comment fixes.
477 2011-09-27 Ed Schonberg <schonberg@adacore.com>
479 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
482 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
484 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
485 instead of Directly_Designated_Type in the indirect array case.
487 2011-09-27 Robert Dewar <dewar@adacore.com>
489 * exp_util.adb, exp_aggr.adb: Minor reformatting.
491 2011-09-27 Ed Schonberg <schonberg@adacore.com>
493 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
494 on subtype declarations.
495 * exp_aggr.adb: Minor comment update.
497 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
499 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
500 test in the N_Explicit_Dereference case. Fold double logical
501 negation in the special loop case and conditionalize it on
502 Variable_Ref being true.
504 2011-09-27 Ed Schonberg <schonberg@adacore.com>
506 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
507 single protected object and the selector is a discriminant or an
508 entry family, this is a non-overloaded candidate interpretation,
509 and possible primitive operations of the type must not be
512 2011-09-27 Arnaud Charlet <charlet@adacore.com>
514 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
516 2011-09-27 Pascal Obry <obry@adacore.com>
518 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
519 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
520 Add dummy definitions for pthread_rwlock_t
521 and pthread_rwlockattr_t on all POSIX platforms.
522 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
524 (Finalize_Lock): Likewise.
525 (Write_Lock): Likewise.
528 2011-09-27 Tristan Gingold <gingold@adacore.com>
530 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
533 2011-09-27 Pascal Obry <obry@adacore.com>
535 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
536 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
537 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
538 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
539 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
540 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
541 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
542 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
543 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
544 s-taprop-posix.adb: Revert previous changes.
545 (Lock): Now a record containing the two possible lock
546 (mutex and read/write) defined in OS_Interface.
547 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
549 (Initialize_Protection): Likewise.
551 (Lock_Read_Only): Likewise.
554 2011-09-27 Pascal Obry <obry@adacore.com>
556 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
557 OS_Interface.pthread_rwlock_t.
559 2011-09-27 Robert Dewar <dewar@adacore.com>
561 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
562 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
563 sem_ch5.adb, sem_util.adb: Minor reformatting.
565 2011-09-27 Pascal Obry <obry@adacore.com>
567 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
568 (Finalize_Lock)[RW_Lock]: Likewise.
569 (Write_Lock)[RW_Lock]: Likewise.
570 (Unlock)[RW_Lock]: Likewise.
571 (Read_Lock): Define L as RW_Lock (instead of Lock).
572 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
573 routine for r/w lock.
574 (Finalize_Lock)[RW_Lock]: Likewise.
575 (Write_Lock)[RW_Lock]: Likewise.
576 (Unlock)[RW_Lock]: Likewise.
577 (Read_Lock): Define L as RW_Lock (instead of Lock).
579 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
580 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
581 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
582 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
583 routine for standard lock.
584 (Finalize_Lock)[RW_Lock]: Likewise.
585 (Write_Lock)[RW_Lock]: Likewise.
586 (Unlock)[RW_Lock]: Likewise.
587 (Read_Lock): Define L as RW_Lock (instead of Lock).
588 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
589 in the record definition.
590 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
591 lock for 'R' locking policy.
592 (Initialize_Protection): Likewise.
594 (Lock_Read_Only): Likewise.
596 * s-taspri-posix.ads (RW_Lock): New type defined as
597 OS_Interface.pthread_rwlock_t.
599 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
600 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
601 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
602 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
604 2011-09-27 Pascal Obry <obry@adacore.com>
606 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
608 2011-09-27 Pascal Obry <obry@adacore.com>
610 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
611 s-osinte-hpux.ads, s-osinte-irix.ads,
612 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
614 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
615 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
616 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
617 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
618 pthread_rwlock_destroy, pthread_rwlock_rdlock,
619 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
621 2011-09-27 Pascal Obry <obry@adacore.com>
623 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
624 (RE_Id): Add RE_Lock_Read_Only.
625 (RE_Unit_Table): Likewise.
626 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
627 to lift restriction on first character. Handle now the
628 Name_Concurrent_Readers_Locking where policy character is set to
630 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
632 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
633 read only lock for function in protected object.
634 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
635 this routine is now used.
637 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
639 * s-atocou-x86.adb (Decrement): Use %;.
640 (Increment): Likewise.
642 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
644 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
645 dereference of the pointer to the storage area. Remove useless type
646 conversions and factor out common code.
648 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
650 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
651 variable and use it throughout.
652 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
653 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
654 first step. Also convert to the unpadded type as a last step.
656 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
658 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
659 DECL_CHAIN in comment.
660 * gcc-interface/trans.c (gigi): Likewise.
661 (Attribute_to_gnu): Likewise.
662 (build_function_stub): Likewise.
663 (gnat_to_gnu): Likewise.
664 * gcc-interface/utils.c (create_subprog_decl): Likewise.
665 (convert_vms_descriptor64): Likewise.
666 (convert_vms_descriptor32): Likewise.
668 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
670 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
671 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
672 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
673 the type of the record is TYPE_READONLY.
675 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
676 Robert Dewar <dewar@adacore.com>
678 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
679 OUT formal parameter which is of an null-exclusion access subtype.
681 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
683 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
684 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
685 (gnat_to_gnu_param): Likewise.
686 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
687 maybe_unconstrained_array instead of doing the work manually.
688 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
689 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
690 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
691 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
692 (gnat_stabilize_reference): Likewise.
694 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
696 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
697 (SET_TYPE_NULL_BOUNDS): Likewise.
698 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
699 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
700 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
702 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
703 check that the initializer is a valid constant expression for use in
704 initializing a static variable. Add missing guard.
705 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
706 (convert_to_fat_pointer): In the null fat pointer case, build a valid
707 pointer for the bounds.
708 * gcc-interface/utils2.c (compare_fat_pointers): New function.
709 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
711 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
713 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
714 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
715 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
716 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
717 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
718 to the indirect case.
719 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
720 the TREE_THIS_NOTRAP flag.
722 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
724 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
725 iteration scheme, always generate the do-while form if optimization
726 is enabled. Use more straightforward test at the end.
728 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
730 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
731 XNEW instead of xmalloc. Do not build useless pointer type.
732 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
733 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
734 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
736 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
738 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
739 the alignment if this doesn't prevent BLKmode access to the object.
741 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
743 * gcc-interface/Makefile.in (darwin): Do not issue the
744 '-flat_namespace' linker flag during Ada build.
745 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
746 default shared library options.
748 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
750 * gcc-interface/decl.c (annotate_value): Look up expression for
751 insertion in the cache at the end.
753 2011-09-19 Arnaud Charlet <charlet@adacore.com>
755 * gcc-interface/Make-lang.in: Update dependencies.
757 2011-09-19 Steve Baird <baird@adacore.com>
759 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
760 configuration pragma names so that Is_Configuration_Pragma_Name
761 will return True for Name_Annotate. Make corresponding change in
762 Pragma_Id enumeration type. This is needed to allow an Annotate
763 pragma to occur in a configuration pragma file (typically,
765 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
766 * gnat_rm.texi: Note that pragma Annotate may be used as a
767 configuration pragma.
769 2011-09-19 Ed Schonberg <schonberg@adacore.com>
771 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
772 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
774 2011-09-19 Yannick Moy <moy@adacore.com>
776 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
777 for expansion of set membership.
778 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
779 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
780 visible for use in Alfa expansion.
781 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
782 variable in Alfa mode.
784 2011-09-19 Thomas Quinot <quinot@adacore.com>
786 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
788 2011-09-19 Thomas Quinot <quinot@adacore.com>
790 * exp_ch9.adb: Minor reformatting.
792 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
794 * freeze.adb (Build_Renamed_Body): Generic subprograms
795 instantiations cannot be poperly inlined by the compiler, do
796 not set the Body_To_Inline attribute in such cases.
797 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
798 inlining-related flags from the generic subprogram declaration.
800 2011-09-19 Thomas Quinot <quinot@adacore.com>
802 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
803 (Build_Stub_Type): Remove, instead copy components from
804 System.Partition_Interface.RACW_Stub_Type.
805 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
806 (Copy_Component_List): New subprogram.
808 2011-09-19 Yannick Moy <moy@adacore.com>
810 * lib-xref.adb (Generate_Reference): Ignore references to
811 constants in Standard.
813 2011-09-19 Robert Dewar <dewar@adacore.com>
815 * err_vars.ads, errout.ads: Minor reformatting.
817 2011-09-19 Robert Dewar <dewar@adacore.com>
819 * aspects.ads (Impl_Defined_Aspects): New array
820 * lib-writ.adb (No_Dependences): New name for No_Dependence
821 * restrict.adb (No_Dependences): New name for No_Dependence
822 (Check_Restriction_No_Specification_Of_Aspect): New
824 (Set_Restriction_No_Specification_Of_Aspect): New procedure
825 (Restricted_Profile_Result): New variable
826 (No_Specification_Of_Aspects): New variable
827 (No_Specification_Of_Aspect_Warning): New variable
828 * restrict.ads (No_Dependences): New name for No_Dependence
829 (Check_Restriction_No_Specification_Of_Aspect): New procedure
830 (Set_Restriction_No_Specification_Of_Aspect): New procedure
831 * s-rident.ads: Add restriction
832 No_Implementation_Aspect_Specifications, this is also added to
833 the No_Implementation_Extensions profile.
834 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
835 No_Implementation_Defined_Aspects
836 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
837 * sem_prag.adb (Analyze_Aspect_Specifications): Check
838 No_Implementation_Aspects
839 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
840 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
842 2011-09-19 Yannick Moy <moy@adacore.com>
844 * lib-xref.adb (Generate_Reference): Take into account multiple
845 renamings for Alfa refs.
847 2011-09-19 Thomas Quinot <quinot@adacore.com>
849 * g-socthi-mingw.adb: Minor reformatting.
851 2011-09-19 Yannick Moy <moy@adacore.com>
853 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
854 expansion to False in mode Alfa
856 2011-09-19 Pascal Obry <obry@adacore.com>
858 * mingw32.h: Remove obsolete code needed for old versions
861 2011-09-19 Robert Dewar <dewar@adacore.com>
863 * errout.ads: Minor reformatting.
865 2011-09-19 Ed Schonberg <schonberg@adacore.com>
867 * sem_ch6.adb (Analyze_Expression_Function): When the expression
868 function is transformed into a declaration and a body, insert
869 body at the end of the declarative part, to prevent premature
870 freeze actions, and preserve original specification in the
871 subprogram declaration.
873 2011-09-19 Vincent Celier <celier@adacore.com>
875 * projects.texi: Minor editing.
877 2011-09-19 Robert Dewar <dewar@adacore.com>
879 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
880 exp_aggr.adb: Minor reformatting.
882 2011-09-19 Yannick Moy <moy@adacore.com>
884 * lib-xref.adb (Generate_Reference): Change entity referenced
885 to underlying object if any, or else reference to the HEAP.
887 2011-09-15 Arnaud Charlet <charlet@adacore.com>
889 * gcc-interface/Make-lang.in: Update dependencies.
891 2011-09-15 Robert Dewar <dewar@adacore.com>
893 * tree_io.ads: Minor reformatting.
894 * a-intnam.ads: Fix bad header.
896 2011-09-15 Thomas Quinot <quinot@adacore.com>
898 * a-exexpr-gcc.adb: Minor reformatting.
900 2011-09-15 Yannick Moy <moy@adacore.com>
902 * sem_ch6.adb: Propagate information that an expression function comes
903 from source (otherwise references to this entity are not stored).
905 2011-09-15 Robert Dewar <dewar@adacore.com>
907 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
908 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
909 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
911 2011-09-15 Ed Schonberg <schonberg@adacore.com>
913 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
914 if the expression function is not a completion, create a
915 new specification for the generated declaration, and keep the
916 original specification in the generated body. Shorter code also
917 ensures that proper warnings are generated for unused formals
920 2011-09-15 Sergey Rybin <rybin@adacore.com>
922 * tree_io.ads: Update ASIS_Version_Number because of the changes
923 in the tree structures for expression functions.
925 2011-09-15 Arnaud Charlet <charlet@adacore.com>
927 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
928 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
929 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
930 (CLOCK_REALTIME): Fix wrong value on some OSes.
931 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
933 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
935 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
936 to unconstrained array case, deal with each branch of a COND_EXPR.
937 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
938 a COND_EXPR in the initializer, if present.
940 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
942 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
943 of an addressable type.
944 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
945 Deal with those cases for which creating a temporary is mandatory.
947 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
949 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
950 this is a real formal parameter before testing whether it is by ref.
952 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
954 * gcc-interface/gigi.h (build_call_0_expr): Delete.
955 (build_call_1_expr): Likewise.
956 (build_call_2_expr): Likewise.
957 (build_call_n_expr): New prototype.
958 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
959 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
960 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
961 (Exception_Handler_to_gnu_zcx): Likewise.
962 (gnat_to_gnu): Likewise.
963 (build_binary_op_trapv): Likewise.
964 * gcc-interface/utils2.c (build_call_0_expr): Delete.
965 (build_call_1_expr): Likewise.
966 (build_call_2_expr): Likewise.
967 (build_call_n_expr): New function.
968 (build_call_raise): Use build_call_n_expr.
969 (build_call_raise_range): Likewise.
970 (build_call_raise_column): Likewise.
971 (build_call_alloc_dealloc_proc): Likewise.
972 (maybe_wrap_malloc): Likewise.
973 (maybe_wrap_free): Likewise.
975 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
977 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
979 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
980 the result type is null if ENABLE_CHECKING. Set operation_type at the
981 end unconditionally if not set in the previous cases.
982 Use build2 and void_type_node for MODIFY_EXPR.
983 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
985 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
987 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
988 precision when converting to or from an integral type whose precision
989 is not equal to its size.
991 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
993 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
995 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
997 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
999 * system-darwin-ppc64.ads: New file.
1001 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1003 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1006 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1008 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1009 size switches to the link phase for shared libs.
1011 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1013 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1014 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1016 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1018 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1019 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1020 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1022 (TOOLS_FLAGS_TO_PASS): New.
1023 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1025 2011-09-06 Robert Dewar <dewar@adacore.com>
1027 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1028 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1030 2011-09-06 Robert Dewar <dewar@adacore.com>
1032 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1033 * s-rident.ads: New restriction No_Implementation_Units
1034 (this restriction is also part of the profile
1035 No_Implementation_Extensions)
1036 * sem_ch10.adb (Analyze_With_Clause): Add check for
1037 No_Implementation_Units restriction.
1039 2011-09-06 Jerome Guitton <guitton@adacore.com>
1041 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1044 2011-09-06 Thomas Quinot <quinot@adacore.com>
1046 * s-solita.adb: Minor reformatting.
1048 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1050 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1051 is a rewriting of an expression function does not freeze previous
1054 2011-09-06 Robert Dewar <dewar@adacore.com>
1056 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1058 2011-09-06 Tristan Gingold <gingold@adacore.com>
1060 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1061 powerpc-wrs-vxworksae.
1063 2011-09-06 Thomas Quinot <quinot@adacore.com>
1065 * s-os_lib.ads (Spawn): Minor documentation clarification,
1066 Success is True for a zero exit status.
1068 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1070 * sem_ch5.adb: Add message for common iterator error.
1072 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1074 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1075 selected component discriminated by a current instance, replace
1076 the constraint with a reference to the target object, regardless
1077 of whether the context is an init_proc.
1079 2011-09-06 Robert Dewar <dewar@adacore.com>
1081 * exp_attr.adb: Descriptor_Size is never static.
1083 2011-09-06 Robert Dewar <dewar@adacore.com>
1085 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1087 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1089 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1092 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1094 * sem_res.adb (Resolve): An expression that is the body of an
1095 expression function does not freeze.
1097 2011-09-06 Matthew Heaney <heaney@adacore.com>
1099 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1100 a-cuprqu.adb: Changed copyright notice to indicate current
1103 2011-09-06 Vincent Celier <celier@adacore.com>
1105 * prj.adb: Minor spelling error fix in comment
1106 * sem_res.adb: Minor reformatting
1108 2011-09-06 Pascal Obry <obry@adacore.com>
1110 * sysdep.c (winflush_nt): Removed as not needed anymore.
1111 (winflush_95): Likewise.
1112 (winflush_init): Likewise.
1113 (winflush_function): Likewise.
1114 (getc_immediate_common): Remove call to winflush_function.
1116 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1118 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1119 processing for Descriptor_Size.
1120 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1121 to account for its broader usage.
1122 * sem_attr.adb (Analyze_Attribute): Change the error detection
1123 circuitry for Descriptor_Size as the attribute is now applicable
1126 2011-09-06 Robert Dewar <dewar@adacore.com>
1128 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1130 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1132 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1133 in a parameter association must not set the Referenced flag on
1135 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1137 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1139 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1141 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1143 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1144 gnatlink-re): Speed up by using -j0.
1146 2011-09-06 Yannick Moy <moy@adacore.com>
1148 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1149 Set_Corresponding_Aspect when creating pragma from aspect.
1150 (Add_Predicates): Use new field Corresponding_Aspect.
1151 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1152 name when present, for the purpose of issuing error messages;
1153 remove local procedure Error_Pragma_Arg_Alternate_Name.
1154 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1156 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1159 2011-09-06 Robert Dewar <dewar@adacore.com>
1161 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1163 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1165 * exp_ch6.adb (Build_Heap_Allocator): Add new
1166 local variable Desig_Typ. Code and comment reformatting. Add
1167 machinery to ensure that the allocation uses a fat pointer when
1168 the type of the return object is a constrained array and the
1169 function return type is an unconstrained array.
1171 2011-09-06 Vincent Celier <celier@adacore.com>
1173 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1174 parameters in subprograms.
1176 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1178 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1180 2011-09-06 Thomas Quinot <quinot@adacore.com>
1182 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1183 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1185 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1186 is null, destroy task specific data, to make API consistent with
1187 other platforms, and thus compatible with the shared version
1189 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1190 Document the above assumption.
1192 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1194 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1195 variable for type of return value when return type is
1196 unconstrained and context is an assignment.
1198 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1200 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1201 class-wide operation if expansion is not enabled.
1203 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1205 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1208 2011-09-06 Yannick Moy <moy@adacore.com>
1210 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1211 Aspect_Invariant): Do not issue error at this point on illegal
1212 pragma placement, as this is checked later on when analyzing
1213 the corresponding pragma.
1214 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1215 similar to Error_Pragma_Arg, except the source name of the
1216 aspect/pragma to use in warnings may be equal to parameter
1217 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1218 message to distinguish source name of pragma/aspect, and whether
1219 the illegality resides in the type being public, or being private
1220 without a public declaration
1222 2011-09-06 Thomas Quinot <quinot@adacore.com>
1224 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1225 size check (fd_set is implemented differently on that platform).
1227 2011-09-06 Thomas Quinot <quinot@adacore.com>
1229 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1230 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1231 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1232 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1233 (ATCB_Allocation): New subpackage of
1234 System.Tasking.Primitive_Operations, shared across all targets
1235 with full tasking runtime.
1236 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1238 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1239 taking care of establishing a local temporary ATCB if the one
1240 being deallocated is Self, to avoid a reference to the freed
1241 ATCB in Abort_Undefer.
1243 2011-09-06 Thomas Quinot <quinot@adacore.com>
1245 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1246 terminated, mark it for deallocation upon termination.
1247 (Terminate_Task): Call Free_Task again if the task is marked
1248 for automatic deallocation upon termination.
1250 2011-09-06 Robert Dewar <dewar@adacore.com>
1252 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1253 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1254 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1255 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1256 a-intnam-solaris.ads, a-intnam-tru64.ads,
1257 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1258 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1259 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1260 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1261 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1262 Add new profile No_Implementation_Extensions
1263 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1264 profile No_Implementation_Extensions
1265 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1266 Check violation of restriction No_Implementation_Identifiers
1267 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1268 Add entry for Name_No_Implementation_Extensions
1270 2011-09-06 Robert Dewar <dewar@adacore.com>
1272 * impunit.ads: Minor reformatting.
1274 2011-09-06 Robert Dewar <dewar@adacore.com>
1276 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1278 2011-09-06 Pascal Obry <obry@adacore.com>
1280 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1283 2011-09-06 Robert Dewar <dewar@adacore.com>
1285 * g-socket.adb: Minor reformatting
1287 2011-09-06 Javier Miranda <miranda@adacore.com>
1289 * ali.adb (Scan_ALI): Add missing support to load references of
1290 entities imported from other languages.
1291 * ali.ads (Xref_Record): Adding new fields to store the language and
1292 name of an imported entity.
1293 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1296 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1298 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1299 is allowed on a full type declaration if it is the completion of
1300 a private declarations.
1301 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1302 aspect is allowed on a full type declaration in the private part
1305 2011-09-06 Robert Dewar <dewar@adacore.com>
1307 * sem_ch8.ads: Minor reformatting
1309 2011-09-06 Thomas Quinot <quinot@adacore.com>
1311 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1312 Guard against socket values that are not in [0;FD_SETSIZE[
1314 2011-09-06 Robert Dewar <dewar@adacore.com>
1316 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1319 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1321 * s-linux-alpha.ads: Minor reformatting
1322 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1323 Use sizeof instead of corresponding C defines in s-oscons template.
1325 2011-09-06 Vadim Godunko <godunko@adacore.com>
1327 * a-convec.ads, a-iteint.ads: Minor reformatting.
1329 2011-09-06 Vincent Celier <celier@adacore.com>
1331 * projects.texi: Add menus and @node lines.
1333 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1335 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1336 where the return type is an unconstrained array and the context
1337 is an assignment. Optimize the case when the target of the
1338 assignment is a selected component.
1340 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1342 * s-solita.adb: Update comments.
1344 2011-09-06 Pascal Obry <obry@adacore.com>
1346 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1347 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1348 * s-oscons-tmplt.c: Add support for generating pthread related
1349 types size on GNU/Linux as done for Darwin.
1350 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1352 2011-09-06 Robert Dewar <dewar@adacore.com>
1354 * exp_ch6.adb: Fix minor typo.
1356 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1358 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1359 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1360 (Double_Size_Of): Alphabetized. Update the comment on usage.
1361 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1362 (Nearest_Multiple_Rounded_Up): New routine.
1363 (Size_Of): Update comment on usage. The generated expression now
1364 accounts for alignment gaps by rounding the size of the type to the
1365 nearest multiple rounded up of the type's alignment.
1367 2011-09-06 Robert Dewar <dewar@adacore.com>
1369 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1371 2011-09-06 Steve Baird <baird@adacore.com>
1373 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1374 derived subprograms in checking for presence of an
1375 Extra_Accessibility_Of_Result formal parameter.
1376 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1377 checking for presence of an Extra_Accessibility_Of_Result formal
1379 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1380 case where the Parameter_Associatiations attribute is already set,
1381 but set to an empty list.
1382 (Needs_Result_Accessibility_Level):
1383 Unconditionally return False. This is a temporary
1384 change, disabling the Extra_Accessibility_Of_Result
1386 (Expand_Simple_Function_Return): Check for
1387 Extra_Accessibility_Of_Result parameter's presence instead of
1388 testing Ada_Version when generating a runtime accessibility
1389 check which makes use of the parameter.
1391 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1393 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1394 expression in a given case alternative must be attached to the
1395 statement list of the ccrresponding case statement alternative
1396 They cannot be propagated ahead of the case statement, because
1397 the validity of the expression that generated the action may
1398 hold only for that alternative.
1400 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1402 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1403 (Alignment_Of): Remove the code for strict alignment targets.
1404 (Double_Alignment_Of): Removed.
1405 (Double_Size_Of): New routine.
1406 (Make_Finalize_Address_Stmts): Change the
1407 calculation of the dope's size. Update relevant comments.
1408 (Size_Of): New routine.
1410 2011-09-06 Steve Baird <baird@adacore.com>
1412 * einfo.ads (Extra_Accessibility): Update associated comment to use
1413 the term "present" correctly ("present" just means that it is not
1414 an error to query the value of the attribute - it does not imply
1415 that the value must be non-null).
1416 (Extra_Constrained): Ditto.
1417 (Is_Visible_Formal): Ditto.
1418 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1419 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1420 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1421 * exp_ch6.adb (Expand_Call): The callee may require an
1422 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1423 < Ada_2012. This can occur if the callee is exported from a Gnat
1424 runtimes unit. Also improve a comment.
1426 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1428 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1429 (Alignment_Of): Rename formal parameter Some_Typ
1430 to Typ, update related comment. Use the allocator alignment on
1431 strict alignment targets such as SPARC.
1432 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1435 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1437 * sem_ch9.adb (Check_Interfaces): Test
1438 Is_Limited_Type rather than Is_Limited_Record when checking that
1439 the partial view of a synchronized full view must be limited.
1441 2011-09-06 Emmanuel Briot <briot@adacore.com>
1443 * g-comlin.adb (Free): Fix memory leak.
1445 2011-09-06 Robert Dewar <dewar@adacore.com>
1447 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1449 2011-09-06 Steve Baird <baird@adacore.com>
1451 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1452 (Ada2012) cases described in AI05-0234 where the accessibility
1453 level of a function result is "determined by the point of
1454 call", an implicit parameter representing that accessibility
1455 level is passed in. Extra_Accessibilty_Of_Result yields this
1456 additional formal parameter. Extra_Accessibility_Of_Result
1457 is analogous to the existing Extra_Accessibility
1458 function used in the implementation of access parameters.
1459 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1460 Extra_Accessibility_Of_Result attribute.
1461 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1462 (Set_Extra_Accessibility_Of_Result): New procedure.
1463 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1464 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1465 an accessibility level literal to Natural; introduce a nested
1466 function, Make_Level_Literal, to do this.
1467 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1468 determines whether a given function (or access-to-function
1469 type) needs to have an implicitly-declared accessibility-level
1470 parameter added to its profile.
1471 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1472 previously declared in the body of Exp_Ch6.
1473 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1475 (Has_Unconstrained_Access_Discriminants): New Function; a
1476 predicate on subtype entities which returns True if the given
1477 subtype is unconstrained and has one or more access discriminants.
1478 (Expand_Call): When expanding a call to a function which takes an
1479 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1480 actual parameter value. In the case of a function call which is
1481 used to initialize an allocator, this may not be possible because
1482 the Etype of the allocator may not have been set yet. In this
1483 case, we defer passing in the parameter and handle it later in
1484 Expand_Allocator_Expression.
1485 (Expand_Simple_Function_Return): When returning from a function which
1486 returns an unconstrained subtype having at least one access
1487 discriminant, generate the accessibility check needed to ensure that
1488 the function result will not outlive any objects designated by its
1490 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1492 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1493 is used to initialize an allocator, we may need to pass in "the
1494 accessibility level determined by the point of call" (AI05-0234)
1495 to the function. Expand_Call, where such actual parameters are
1496 usually generated, is too early in this case because the Etype of
1497 the allocator (which is used in determining the level to be passed
1498 in) may not have been set yet when Expand_Call executes. Instead,
1499 we generate code to pass in the appropriate actual parameter
1500 in Expand_Allocator_Expression.
1501 * sem_ch6.adb (Create_Extra_Formals): Create
1502 the new Extra_Accessibility_Of_Result formal if
1503 Needs_Result_Accessibility_Level returns True. This includes the
1504 introduction of a nested procedure, Check_Against_Result_Level.
1506 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1508 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
1511 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1513 * s-finmas.adb (Set_Finalize_Address): Explain the reason
1514 for the synchronization. Move the test for null from
1515 s-stposu.Allocate_Any_Controlled to this routine since the check
1516 needs to be protected too.
1517 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
1518 synchronization code.
1519 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
1520 explaining the context in which this routine is used.
1521 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
1522 to s-finmas.Set_Finalize_Address.
1524 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1526 * einfo.ads: Document that itypes have no parent field.
1528 2011-09-05 Robert Dewar <dewar@adacore.com>
1530 * rtsfind.adb (Check_CRT): Check for overloaded entity
1531 * rtsfind.ads: Document that entities to be found by rtsfind
1532 cannot be overloaded
1533 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
1534 (Lock_Entries_With_Status): New name for Lock_Entries with two
1535 arguments (changed to meet rtsfind no overloading rule).
1537 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1539 * s-finmas.adb (Set_Finalize_Address (Address,
1540 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1541 (Set_Finalize_Address (in out Finalization_Master,
1542 Finalize_Address_Ptr): Add synchronization code.
1543 * s-finmas.ads (Set_Finalize_Address (Address,
1544 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1545 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
1546 Set_Finalize_Address for the heterogeneous case.
1548 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1550 * sem_ch3.adb: Undo previous change, not suitable after all.
1552 2011-09-05 Robert Dewar <dewar@adacore.com>
1554 * einfo.ads: Minor comment clarification.
1556 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1558 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
1559 no longer needs to search through the entities of the return
1560 statement scope to find the _chain.
1561 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
1562 (Analyze_Block_Statement): Add local variable
1563 Is_BIP_Return_Statement. Add machinery to install all entities
1564 produced by the expansion of the return object declaration.
1565 (Install_Return_Entities): New routine.
1566 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
1568 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1570 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
1571 of subunit is incomplete.
1572 (Analyze_Proper_Body): If parent spec is not available, do not
1575 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1577 * sem_disp.adb (Find_Controlling_Arg): Add checks for
1578 interface type conversions, that are expanded into dereferences.
1580 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1582 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1583 Examine the parameter and return profile of a subprogram and swap
1584 any incomplete types coming from a limited context with their
1585 corresponding non-limited views.
1586 (Exchange_Limited_Views): New routine.
1588 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1590 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
1591 of internal entity to the subtype declaration, so that when
1592 entities are subsequently exchanged in a package body, the tree
1593 remains properly formatted for ASIS.
1595 2011-09-05 Johannes Kanig <kanig@adacore.com>
1597 * g-comlin.adb (Set_Usage): Additional optional argument to set help
1599 (Display_Help): display the user given help message, if available.
1601 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1603 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
1604 is legal if the original node is an identifier that is a
1605 parameterless function call.
1607 2011-09-05 Pascal Obry <obry@adacore.com>
1609 * prj-nmsc.adb: Minor reformatting.
1610 Add support for standalone aggregate library.
1611 (Check_Stand_Alone_Library): Handle standalone aggregate library.
1612 * projects.texi: Fix documentation for aggregate library projects.
1614 2011-09-05 Robert Dewar <dewar@adacore.com>
1616 * sem_ch6.adb: Minor reformatting.
1618 2011-09-05 Matthew Gingell <gingell@adacore.com>
1620 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
1621 stack guard page on PPC Linux. This patch ensures the 64K guard page at
1622 the bottom of the stack is not overwritten.
1624 2011-09-05 Thomas Quinot <quinot@adacore.com>
1626 * exp_intr.adb, s-tasini.adb: Minor reformatting.
1628 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1630 * sem_ch3.adb (Access_Definition): If an access type declaration
1631 appears in a child unit, the scope of whatever anonymous type
1632 may be generated is the child unit itself.
1634 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1636 * sem_ch6.adb (Analyze_Expression_Function): Do not set
1637 Comes_From_Source on rewritten body.
1638 (Analyze_Subprogram_Body_Helper): Check that the original node for
1639 the body comes from source, when determining whether expansion
1640 of a protected operation is needed.
1642 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1644 * exp_aggr.adb (Replace_Type): If the target of the assignment is
1645 a selected component and the right-hand side is a self-referential
1646 access, the proper prefix of the rewritten attribute is a copy
1647 of the left-hand side, not of its prefix.
1649 2011-09-05 Robert Dewar <dewar@adacore.com>
1651 * sem_ch5.adb: Minor reformatting.
1652 * sem_ch3.adb: Minor code clean up.
1654 2011-09-05 Jose Ruiz <ruiz@adacore.com>
1656 * exp_ch9.adb (Make_Initialize_Protection): The fact that
1657 restriction No_Dynamic_Attachment is in effect or not should
1658 not influence the default priority associated to a protected
1659 object. With this change, when the restriction is in effect (as
1660 is the case for the Ravenscar profile) the default priority of
1661 a protected object with an interrupt handler is in the range of
1662 interrupt priorities (Default_Interrupt_Priority) as required
1665 2011-09-05 Arnaud Charlet <charlet@adacore.com>
1667 * a-iteint.ads: Fix header.
1669 2011-09-05 Vincent Celier <celier@adacore.com>
1671 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
1672 with a directory separator to avoid output such as:
1673 "/path/to/objauto.cgpr" has been deleted.
1675 2011-09-05 Robert Dewar <dewar@adacore.com>
1677 * sem_ch3.adb: Minor reformatting.
1679 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1681 * sem_ch5.adb: Better error message.
1683 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1685 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
1686 (Expand_Array_Aggregate): Detect a special case of an aggregate
1687 which contains tasks in the context of an unexpanded return
1688 statement of a build-in-place function.
1689 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
1690 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
1691 which contains tasks and expand it now that the original simple
1692 return statement has been rewritten.
1693 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
1694 reformatting. Do not create a chain for an extended return
1695 statement if one is already available.
1696 (Has_Activation_Chain): New routine.
1698 2011-09-05 Marc Sango <sango@adacore.com>
1700 * sem_ch3.adb (Analyze_Object_Declaration): Remove
1701 the wrong test and add the correct test to detect the violation
1702 of illegal use of unconstrained string type in SPARK mode.
1704 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1706 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
1707 message on an iterator over an array.
1709 2011-09-05 Robert Dewar <dewar@adacore.com>
1711 * lib-xref-alfa.adb: Minor reformatting.
1713 2011-09-05 Robert Dewar <dewar@adacore.com>
1715 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
1716 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
1718 2011-09-05 Gary Dismukes <dismukes@adacore.com>
1720 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
1722 2011-09-05 Johannes Kanig <kanig@adacore.com>
1724 * lib-xref-alfa.adb: Update comments.
1726 2011-09-05 Thomas Quinot <quinot@adacore.com>
1728 * sem_res.adb: Minor reformatting
1730 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1732 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
1733 present, create them now. Needed in case the return type was
1734 a limited view in the function declaration.
1735 (Make_Build_In_Place_Call_In_Allocator): If return type contains
1736 tasks, build the activation chain for it. Pass a reference to
1737 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
1738 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
1739 with build_in_place calls.
1740 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
1741 incomplete, inatialize its Corresponding_Record_Type component.
1742 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
1745 2011-09-05 Johannes Kanig <kanig@adacore.com>
1747 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
1750 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1752 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
1753 appears within a package specification and the token after "IS"
1754 is not a parenthesis, assume that this is an unparenthesized
1755 expression function, even if the token appears in a line by
1757 * par.adb: Clarify use of Labl field of scope stack in error
1760 2011-09-05 Bob Duff <duff@adacore.com>
1762 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
1763 conversions instead of normal type conversions in all cases where a
1764 type conversion would be illegal. In particular, use unchecked
1765 conversions when the operand types are private.
1767 2011-09-05 Johannes Kanig <kanig@adacore.com>
1769 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
1770 objects of task type or protected type.
1772 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1774 * sem_ch6.adb (Analyze_Expression_Function): If the expression
1775 function comes from source, indicate that so does its rewriting,
1776 so it is compatible with any subsequent expansion of the
1777 subprogram body (e.g. when it is a protected operation).
1778 * sem_ch4.adb: minor reformatting
1780 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1782 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
1783 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
1784 may lead to wrong ancestor package in the case of instantiated subunit
1785 bodies. If a subunit is instantiated, follow the chain of instantiations
1786 rather than the stub structure.
1788 2011-09-02 Robert Dewar <dewar@adacore.com>
1790 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1791 * gcc-interface/Make-lang.in: Update dependencies.
1793 2011-09-02 Marc Sango <sango@adacore.com>
1795 * sem_ch3.adb (Analyze_Object_Declaration): Change
1796 comment and add additional check to differentiate constant of
1797 type string from others unconstrained type.
1799 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1801 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
1802 present in incomplete type declarations to refine the error
1803 message the full declaration is in the same unit.
1804 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
1805 an incomplete type, set the Premature_Use for additional message.
1806 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
1807 and Premature_Use is set, place additional information at the
1808 point of premature use.
1810 2011-09-02 Bob Duff <duff@adacore.com>
1812 * sem_ch6.adb: (Check_Post_State): Suppress warning
1813 "postcondition refers only to pre-state" when the expression has not
1814 yet been analyzed, because it causes false alarms. This can happen when
1815 the postcondition contains a quantified expression, because those are
1816 analyzed later. This is a temporary/partial fix.
1817 (Process_Post_Conditions): Minor: change wording of warning.
1819 2011-09-02 Marc Sango <sango@adacore.com>
1821 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
1822 illegal use of unconstrained string type in SPARK mode.
1823 * sem_res.adb (Analyze_Operator_Symbol): Set the
1824 right place where the string operand of concatenation should be
1825 violate in SPARK mode.
1827 2011-09-02 Robert Dewar <dewar@adacore.com>
1829 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
1830 exp_ch3.adb: Minor reformatting.
1832 2011-09-02 Vincent Celier <celier@adacore.com>
1834 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
1835 as the compiler driver so Is_Compilable returns True for sources.
1836 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
1839 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1841 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
1842 condition, a reference to a controlling formal must be interpreted
1843 as having the class-wide type (or an access to such) so that the
1844 inherited condition can be properly applied to any overriding
1845 operation (see ARM12 6.6.1 (7)).
1847 2011-09-02 Tristan Gingold <gingold@adacore.com>
1849 * init.c (__gnat_is_vms_v7): Fix case and add prototype
1852 2011-09-02 Javier Miranda <miranda@adacore.com>
1854 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
1855 initializing expression of a class-wide interface object declaration
1856 if its type is limited.
1858 2011-09-02 Johannes Kanig <kanig@adacore.com>
1860 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
1861 literals, take into account the type name; the type is *not*
1862 the scope for an enumeration literal.
1864 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1866 * sem_ch6.adb (Check_Overriding_Indicator): add special check
1867 to reject an overriding indicator on a user-defined Adjust
1868 subprogram for a limited controlled type.
1870 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1872 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
1873 for an actual that is a function call returning an unconstrained
1874 limited controlled type.
1876 2011-09-02 Tristan Gingold <gingold@adacore.com>
1878 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
1880 2011-09-02 Johannes Kanig <kanig@adacore.com>
1882 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
1883 from "HEAP" to __HEAP Change comment that refers to that variable
1884 * put_alfa.adb: Change comment that refers to that variable
1886 2011-09-02 Robert Dewar <dewar@adacore.com>
1888 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
1890 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1892 * exp_util.adb (Extract_Renamed_Object): Renamed to
1893 Find_Renamed_Object. This routine has been reimplemented and now uses
1894 tree traversal to locate a renamed object.
1895 (Is_Aliased): Replace call to Extract_Renamed_Object with
1896 Find_Renamed_Object.
1898 2011-09-02 Tristan Gingold <gingold@adacore.com>
1900 * init.c: (__gnat_is_vms_v7): New function.
1902 2011-09-02 Olivier Hainque <hainque@adacore.com>
1904 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
1905 that have a misaligned backchain, necessarily bogus.
1907 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1909 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
1910 TSS routine Finalize_Address when compiling in Alfa mode.
1911 (Expand_Freeze_Record_Type): Do not create TSS routine
1912 Finalize_Address when compiling in Alfa mode.
1913 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
1914 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
1916 (Expand_N_Allocator): Do not produce a call to
1917 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
1918 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
1919 produce a call to primitive Set_Finalize_Address in Alfa mode because
1920 Finalize_Address is not built.
1921 * exp_ch7.adb (Build_Finalization_Master): Do not create
1922 finalization masters in Afa mode since they are not needed.
1923 (Build_Finalizer): Do not create scope and library-level
1924 finalizers in Alfa mode since they are not needed.
1925 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
1926 "new" and "free" when applied to controlled objects in Alfa mode since
1929 2011-09-02 Vincent Celier <celier@adacore.com>
1931 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
1932 only library names with the syntax of Ada identifiers, to avoid errors
1933 when compiling the binder generated files.
1934 * projects.texi: Document restriction on SAL library names
1936 2011-09-02 Thomas Quinot <quinot@adacore.com>
1938 * a-chtgbo.adb: Minor comment fix.
1940 2011-09-02 Robert Dewar <dewar@adacore.com>
1942 * lib-xref.adb: Minor reformatting
1944 2011-09-02 Vincent Celier <celier@adacore.com>
1946 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
1947 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
1948 --version and --help in usage.
1949 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
1951 2011-09-02 Bob Duff <duff@adacore.com>
1953 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
1954 compilers don't understand it.
1956 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1958 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
1959 underlying subtype rather than its base type on the call to
1960 Build_Record_Or_Elementary_Input_Function, so that any
1961 constraints on a discriminated subtype will be available for
1962 doing the check required by AI05-0192.
1963 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1964 If the prefix subtype of the 'Input attribute is a constrained
1965 discriminated subtype, then check each constrained discriminant value
1966 against the corresponding value read from the stream.
1968 2011-09-02 Yannick Moy <moy@adacore.com>
1970 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
1971 warnings on suspicious contracts, and enable them with -gnatwa.
1973 2011-09-02 Robert Dewar <dewar@adacore.com>
1975 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
1978 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1980 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
1981 which ensure that restriction No_Dynamic_Attachment has not been
1983 (Make_Initialize_Protection): Protected types with attach or
1984 interrupt handlers must not violate restriction No_Dynamic_Attachment.
1985 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
1986 which ensures that restriction No_Dynamic_Attachment has not been
1988 * sem_attr.adb: (Eval_Attribute): Transform
1989 VAX_Float_Type'First and 'Last into references to
1990 the temporaries which store the corresponding bounds. The
1991 transformation is needed since the back end cannot evaluate
1992 'First and 'Last on VAX.
1993 (Is_VAX_Float): New routine.
1995 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1997 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
1998 generic unit is not intrinsic and has an explicit convention,
1999 the instance inherits it.
2001 2011-09-02 Robert Dewar <dewar@adacore.com>
2003 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2004 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2006 2011-09-02 Thomas Quinot <quinot@adacore.com>
2008 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2009 Guard against a prefix that is an N_Has_Entity but has no
2012 2011-09-02 Yannick Moy <moy@adacore.com>
2014 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2017 2011-09-02 Yannick Moy <moy@adacore.com>
2019 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2020 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2022 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2023 procedure looking for suspicious postconditions.
2024 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2025 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2026 options -gnatw.t and -gnatw.T.
2028 2011-09-02 Pascal Obry <obry@adacore.com>
2030 * prj.adb: Minor code refactoring. Move check for null project in
2032 * projects.texi: Fix minor typos.
2034 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2036 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2037 of iteration is an expression, its value must be captured in a
2038 renaming declaration, so that modification of the elements is
2039 propagated to the original container.
2041 2011-09-02 Pascal Obry <obry@adacore.com>
2043 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2044 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2045 prj-tree.adb: Minor reformatting and style fixes.
2047 2011-09-02 Robert Dewar <dewar@adacore.com>
2049 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2050 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2051 No_Implicit_Aliasing
2052 (Analyze_Attribute, case Address): ditto
2053 (Analyze_Attribute, case Unrestricted_Access): ditto
2054 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2055 No_Implicit_Aliasing restriction.
2056 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2058 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2060 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2061 is an unchecked conversion, apply test to its expression.
2063 2011-09-02 Javier Miranda <miranda@adacore.com>
2065 * sem_ch3.adb (Check_Abstract_Overriding): When
2066 traversing the chain of aliased subprograms avoid reporting a
2067 redundant error on the current entity.
2069 2011-09-02 Sergey Rybin <rybin@adacore.com>
2071 * gnat_ugn.texi: Minor clean up.
2073 2011-09-02 Bob Duff <duff@adacore.com>
2075 * s-htable.adb (Set_If_Not_Present): Use renaming
2076 instead of ":=", because the type Key is limited in the generic (even
2077 if not in the instances).
2079 2011-09-02 Robert Dewar <dewar@adacore.com>
2081 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2082 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2085 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2087 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2088 inherited component with the enclosing derived type. Code reformatting.
2090 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2092 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2093 return done when overflow checks are enabled, since comparisons against
2094 Lor and Hir should not be done when OK1 is False.
2096 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2098 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2099 Add new formal Master_Exp. When present, add that expression to the
2100 call as an extra actual.
2101 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2102 Fmaster_Actual and in the case of a BIP call initializing a return
2103 object of an enclosing BIP function set it to a
2104 new reference to the implicit finalization master
2105 formal of the enclosing function. Fmaster_Actual is
2106 then passed to the new formal Master_Exp on the call to
2107 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2108 initializations of Enclosing_Func to its declaration.
2110 2011-09-02 Thomas Quinot <quinot@adacore.com>
2112 * csets.ads: Minor reformatting
2114 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2116 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2117 the full view of a private type coming from an instantiation.
2118 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2119 loop to iterate over the declarations rather than use the
2120 First_Entity / Next_Entity scheme.
2122 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2124 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2125 X'range (N) into X'First (N) .. X'Last (N), do not share the
2126 dimension indicator N, if present. Even though it is a static
2127 constant, its source location may be modified when printing
2128 expanded code under -gnatDL, and node sharing will lead to chaos
2129 in Sprint on large files, by generating a sloc value that does
2130 not correspond to any source file.
2132 2011-09-02 Bob Duff <duff@adacore.com>
2134 * einfo.adb: (Has_Xref_Entry): Do not call
2135 Implementation_Base_Type. Lib.Xref has been
2136 rewritten to avoid the need for it, and it was costly.
2137 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2138 functions in support of efficient xref.
2139 * lib-xref-alfa.adb: Misc changes related to Key component of
2141 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2142 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2143 no longer does. This is the one place where it is needed.
2145 2011-09-02 Johannes Kanig <kanig@adacore.com>
2147 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2148 similar interface as the other Getopt function.
2150 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2152 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2153 a call to Set_Finalize_Address if there is no allocator available.
2154 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2155 a case of allocator expansion where the allocator is not expanded but
2156 needs a custom allocate routine. Code reformatting.
2157 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2158 Ren_Obj. Code reformatting.
2159 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2160 through the use of 'reference.
2161 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2162 as part of build-in-place expansion. They are intentionally marked as
2163 coming from source, but their parents are not.
2165 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2167 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2168 is the generated subprogram declaration for a child unit body
2169 that acts as spec, use the original body in the with_clause,
2170 to prevent binding errors.
2172 2011-09-02 Vincent Celier <celier@adacore.com>
2174 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2175 qualifier /MULTI_UNIT_INDEX=
2177 2011-09-02 Johannes Kanig <kanig@adacore.com>
2179 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2180 instead of calling the callback function
2182 2011-09-02 Robert Dewar <dewar@adacore.com>
2184 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2185 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2187 2011-09-02 Vincent Celier <celier@adacore.com>
2189 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2190 explicitly declared in an extending project, do not warn if a source
2191 for an inherited naming exception is not found.
2193 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2195 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2196 expansion is inactive.
2198 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2200 * sem_util.adb (Note_Possible_Modification): If the entity
2201 being modified is the renaming generated for an Ada2012 iterator
2202 element, the enclosing container or array is modified as well.
2204 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2206 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2207 Initialize): Define and initialize the
2208 mutex attributes and condition variable attributes locally.
2210 2011-09-02 Vincent Celier <celier@adacore.com>
2212 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2213 exception replaced in an extending project.
2214 (Check_Object): No error when the other source is locally removed.
2216 2011-09-02 Yannick Moy <moy@adacore.com>
2218 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2221 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2223 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2225 * gcc-interface/Make-lang.in: Update dependencies.
2227 2011-09-01 Robert Dewar <dewar@adacore.com>
2229 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2231 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2233 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2234 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2235 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2236 specific for systems where their glibc version does not define the
2237 routines to handle dynamically allocated CPU sets.
2239 2011-09-01 Vincent Celier <celier@adacore.com>
2241 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2242 prj-env.adb: Implement inheritance of naming exceptions in extending
2245 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2247 * gnatls.adb: Display simple message instead of content of
2250 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2252 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2253 access discriminant and anonymous access component scopes.
2254 (Inherit_Component): Reuse the itype of an access discriminant
2255 or anonymous access component by copying it in order to set the proper
2256 scope. This is done only when the parent and the derived type
2257 are in different scopes.
2258 (Set_Anonymous_Etype): New routine.
2260 2011-09-01 Robert Dewar <dewar@adacore.com>
2262 * a-convec.adb: Minor reformatting throughout.
2264 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2266 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2267 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2268 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2269 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2270 CPU_SET_S respectively because we are now using dynamically allocated
2271 CPU sets which are more portable across different glibc versions.
2272 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2273 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2274 masks dynamically according to the number of processors in the target
2276 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2277 respectively, so we need to pass the size of the masks as
2279 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2280 created cpu_set_t masks
2281 with the number of processors available in the target platform,
2282 instead of static bit arrays. It enhances portability because
2283 it uses the information from the target platform.
2284 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2285 are using a restricted run-time library, use the flag
2286 Configurable_Run_Time_Mode instead of Restricted_Profile.
2288 2011-09-01 Vincent Celier <celier@adacore.com>
2290 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2291 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2293 2011-09-01 Nicolas Roche <roche@adacore.com>
2295 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2296 on VxWorks in kernel mode.
2298 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2300 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2301 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2302 directly the bit array.
2303 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2304 the linux macros with the same name.
2305 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2306 wrappers around the CPU_ZERO and CPU_SET linux macros.
2308 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2310 * exp_ch7.adb (Find_Insertion_List): Removed.
2311 (Process_Transient_Objects): Insert the declarations of the hook
2312 access type and the hook object before the associated transient object.
2314 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2316 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2317 package System.Aux_Dec when using restricted run-time libraries which
2318 do not have this package.
2320 2011-09-01 Tristan Gingold <gingold@adacore.com>
2322 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2324 2011-09-01 Bob Duff <duff@adacore.com>
2326 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2327 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2329 2011-09-01 Thomas Quinot <quinot@adacore.com>
2331 * exp_ch5.adb: Minor reformatting
2332 * gnat_ugn.texi: Fix minor typos.
2333 * gcc-interface/Make-lang.in: Update dependencies.
2335 2011-09-01 Robert Dewar <dewar@adacore.com>
2337 * inline.adb, sem_aggr.adb: Minor reformatting.
2339 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2341 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2343 2011-09-01 Robert Dewar <dewar@adacore.com>
2345 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2347 2011-09-01 Bob Duff <duff@adacore.com>
2349 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2350 body" the same as "in inlined body", because visibility shouldn't
2353 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2355 * inline.adb (Add_Inlined_Body): Refine previous change.
2357 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2359 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2360 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2361 Test for case where call
2362 initializes an object of a return statement before testing for
2363 a constrained call, to ensure that all such cases get handled
2364 by simply passing on the caller's parameters. Also, in that
2365 case call Needs_BIP_Alloc_Form to determine whether to pass on
2366 the BIP_Alloc_Form parameter of the enclosing function rather
2367 than testing Is_Constrained. Add similar tests for the return
2368 of a BIP call to later processing to ensure consistent handling.
2369 (Needs_BIP_Alloc_Form): New utility function.
2370 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2371 a BIP_Alloc_Form formal with call to new utility function
2372 Needs_BIP_Alloc_Form.
2374 2011-09-01 Pascal Obry <obry@adacore.com>
2376 * prj-part.adb: Minor reformatting.
2378 2011-09-01 Vincent Celier <celier@adacore.com>
2380 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2381 half character in the unit name.
2383 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2385 * exp_ch4.adb: Minor code and comment reformatting.
2387 2011-09-01 Thomas Quinot <quinot@adacore.com>
2389 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2390 for Is_Limited_Type and Is_Tagged_Type in condition checking
2391 for by-reference type.
2392 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2393 subprograms may have a completion because of a previous
2394 Inline_Always clause, but the enclosing package must be marked
2395 inlined for the subprogram body to become visible to the backend.
2397 2011-09-01 Thomas Quinot <quinot@adacore.com>
2399 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2401 2011-09-01 Pascal Obry <obry@adacore.com>
2403 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2405 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2407 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2408 the formals of a subprogram stub that acts as a spec.
2410 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2412 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2413 type, declare a renaming for it, not an object declaration.
2415 2011-09-01 Yannick Moy <moy@adacore.com>
2417 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2418 Ignore_Errors to ignore failures to read ALI files when True.
2420 2011-09-01 Javier Miranda <miranda@adacore.com>
2422 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2423 constructor calls associated with non-tagged record types.
2425 2011-09-01 Robert Dewar <dewar@adacore.com>
2427 * g-socthi-vms.adb: Minor reformatting.
2429 2011-09-01 Nicolas Roche <roche@adacore.com>
2431 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2432 in order to avoid impact of imcompatible changes.
2433 * cstreams.c: Likewise
2435 * aux-io.c: Likewise
2437 2011-09-01 Yannick Moy <moy@adacore.com>
2439 * lib-writ.adb (Write_With_Lines): Always output complete information
2440 on "with" line in Alfa mode, as this is required by formal verification
2443 2011-09-01 Tristan Gingold <gingold@adacore.com>
2445 * g-socthi-vms.adb: Add comments.
2447 2011-09-01 Pascal Obry <obry@adacore.com>
2449 * prj.ads: Minor reformatting.
2451 2011-09-01 Vincent Celier <celier@adacore.com>
2453 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2454 exceptions in the config pragmas file.
2456 2011-09-01 Tristan Gingold <gingold@adacore.com>
2458 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2460 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2462 * exp_ch7.adb (Find_Insertion_List): New routine.
2463 (Process_Transient_Objects): Add code to handle the abnormal
2464 finalization of a controlled transient associated with a subprogram
2465 call. Since transients are cleaned up right after the associated
2466 context, an exception raised during a subprogram call may bypass the
2469 2011-09-01 Robert Dewar <dewar@adacore.com>
2471 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2474 2011-09-01 Robert Dewar <dewar@adacore.com>
2476 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2478 2011-09-01 Robert Dewar <dewar@adacore.com>
2480 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2482 2011-09-01 Thomas Quinot <quinot@adacore.com>
2484 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2485 GNATRTL_NONTASKING_OBJS.
2487 2011-09-01 Robert Dewar <dewar@adacore.com>
2489 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2490 possibility of this flag being set for formals in Ada 2012 mode.
2491 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2493 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2495 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2497 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2500 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2502 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2503 insertion node in a tree of nested Expression_With_Actions nodes.
2504 (Process_Transient_Object): In the case where a complex if statement
2505 has been converted into nested Expression_With_Actions nodes, the
2506 "hook" object and the associated access type must be inserted before
2507 the top most Expression_With_Actions.
2509 2011-09-01 Robert Dewar <dewar@adacore.com>
2511 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
2512 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
2514 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2516 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
2518 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2520 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
2522 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
2523 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
2524 in a similar way as we do for the Priority or Dispatching_Domain aspect.
2525 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
2526 Dispatching_Domains_Frozen): Move this local data to package
2527 System.Tasking because with the CPU aspect we need to have access
2528 to this data when creating the task in System.Tasking.Stages.Create_Task
2529 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
2530 Move these variables from the body of
2531 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
2532 we need to have access to this data when creating the task in
2533 System.Tasking.Stages.Create_Task.
2534 * s-taskin.adb (Initialize): Signal the allocation of the environment
2535 task to a CPU, if any, so that we know whether the CPU can be
2536 transferred to a different dispatching domain.
2537 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
2538 is being allocated belongs to the dispatching domain where the task
2539 lives. Signal the allocation of the task to a CPU, if any, so that we
2540 know whether the CPU can be transferred to a different dispatching
2543 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2545 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
2546 attributes Same_Storage and Overlaps_Storage.
2548 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2550 * exp_strm.adb: Remove with and use clause for Opt.
2551 (Build_Array_Input_Function): Remove the version-dependent generation
2552 of the return statement. The Ada 2005 tree is now the default.
2554 2011-09-01 Yannick Moy <moy@adacore.com>
2556 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
2557 it is never empty when compiling in Alfa mode.
2559 2011-09-01 Robert Dewar <dewar@adacore.com>
2561 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
2562 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
2563 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
2564 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
2566 2011-09-01 Matthew Heaney <heaney@adacore.com>
2568 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
2569 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
2570 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
2571 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
2572 unbounded queue container.
2573 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
2574 bounded queue container.
2575 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
2576 unbounded priority queue container.
2577 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
2578 bounded priority queue container.
2580 2011-08-31 Pascal Obry <obry@adacore.com>
2582 * a-direct.adb: Do not try to create an UNC path on Windows.
2583 (Create_Path): Skip leading computer name in UNC path if any.
2585 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2587 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
2588 version-dependent generation of the return statement. The Ada 2005 tree
2591 2011-08-31 Thomas Quinot <quinot@adacore.com>
2593 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
2594 types Stream_Element_Offset and Storage_Offset have a different native
2595 type depending on whether the platform is 32 or 64 bits. When
2596 exchanging them, always convert to 64 bits.
2598 2011-08-31 Yannick Moy <moy@adacore.com>
2600 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
2601 --force-alfa to gnat2why.
2603 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2605 * sem_ch12.adb (Save_References): If the node has aspects, save
2606 references within the corresponding expressions in a separate step,
2607 because the aspects are not directly in the tree for the declaration
2608 to which they belong.
2610 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2612 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
2613 in CodePeer mode, since representation clauses are partially ignored.
2614 * gcc-interface/Make-lang.in: Update dependencies.
2616 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2618 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2619 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
2620 to any dispatching domain.
2622 2011-08-31 Thomas Quinot <quinot@adacore.com>
2624 * exp_ch4.adb: Minor reformatting.
2626 2011-08-31 Bob Duff <duff@adacore.com>
2628 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
2629 on nodes for which it is not defined.
2630 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
2633 2011-08-31 Bob Duff <duff@adacore.com>
2635 * sem_ch3.adb (Process_Full_View): Disable legality check if
2636 In_Instance, to avoid spurious errors.
2637 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
2638 if In_Instance, to avoid spurious errors.
2640 2011-08-31 Pascal Obry <obry@adacore.com>
2642 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
2643 directory speparators.
2644 (Compose): Use Dir_Seps to handle both forms.
2645 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
2647 (Extension): Use Dir_Seps to handle both forms.
2649 2011-08-31 Pascal Obry <obry@adacore.com>
2651 * prj-conf.adb: Minor reformatting.
2653 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2655 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
2656 dispatching domain aspect.
2657 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
2659 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
2660 Dispatching_Domain aspect in a similar way as we do for the Priority
2662 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
2663 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
2665 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
2666 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
2667 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
2668 Dispatching_Domain and add it to the task definition.
2669 (Sig_Flags): Add Pragma_Dispatching_Domain.
2670 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
2671 support to find the types Dispatching_Domain and
2672 Dispatching_Domain_Access.
2673 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
2674 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
2675 query the availability of a pragma Dispatching_Domain.
2676 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
2677 the expander to pass the Dispatching_Domain when creating a task.
2678 (Name_Dispatching_Domain): Add this new name for a pragma.
2679 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
2680 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
2681 task has been allocated at creation time.
2682 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
2683 Ravenscar is always null.
2684 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
2685 the task has been allocated at creation time.
2686 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
2687 a specific dispatching domain.
2688 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
2689 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
2690 and CPU are specified for the task, and the CPU value is not contained
2691 within the range of processors for the domain.
2693 2011-08-31 Vincent Celier <celier@adacore.com>
2695 * make.adb (Original_Gcc) : New constant String_Access.
2696 (Gnatmake): For VM targets, do not use VM version of the compiler if
2697 --GCC= has been specified.
2699 2011-08-31 Thomas Quinot <quinot@adacore.com>
2701 * sem_ch5.adb: Minor reformatting.
2703 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2705 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
2708 2011-08-31 Bob Duff <duff@adacore.com>
2710 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
2711 the access type is private; we don't care about privacy in expansion.
2713 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2715 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
2716 subcomponents tnat may be limited, because they originate in view
2717 conflicts. If the original aggregate is legal and the actuals are
2718 legal, the aggregate itself is legal.
2720 2011-08-31 Matthew Heaney <heaney@adacore.com>
2722 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
2725 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2727 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
2730 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2732 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
2733 Interrupt_Priority aspects, force the analysis of the aspect expression
2734 (when building the equivalent pragma). Otherwise, its analysis is done
2735 too late, after the task or protected object has been created.
2736 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
2737 Analyze_Single_Task_Declaration): Remove the code to move the aspects
2738 to the object declaration because they are needed in the type
2741 2011-08-31 Robert Dewar <dewar@adacore.com>
2743 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
2744 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
2747 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2749 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
2750 if the corresponding type is malformed due to restriction violations.
2752 2011-08-31 Robert Dewar <dewar@adacore.com>
2754 * s-ransee.ads, s-ransee.adb: Minor reformatting.
2756 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2758 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
2759 would cause the generation of Set_Finalize_Address if the target is a
2760 VM and the designated type is not derived from [Limited_]Controlled.
2762 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2764 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
2766 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
2767 case of a compilation error.
2769 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2771 * init.c (__gnat_error_handler): Standardize the stack overflow or
2772 erroneous memory access message.
2773 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
2774 or erroneous memory access message.
2776 2011-08-31 Robert Dewar <dewar@adacore.com>
2778 * sem_ch4.adb: Minor reformatting.
2779 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
2781 2011-08-31 Thomas Quinot <quinot@adacore.com>
2783 * scos.ads: Minor documentation clarification.
2784 * put_scos.adb: Do not generate SCO unit header line for a unit that
2787 2011-08-31 Robert Dewar <dewar@adacore.com>
2789 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
2791 2011-08-31 Tristan Gingold <gingold@adacore.com>
2793 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
2794 hold variables between these following subprograms.
2795 (Build_Exception_Handler, Build_Object_Declarations,
2796 Build_Raise_Statement): Use the above type as parameter.
2797 Make the above adjustments.
2798 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
2800 2011-08-31 Pascal Obry <obry@adacore.com>
2802 * projects.texi: Minor reformatting.
2804 2011-08-31 Tristan Gingold <gingold@adacore.com>
2806 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
2807 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
2809 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2811 * exp_ch5.adb: Minor code cleanup.
2812 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
2813 prevent cascaded errors.
2814 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
2815 variable of an iterator specification in current scope.
2816 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
2817 postconditions on the stack, as they contain no return statements.
2819 2011-08-31 Yannick Moy <moy@adacore.com>
2821 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
2822 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
2823 call Qualify_Entity_Names.
2824 (Expand_Alfa): call Qualify_Entity_Names in more cases
2825 * lib-xref-alfa.adb: Take into account system package.
2826 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
2827 CodePeer mode in which we are interested in finding bugs even if
2828 compiler cannot compile source.
2829 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
2832 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2834 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
2835 denoted by the subtype mark to ensure getting the concurrent type in
2836 the case where the subtype mark denotes a private subtype of a
2837 concurrent type (needed when using -gnatc).
2838 (Process_Subtype): For the processing specific to type kinds, case on
2839 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
2840 subtype denotes a private subtype whose base type is nonprivate (needed
2841 for subtypes of private fulfilled by task types when compiling with
2844 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2846 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
2847 late primitives that override interface operations when the full
2848 expander is not active, to avoid blowups in Register_Primitive when
2849 types don't have associated secondary dispatch tables.
2851 2011-08-31 Yannick Moy <moy@adacore.com>
2853 * alfa_test.adb: Code clean up.
2855 2011-08-31 Marc Sango <sango@adacore.com>
2857 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
2858 by Comes_From_Source (Original_Node (N)) in order to treat also the
2859 nodes which have been rewritten.
2860 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
2861 explicit dereference and slice violation in spark mode on the nodes
2862 coming only from the source code.
2864 2011-08-31 Robert Dewar <dewar@adacore.com>
2866 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
2867 lib-xref-alfa.adb: Minor reformatting.
2869 2011-08-31 Matthew Heaney <heaney@adacore.com>
2871 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
2873 2011-08-31 Javier Miranda <miranda@adacore.com>
2875 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
2876 only for class-wide subprograms conflicting with entities of concurrent
2879 2011-08-31 Matthew Heaney <heaney@adacore.com>
2881 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
2884 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2886 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
2887 general description of the routine.
2889 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2891 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
2892 doubly-linked lists.
2894 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2896 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
2897 check is needed for a left-hand side that is a dereference, and the
2898 base type is private without discriminants (whereas the full type does
2899 have discriminants), an extra retrieval of the underlying type may be
2900 needed in the case where the subtype is a record subtype whose base
2901 type is private. Update comments.
2903 2011-08-31 Javier Miranda <miranda@adacore.com>
2905 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
2906 found check if there is a class-wide subprogram covering the primitive.
2908 2011-08-31 Yannick Moy <moy@adacore.com>
2910 * sem_res.adb: Further cases where full expansion test is needed,
2911 rather than expansion test.
2913 2011-08-31 Pascal Obry <obry@adacore.com>
2915 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
2917 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2919 * exp_ch5.adb: Handle iterators over derived container types.
2921 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2923 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
2924 (Has_Anonymous_Master): New routine.
2925 (Set_Has_Anonymous_Master): New routine.
2926 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
2927 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
2928 (Current_Anonymous_Master): New routine.
2929 (Current_Unit_First_Declaration): Removed.
2930 (Current_Unit_Scope): Removed.
2931 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
2932 their objects on a per-unit heterogeneous finalization master.
2934 2011-08-31 Matthew Heaney <heaney@adacore.com>
2936 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
2939 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2941 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
2944 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2946 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
2947 where the actual is an unexpanded call to 'Input.
2949 2011-08-31 Yannick Moy <moy@adacore.com>
2951 * sem_ch4.adb: Code clean up.
2953 2011-08-31 Yannick Moy <moy@adacore.com>
2955 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
2957 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2959 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
2960 and TSS primitive Finalize_Address if finalization is suppressed.
2961 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
2962 primitive Finalize_Address if finalization is suppressed.
2964 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2966 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
2967 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
2968 sure that the underlying task has already been created before trying
2969 to change its affinity.
2970 (Set_CPU): Use the term processor instead of CPU, as we do in
2973 2011-08-31 Vincent Celier <celier@adacore.com>
2975 * prj-attr.adb: New Compiler attribute Source_File_Switches.
2976 * prj-nmsc.adb (Process_Compiler): Process attribute
2977 Source_File_Switches.
2978 * prj.ads (Language_Config): New name list component
2979 Name_Source_File_Switches.
2980 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
2982 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2984 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
2985 discriminated component of an actual, expand at once to prevent
2986 ouf-of-order references with generated subtypes.
2988 2011-08-31 Yannick Moy <moy@adacore.com>
2990 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
2991 reference to operator in Alfa xrefs.
2993 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2995 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
2996 where the parent instance was frozen before the current instance due to
2997 the presence of a source body. Update calls to Insert_After_Last_Decl.
2998 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
2999 Update the comment which illustrates the purpose of the routine.
3000 Package instances are now frozen by source bodies which appear after
3001 the instance. This ensures that entities coming from within the
3002 instance are available for use in the said bodies.
3003 (Install_Body): Add code to handle the case where the parent instance
3004 was frozen before the current instance due to the presence of a source
3005 body. Update calls to Insert_After_Last_Decl.
3007 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3009 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3011 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3013 2011-08-31 Yannick Moy <moy@adacore.com>
3015 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3017 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3018 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3019 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3020 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3021 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3022 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3023 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3024 ALFA in Alfa (we dropped acronym).
3025 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3026 operations in a case where it returned previously No_Elist.
3028 2011-08-31 Robert Dewar <dewar@adacore.com>
3030 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3031 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3032 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3033 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3034 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3035 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3038 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3040 * sem_ch12 (Check_Private_View): Revert previous change.
3041 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3042 conversion is in a generic instance.
3044 2011-08-31 Matthew Heaney <heaney@adacore.com>
3046 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3047 * a-chtgbo.adb (Free): Allow 0 as index value.
3049 2011-08-31 Matthew Heaney <heaney@adacore.com>
3051 * a-cborma.adb (Insert): Add comment to explain why no element
3054 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3056 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3057 spec discriminant is already a concurrent type, in which case just use
3058 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3060 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3062 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3063 system-linux-mips.ads, system-linux-mipsel.ads,
3064 system-linux-mips64el.ads, system-linux-ppc64.ads,
3065 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3067 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3069 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3070 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3071 (build_unary_op): Likewise.
3073 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3075 * raise-gcc.c: Do not include coretypes.h and tm.h.
3076 (setup_to_install): Remove test for compiler macro.
3077 * targext.c: Document use for the library.
3078 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3080 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3082 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3083 the expression to the nominal type if the latter is a record type with
3084 a variant part and the type of the former is a record type without one.
3086 2011-08-30 Yannick Moy <moy@adacore.com>
3088 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3089 expansion in Alfa mode.
3090 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3091 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3093 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3094 * sem_res.adb: Ditto.
3095 * gcc-interface/Make-lang.in: Update dependencies.
3097 2011-08-30 Thomas Quinot <quinot@adacore.com>
3099 * g-socket.ads: Minor documentation adjustment.
3101 2011-08-30 Robert Dewar <dewar@adacore.com>
3103 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3105 2011-08-30 Yannick Moy <moy@adacore.com>
3107 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3108 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3109 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3110 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3111 Revert change which introduced files for "light"
3112 expansion, to be replaced by a single file for Alfa expansion.
3114 2011-08-30 Robert Dewar <dewar@adacore.com>
3116 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3117 Minor code reorg/reformatting.
3119 2011-08-30 Yannick Moy <moy@adacore.com>
3121 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3122 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3123 used for testing full expansion, that is active expansion not in the
3124 reduced mode for Alfa
3125 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3126 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3127 of the verbose (Expander_Active and not ALFA_Mode)
3129 2011-08-30 Tristan Gingold <gingold@adacore.com>
3131 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3132 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3133 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3134 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3136 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3138 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3139 access conversions to check that the conversion is a rewritten node,
3140 rather than just having Comes_From_Source set to False, which wasn't
3143 2011-08-30 Robert Dewar <dewar@adacore.com>
3145 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3146 g-socket.ads: Minor reformatting.
3148 2011-08-30 Thomas Quinot <quinot@adacore.com>
3150 * sem_util.adb: Minor reformatting.
3152 2011-08-30 Tristan Gingold <gingold@adacore.com>
3154 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3155 to be compliant with the ABI.
3157 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3159 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3160 of a designated type when the related access type is an actual in an
3161 instance. This ensures that the full view of designated type is
3162 available when inside the body of the instance.
3164 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3166 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3167 in a position to be modified, a slice is treated like an indexed
3170 2011-08-30 Thomas Quinot <quinot@adacore.com>
3172 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3173 field tv_sec in struct timeval.
3175 2011-08-30 Yannick Moy <moy@adacore.com>
3177 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3178 blocks of code doing full expansion, previously only guarded by
3179 Expander_Active, by anding the test that ALFA_Mode is not set
3181 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3183 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3184 add the function to the list of private dependents, for subsequent
3185 legality check on Taft amendment types.
3186 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3187 Private_Dependents, as for other incomplete types.
3188 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3189 Taft-amendment type is used as the return type of a function.
3191 2011-08-30 Javier Miranda <miranda@adacore.com>
3193 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3194 which emits an error by a call to a new routine which report the error.
3195 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3196 entity does not cover an existing interface.
3197 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3199 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3200 protected procedures or entries whose mode is not conformant.
3201 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3202 an error by a call to a new routine which report the error.
3204 2011-08-30 Robert Dewar <dewar@adacore.com>
3206 * gnat_rm.texi: Minor change.
3207 * exp_attr_light.adb: Minor reformatting.
3209 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3211 * sem_ch3.adb: Patch inheritance of aspects in
3212 Complete_Private_Subtype, to avoid infinite loop.
3214 2011-08-30 Javier Miranda <miranda@adacore.com>
3216 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3217 been reported and a subprogram covering an interface primitive is not
3218 found then skip generating the internal entity. Done to avoid crashing
3220 (Check_Abstract_Overriding): Change text of error of wrong formal of
3221 protected subprogram or entry. Done for consistency to emit exactly the
3222 same error reported by Check_Synchronized_Overriding. In addition, the
3223 error is restricted to protected types (bug found working on AI05-0090)
3225 2011-08-30 Yannick Moy <moy@adacore.com>
3227 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3228 expansion in Alfa mode.
3229 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3230 * exp_light.adb, exp_light.ads: New package defining light expansion.
3231 * expander.adb (Expand): Call light expansion in Alfa mode
3232 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3234 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3236 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3237 * gnat1drv.adb (Adjust_Global_Switches): Comment
3239 2011-08-30 Yannick Moy <moy@adacore.com>
3241 * lib-xref-alfa.adb: Minor refactoring.
3243 2011-08-30 Yannick Moy <moy@adacore.com>
3245 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3247 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3248 expansion in Alfa mode.
3249 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3252 2011-08-30 Robert Dewar <dewar@adacore.com>
3254 * debug_a.adb: Update comment.
3256 2011-08-30 Robert Dewar <dewar@adacore.com>
3258 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3259 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3260 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3261 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3263 2011-08-30 Robert Dewar <dewar@adacore.com>
3265 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3268 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3270 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3271 Build_Finalization_Master by supplying an insertion node and enclosing
3272 scope. In its old version, the call did not generate a finalization
3274 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3275 recognize anonymous access-to-controlled components. Rewrite the
3276 machinery which creates finalization masters to service anonymous
3277 access-to-controlled components of a record type. In its current state,
3278 only one heterogeneous master is necessary to handle multiple anonymous
3280 (Freeze_Type): Comment reformatting.
3281 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3283 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3284 associates TSS primitive Finalize_Address with either the master itself
3285 or with the internal hash table depending on the mode of operation of
3288 2011-08-30 Javier Miranda <miranda@adacore.com>
3290 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3291 interface type then do not generate code to compare this component.
3292 Required since they have no components and their equality operator is
3295 2011-08-30 Steve Baird <baird@adacore.com>
3297 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3298 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3299 returns the (static) accessibility level of the object. Otherwise, the
3300 same as Type_Access_Level.
3301 (Dynamic_Accessibility_Level): New function; given an expression which
3302 could occur as the rhs of an assignment to a saooaaat (i.e., an
3303 expression of an access-to-object type), return the new value for the
3304 saooaaat's associated Extra_Accessibility object.
3305 (Effective_Extra_Accessibility): New function; same as
3306 Einfo.Extra_Accessibility except that object renames are looked through.
3308 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3309 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3311 (Effective_Extra_Accessibility): New function; see sem_util.ads
3313 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3314 (Extra_Accessibility): Update comments.
3315 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3316 except RM_Size field (which is only for types) is unaffected.
3318 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3319 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3321 (Init_Size): Add assertion that we are not trashing the
3322 Extra_Accessibility attribute of an object.
3323 (Init_Size_Align): Add assertion that we are not trashing the
3324 Extra_Accessibility attribute of an object.
3325 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3326 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3327 differently for the type of a (non-library-level) saooaaat depending
3328 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3329 is queried in this set of changes - everything else (in particular,
3330 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3331 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3332 The special treatment of library-level saooaaats is an optimization,
3333 not required for correctnesss. This is based on the observation that the
3334 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3335 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3337 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3338 false for the type of a saooaaat, declare and initialize its
3339 accessibility level object and set the Extra_Accessibility attribute
3340 of the saooaaat to refer to this object.
3341 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3342 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3343 calls to Effective_Extra_Accessibility in order to support
3344 renames of saooaaats.
3345 (Expand_N_Type_Conversion): Add new local function,
3346 Has_Extra_Accessibility, and call it when determining whether an
3347 accessibility check is needed.
3348 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3349 evaluate to True (without raising an exception).
3351 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3352 saooaaat, update its associated Extra_Accessibility object (if
3353 it has one). This includes an accessibility check.
3354 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3355 a saooaaat, update its Extra_Accessibility object too (if it
3357 (Expand_Call): Replace a couple of calls to Type_Access_Level
3358 with calls to Dynamic_Access_Level to handle cases where
3359 passing a literal (any literal) is incorrect.
3360 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3361 checks associated with "Saooaat := Some_Object'Access;"; this must
3362 be rejected if Some_Object is declared in a more nested scope
3364 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3365 assignment to a saooaaat even if Is_Local_Anonymous_Access
3366 returns False for its type (indicating a 2012-style saooaaat).
3368 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3369 (which is only appropriate for objects, not types) with a call
3370 of Init_Object_Size_Align in order to avoid trashing the
3371 Extra_Accessibility attribute of a rename (the two attributes
3374 (Valid_Conversion) Replace six calls to Type_Access_Level with
3375 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3376 Ada2012 non-library-level saooaaat, the former returns library level
3377 while the latter returns the (static) accessibility level of the
3378 saooaaat. A type conversion to the anonymous type of a saooaaat
3379 can only occur as part of an assignment to the saooaaat, so we
3380 know that such a conversion must be in a lhs context, so Deepest
3381 yields the result that we need. If such a conversion could occur,
3382 say, as the operand of an equality operator, then this might not
3383 be right. Also add a test so that static accessibilty checks are
3384 performed for converting to a saooaaat's type even if
3385 Is_Local_Anonymous_Access yields False for the type.
3387 2011-08-30 Javier Miranda <miranda@adacore.com>
3389 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3390 controls generation of a warning associated with late declaration of
3391 dispatching functions. Required to avoid generating spurious
3394 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3396 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3397 return object has an anonymous access type and the function's type is
3398 a named access type.
3399 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3400 conversions on implicit conversions, since such conversions can occur
3401 for anonymous access cases due to expansion. Issue error for attempt
3402 to rename an anonymous expression as an object of a named access type.
3403 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3404 to indicate whether this function should report errors on invalid
3406 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3407 the expression is of an anonymous access type and the expected type is
3408 a named general access type, rewrite the expression as a type
3409 conversion, unless this is an expression of a membership test.
3410 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3411 calling of Error_Msg_N on new formal Report_Errs.
3412 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3413 calling of Error_Msg_NE on new formal Report_Errs.
3414 (Valid_Conversion): Move declaration of this function to the package
3415 spec, to allow calls from membership test processing. For Ada 2012,
3416 enforce legality restrictions on implicit conversions of anonymous
3417 access values to general access types, disallowing such conversions in
3418 cases where the expression has a dynamic accessibility level (access
3419 parameters, stand-alone anonymous access objects, or a component of a
3420 dereference of one of the first two cases).
3421 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3422 in the context of a named general access expected type.
3423 * exp_ch4.adb Add with and use of Exp_Ch2.
3424 (Expand_N_In): Add processing for membership tests applied to
3425 expressions of an anonymous access type. First, Valid_Conversion is
3426 called to check whether the test is statically False, and then the
3427 conversion is expanded to test that the expression's accessibility
3428 level is no deeper than that of the tested type. In the case of
3429 anonymous access-to-tagged types, a tagged membership test is applied
3431 (Tagged_Membership): Extend to handle access type cases, applying the
3432 test to the designated types.
3433 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3434 accessibility level, and the actual is a 'Access applied to a current
3435 instance, pass the accessibility level of the type of the current
3436 instance rather than applying Object_Access_Level to the prefix. Add a
3437 ??? comment, since this level isn't quite right either (will eventually
3438 need to pass an implicit level parameter to init procs).
3440 2011-08-30 Bob Duff <duff@adacore.com>
3442 * s-taskin.ads: Minor comment fix.
3444 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3446 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3447 component and the selector is a dispatching operation, check if it is
3448 a prefixed call before rewriting as a parameterless function call.
3450 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3452 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3453 tsystem.h into $(RTSDIR) instead of rts.
3455 2011-08-29 Robert Dewar <dewar@adacore.com>
3457 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3459 * gcc-interface/Make-lang.in: Update dependencies.
3461 2011-08-29 Yannick Moy <moy@adacore.com>
3463 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3464 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3465 table to hold dereferences.
3466 (Add_ALFA_Xrefs): Take into account dereferences as special
3467 reads/writes to the variable "HEAP".
3468 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3469 (Generate_Dereference): New procedure to store a read/write dereferencew
3471 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3472 the special "HEAP" var.
3473 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3475 * sem_util.adb (Note_Possible_Modification): Store write dereference
3478 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3480 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3481 ensures that the level of the subpool access type is not deeper than
3482 that of the pool object.
3483 * sem_util.adb (Object_Access_Level): Expand to handle defining
3485 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3486 subpool handle name of a rewritten allocator.
3488 2011-08-29 Robert Dewar <dewar@adacore.com>
3490 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3492 2011-08-29 Thomas Quinot <quinot@adacore.com>
3494 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3495 values, we generate multiple triples of parameters in the TypeCode.
3496 Bump Choice_Index for each such triple so that a subsequent default
3497 choice is associated with the correct index in the typecode.
3499 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3501 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3503 (First, Last): Handle properly an iterator over a null container.
3505 2011-08-29 Bob Duff <duff@adacore.com>
3507 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
3508 processing if we run across a node with no Scope. This can happen if
3509 we're with-ing an library-level instance, and that instance got errors
3510 that caused "instantiation abandoned".
3511 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
3512 an exception instead of using Assert, so it won't go into an infinite
3513 loop, even when assertions are turned off.
3515 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3517 * a-coorse.adb: Proper handling of empty ordered sets.
3519 2011-08-29 Johannes Kanig <kanig@adacore.com>
3521 * debug.adb: Add comments.
3523 2011-08-29 Thomas Quinot <quinot@adacore.com>
3525 * a-except.adb, a-except-2005.adb: Minor comment rewording and
3528 2011-08-29 Yannick Moy <moy@adacore.com>
3530 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
3531 declaration for Itypes in Alfa mode.
3533 2011-08-29 Robert Dewar <dewar@adacore.com>
3535 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
3536 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3537 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
3540 2011-08-29 Tristan Gingold <gingold@adacore.com>
3542 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
3544 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
3545 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
3548 2011-08-29 Robert Dewar <dewar@adacore.com>
3550 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
3552 2011-08-29 Javier Miranda <miranda@adacore.com>
3554 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
3555 renamings of formal subprograms when the actual for a formal type is
3558 2011-08-29 Matthew Heaney <heaney@adacore.com>
3560 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
3563 2011-08-29 Matthew Heaney <heaney@adacore.com>
3565 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
3566 components of record type.
3567 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
3570 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3572 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
3573 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
3576 2011-08-29 Robert Dewar <dewar@adacore.com>
3578 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
3581 2011-08-29 Matthew Heaney <heaney@adacore.com>
3583 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
3584 components of record type.
3586 2011-08-29 Bob Duff <duff@adacore.com>
3588 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
3589 by the termination handler.
3591 2011-08-29 Yannick Moy <moy@adacore.com>
3593 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
3594 created in Alfa mode, instead of inserting artificial declarations of
3595 non-Itypes in the tree.
3596 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
3597 know if an Itype has a corresponding declaration, as defined in
3600 2011-08-29 Yannick Moy <moy@adacore.com>
3602 * gnat1drv.adb: Minor rewrite.
3604 2011-08-29 Bob Duff <duff@adacore.com>
3606 * s-tasuti.adb (Make_Passive): Work around race condition in
3607 Make_Independent, which can cause Wait_Count to be zero. So instead of
3608 asserting that Wait_Count > 0, and then decrementing it, decrement it
3609 only if Wait_Count > 0.
3610 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
3611 should be nonnegative, so declare them Natural instead of Integer.
3613 2011-08-29 Robert Dewar <dewar@adacore.com>
3615 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
3616 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
3617 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
3618 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
3619 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
3621 2011-08-29 Tristan Gingold <gingold@adacore.com>
3623 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
3625 2011-08-29 Vadim Godunko <godunko@adacore.com>
3627 * s-parint.ads: Minor comment clarification.
3629 2011-08-29 Vincent Celier <celier@adacore.com>
3631 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
3632 may be used as identifiers.
3634 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3636 * a-coinho.ads: Minor reformating.
3638 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3640 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
3641 container of a derived type.
3643 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3645 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3646 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
3648 2011-08-29 Pascal Obry <obry@adacore.com>
3650 * exp_disp.adb: Minor comment fix.
3651 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
3652 to avoid warnings when compiling with -Wall.
3653 (Make_Disp_Conditional_Select_Body): Likewise.
3654 (Make_Disp_Timed_Select_Body): Likewise.
3656 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3658 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
3659 an entity name, generate reference for it.
3661 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3663 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
3665 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
3666 the class-wide type.
3667 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
3669 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3671 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
3672 subtype for an object whose type is an unconstrained union.
3674 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3676 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
3677 is allowed in a component definition, by AI95-406.
3679 2011-08-29 Matthew Heaney <heaney@adacore.com>
3681 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
3683 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3685 * a-except-2005.adb: Alphabetize all routines.
3686 (Triggered_By_Abort): New routine.
3687 * a-except-2005.ads (Triggered_By_Abort): New routine.
3688 * a-except.adb Alphabetize all routines.
3689 (Triggered_By_Abort): New routine.
3690 * a-except.ads (Triggered_By_Abort): New routine.
3691 * exp_ch7.adb: Update all comments involving the detection of aborts in
3693 (Build_Object_Declarations): Do not generate code to detect the
3694 presence of an abort at the start of finalization code, use a runtime
3696 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
3698 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
3699 allocate a task on a subpool.
3700 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
3701 The flag disables all actions related to the maintenance of
3702 Finalize_Address_Table when subpools are not in use.
3703 (Allocate_Any_Controlled): Signal the machinery that subpools are in
3705 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
3706 performs costly task locking when subpools are not in use.
3708 2011-08-29 Yannick Moy <moy@adacore.com>
3710 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
3711 types and dispatching calls in Alfa mode.
3712 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
3713 correspondance between body and spec scopes, to reuse utility functions
3714 (Traverse_Declarations_Or_Statements): Protect access to body for stub
3715 by testing the presence of the library unit for the body
3716 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
3717 mode the expansion of accept statements is skipped
3718 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
3719 the unique entity corresponding to the one returned by
3720 Unique_Defining_Entity applied to the enclosing declaration of the
3723 2011-08-29 Bob Duff <duff@adacore.com>
3725 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
3726 gdb when x is not a node (it can be a node list, name_id, etc). pp is
3727 an alias for pn. ppp is an alias for pt.
3729 2011-08-29 Javier Miranda <miranda@adacore.com>
3731 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
3732 aggregate to take a consistent decision on the need to convert into
3733 assignments aggregates that initialize constant objects.
3735 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3737 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
3738 Build_Allocate_Deallocate_Proc in order to handle allocation of
3739 non-controlled objects on subpools.
3740 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
3741 to be end-user visible.
3742 * s-finmas.adb: Add with and use clause for System.HTable.
3743 Add an instantiation of Simple_HTable which provides a mapping between
3744 the address of a controlled object and the corresponding
3745 Finalize_Address used to clean up the object. The table is used when a
3746 master is operating in heterogeneous mode.
3747 (Attach): Explain why the input node is not verified on being already
3749 (Delete_Finalize_Address): New routine.
3750 (Detach): Add pragma Assert which ensures that a node is already
3752 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
3753 since nodes are no longer removed on traversal. Explain why node
3754 detachment is undesirable in this case.
3755 (Get_Finalize_Address): New routine.
3756 (Hash): New routine.
3757 (Is_Empty_List): Removed.
3758 (pm): Renamed to Print_Master. Add output for discriminant
3760 Comment reformatting.
3761 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3762 * s-finmas.ads: Various comments additions / improvements.
3763 Type Finalization_Master has a discriminant which determines the mode of
3765 (Delete_Finalize_Address): New routine.
3766 (Get_Finalize_Address): New routine.
3767 (pm): Renamed to Print_Master.
3768 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3769 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
3770 use clause for System.IO.
3771 (Allocate_Any_Controlled): Add machinery to set TSS primitive
3772 Finalize_Address depending on the mode of allocation and the mode of
3774 (Deallocate_Any_Controlled): Remove the relation pair object -
3775 Finalize_Address regardless of the master mode. Add comment explaining
3777 (Detach): Ensure that fields Prev and Next are null after detachment.
3778 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
3779 scheme to check whether the list of subpools is empty. There is no
3780 longer need to store the next subpool or advance the current pointer.
3781 (Is_Empty_List): New routine.
3782 (Print_Pool): New routine.
3783 (Print_Subpool): New routine.
3784 * s-stposu.ads: Various comments additions / improvements.
3785 Field Master of type Root_Subpool is now a heterogeneous collection.
3786 (Print_Pool): New routine.
3787 (Print_Subpool): New routine.
3789 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3791 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
3792 forms, using aspects of container types.
3793 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
3794 Has_Implicit_Dereference flags, that may be set on the partial view.
3795 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
3796 container type with an indexing aspect.
3797 (Analyze_Quantified_Expression): Analyze construct with expansion
3798 disabled, because it will be rewritten as a loop during expansion.
3799 (Try_Container_Indexing): The prefix itself may be a container type
3800 with an indexing aspect, as with a vector of vectors.
3801 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
3802 the original doamin of iteration, for name capture.
3803 (Analyze_Iterator_Specification): If the domain is an expression that
3804 needs finalization, create a separate declaration for it.
3805 For an iterator with "of" retrieve default iterator info from aspect of
3806 container type. For "in" iterator, retrieve type of Iterate function.
3807 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
3808 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
3809 analysis, to prevent spurious errors about late attributes.
3810 * sprint.adb: Handle quantified expression with either loop or iterator
3812 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
3815 2011-08-29 Vincent Celier <celier@adacore.com>
3817 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
3818 Binder or Linker of the main project file.
3820 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3822 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
3825 2011-08-29 Yannick Moy <moy@adacore.com>
3827 * exp_ch9.adb: Partial revert of previous change for Alfa mode
3829 2011-08-29 Yannick Moy <moy@adacore.com>
3831 * exp_ch11.adb: Minor expansion of comment.
3833 2011-08-29 Yannick Moy <moy@adacore.com>
3835 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
3837 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3839 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
3840 interpretation, set the type before resolving the operands, because
3841 legality checks on an exponention operand need to know the type of the
3844 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3846 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
3847 cleanups on a master if the instance is within a generic unit.
3848 Complement to the corresponding fix to inline.adb for K520-030.
3850 2011-08-29 Tristan Gingold <gingold@adacore.com>
3852 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
3854 * exp_intr.adb: Minor comment fix.
3856 2011-08-29 Bob Duff <duff@adacore.com>
3858 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
3859 Delay_Required was used as an uninitialized variable.
3861 2011-08-29 Robert Dewar <dewar@adacore.com>
3863 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
3864 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
3865 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
3867 2011-08-29 Thomas Quinot <quinot@adacore.com>
3869 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
3870 Remove unused variables.
3872 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3874 * sem_res.adb: Remove Build_Explicit_Dereference.
3875 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
3876 from sem_res.adb, used in analysis of additional constructs.
3877 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
3878 expansion of iterators.
3879 (Is_Object_Reference): Recognize variables rewritten as explicit
3880 dereferences in Ada2012.
3881 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
3882 Reversible_Iterator names, for expansion of Ada2012 iterators.
3883 * aspects.ads, aspects.adb (Find_Aspect): Utility.
3884 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
3885 linked list container.
3886 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
3887 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
3889 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3891 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
3894 2011-08-29 Vincent Celier <celier@adacore.com>
3896 * make.adb (Gnatmake): Get the maximum number of simultaneous
3897 compilation processes after the Builder switches has been scanned, as
3898 there may include -jnn.
3900 2011-08-29 Matthew Heaney <heaney@adacore.com>
3902 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
3904 2011-08-29 Tristan Gingold <gingold@adacore.com>
3906 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
3907 GNAT_DRIVER_COMMAND_LINE to 255.
3909 2011-08-29 Pascal Obry <obry@adacore.com>
3911 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
3912 reformatting and style fix (class attribute casing).
3914 2011-08-29 Yannick Moy <moy@adacore.com>
3916 * exp_ch11.adb: Yet another case where expansion should be common
3917 between CodePeer and Alfa.
3919 2011-08-29 Yannick Moy <moy@adacore.com>
3921 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
3923 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3925 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
3926 incomplete type and its completion match.
3928 2011-08-29 Yannick Moy <moy@adacore.com>
3930 * exp_ch13.adb: Adjust previous change.
3932 2011-08-29 Robert Dewar <dewar@adacore.com>
3934 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
3935 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
3938 2011-08-29 Emmanuel Briot <briot@adacore.com>
3940 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
3941 initialize aggregated projects.
3943 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3945 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
3946 depth of candidates to resolve a potentially spurious ambiguity between
3947 two visible subprograms.
3949 2011-08-29 Yannick Moy <moy@adacore.com>
3951 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
3953 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
3954 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
3957 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3959 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
3962 2011-08-29 Thomas Quinot <quinot@adacore.com>
3964 * sem_res.adb: Minor reformatting.
3966 2011-08-29 Johannes Kanig <kanig@adacore.com>
3968 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
3970 * gnat1drv.adb (Adjust_Global_Switches): Set
3971 Use_Expressions_With_Actions to False in ALFA mode.
3972 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
3975 2011-08-29 Yannick Moy <moy@adacore.com>
3977 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
3978 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
3979 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
3980 tagged types and dispatching calls in Alfa mode.
3982 2011-08-29 Javier Miranda <miranda@adacore.com>
3984 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
3985 we do not report an error on an Empty node.
3987 2011-08-29 Geert Bosch <bosch@adacore.com>
3989 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
3990 a-nlrear.o and a-nurear.o.
3992 2011-08-29 Robert Dewar <dewar@adacore.com>
3994 * freeze.adb: Minor code reorganization.
3996 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
3997 sem_ch6.adb: Minor reformatting
3999 2011-08-29 Tristan Gingold <gingold@adacore.com>
4001 * s-except.ads, s-except.adb: Provide dummy body.
4003 2011-08-29 Yannick Moy <moy@adacore.com>
4005 * sem_warn.adb (Within_Postcondition): Take into account the case of
4006 an Ensures component in a Test_Case.
4008 2011-08-29 Tristan Gingold <gingold@adacore.com>
4010 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4011 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4012 System_Exceptions_Debug
4013 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4014 * a-except.adb: With and use System.Exceptions_Debug instead of
4016 * a-except-2005.adb: Likewise.
4017 * s-assert.adb: Likewise.
4018 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4019 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4020 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4021 s-excdeb. Update dependencies.
4022 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4023 as these no longer need external libraries.
4025 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4027 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4028 exponentiation operator on universal values in a context that requires
4031 2011-08-29 Tristan Gingold <gingold@adacore.com>
4033 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4034 before calling notify_handled_exception.
4035 * a-exextr.adb: Fix comment.
4037 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4039 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4040 Finalize_Address of the access type's finalization master.
4041 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4042 access type's finalization master. Add a guard to prevent
4043 Associated_Storage_Pool from being set on .NET/JVM.
4044 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4045 attribute Finalize_Address of the access type's finalization master.
4046 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4047 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4048 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4050 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4051 use clause for System.IO
4052 (Detach): Relax the assertion, to be reinstated later.
4053 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4054 Relax the assertion on Finalize_Address, to be reinstated later.
4055 (Is_Empty_List): New routine.
4056 (pm): New debug routine.
4057 (Set_Finalize_Address): New routine.
4058 * s-finmas.ads (pm): New debug routine.
4059 (Set_Finalize_Address): New routine.
4060 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4062 2011-08-29 Tristan Gingold <gingold@adacore.com>
4064 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4065 Remove convention C.
4067 2011-08-29 Tristan Gingold <gingold@adacore.com>
4069 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4070 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4071 (Finalize_TCB): Remove its finalization.
4072 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4073 * s-soflin.adb (NT_Exc_Stack): Remove
4074 (Get_Exc_Stack_Addr_NT): Likewise.
4075 (Get_Exc_Stack_Addr_Soft): Likewise.
4076 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4077 (Get_Exc_Stack_Addr): Likewise.
4078 (Get_Exc_Stack_Addr_Soft): Likewise
4079 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4080 (Exc_Stack_Ptr_T): Likewise.
4081 (Private_Data): Remove Exc_Stack_Ptr component.
4083 2011-08-29 Tristan Gingold <gingold@adacore.com>
4085 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4087 2011-08-29 Tristan Gingold <gingold@adacore.com>
4089 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4091 2011-08-29 Geert Bosch <bosch@adacore.com>
4093 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4094 L2_Norm, Swap_Column): New generic subprograms
4095 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4096 L2_Norm, Swap_Column): Implement new subprograms in order to
4097 eliminate dependency on BLAS and LAPACK libraries in
4098 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4099 version. Forward_Eliminate/Back_Substitute can be used to put a
4100 matrix in row echelon or reduced row echelon form using partial
4102 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4103 Swap_Column): Instantiate from System.Generic_Array_Operations.
4104 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4105 (Sqrt): Local function for simple computation of square root without
4106 adding dependencies on Generic_Elementary_Functions.
4107 (Swap): New subprogram to exchange floating point numbers.
4108 (Inverse): Reimplement using Jordan-Gauss elimination.
4109 (Jacobi): New procedure implementing Jacobi's method for computation
4110 of eigensystems, based on Rutishauser's implementation.
4111 (L2_Norm): Implement directly using the inner product.
4112 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4113 decreasing eigenvalue as required by the Ada RM.
4114 (Swap_Column): New helper procedure for Sort_Eigensystem.
4115 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4116 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4119 2011-08-29 Thomas Quinot <quinot@adacore.com>
4121 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4124 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4126 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4127 than the current node.
4128 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4129 Finalization_Master. The list headers have two fields instead of three.
4130 This should fix alignment issue but subpool allocations are now
4131 unusable. Alphabetize subprograms.
4132 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4133 the size of the header when converting the beginning of the object to
4134 a FM_Node. Set the master's Finalize_Address attribute if not already
4136 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4137 header when converting the beginning of the object to a FM_Node.
4139 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4141 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4142 reraise when compiling for CodePeer.
4144 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4146 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4147 now needed by a-convec.adb. Fix warning.
4149 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4151 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4152 processing of TSS routine Finalize_Address when compiling in
4155 2011-08-29 Thomas Quinot <quinot@adacore.com>
4157 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4158 sem_warn.adb: Minor reformatting.
4160 2011-08-29 Emmanuel Briot <briot@adacore.com>
4162 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4163 languages from aggregated projects.
4165 2011-08-29 Yannick Moy <moy@adacore.com>
4167 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4168 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4169 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4170 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4171 for stubs are traversed too when parameter is set
4172 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4173 (Traverse_Declarations_Or_Statements): Do the special traversing for
4174 stubs when required.
4175 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4176 return subprogram or package body from stub.
4177 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4178 stubs without prior subprogram decl.
4180 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4182 * gnat_ugn.texi: Fix typo.
4184 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4186 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4187 which accounts for size vs alignment issues and calculates the size of
4189 (Deallocate_Any_Controlled): Ditto.
4190 (Nearest_Multiple_Rounded_Up): New routine.
4192 2011-08-29 Tristan Gingold <gingold@adacore.com>
4194 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4195 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4196 (Set_Exception_Msg): Ditto.
4197 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4199 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4200 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4201 (Raise_With_Msg): Remove Cleanup_Flag.
4202 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4203 Clean_Flag and Private_Data components.
4205 2011-08-29 Yannick Moy <moy@adacore.com>
4207 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4209 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4210 of an explicitly declared type, so that the base types of the original
4211 type and this generated type are the same, and a "type" (not a subtype
4213 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4214 small" in Alfa mode, like in CodePeer mode.
4215 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4216 clauses in Alfa mode.
4218 2011-08-29 Javier Miranda <miranda@adacore.com>
4220 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4221 function to the package spec.
4222 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4223 internally generated bodies of null procedures locate the internally
4224 generated spec enforcing mode conformance.
4225 (Is_Interface_Conformant): Ensure that the controlling formal of the
4228 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4230 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4231 reject the pragma if it appears to apply to a formal subprogram.
4233 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4235 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4236 inner expression, to prevent double evaluation.
4238 2011-08-29 Tristan Gingold <gingold@adacore.com>
4240 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4242 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4243 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4244 (Raise_Current_Excep): Adjust call.
4245 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4247 2011-08-29 Thomas Quinot <quinot@adacore.com>
4249 * exp_disp.adb: Minor reformatting.
4251 2011-08-29 Tristan Gingold <gingold@adacore.com>
4253 * a-exexpr.adb (Setup_Exception): Removed.
4254 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4255 * a-except.adb (Exception_Propagation): Removed.
4256 * a-except-2005.adb (Setup_Exception): Removed.
4257 (Reraise): Remove call to Setup_Exception.
4258 (Reraise_Occurrence): Ditto.
4259 (Reraise_Occurrence_Always): Ditto.
4260 (Reraise_Occurrence_No_Defer): Ditto.
4261 (Transfer_Occurrence): Ditto.
4262 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4263 (Set_Exception_Msg): Ditto.
4265 2011-08-29 Robert Dewar <dewar@adacore.com>
4267 * a-convec.adb, exp_disp.adb: Minor reformatting.
4269 2011-08-29 Tristan Gingold <gingold@adacore.com>
4271 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4273 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4275 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4276 Exception_Handlers to No_List instead of Empty_List in the case where
4277 there are no handlers.
4279 2011-08-29 Tristan Gingold <gingold@adacore.com>
4281 * gcc-interface/gigi.h (enum standard_datatypes): Add
4282 ADT_reraise_zcx_decl
4283 (reraise_zcx_decl): New macro.
4284 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4285 (gigi): Set reraise_zcx_decl.
4286 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4287 (gnat_to_gnu): Handle N_Raise_Statement.
4289 2011-08-29 Robert Dewar <dewar@adacore.com>
4291 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4292 a-undesu.adb: Minor reformatting.
4294 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4296 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4297 table, accept an unfrozen untagged component if it is an actual for a
4298 formal incomplete type.
4299 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4300 provide new iterator forms over vectors.
4301 Introduce type Iterator in package body to implement operations of
4302 Reversible_Iterator interface.
4303 * a-iteint.ads: Make package pure so it is usable with new container
4304 packages, that are categorized Remote_Types.
4306 2011-08-29 Robert Dewar <dewar@adacore.com>
4308 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4310 2011-08-29 Bob Duff <duff@adacore.com>
4312 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4313 of <>, because this is the routine that checks for dimensionality
4314 errors (for example, for a two-dimensional array, (others => <>) should
4315 be (others => (others => <>)).
4317 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4319 * impunit.adb: Add new run-time units.
4320 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4321 s-stposu.ads, s-stposu.adb: Code clean up.
4322 Handle protected class-wide or task class-wide types
4323 Handle C/C++/CIL/Java types.
4324 * s-spsufi.adb, s-spsufi.ads: New files.
4326 2011-08-29 Yannick Moy <moy@adacore.com>
4328 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4329 library-level subprogram.
4330 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4332 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4334 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4336 * gnat_rm.texi: Update doc for Test_Case pragma.
4338 2011-08-29 Tristan Gingold <gingold@adacore.com>
4340 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4342 (GCC_Exception_Access): New type.
4343 (Unwind_DeleteException): New imported procedure
4344 (Foreign_Exception): Import it.
4345 (GNAT_GCC_Exception): Simply have the occurrence inside.
4346 (To_GCC_Exception): New function.
4347 (To_GNAT_GCC_Exception): New function.
4348 (GNAT_GCC_Exception_Cleanup): New procedure..
4349 (Propagate_GCC_Exception): New procedure.
4350 (Reraise_GCC_Exception): New procedure.
4351 (Setup_Current_Excep): New procedure.
4352 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4353 (Unwind_RaiseException): Ditto.
4354 (Unwind_ForcedUnwind): Ditto.
4356 (Begin_Handler): Change type of parameter.
4357 (End_Handler): Ditto. Now delete the exception if still present.
4358 (Setup_Key): Removed.
4359 (Is_Setup_And_Not_Propagated): Removed.
4360 (Set_Setup_And_Not_Propagated): Ditto.
4361 (Clear_Setup_And_Not_Propagated): Ditto.
4362 (Save_Occurrence_And_Private): Ditto.
4363 (EID_For): Add 'not null' constraint on parameter.
4364 (Setup_Exception): Does nothing.
4365 (Propagate_Exception): Simplified.
4366 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4367 re-raise is not expanded anymore.
4368 * s-except.ads (Foreign_Exception): New exception - placeholder for
4370 * raise-gcc.c (__gnat_setup_current_excep): Declare
4371 (CXX_EXCEPTION_CLASS): Define (not yet used)
4372 (GNAT_EXCEPTION_CLASS): Define.
4373 (is_handled_by): Handle foreign exceptions.
4374 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4376 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4378 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4380 2011-08-29 Thomas Quinot <quinot@adacore.com>
4382 * a-synbar-posix.adb: Minor reformatting.
4384 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4386 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4387 a-exetim-default.ads (Interrupt_Clocks_Supported,
4388 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4389 definitions to be compliant with AI-0171. The target systems do not
4390 support separate account for the execution time of interrupt handlers.
4392 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4394 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4395 in the barrier to put first the easiest to evaluate (and the one which
4396 will be True more often). More efficient.
4398 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4400 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4402 2011-08-29 Bob Duff <duff@adacore.com>
4404 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4405 attributes that are now aspects, as specified by AI05-0229-1.
4406 * sem_ch13.adb (Analyze_Aspect_Specifications,
4407 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4408 pragmas or attribute references, as appropriate.
4410 2011-08-29 Robert Dewar <dewar@adacore.com>
4412 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4413 a-synbar-posix.ads: Minor reformatting.
4415 2011-08-29 Yannick Moy <moy@adacore.com>
4417 * snames.ads-tmpl: Add name Force.
4419 2011-08-29 Pascal Obry <obry@adacore.com>
4421 * prj-nmsc.adb: Minor reformatting.
4423 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4425 * a-exetim.ads (Interrupt_Clocks_Supported,
4426 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4427 definitions to be compliant with AI-0171.
4429 2011-08-29 Robert Dewar <dewar@adacore.com>
4431 * a-ngelfu.adb: Add comments.
4433 2011-08-29 Geert Bosch <bosch@adacore.com>
4435 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4436 the closest machine number to Pi / 2.0.
4438 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4440 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4441 package Ada.Synchronous_Barriers.
4442 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4443 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4444 default implementation using protected objects and another one
4445 a-synbar-posix using POSIX barriers as the underlying support.
4446 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4447 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4448 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4449 Clean up dependencies.
4450 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4452 2011-08-29 Robert Dewar <dewar@adacore.com>
4454 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4455 exp_dist.adb: Minor code reorganization.
4458 2011-08-29 Thomas Quinot <quinot@adacore.com>
4460 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4461 primitive operation must support external streaming if it is not a
4462 controlling access result.
4464 2011-08-29 Thomas Quinot <quinot@adacore.com>
4466 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4468 2011-08-29 Bob Duff <duff@adacore.com>
4470 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4471 restriction on allocators, as required by AI05-0013-1.
4472 * restrict.ads: Minor comment fix.
4474 2011-08-29 Tristan Gingold <gingold@adacore.com>
4476 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4477 (To_Jmpbuf_Address): Ditto
4478 (builtin_longjmp): Ditto
4480 2011-08-29 Thomas Quinot <quinot@adacore.com>
4482 * sem_res.adb: Minor reformatting.
4484 2011-08-29 Vincent Celier <celier@adacore.com>
4486 * make.adb (Gnatmake): Move special processing for VM targets after the
4487 call to Get_Target_Parameters.
4489 2011-08-29 Thomas Quinot <quinot@adacore.com>
4491 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4493 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4495 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4496 where an anonymous access discriminant of a limited designated type
4497 appears in a non-immutably limited discriminated type and issue an
4498 error message. Add local variable Desig_T and replace all occurrences
4501 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4503 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4504 implementation is compliant to RM D.15(15/2) after the modification
4505 imposed by AI05-0094-1 (binding interpretation).
4507 2011-08-29 Robert Dewar <dewar@adacore.com>
4509 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
4510 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
4512 2011-08-29 Thomas Quinot <quinot@adacore.com>
4514 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
4515 the scope name, do not report a missing label as a style violation (it
4516 will be diagnosed as an illegality).
4517 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
4518 variant records: Get_Enum_Lit_From_Pos already returns a usage
4519 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
4520 on Expr in Integer_Literal case so that it can be used by
4523 2011-08-29 Tristan Gingold <gingold@adacore.com>
4525 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
4527 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
4528 (Build_Abort_Block_Handler): New function to build an Abort_Signal
4530 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
4531 Build_Abort_Block_Handler to build the exception handler. Do not
4532 undefer aborts for the Abort_Signal exception handler if back-end
4533 exception mechanism.
4534 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
4535 back_end exceptions for all others and abort_signal.
4536 * s-except.ads (ZCX_By_Default): New constant.
4537 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
4538 (Raise_Exception_Always): Ditto.
4539 (Raise_From_Signal_Handler): Ditto.
4540 (Raise_With_Location_And_Msg): Ditto.
4541 (Raise_With_Msg): Ditto.
4543 (Reraise_Occurence): Ditto.
4544 (Reraise_Occurrence_Always): Ditto.
4545 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
4546 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
4548 2011-08-29 Thomas Quinot <quinot@adacore.com>
4550 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
4552 2011-08-29 Robert Dewar <dewar@adacore.com>
4554 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
4555 Minor code reorganization.
4557 2011-08-29 Bob Duff <duff@adacore.com>
4559 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
4560 2012, not just Ada 2005.
4562 2011-08-29 Vincent Celier <celier@adacore.com>
4564 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
4565 with a project file or with gprbuid, if -gnatep= is specified, the
4566 builder may need to be invoked with -x.
4568 2011-08-29 Tristan Gingold <gingold@adacore.com>
4570 * a-exexpr-gcc.adb: Minor comment fix.
4572 2011-08-29 Robert Dewar <dewar@adacore.com>
4574 * sem_ch8.adb: Minor reformatting.
4576 2011-08-29 Bob Duff <duff@adacore.com>
4578 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
4579 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
4580 treating "some" as unreserved in earlier Ada versions. This is now
4581 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
4582 rather than Name_Some, since Tok_Some is now recognized as reserved.
4583 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
4585 * scans.ads: Minor comment fixes.
4586 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
4587 for other language versions.
4588 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
4589 treating "some" as unreserved in earlier Ada versions. This is now
4590 handled in Snames.Is_Keyword_Name.
4591 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
4593 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
4594 unreserved in earlier Ada versions. This is now handled in
4595 Snames.Is_Keyword_Name.
4596 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
4597 words as for other language versions.
4598 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
4599 Ada 2012, not just Ada 2005.
4601 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4603 * sem_ch13.adb: Additional semantic checks for aspects involved in
4606 2011-08-29 Matthew Heaney <heaney@adacore.com>
4608 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
4609 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
4610 Container parameter.
4611 (Ancestor_Find): ditto.
4613 2011-08-29 Thomas Quinot <quinot@adacore.com>
4615 * par-endh.adb: Minor reformatting.
4617 2011-08-29 Tristan Gingold <gingold@adacore.com>
4619 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
4620 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
4621 (Adjust_N_CLeanups_For): Remove.
4622 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
4624 (Propgate_Exception): Adjust.
4625 * raise-gcc.c: Add a few static/const.
4626 (Adjust_N_Cleanups_For): Remove declaration.
4627 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
4629 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4631 * sem_ch8.adb: Use type of function return when rewriting as object
4634 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4636 * sem_type.adb: Minor reformatting.
4638 2011-08-29 Robert Dewar <dewar@adacore.com>
4640 * makeutl.adb: Minor reformatting.
4642 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4644 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
4645 function call of a limited type, the expansion of the renaming is
4646 complicated by the presence of various temporaries and subtypes that
4647 capture constraints of the renamed object.
4648 Rewrite node as an object declaration, whose expansion is simpler.
4649 Given that the object is limited there is no copy involved and no
4652 2011-08-29 Robert Dewar <dewar@adacore.com>
4654 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
4655 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
4657 2011-08-29 Tristan Gingold <gingold@adacore.com>
4659 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
4660 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
4661 system-linux-hppa.ads, system-linux-s390.ads,
4662 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
4663 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
4664 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
4665 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
4666 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
4667 system-solaris-sparc.ads, system-lynxos-x86.ads,
4668 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
4669 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
4670 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
4671 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
4672 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
4673 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
4674 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
4675 * opt.ads: Adjust comment.
4676 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
4677 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
4678 * system.ads: Move GCC_ZCX_Support to obsolete entries.
4680 2011-08-29 Emmanuel Briot <briot@adacore.com>
4682 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
4683 file name is specified on the gnatmake or gprbuild command line, and
4684 before we search for that file in the project.
4686 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4688 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
4689 used to determine whether a possible interpretation for an overloadable
4690 entity is declared within the current instantiation and should be
4691 included in the candidate set.
4693 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4695 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
4697 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4699 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
4700 access subtype is access_to_subprogram, when applying checks for
4703 2011-08-29 Matthew Heaney <heaney@adacore.com>
4705 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
4706 for sibling when common parent.
4708 2011-08-29 Thomas Quinot <quinot@adacore.com>
4710 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
4713 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4715 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
4716 for the return type when in ASIS mode.
4718 2011-08-29 Vincent Celier <celier@adacore.com>
4720 * make.adb (Gnatmake): Get the default search dirs, then the target
4721 parameters after getting the Builder switches, as the Builder switches
4722 may include --RTS= and that could change the default search dirs.
4724 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4726 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
4727 Make_Final_Call. Move the processing for class-wide types before the
4728 processing for derivations from [Limited_]Controlled.
4729 (Make_Final_Call): Move the processing for class-wide types before the
4730 processing for derivations from [Limited_]Controlled.
4731 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
4732 Add code to account for alignments larger than the list header. Add a
4733 comment illustrating the structure of the allocated object + padding +
4735 (Deallocate_Any_Controlled): Add code to account for alignments larger
4736 than the list header.
4738 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4740 * sinfo.ads, sinfo.adb: New node kind
4741 N_Formal_Incomplete_Type_Definition, related flags.
4742 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
4743 Parse formal incomplete types.
4744 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
4746 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
4747 Formal incomplete types do not need completion.
4748 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
4749 Validate_Incomplete_Type_Instance): New procedures to handle formal
4751 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
4752 that corresponds to a formal incomplete type.
4753 * sprint.adb: Handle formal incomplete type declarations.
4754 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
4757 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4759 * a-fihema.ads, a-fihema.adb: Unit removed.
4760 * a-undesu.ads, a-undesu.adb: New unit implementing
4761 Ada.Unchecked_Deallocate_Subpool.
4762 * einfo.adb: Remove Associated_Collection from the node usage.
4763 Add Finalization_Master to the node usage.
4764 (Associated_Collection): Removed.
4765 (Finalization_Master): New routine.
4766 (Set_Associated_Collection): Removed.
4767 (Set_Finalization_Master): New routine.
4768 (Write_Field23_Name): Remove Associated_Collection from the output. Add
4769 Finalization_Master to the output.
4770 * einfo.ads: Remove attribute Associated_Collection and its uses in
4772 Add new attribute Finalization_Master along with its uses in entitites.
4773 (Associated_Collection): Removed along with its pragma import.
4774 (Finalization_Master): New routine along with a pragma import.
4775 (Set_Associated_Collection): Removed along with its pragma import.
4776 (Set_Finalization_Master): New routine along with a pragma import.
4777 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
4778 Build_Finalization_Collection with Build_Finalization_Master.
4779 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
4780 before the bodies of the predefined routines. Add comment explaining
4781 this. Replace call to Build_Finalization_Collection with
4782 Build_Finalization_Master.
4783 (Freeze_Type): Replace call to Build_Finalization_Collection with
4784 Build_Finalization_Master.
4785 (Make_Finalize_Address_Body): Comment reformatting.
4786 (Make_Predefined_Primitive_Specs): Code reformatting.
4787 (Stream_Operation_OK): Update comment mentioning finalization
4788 collections. Replace RE_Finalization_Collection with
4789 RE_Finalization_Master.
4790 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
4791 Associated_Collection with Finalization_Master. Replace call to
4792 Build_Finalization_Collection with Build_Finalization_Master.
4793 (Expand_Allocator_Expression): Replace call to Associated_Collection
4794 with Finalization_Master. Replace call to Set_Associated_Collection with
4795 Set_Finalization_Master. Remove the generation of
4796 Set_Finalize_Address_Ptr.
4797 (Expand_N_Allocator): Replace call to Associated_Collection with
4798 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
4799 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
4800 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
4801 comment on usage. Replace call to Needs_BIP_Collection with
4802 Needs_BIP_Finalization_Master Remplace BIP_Collection with
4803 BIP_Finalization_Master. Update all comments which mention finalization
4804 collections. Replace Associated_Collection with
4805 Finalization_Master. Replace Build_Finalization_Collection with
4806 Build_Finalization_Master.
4807 (BIP_Formal_Suffix): Update BIP_Collection's case.
4808 (Build_Heap_Allocator): Update the related comment. Rename local
4809 variable Collect to Fin_Mas_Id and update its occurrences. Update
4810 comments which mention finalization collections. Replace
4811 Set_Associated_Collection with Set_Finalization_Master.
4812 (Expand_Call): Update the code which detects a special piece of library
4814 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
4815 Add_Collection_Actual_To_Build_In_Place_Call with
4816 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
4817 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
4818 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
4819 Add_Collection_Actual_To_Build_In_Place_Call with
4820 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4821 (Make_Build_In_Place_Call_In_Assignment): Replace call to
4822 Add_Collection_Actual_To_Build_In_Place_Call with
4823 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4824 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4825 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
4826 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4827 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
4828 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
4829 Replace call to Set_Associated_Collection with Set_Finalization_Master.
4830 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
4831 Replace the call to Associated_Collection with Finalization_Master.
4832 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
4833 Update the way finalization master names are generated. Update the
4834 retrieval of the correct access type which will carry the pool and
4836 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
4837 (Make_Finalize_Address_Body): Abstract types do not need
4838 Finalize_Address. Code reformatting.
4839 (Make_Finalize_Address_Stmts): Update comment on usage.
4840 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4841 (Process_Declarations): Update comments.
4842 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
4843 Build_Finalization_Master. Update associated comment.
4844 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4845 * exp_ch13.adb: Update comments which mention finalization collections.
4846 (Expand_N_Free_Statement): Replace the call to Associated_Collection
4847 with Finalization_Master.
4848 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
4849 create calls to routines Allocate_Any_Controlled and
4850 Deallocate_Any_Controlled.
4851 (Find_Finalize_Address): New routine.
4852 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
4854 (Requires_Cleanup_Actions): Update the comment on freeze node
4856 * exp_util.ads: Remove comment on generated code for
4857 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
4858 is better to simply look in the body.
4859 * freeze.adb (Freeze_All): Update the comment of finalization
4860 collections. Replace the call to Associated_Collection with
4861 Finalization_Master. Replace the call to Build_Finalization_Collection
4862 with Build_Finalization_Master.
4863 * impunit.adb: Add a-undesu and s-stposu to the list of units.
4864 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
4866 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
4867 Ada.Finalization. Add processing for children of System.Storage_Pools.
4868 * rtsfind.ads: Remove the naming of second level children of
4870 Remove Ada_Finalization_Heap_Management from the list of units.
4871 Remove subtype Ada_Finalization_Child.
4872 Remove the following subprogram entities:
4876 RE_Finalization_Collection
4877 RE_Finalization_Collection_Ptr
4878 RE_Set_Finalize_Address_Ptr
4880 Add the naming of second level children of System.Storage_Pools.
4881 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
4883 Add subtype System_Storage_Pools_Child.
4884 Add the following subprogram entities to System.Finalization_Masters:
4886 RE_Finalization_Master
4887 RE_Finalization_Master_Ptr
4889 Add the following subprogram entities to System.Storage_Pools.Subpools:
4891 RE_Allocate_Any_Controlled
4892 RE_Deallocate_Any_Controlled
4893 RE_Root_Storage_Pool_With_Subpools
4897 Move the following subprogram entities from
4898 Ada.Finalization.Heap_Management to System.Finalization_Masters:
4900 RE_Add_Offset_To_Address
4905 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
4906 Set_Associated_Collection with Set_Finalization_Master.
4907 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
4908 BIP_Finalization_Master is created.
4909 * s-finmas.adb: New unit System.Finalization_Masters.
4910 * s-finmas.ads: New unit System.Finalization_Masters.
4911 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
4912 * s-stposu.ads, s-stposu.adb: New unit implementing
4913 System.Storage_Pools.Subpools.
4915 2011-08-29 Bob Duff <duff@adacore.com>
4917 * tbuild.adb: Add assertion.
4919 2011-08-29 Thomas Quinot <quinot@adacore.com>
4921 * s-pooglo.adb: Minor reformatting.
4923 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4925 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
4926 an indexed component of a packed array whose element type is a record
4927 with a representation clause different from that of the right-hand
4928 side, generate a temporary to minimuze the number of bit-field
4929 operations generated.
4931 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4933 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
4934 declarations, and thus are likely insertion points for actions.
4936 2011-08-29 Bob Duff <duff@adacore.com>
4938 * einfo.ads: Minor comment fix.
4940 2011-08-29 Robert Dewar <dewar@adacore.com>
4942 * frontend.adb, gnat1drv.adb: Minor reformatting.
4944 2011-08-29 Tristan Gingold <gingold@adacore.com>
4946 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
4947 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
4948 space in front of the header.
4950 2011-08-29 Johannes Kanig <kanig@adacore.com>
4952 * frontend.adb (Frontend): Exit after creating Standard package when
4953 -gnatd.H is present.
4954 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
4957 2011-08-29 Robert Dewar <dewar@adacore.com>
4959 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
4960 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
4961 snames.ads-tmpl: Minor reformatting.
4963 2011-08-29 Philippe Gil <gil@adacore.com>
4965 * prj.adb (Reset_Units_In_Table): New procedure.
4966 Reset units to avoid access to freed memory.
4968 2011-08-29 Thomas Quinot <quinot@adacore.com>
4970 * get_scos.adb: When reading a P statement SCO without a pragma name
4971 (from an older ALI file), ensure that the Pragma_Name component is set
4972 to Unknown_Pragma (not left uninitialized).
4974 2011-08-29 Vincent Celier <celier@adacore.com>
4976 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
4977 modified to compute correctly the object path of a SAL project that is
4978 extending another library project.
4979 (Write_Path_File): New procedure.
4980 * makeutl.ads (Directories): New table moved from Buildgpr
4981 (Get_Directories): New procedure moved from Buildgpr
4982 (Write_Path_File): New procedure
4983 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
4984 paths before binding SALs, instead of Set_Ada_Paths.
4985 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
4987 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
4988 (Current_Source_Path_File_Of): New function
4989 (Set_Current_Object_Path_File_Of): New procedure
4990 (Current_Source_Object_File_Of): New function
4991 (Set_Current_Object_Path_File_Of): New procedure
4992 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
4993 (Current_Source_Path_File_Of): New function
4994 (Set_Current_Object_Path_File_Of): New procedure
4995 (Current_Source_Object_File_Of): New function
4996 (Set_Current_Object_Path_File_Of): New procedure
4998 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5000 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5001 packed entity, use a bit-field assignment only if there is no change of
5004 2011-08-29 Thomas Quinot <quinot@adacore.com>
5006 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5007 Is_RTU instead of using Chars comparisons.
5009 2011-08-29 Thomas Quinot <quinot@adacore.com>
5011 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5012 temporary object if the actual is constrained, and the discriminants
5013 read from the stream don't match.
5015 2011-08-29 Tristan Gingold <gingold@adacore.com>
5017 * sem_attr.adb, exp_attr.adb: Add handling of
5018 Attribute_System_Allocator_Alignment
5019 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5020 Attribute_System_Allocator_Alignment.
5021 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5022 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5023 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5024 get_target_system_allocator_alignment.
5026 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5028 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5031 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5033 * exp_ch3.adb (In_Runtime): Fix typo.
5035 2011-08-29 Bob Duff <duff@adacore.com>
5037 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5039 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5041 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5042 and a separate tag assignment is generated, ensure that the tag
5043 assignment is analyzed.
5045 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5047 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5048 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5049 of statement lists that may contain local declarations.
5050 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5051 duplicate the triggering statements needed for the expansion of this
5052 construct, when the trigger is a dispatching call to a synchronized
5055 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5057 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5058 * bindgen.adb: Add comments.
5059 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5062 2011-08-29 Robert Dewar <dewar@adacore.com>
5064 * exp_attr.adb: Minor reformatting.
5065 Minor code reorganization and commenting.
5066 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5069 2011-08-29 Thomas Quinot <quinot@adacore.com>
5071 * get_scos.adb: Ignore chaining indicators not currently supported
5074 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5076 * system.ads: Minor editing.
5078 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5080 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5082 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5083 Attribute_Elab_Subp_Body.
5084 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5085 * sem_util.adb: Update comments.
5087 2011-08-29 Thomas Quinot <quinot@adacore.com>
5089 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5090 pragma name for each SCO statement corresponding to a pragma.
5092 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5094 * opt.ads: Minor editing.
5096 2011-08-29 Yannick Moy <moy@adacore.com>
5098 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5099 that only made sense for CodePeer mode.
5101 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5103 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5104 which is no longer used.
5105 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5106 handling of the 64-bit division check.
5107 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5109 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5112 2011-08-29 Thomas Quinot <quinot@adacore.com>
5114 * get_scos.adb: Minor reformatting.
5116 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5118 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5119 statement list is wrapped in a block, the block is explicitly analyzed
5120 in order to properly redecorate the entities and create a servicing
5123 2011-08-29 Tristan Gingold <gingold@adacore.com>
5125 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5126 (Set_Zero_Cost_Handling): Remove.
5128 2011-08-29 Thomas Quinot <quinot@adacore.com>
5130 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5132 2011-08-29 Geert Bosch <bosch@adacore.com>
5134 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5135 instruction, as the latter may produce -0.0, which is not a valid VAX
5137 (Neg_G): Likewise for VAX F float.
5139 2011-08-29 Robert Dewar <dewar@adacore.com>
5141 * exp_util.adb: Minor reformatting.
5143 2011-08-29 Yannick Moy <moy@adacore.com>
5145 * sem_ch3.adb: Minor comment update.
5147 2011-08-29 Thomas Quinot <quinot@adacore.com>
5149 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5152 2011-08-29 Thomas Quinot <quinot@adacore.com>
5154 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5155 current statement sequence on a generic instantiation or a subprogram
5158 2011-08-29 Robert Dewar <dewar@adacore.com>
5160 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5163 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5165 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5166 Correct the check which involves the freeze node of a controlled or
5167 access-to-controlled type.
5169 2011-08-29 Geert Bosch <bosch@adacore.com>
5171 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5173 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5176 2011-08-29 Yannick Moy <moy@adacore.com>
5178 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5179 for every index type and component type that is not a subtype_mark.
5180 (Process_Subtype): Set Etype of subtype.
5182 2011-08-29 Robert Dewar <dewar@adacore.com>
5184 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5185 reorganization. Minor reformatting.
5187 2011-08-29 Steve Baird <baird@adacore.com>
5189 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5190 for CodePeer and ALFA modes.
5192 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5194 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5195 that comes from an enclosing scope if it is not the renaming of an
5196 actual, to handle properly a spurious ambiguity in an instance.
5198 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5200 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5201 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5202 use it instead of the Esize of the first parameter.
5203 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5205 <Size>: Likewise. Call it for composite types on the RM size.
5207 2011-08-29 Yannick Moy <moy@adacore.com>
5209 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5210 * sem_util.adb (Unique_Name): Correct behaviour for names of
5213 2011-08-29 Yannick Moy <moy@adacore.com>
5215 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5216 verification mode, analyze pragma expression for correctness, for
5217 pre/post on library-level subprogram, as it is not expanded later.
5219 2011-08-29 Yannick Moy <moy@adacore.com>
5221 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5222 in formal verification.
5224 2011-08-29 Thomas Quinot <quinot@adacore.com>
5226 * sem_util.adb: Minor reformatting.
5227 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5229 * par_sco.ads, par_sco.adb: Update comments.
5231 2011-08-29 Yannick Moy <moy@adacore.com>
5233 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5234 associated getter/setter.
5235 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5237 2011-08-29 Vincent Celier <celier@adacore.com>
5239 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5240 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5241 with declarations for Language_Kind and Dependency_Kind for Ada.
5242 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5243 (Process_Compiler): Take into account the new attributes Dependency_Kind
5245 (Check_Configuration): Check if language kind is unit based, not if the
5246 language name is Ada.
5247 (Process_Exceptions_Unit_Based): Ditto
5248 (Add_Language): Remove default additions of language and dependency kind
5249 * prj.ads: Minor comment change
5250 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5252 2011-08-29 Johannes Kanig <kanig@adacore.com>
5254 * debug.adb: Update comments.
5256 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5258 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5259 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5260 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5261 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5262 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5264 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5266 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5267 (GNATLIBCFLAGS_FOR_C): Replace
5268 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5269 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5270 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5271 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5273 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5275 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5277 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5279 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5281 2011-08-05 Nicolas Roche <roche@adacore.com>
5283 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5284 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5286 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5288 2011-08-05 Matthew Heaney <heaney@adacore.com>
5290 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5291 subprogram bodies declared out-of-order.
5293 2011-08-05 Yannick Moy <moy@adacore.com>
5295 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5296 entities directly in package Standard, otherwise skip the standard
5299 2011-08-05 Robert Dewar <dewar@adacore.com>
5301 * a-cbmutr.adb: Minor reformatting
5302 (Allocate_Node): refactor node allocation algorithm
5304 2011-08-05 Robert Dewar <dewar@adacore.com>
5306 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5307 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5309 (Analyze_Pragma, case Check_Policy): Ditto.
5310 * sem_prag.ads (Check_Disabled): New function
5311 * snames.ads-tmpl: Add Name_Disable.
5313 2011-08-05 Robert Dewar <dewar@adacore.com>
5315 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5316 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5318 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5320 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5321 that appears in a generic formal part and applies to a formal
5324 2011-08-05 Robert Dewar <dewar@adacore.com>
5326 * a-cbmutr.ads: Minor reformatting.
5328 2011-08-05 Matthew Heaney <heaney@adacore.com>
5330 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5331 to check count, check sign of value instead.
5332 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5333 (Copy_Subtree): allocate copy of source element
5334 (Equal_Subtree): compare elements, not access objects
5336 2011-08-05 Vincent Celier <celier@adacore.com>
5338 * gnat_ugn.texi: Fix VMS alternative.
5340 2011-08-05 Thomas Quinot <quinot@adacore.com>
5342 * sem_ch11.adb: Add comment.
5344 2011-08-05 Robert Dewar <dewar@adacore.com>
5346 * exp_util.adb: Minor comment fix.
5348 2011-08-05 Robert Dewar <dewar@adacore.com>
5350 * scng.adb (Error_Unterminated_String): Improve flag position when
5353 2011-08-05 Matthew Heaney <heaney@adacore.com>
5355 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5357 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5358 multiway tree containers.
5360 2011-08-05 Robert Dewar <dewar@adacore.com>
5362 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5363 * stylesw.adb: Implement -gnatyC to control comment spacing
5364 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5366 * usage.adb: Add line for -gnatyC.
5368 2011-08-05 Robert Dewar <dewar@adacore.com>
5370 * gnat_ugn.texi: Document -gnatyC.
5371 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5372 synonym for COMMENTS2).
5374 2011-08-05 Robert Dewar <dewar@adacore.com>
5376 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5377 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5378 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5379 a-comutr.ads, lib-xref.adb: Minor reformatting.
5381 2011-08-05 Robert Dewar <dewar@adacore.com>
5383 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5384 warning if there is an exception handler present.
5386 2011-08-05 Pascal Obry <obry@adacore.com>
5388 * a-iteint.ads: Fix copyright year.
5390 2011-08-05 Thomas Quinot <quinot@adacore.com>
5392 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5393 statement SCO for a USE clause or a representation clause.
5395 2011-08-05 Yannick Moy <moy@adacore.com>
5397 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5398 between body and spec for stub.
5399 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5400 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5401 pragma precondition or postcondition, for which the enclosing
5402 subprogram or package in the AST is not the desired one, return empty.
5404 2011-08-05 Thomas Quinot <quinot@adacore.com>
5406 * g-expect.adb: Minor reformatting.
5408 2011-08-05 Bob Duff <duff@adacore.com>
5410 * a-fihema.adb: Comment out OS_Lib.
5412 2011-08-05 Matthew Heaney <heaney@adacore.com>
5414 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5415 (unbounded multiway tree containers) and a-iteint.ads.
5416 * a-comutr.ads, a-comutr.adb:
5417 This is the new Ada 2012 unit for unbounded multiway tree containers
5418 * a-cimutr.ads, a-cimutr.adb
5419 This is the new Ada 2012 unit for indefinite multiway tree containers
5420 * a-iteint.ads: New file.
5422 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5424 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5426 2011-08-05 Bob Duff <duff@adacore.com>
5428 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5430 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5432 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5434 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5435 general indexing aspects of Ada2012. Called when analyzing indexed
5436 components when other interpretations fail.
5437 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5438 in an expression context where overloading is meaningful. This excludes
5439 the occurrence in an aspect specification (efficiency only).
5440 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5441 related to iterators can be set by an attribute specification, but
5443 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5444 Constant_Indexing and Variable_Indexing.
5445 (Check_Indexing_Functions): New procedure to perform legality checks.
5446 Additional semantic checks at end of declarations.
5448 2011-08-05 Sergey Rybin <rybin@adacore.com>
5450 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5451 order of calling Tree_Write/Tree_Read routines made for aspects.
5453 2011-08-05 Bob Duff <duff@adacore.com>
5455 * a-fihema.adb (Finalize): Fix race condition.
5457 2011-08-05 Yannick Moy <moy@adacore.com>
5459 * sem_ch12.adb (Analyze_Package_Instantiation,
5460 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5463 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5465 * sem_type.adb (Specific_Type): in an instance, the type-specific
5466 operand of an equality check that involves null may have a private
5467 type. Use full view to determine legality of construct.
5469 2011-08-05 Vincent Celier <celier@adacore.com>
5471 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5472 delete or close the file when the call to gnatmake was successful.
5474 2011-08-05 Yannick Moy <moy@adacore.com>
5476 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5477 Global_Discard_Names.
5479 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5481 * sinfo.ads: comments on use of entity field for aspect specifications.
5483 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5485 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5486 node is not itself an entity but a selected component, it is a
5487 rewritten parameterless call to an en enclosing synchronized operation,
5488 and this expansion will be performed again in the instance, so there is
5489 no global information to preserve.
5491 2011-08-05 Javier Miranda <miranda@adacore.com>
5493 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5494 for renamings of predefined primitives.
5495 (In_Predef_Prims_DT): New subprogram.
5497 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5499 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5500 possible interpretation of name is a reference type, add an
5501 interpretation that is the designated type of the reference
5502 discriminant of that type.
5503 * sem_res.adb (resolve): If the interpretation imposed by context is an
5504 implicit dereference, rewrite the node as the deference of the
5505 reference discriminant.
5506 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
5507 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
5508 parent type or base type.
5509 * sem_ch4.adb (Process_Indexed_Component,
5510 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
5511 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
5512 Check for implicit dereference.
5513 (List_Operand_Interps): Indicate when an implicit dereference is
5515 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
5517 2011-08-05 Thomas Quinot <quinot@adacore.com>
5519 * scos.ads: Update documentation of SCO table. Pragma statements can now
5520 be marked as disabled (using 'p' instead of 'P' as the statement kind).
5521 * par_sco.ads, par_sco.adb: Implement the above change.
5522 (Process_Decisions_Defer): Generate a P decision for the first parameter
5523 of a dyadic pragma Debug.
5524 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
5526 * put_scos.adb: Code simplification based on above change.
5528 2011-08-05 Robert Dewar <dewar@adacore.com>
5530 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
5531 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5532 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
5533 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
5535 2011-08-05 Bob Duff <duff@adacore.com>
5537 * a-stunau.ads, g-spipat.adb: Update comments.
5539 2011-08-05 Bob Duff <duff@adacore.com>
5541 * a-fihema.ads: Minor comment fix.
5542 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
5544 (Attach, Detach): Remove some unnecessary code.
5545 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
5547 2011-08-05 Bob Duff <duff@adacore.com>
5549 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
5550 allocation for Objects component. This simplifies the code somewhat. It
5551 is also a little more efficient in the not-so-unusual case where there
5552 are no controlled objects allocated.
5553 Make Finalization_Started flag atomic.
5554 (Finalize): Avoid unnecessary detachment of items from the list.
5555 (pcol): Minor cleanup.
5557 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5559 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
5560 package whose name is the same as that of the generic unit, or its
5563 2011-08-05 Bob Duff <duff@adacore.com>
5565 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
5566 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
5567 Minor comment fixes.
5569 2011-08-05 Arnaud Charlet <charlet@adacore.com>
5571 * make.adb (Linking_Phase): No longer need to set source search path
5572 before calling gnatlink in CodePeer mode.
5573 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
5574 gcc in CodePeer mode, since the binder generated file no longer has a
5576 * switch.ads, switch.adb (Is_Language_Switch): Removed.
5577 * switch-c.adb: Update comment.
5579 2011-08-05 Thomas Quinot <quinot@adacore.com>
5581 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
5583 2011-08-05 Nicolas Roche <roche@adacore.com>
5585 * gnat_ugn.texi: Fix minor syntax error issue.
5587 2011-08-05 Vincent Celier <celier@adacore.com>
5589 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5590 delete or close the file when the call to gnatmake returns a non
5591 successful return code.
5593 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5595 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
5596 check, indicate that the copy of the original node does not come from
5597 source, to prevent an infinite recursion of the expansion.
5599 2011-08-05 Johannes Kanig <kanig@adacore.com>
5601 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
5602 VC generation for subprogram bodies.
5604 2011-08-05 Yannick Moy <moy@adacore.com>
5607 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
5608 the base type with the smallest allowed base type.
5610 2011-08-05 Sergey Rybin <rybin@adacore.com>
5612 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
5615 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5617 * sem_ch12.ads: minor comment updates.
5619 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5621 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
5622 instantiation and a formal package the compiler generates a package
5623 renaming declaration so that the generic name within the declaration
5624 is interpreted as a renaming of the instance. At the end of a formal
5625 package declaration, this renaming must become invisible.
5627 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5629 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
5630 comparison and rely on concrete entities instead.
5632 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5634 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
5635 and discriminants, to indicate that the type has an access discriminant
5636 that supports implicit dereference.
5637 * snames.ads-tmpl: Add names of aspects and attributes related to
5638 Ada2012 iterators: constant_indexing, default_iterator,
5639 iterator_element, implicit_dereference, variable_indexing.
5640 * aspects.ads, aspects.adb: entries for iterator-related aspects.
5641 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
5642 iterator-related aspects.
5643 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
5645 2011-08-05 Sergey Rybin <rybin@adacore.com>
5647 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
5648 metrics in gnatmetric to cover new kinds of coupling mentrics.
5650 2011-08-05 Steve Baird <baird@adacore.com>
5652 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
5653 of calling the user-defined main subprogram.
5654 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
5655 is set) Call_Main_Subprogram ahead of, as opposed to
5657 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
5658 generation of a "with" of the user-defined main subprogram.
5659 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
5660 (which is now called from Gen_Main instead).
5662 2011-08-05 Emmanuel Briot <briot@adacore.com>
5664 * projects.texi: Added reference to the Makefile package.
5666 2011-08-05 Thomas Quinot <quinot@adacore.com>
5668 * exp_ch7.adb: Minor comment rewording.
5670 2011-08-05 Ed Falis <falis@adacore.com>
5672 * env.c: Fix comment.
5674 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5676 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
5677 character comparison and rely on concrete entities instead.
5679 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5681 * sem_ch3.adb: (Check_Private_Overriding): better error message,
5682 suggested by AI95-0068.
5684 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5686 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
5687 the two potential initialization calls. This accounts for any
5688 access-before-elaboration checks which may precede the initialization
5690 (Next_Suitable_Statement): New routine. Returns the next real statement
5691 after the input node while skipping generated checks.
5692 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
5693 with comment on usage.
5694 Do not generate Elaborate_All when the trigger is a finalization call
5695 coming from a type init proc.
5696 (Check_Elab_Call): Propagate the initialization procedure context to
5697 subsequent calls to Check_A_Call.
5698 (Check_Internal_Call_Continue): Propagate the initialization procedure
5699 context to subsequent calls to Check_Elab_Call.
5700 (Is_Finalization_Procedure): New routine. Returns True if the input
5701 entity denotes a [Deep_]Finalize routine.
5702 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
5703 along with comment on usage.
5705 2011-08-05 Vadim Godunko <godunko@adacore.com>
5707 * s-atocou.ads: Add list of supported platforms.
5709 2011-08-05 Yannick Moy <moy@adacore.com>
5711 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
5713 * opt.ads (Disable_ALI_File): new Boolean flag
5714 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
5716 2011-08-05 Ed Falis <falis@adacore.com>
5718 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
5719 environ is properly defined.
5721 2011-08-05 Vincent Celier <celier@adacore.com>
5723 * make.adb (Compilation_Phase): Exit immediately when all objects have
5724 been found up to date, to avoid multiple exit messages.
5725 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
5726 same project for languages with no compiler.
5727 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
5729 2011-08-05 Robert Dewar <dewar@adacore.com>
5731 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
5732 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
5733 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
5734 s-atocou-builtin.adb: Minor reformatting.
5736 2011-08-05 Yannick Moy <moy@adacore.com>
5738 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
5739 if the node to wrap is a pragma check, this node and enclosed
5740 expression are not expanded, so do not apply any transformations here.
5741 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
5742 introducing transient scopes.
5744 2011-08-05 Jose Ruiz <ruiz@adacore.com>
5746 * adaint.c (__gnat_set_writable, __gnat_set_readable,
5747 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
5748 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
5749 routine is available, so we use the default implementation of these
5751 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
5752 support for copying attributes on VxWorks 6.
5754 2011-08-05 Yannick Moy <moy@adacore.com>
5756 * debug.adb: Remove use of -gnatd.D.
5757 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
5758 * opt.ads: Simplify variables for ALFA mode, to keep one only
5759 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
5762 2011-08-05 Vincent Celier <celier@adacore.com>
5764 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
5765 Builder'Default_Switches.
5767 2011-08-05 Vincent Celier <celier@adacore.com>
5769 * makeusg.adb: Add lines for --create-map-file switches.
5771 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5773 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
5774 profile is incomplete and the full view is available, replace it with
5776 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
5777 incomplete, freezing the subprogram is delayed until the full view is
5779 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
5780 fixed-point multiplication operator and the predefined operator is
5781 resolved in favor of the user-defined one.
5783 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5785 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
5788 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5790 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
5791 whether a type lacks user-defined Read or Write operations, or has a
5792 component that lacks them.
5793 * sem_attr.adb (Check_Stream_Attribute): if restriction
5794 No_Default_Stream_Attributes is active, verify that all subcomponent
5795 types of the target have user-defined stream operations, and report
5797 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
5798 * exp_strm.adb: Build_Elementary_Input_Call,
5799 Build_Elementary_Write_Call): remove checks for restriction
5800 No_Default_Stream_Attributes, now checked in semantics.
5802 2011-08-04 Vincent Celier <celier@adacore.com>
5804 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
5805 switches on the command line, look for all valid --RTS switches in the
5806 Builder switches and for each language use the first runtime name found
5807 to invoke gprconfig.
5808 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
5809 command line and there is no auto-configuration.
5810 (Runtime_Name_Set_For): New function.
5812 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5814 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
5815 elaborate initialization expression for variable Abort when processing
5816 a package body or a declaration.
5817 (Create_Finalizer): Propagate the package context when creating the
5818 exception-related variables.
5819 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
5820 For_Package along with usage comment.
5822 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5824 * gcc-interface/Makefile.in: Clean up targets.
5825 Enable new package for atomic counters and copy-on-write implementation
5826 of unbounded strings on x86 platforms.
5827 * gcc-interface/Make-lang.in: Update dependencies.
5829 2011-08-04 Robert Dewar <dewar@adacore.com>
5831 * exp_ch7.adb: Minor reformatting.
5833 2011-08-04 Robert Dewar <dewar@adacore.com>
5835 * exp_strm.adb: Minor reformatting.
5837 2011-08-04 Vadim Godunko <godunko@adacore.com>
5839 * s-atocou.adb: Replace by dummy version and use on targets where atomic
5840 operations are not supported.
5841 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
5842 * s-atocou-x86.adb: New file.
5843 * Makefile.rtl: Add s-atocou.o file
5845 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5847 * make.adb (Compile): Move setting of CodePeer_Mode to ...
5848 (Compilation_Phase): ... here.
5849 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
5851 2011-08-04 Thomas Quinot <quinot@adacore.com>
5853 * Make-generated.in: Fix minor typo in comment.
5855 2011-08-04 Thomas Quinot <quinot@adacore.com>
5857 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
5860 2011-08-04 Robert Dewar <dewar@adacore.com>
5862 * a-coinho.adb: Minor reformatting.
5864 2011-08-04 Robert Dewar <dewar@adacore.com>
5866 * a-coinho.ads: Minor reformatting.
5868 2011-08-04 Vadim Godunko <godunko@adacore.com>
5870 * s-atocou.ads, s-atocou.adb: New files.
5871 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
5872 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
5873 direct use of GCC's atomic builtins and replace them by use of new
5874 atomic counter package.
5876 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5878 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
5880 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5882 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
5883 with a call to Get_External_Tag.
5884 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
5885 subprogram usage. Remove the guard against package declarations and
5886 bodies since Build_Cleanup_Statements is no longer invoked in that
5888 (Build_Components): Initialize Tagged_Type_Stmts when the context
5889 contains at least one library-level tagged type.
5890 (Build_Finalizer): New local variables Has_Tagged_Types and
5891 Tagged_Type_Stmts along with associated comments on usage. Update the
5892 logic to include tagged type processing.
5893 (Create_Finalizer): Insert all library-level tagged type unregistration
5894 code before the jump block circuitry.
5895 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
5896 (Expand_N_Package_Declaration): Remove the call to
5897 Build_Cleanup_Statements.
5898 (Process_Tagged_Type_Declaration): New routine. Generate a call to
5899 unregister the external tag of a tagged type.
5900 (Processing_Actions): Reimplemented to handle tagged types.
5901 (Process_Declarations): Detect the declaration of a library-level
5902 tagged type and carry out the appropriate actions.
5903 (Unregister_Tagged_Types): Removed. The machinery has been directly
5904 merged with Build_Finalizer.
5906 2011-08-04 Robert Dewar <dewar@adacore.com>
5908 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
5909 gnatls.adb, exp_ch3.adb: Minor reformatting.
5911 2011-08-04 Marc Sango <sango@adacore.com>
5913 * sem_attr.adb (Analyze_Attribute): Replace the message
5914 "invisible attribute of}" of the spark restriction violation in
5915 attribute reference by the simple message "invisible attribute of type".
5916 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
5917 two insertion characters: '&' and '}'.
5919 2011-08-04 Vadim Godunko <godunko@adacore.com>
5921 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
5922 * a-coinho.ads, a-coinho.adb: New file.
5923 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
5925 2011-08-04 Nicolas Roche <roche@adacore.com>
5927 * alfa_test.adb: Not all ali files are containing alfa information even
5928 if compiled with -gnatd.F. So suppress warning about missing ALFA
5931 2011-08-04 Yannick Moy <moy@adacore.com>
5933 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
5935 * put_alfa.adb: Check that scope name is not empty.
5937 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5939 * exp_ch3.adb (Stream_Operation_Ok): new predicate
5940 Needs_Elementary_Stream_Operation, to determine whether user-defined
5941 Read and Write attributes are available for the elementary components
5942 of the given type. If only the predefined attributes are available,
5943 then when restriction No_Default_Stream_Attributes is active the
5944 predefined stream attributes for the composite type cannot be created.
5946 2011-08-04 Robert Dewar <dewar@adacore.com>
5948 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
5949 Put routines in alpha order
5951 2011-08-04 Jose Ruiz <ruiz@adacore.com>
5953 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
5954 * gcc-interface/Make-lang.in: Update dependencies.
5956 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5958 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
5959 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
5962 2011-08-04 Robert Dewar <dewar@adacore.com>
5964 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
5965 lib-xref-alfa.adb: Minor reformatting.
5967 2011-08-04 Marc Sango <sango@adacore.com>
5969 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
5970 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
5971 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
5974 2011-08-04 Tristan Gingold <gingold@adacore.com>
5976 * bindgen.adb (Gen_Adainit_C): Remove.
5977 (Gen_Adafinal_C): Ditto.
5978 (Gen_Elab_Externals_C): Ditto.
5979 (Gen_Elab_Calls_C): Ditto.
5980 (Gen_Elab_Order_C): Ditto.
5981 (Gen_Elab_Defs_C): Ditto.
5982 (Gen_Finalize_Library_C): Ditto.
5983 (Gen_Finalize_Library_Defs_C): Ditto.
5984 (Gen_Main_C): Ditto.
5985 (Gen_Output_File_C): Ditto.
5986 (Gen_Restrictions_C): Ditto.
5987 (Gen_Versions_C): Ditto.
5988 (Write_Info_Ada_C): Ditto.
5989 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
5990 (Gen_Output_File): Do not force Ada_Bind_File anymore.
5991 Always call Gen_Output_File_Ada.
5992 * gnatlink.adb (Begin_Info): Now a constant.
5994 (Ada_Bind_File): Remove
5995 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
5996 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
5997 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
5998 * opt.ads (Ada_Bind_File): Remove.
6000 2011-08-04 Thomas Quinot <quinot@adacore.com>
6002 * projects.texi: Document target-specific directory in default project
6005 2011-08-04 Thomas Quinot <quinot@adacore.com>
6007 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6010 2011-08-04 Yannick Moy <moy@adacore.com>
6012 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6013 opt.ads, lib-xref.ads: Code clean up.
6015 2011-08-04 Yannick Moy <moy@adacore.com>
6017 * gnat_rm.texi: Update description of Test_Case
6018 * gnat_ugn.texi: Typo.
6020 2011-08-04 Ed Falis <falis@adacore.com>
6022 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6024 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6026 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6027 it is of type Root_Controlled. This action eliminates fields Prev and
6028 Next from type equality.
6030 2011-08-04 Yannick Moy <moy@adacore.com>
6032 * lib-xref-alfa.adb: Correct typo.
6034 2011-08-04 Matthew Heaney <heaney@adacore.com>
6036 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6039 2011-08-04 Yannick Moy <moy@adacore.com>
6041 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6042 (Analyze_Pragma): allow static string expression for name of Test_Case,
6043 instead of simply string literals.
6044 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6047 2011-08-04 Vincent Celier <celier@adacore.com>
6049 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6050 case suffixes to find truncated main sources.
6052 2011-08-04 Tristan Gingold <gingold@adacore.com>
6054 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6055 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6056 (Compute_Current_Task): Ditto.
6058 2011-08-04 Tristan Gingold <gingold@adacore.com>
6060 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6062 2011-08-04 Yannick Moy <moy@adacore.com>
6064 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6065 library-level constant.
6066 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6067 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6068 used as selector of parameter association, in ALFA mode.
6070 2011-08-04 Robert Dewar <dewar@adacore.com>
6072 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6073 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6076 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6078 * make.adb (Linking_Phase): Set source search path before calling
6079 gnatlink in CodePeer mode.
6081 2011-08-04 Javier Miranda <miranda@adacore.com>
6083 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6084 Remove code which takes care of building TSDs.
6085 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6086 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6087 the accessibility check in VM targets.
6088 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6089 (Building_Static_DT): Now returns false for VM targets.
6090 (Build_VM_TSDs): Removed.
6091 (Expand_Interface_Conversion): Generate missing runtime check for
6092 conversions to interface types whose target type is unknown at compile
6094 (Make_VM_TSD): Add missing code to disable the generation of calls to
6095 Check_TSD if the tagged type is not defined at library level, or not
6096 has a representation clause specifying its external tag, or -gnatdQ is
6098 * exp_disp.ads (Build_VM_TSDs): Removed.
6099 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6100 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6101 register primitives in the dispatch tables in VM targets.
6102 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6103 initialization of class-wide interface objects in VM targets.
6104 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6107 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6109 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6110 when dotnet-ld cannot be found.
6112 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6114 * bindgen.adb: Simplify significantly generation of binder body file in
6116 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6117 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6120 2011-08-04 Yannick Moy <moy@adacore.com>
6122 * sem_prag.adb, sem.ads: Code cleanup.
6124 2011-08-04 Tristan Gingold <gingold@adacore.com>
6126 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6127 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6128 results if possible.
6129 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6130 * gnat_ugn.texi: Update dynamic stack usage section.
6132 2011-08-04 Steve Baird <baird@adacore.com>
6134 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6135 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6136 contains only a call to the user-defined main subprogram.
6137 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6138 call the "wrapper" subprogram instead of directly
6139 calling the user-defined main subprogram.
6141 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6143 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6144 alternatives of a case statement for controlled objects. Rename local
6145 variable A to Dead_Alt.
6146 (Expand_N_If_Statement): Check the then and else statements of an if
6147 statement for controlled objects. Check the then statements of all
6148 elsif parts of an if statement for controlled objects.
6149 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6151 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6152 detects a loop associated with the expansion of an array object.
6153 Augment the processing of the loop statements to account for a possible
6154 wrap done by Process_Statements_For_Controlled_Objects.
6155 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6156 statements and abortable part of an asynchronous select for controlled
6158 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6159 conditional entry call for controlled objects.
6160 (Expand_N_Selective_Accept): Check the alternatives of a selective
6161 accept for controlled objects.
6162 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6163 alternatives of a timed entry call for controlled objects.
6164 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6165 exception handler for controlled objects.
6166 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6167 Add formal parameter Nested_Constructs along with its associated
6169 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6170 Requires_Cleanup_Actions.
6171 (Process_Statements_For_Controlled_Objects): New routine.
6172 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6173 routine. Inspect a node which contains a non-handled sequence of
6174 statements for controlled objects. If such an object is found, the
6175 statements are wrapped in a block.
6177 2011-08-04 Bob Duff <duff@adacore.com>
6179 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6180 need to compare with Class_Wide_Type (T2), in order to get at the
6181 original class-wide type node.
6182 * sem_type.ads (Covers): Improve the comment.
6183 * einfo.ads (Class_Wide_Type): Improve the comment.
6184 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6185 the type of the Deref.
6187 2011-08-04 Yannick Moy <moy@adacore.com>
6189 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6190 separate declarations.
6191 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6192 check identifier of pragma argument.
6193 (Chain_TC): check that no other test case associated to the same entity
6194 share the same name.
6195 (Check_Test_Case): disallow test case inside subprogram body
6196 (Analyze_Pragma): correct call to check identifier and not argument
6197 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6198 function gets name from test case pragma.
6200 2011-08-04 Yannick Moy <moy@adacore.com>
6202 * gnat_rm.texi: Document new pragma and aspect.
6203 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6204 (No_Duplicates_Allowed): new constant array defining whether duplicates
6205 aspects of each kind can appear on the same declaration.
6206 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6207 field, which points to a node holding the previous Spec_PPC_List.
6208 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6209 through the indirection with Contract.
6210 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6211 * par-prag.adb (Prag): do nothing on Test_Case pragma
6212 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6214 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6215 component Ensures of Test_Case.
6216 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6217 (Analyze_Generic_Subprogram_Declaration,
6218 Analyze_Subprogram_Instantiation,
6219 Analyze_Abstract_Subprogram_Declaration,
6220 Analyze_Subprogram_Body_Helper,
6221 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6222 insert contract in subprogram node at point of definition
6224 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6225 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6226 corresponding pragma
6227 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6228 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6229 similar to the analysis of pre/post
6230 (Derive_Subprogram): insert contract in subprogram node at point of
6232 * sem_prag.adb, sem_prag.ads
6233 (Check_Arg_Is_String_Literal, Check_Identifier):
6234 new checking procedures to be called in treatment of pragmas
6235 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6236 pragma is well-formed. This does not check currently that 'Result is
6237 used only in the Ensures component of a Test_Case.
6238 (Analyze_Pragma): add case for Test_Case
6239 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6240 components of a Test_Case.
6241 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6242 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6243 pragma, treated as spec expressions.
6244 (Sig_Flags): add value -1 for Test_Case.
6245 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6246 Get_Requires_From_Test_Case_Pragma): getters for both expression
6247 components of a Test_Case.
6248 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6249 indirection between an entry or [generic] subprogram entity and its
6250 pre/post + test-cases.
6251 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6252 get/set for fields of an N_Contract node.
6253 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6254 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6255 names and pragma for Test_Case.
6256 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6258 2011-08-04 Vincent Celier <celier@adacore.com>
6260 * gnat_ugn.texi: Improve documentation of gnatmake switch
6261 --source-info-file=.
6263 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6265 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6266 type). Initialize Atyp to the appropriate type which is later checked
6267 for completion. Rewrite the assertion associated with private type
6270 2011-08-04 Ed Falis <falis@adacore.com>
6272 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6273 initialize the number of CPUs.
6275 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6277 * sem_type.adb (Disambiguate): New subsidiary routine
6278 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6279 equality on an anonymous access type whose designated type is private
6280 does not lead to an ambiguity with the universal access equality
6281 operator in the body or child units of the defining package. The same
6282 is true for a multiplication operator on a private type completed with
6285 2011-08-04 Javier Miranda <miranda@adacore.com>
6287 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6288 (Normalize_Scalars_Config): Removed.
6290 (Register_Opt_Config_Switches): Remove registering config values of
6291 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6292 (Restore_Opt_Config_Switches): Remove code which restores the values of
6293 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6294 Init_Or_Norm_Scalars.
6295 (Save_Opt_Config_Switches): Remove code which saves values of
6296 Init_Or_Norm_Scalars and Normalize_Scalars.
6297 (Set_Opt_Config_Switches): Remove code which restores config values of
6298 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6299 Init_Or_Norm_Scalars.
6301 2011-08-04 Yannick Moy <moy@adacore.com>
6303 * frontend.adb (Frontend): remove previous patch to avoid full
6304 qualification in ALFA mode.
6305 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6306 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6307 unique name for an entity, which could be used to identify the entity
6308 across compilation units.
6310 2011-08-04 Thomas Quinot <quinot@adacore.com>
6313 (Initialize_Default_Project_Path): Add target specific directory
6314 ($prefix/$target/lib/gnat) in front of project path in all cases
6315 (making gnatmake's behaviour consistent with gprbuild).
6316 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6317 Pass target name from Sdefault to project subsystem.
6318 * gnatls.adb: Show new target specific default project directory.
6320 2011-08-04 Johannes Kanig <kanig@adacore.com>
6322 * cstand.adb: Add Information to Identifier in Standard
6323 (Identifer_For): Set Entity to the corresponding entity
6325 2011-08-04 Sergey Rybin <rybin@adacore.com>
6327 * gnat_ugn.texi: Update doc on gnatcheck.
6329 2011-08-04 Yannick Moy <moy@adacore.com>
6331 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6334 2011-08-04 Yannick Moy <moy@adacore.com>
6336 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6337 performing expansion.
6338 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6339 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6340 it is not called in ALFA mode.
6342 2011-08-04 Emmanuel Briot <briot@adacore.com>
6344 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6345 after all, so removed.
6347 2011-08-04 Sergey Rybin <rybin@adacore.com>
6349 * vms_data.ads: Add missing VMS qualifiers.
6351 2011-08-04 Emmanuel Briot <briot@adacore.com>
6353 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6354 the list of files on the command line after processing it through
6357 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6359 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6360 processing for .NET/JVM. These targets can now benefit from
6361 Raise_From_Controlled_Operation and they share the same processing with
6363 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6364 These targets need transient scopes in order to properly finalize short
6365 lived controlled objects.
6366 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6367 NET/JVM. These targets can now benefit from
6368 Raise_From_Controlled_Operation and they share the same processing with
6371 2011-08-04 Geert Bosch <bosch@adacore.com>
6373 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6375 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6377 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6378 Expand_Record_Aggregate, to determine whether aggregate must be
6379 expanded into assignments. This is the case if the ancestor part is
6380 private, regarless of the setting of the flag Has_Private_Ancestor.
6382 2011-08-04 Ed Falis <falis@adacore.com>
6384 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6386 2011-08-04 Bob Duff <duff@adacore.com>
6388 * sinfo.ads: Fix comment.
6390 2011-08-04 Steve Baird <baird@adacore.com>
6392 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6393 choose a package name in much the same way as is
6394 done for JGNAT when VM_Target /= No_VM, except that
6395 a slightly more distinctive prefix string is used.
6397 2011-08-04 Emmanuel Briot <briot@adacore.com>
6399 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6400 gnatmake command line.
6401 This behavior was never documented (and was supported only because of
6402 an early bug in the code). This case might lead to ambiguous cases
6403 (between unit names and truncated base names without suffixes).
6405 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6407 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6408 Remove the external tag of a tagged type from the internal hash table.
6409 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6410 expanded usage of the routine. Strenghten the check for Is_Master. Add
6411 processing for tagged types.
6412 (Build_Finalizer): Create all the necessary lists used in finalizer
6413 creation when the processed context is a package that may contain
6415 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6416 Requires_Cleanup_Actions.
6417 (Expand_N_Package_Body): Package bodies may need clean up code
6418 depending on whether they contain tagged types.
6419 (Expand_N_Package_Declaration): Package declarations may need clean up
6420 code depending on whether they contain tagged types.
6421 (Unregister_Tagged_Types): New routine. Search through a list of
6422 declarations or statements, looking for non-abstract Ada tagged types.
6423 For each such type, generate code to unregister the external tag.
6424 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6425 Requires_Cleanup_Actions.
6426 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6427 through a list of declarations or statements looking for non-abstract
6428 Ada tagged types or controlled objects.
6429 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6430 Requires_Cleanup_Actions.
6431 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6432 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6435 2011-08-04 Vincent Celier <celier@adacore.com>
6437 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6438 has Ada sources, not project Project, because if the root project
6439 Project has no sources of its own, all projects will be deemed without
6442 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6444 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6445 of the No_Param_Proc acc-to-subp type used for initialization of
6446 __gnat_finalize_library_objects so that it's declared at library level
6447 rather than nested inside of the adainit routine.
6449 2011-08-04 Javier Miranda <miranda@adacore.com>
6451 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6452 if the tagged type has a representation clause which specifies its
6455 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6457 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6458 Remove previous procedure with that name.
6459 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6461 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6462 subtype mark, the ancestor cannot have unknown discriminants.
6463 (Resolve_Record_Aggregate): if the type has invisible components
6464 because of a private ancestor, the aggregate is illegal.
6466 2011-08-04 Vincent Celier <celier@adacore.com>
6468 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6469 account switches -gnat2005, -gnat12 and -gnat2012.
6471 2011-08-04 Bob Duff <duff@adacore.com>
6473 * s-tasdeb.ads: Minor comment fix.
6475 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6477 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6479 * switch.ads, switch.adb (Is_Language_Switch): New function.
6481 2011-08-04 Vincent Celier <celier@adacore.com>
6483 * switch-c.adb: Minor comment addition.
6485 2011-08-04 Vincent Celier <celier@adacore.com>
6487 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6488 ending with '=' is followed by a space (missing file name).
6490 2011-08-04 Pascal Obry <obry@adacore.com>
6492 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6494 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6496 * sem_ch12.adb (Analyze_Associations): New routine
6497 Check_Overloaded_Formal_Subprogram to reject a formal package when
6498 there is a named association or a box initialisation for an overloaded
6499 formal subprogram of the corresponding generic.
6501 2011-08-04 Yannick Moy <moy@adacore.com>
6503 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6504 * get_alfa.adb, put_alfa.adb: Read and write new component of
6506 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
6508 2011-08-04 Pascal Obry <obry@adacore.com>
6510 * urealp.adb: Minor reformatting.
6512 2011-08-04 Tristan Gingold <gingold@adacore.com>
6514 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
6515 Handle the case when Cleanup_Protected_Object returns Empty.
6517 2011-08-04 Yannick Moy <moy@adacore.com>
6519 * frontend.adb (Frontend): only qualify names in non-ALFA mode
6521 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6523 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
6524 call, ignore functions.
6526 2011-08-04 Geert Bosch <bosch@adacore.com>
6528 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
6531 2011-08-04 Emmanuel Briot <briot@adacore.com>
6533 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
6534 as an index for Builder'Switches. This conforms to the documentation.
6535 * make.adb (Insert_Project_Sources): avoid duplicate code
6537 2011-08-04 Emmanuel Briot <briot@adacore.com>
6539 * makeutl.adb (Complete_Mains): if the user has passed a relative file
6540 name on the command line (for instance "../dummy"), never assume it can
6543 2011-08-04 Tristan Gingold <gingold@adacore.com>
6545 * bindgen.adb: Remove code the reference or create the
6546 Break_Start/__gnat_break_start procedure.
6547 * s-stalib.adb (Break_Start): Removed.
6549 2011-08-04 Emmanuel Briot <briot@adacore.com>
6551 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
6552 shared with gprbuild.
6554 2011-08-04 Yannick Moy <moy@adacore.com>
6556 * par-ch4.adb (P_Primary): preferentially issue an error message about
6557 a missing parenthesis arount a conditional or case expression in Ada
6558 2012 mode, if we detect that the alignment is not correct for a
6561 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6563 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
6564 tag-to-class-wide conversion as needing finalization actions.
6565 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
6566 a tag-to-class-wide conversion as needing finalization actions.
6567 (Is_Finalizable_Transient): The result of a tag-to-class-wide
6568 conversion does not need finalization actions.
6569 (Is_Tag_To_CW_Conversion): New routine.
6570 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
6571 whether an object is the result of a tag-to-class-wide conversion.
6573 2011-08-04 Yannick Moy <moy@adacore.com>
6575 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
6576 the left-hand-side and right-hand-side of a conjunct are inserted when
6577 translating a pre- or postcondition
6578 * sem_ch6.adb: Correct typo in comment
6580 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6582 * gnat_rm.texi: Ravenscar does not prohibit dependence on
6583 Unchecked_Conversion and Unchecked_Deallocation.
6585 2011-08-04 Thomas Quinot <quinot@adacore.com>
6587 * make.adb: Minor reformatting.
6589 2011-08-04 Emmanuel Briot <briot@adacore.com>
6591 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
6592 sources in the project and its imported projects, but not in the whole
6595 2011-08-04 Emmanuel Briot <briot@adacore.com>
6597 * make.adb: Remove debug trace.
6599 2011-08-04 Vincent Celier <celier@adacore.com>
6601 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
6602 path in canonical form, to be able to compare path names on platforms
6603 such as Windows or Darwin.
6605 2011-08-04 Thomas Quinot <quinot@adacore.com>
6607 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
6608 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
6609 * scos.ads: Update documentation accordingly.
6610 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
6613 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6615 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
6616 attribute only if prefix type is scalar.
6618 2011-08-04 Emmanuel Briot <briot@adacore.com>
6620 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
6621 in gnatmake for specifying mains on the command line that do not belong
6622 to the main project. These mains must currently all belong to the same
6624 (Ultimate_Extension_Of): removed, since duplicated
6625 Ultimate_Extending_Project.
6627 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6629 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
6631 (CodePeer_Mode_String): New.
6632 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
6634 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
6635 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
6636 mode, since no useful elaboration subprogram is needed by CodePeer.
6637 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
6638 In this mode, compile binder file with -gnatC and do stop after this
6641 2011-08-04 Vincent Celier <celier@adacore.com>
6643 * exp_ch7.adb: Minor comment fix.
6645 2011-08-04 Robert Dewar <dewar@adacore.com>
6647 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
6648 exp_ch4.adb, makeutl.adb: Minor reformatting.
6650 2011-08-04 Emmanuel Briot <briot@adacore.com>
6652 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
6653 Create several new subprograms to move code out of Make. This makes the
6654 code more readable, removes code duplication, and is a preparation work
6655 for adding support for aggregate projects.
6657 2011-08-04 Tristan Gingold <gingold@adacore.com>
6659 * s-po32gl.ads, s-po32gl.adb: New files.
6660 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
6661 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
6662 (Build_Finalization_Collection): Use it.
6663 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
6664 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
6666 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
6667 * gcc-interface/Make-lang.in: Update dependencies.
6669 2011-08-04 Emmanuel Briot <briot@adacore.com>
6671 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
6674 2011-08-04 Emmanuel Briot <briot@adacore.com>
6676 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
6677 command line is not a file name, also check whether it could be a unit
6680 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6682 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
6683 the header of the finalization routine.
6684 If the unit has no finalizer but is a body whose spec has one, then
6685 generate the decrement of the elaboration entity only.
6686 If the unit has a finalizer and is a spec, then do not generate the
6687 decrement of the elaboration entity.
6688 (Gen_Finalize_Library_C): Likewise.
6690 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6692 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
6693 (Bounds_Size_Expression): Removed.
6694 (Double_Alignment_Of): New subsidiary routine.
6695 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
6696 for a hole in the dope vector of unconstrained arrays due to different
6697 index and element alignments.
6699 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6701 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
6702 raise program_error because body has not been seen yet.
6704 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6706 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
6709 2011-08-04 Vincent Celier <celier@adacore.com>
6711 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
6713 2011-08-04 Yannick Moy <moy@adacore.com>
6715 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
6716 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
6718 2011-08-04 Thomas Quinot <quinot@adacore.com>
6720 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
6721 instantiation in RCI.
6723 2011-08-04 Emmanuel Briot <briot@adacore.com>
6725 * make.adb: Share more code with gprbuild
6727 2011-08-04 Emmanuel Briot <briot@adacore.com>
6729 * projects.texi: Added documentation for the IDE'Gnat project file
6732 2011-08-04 Nicolas Roche <roche@adacore.com>
6734 * gnat_rm.texi: Minor editing.
6736 2011-08-04 Javier Miranda <miranda@adacore.com>
6738 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
6739 and the library case for VM targets.
6740 (Gen_Adainit_Ada): Likewise.
6742 2011-08-04 Robert Dewar <dewar@adacore.com>
6744 * g-altive.ads: Minor comment updates.
6745 * prj-nmsc.adb: Minor reformatting.
6747 2011-08-04 Javier Miranda <miranda@adacore.com>
6750 (Normalize_Scalars_Config): Value of the configuration switch set by
6751 pragma Normalize_Scalars when it appears in the gnat.adc file.
6752 (Normalize_Scalars): New field for record Config_Switches_Type. Used
6753 to save and restore settings of this pragma.
6755 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
6756 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
6758 2011-08-04 Vincent Celier <celier@adacore.com>
6760 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
6762 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6764 * makeutl.adb: Minor reformatting.
6766 2011-08-04 Olivier Hainque <hainque@adacore.com>
6768 * g-altive.ads: Update comments to reflect that only the soft
6769 binding is available today.
6771 2011-08-04 Robert Dewar <dewar@adacore.com>
6773 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
6774 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
6775 * gcc-interface/Make-lang.in: Update dependencies.
6777 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6779 * prj-env.adb: Remove local debug traces.
6781 2011-08-04 Yannick Moy <moy@adacore.com>
6783 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
6784 was used instead of Hi_OK, which could cause a read of an uninitialized
6785 value later on. Detected while working on the new warning.
6786 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
6788 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
6789 in more cases, in order to detect more unreferenced values.
6790 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
6791 object for expression, if any.
6793 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6795 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
6796 the operand types instead of the Esize.
6798 2011-08-04 Steve Baird <baird@adacore.com>
6800 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
6801 enable CodePeer_Mode.
6802 * bindusg.adb (Display): Add help message describing -P binder switch.
6803 * gnat_ugn.texi: Document -P binder switch.
6804 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
6805 user-defined main program directly.
6806 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
6807 user-defined main program in the context clause of the package body.
6809 2011-08-04 Yannick Moy <moy@adacore.com>
6811 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
6812 duplicate of Defining_Entity
6813 (Get_Unique_Entity_For_Decl): rename function into
6814 Unique_Defining_Entity
6815 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
6816 (Formal_Proof_On): remove synthesized flag
6817 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6818 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
6819 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
6820 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
6821 Annotate (Formal_Proof)
6823 2011-08-04 Emmanuel Briot <briot@adacore.com>
6825 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
6826 source files with non-standard naming schemes, in imported projects
6828 2011-08-04 Emmanuel Briot <briot@adacore.com>
6830 * makeutl.adb (Complete_Mains): when a multi-unit source file is
6831 specified on the gprbuild command line, we need to compile all units
6832 within that file, not just the first one we find
6833 Fix error message for mains that are not found.
6835 2011-08-04 Thomas Quinot <quinot@adacore.com>
6837 * sem_ch6.adb: Update comment.
6838 * sem_ch12.adb: Minor reformatting.
6840 2011-08-04 Bob Duff <duff@adacore.com>
6842 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
6843 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
6844 race condition whose symptom is to fail to lock Parent. That, in turn,
6845 causes Parent.Awake_Count to be accessed without locking Parent, which
6846 causes another race condition whose symptom is that Parent.Awake_Count
6847 can be off by 1 (either too high or too low). The solution is to lock
6848 Parent unconditionally, and then lock Acceptor, before reading
6849 Acceptor.Terminate_Alternative.
6851 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6853 * debug.adb: Update comment.
6855 2011-08-04 Robert Dewar <dewar@adacore.com>
6857 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
6858 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
6859 exp_ch6.adb: Minor reformatting.
6861 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6863 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
6866 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6868 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
6870 2011-08-04 Thomas Quinot <quinot@adacore.com>
6872 * sinfo.ads: Minor reformatting.
6874 2011-08-04 Emmanuel Briot <briot@adacore.com>
6876 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
6877 even if there is no location.
6879 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6881 * sem_res.adb, sem_ch4.adb: move check for restriction
6882 No_Task_Hierarchy to resolve_allocator.
6884 2011-08-04 Thomas Quinot <quinot@adacore.com>
6886 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
6887 This flag of N_Pragma nodes is not used, remove it as well as all of
6888 the associated circuitry.
6890 2011-08-04 Javier Miranda <miranda@adacore.com>
6892 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
6893 runtime check on duplicated externa tags
6894 * debug.adb Document switch -gnatdQ.
6896 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6898 * a-fihema.ads: Minor typo fix.
6900 2011-08-04 Yannick Moy <moy@adacore.com>
6902 * sem_ch10.adb: Minor comment update.
6904 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6906 * einfo.adb: Update the node field usage to reflect the renaming of
6907 Return_Flag to Return_ Flag_Or_Transient_Decl.
6908 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
6909 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
6910 (Write_Field15_Name): Change Return_Flag to
6911 Return_Flag_Or_Transient_Decl.
6912 * einfo.ads: Rename node field Return_Flag to
6913 Return_Flag_Or_Transient_Decl. Update the associated comment and all
6914 occurrences in entities.
6915 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
6916 associated Inline pragma.
6917 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
6918 associated Inline pragma.
6919 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
6921 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
6922 Return_Flag and Set_Return_Flag.
6923 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
6924 objects generated for controlled transients declared inside an
6925 Exception_With_Actions. Update the calls to Return_Flag.
6926 (Process_Object_Declaration): Add code to add a null guard for hook
6927 objects generated for controlled transients declared inside an
6928 Exception_With_Actions. Update related comment.
6929 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
6930 objects generated for controlled transients declared inside an
6931 Exception_With_Actions. Update the calls to Return_Flag.
6932 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
6934 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6936 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
6937 positional aggregate.
6939 2011-08-04 Vincent Celier <celier@adacore.com>
6941 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
6942 SLOC only for pragmas.
6944 2011-08-04 Emmanuel Briot <briot@adacore.com>
6946 * projects.texi: Minor typo fix.
6948 2011-08-04 Emmanuel Briot <briot@adacore.com>
6950 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
6951 on case-sensitive file systems.
6953 2011-08-04 Thomas Quinot <quinot@adacore.com>
6955 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
6956 nested in a disabled pragma.
6957 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
6958 enclosing pragma, if any, for X decisions.
6960 2011-08-04 Thomas Quinot <quinot@adacore.com>
6962 * sem_prag.adb: Minor reformatting.
6964 2011-08-04 Vincent Celier <celier@adacore.com>
6966 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
6967 allowed in no run time mode.
6969 2011-08-04 Vincent Celier <celier@adacore.com>
6971 * make.adb (Check): When -gnatc is used, check for the source file
6972 inside the ALI file with a canonical case file name.
6974 2011-08-04 Emmanuel Briot <briot@adacore.com>
6976 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
6977 overriding the separator.
6979 2011-08-04 Robert Dewar <dewar@adacore.com>
6981 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
6982 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
6984 2011-08-04 Robert Dewar <dewar@adacore.com>
6986 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
6988 2011-08-04 Yannick Moy <moy@adacore.com>
6990 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
6991 'Result only appears in postcondition of function.
6993 2011-08-04 Thomas Quinot <quinot@adacore.com>
6995 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
6996 external tag, include the value of the external tag in the exception
6999 2011-08-04 Yannick Moy <moy@adacore.com>
7001 * sem_attr.adb (Result): modify error message for misplaced 'Result
7003 2011-08-04 Sergey Rybin <rybin@adacore.com>
7005 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7006 clear that the second argument must be an identifier.
7008 2011-08-04 Thomas Quinot <quinot@adacore.com>
7010 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7011 -fpreserve-control-flow, insert an IF statement on the barrier
7012 condition to ensure that a conditional branch instruction is generated.
7014 2011-08-04 Emmanuel Briot <briot@adacore.com>
7016 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7017 (Processing_Flags.Ignore_Missing_With): new flag.
7019 2011-08-04 Emmanuel Briot <briot@adacore.com>
7021 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7022 Source_List_File on case-insensitive systems where the file is actually
7023 on a case-sensitive file system (NFS,...).
7025 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7027 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7028 function return contains a controlled [extension] aggregate and the
7029 return statement is not part of a handled sequence of statements, wrap
7030 the return in a block. This ensures that all controlled temporaries
7031 generated during aggregate resolution will be picked up by the
7032 finalization machinery.
7034 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7036 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7037 components, freeze type before resolution, to ensure that default
7038 initializations are present for all components.
7039 * sem_res.adb (Resolve_Actuals): the designated object of an
7040 accces-to-constant type is a legal actual in a call to an
7041 initialization procedure.
7043 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7045 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7046 N_Unchecked_Type_Conversion to the possible containers of a renamed
7049 2011-08-04 Yannick Moy <moy@adacore.com>
7051 * par-ch13.adb (Aspect_Specifications_Present): recognize
7052 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7053 is issued in Strict mode.
7054 * par.adb: Fix typos in comments.
7056 2011-08-04 Yannick Moy <moy@adacore.com>
7058 * sem_attr.adb (Result): modify error message to take into account Post
7059 aspect when compiling Ada 2012 (or newer) code.
7061 2011-08-04 Nicolas Roche <roche@adacore.com>
7063 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7064 remove need for GCC exceptions.
7066 2011-08-04 Vincent Celier <celier@adacore.com>
7068 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7069 project, not the source file name.
7070 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7071 excluded, continue looking. This excluded source will only be returned
7072 if there is no other source with the same base name that is not locally
7075 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7077 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7078 private and one of the operands is a real literal, use a qualified
7079 expression rather than a conversion which is not meaningful to the
7082 2011-08-04 Yannick Moy <moy@adacore.com>
7084 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7085 corresponding aspect X'Class are allowed, proceed with analysis of the
7086 aspect instead of skipping it.
7088 2011-08-04 Tristan Gingold <gingold@adacore.com>
7090 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7091 This will allow to have an Ada implementation for the subprogram.
7093 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7095 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7096 completion and aspects are present, apply them to the entity for the
7097 type which is currently the partial view, but which is the one that
7099 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7100 applies to a partial view, indicate that the full view has predicates
7101 and delayed aspects.
7102 (Replace_Type_Reference): Handle properly predicates that apply to the
7103 full view of a private completion.
7105 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7107 * layout.adb (Layout_Type): For composite types, do not set Esize.
7108 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7110 (Size_Known): Look at the RM size of components instead of the Esize.
7111 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7112 issue warning and activate Implicit_Packing.
7113 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7114 if the Esize is not known.
7115 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7116 for elementary types only.
7117 (Analyze_Record_Representation_Clause): Look at the RM size instead
7118 of the Esize to issue errors.
7119 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7121 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7123 Look at the RM size instead of the Esize for types if the latter is
7125 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7127 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7129 * sem_type.adb: proper handling of equality not involving anonymous
7132 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7134 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7135 Vis_Decls. When creating a library-level finalizer for a package spec,
7136 both the declaration and body of the finalizer are inserted either in
7137 the visible or private declarations of the package spec.
7139 2011-08-04 Javier Miranda <miranda@adacore.com>
7141 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7142 use of the full-view of a type when invoking Is_Ancestor.
7143 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7144 the full-view of private parents is requested, then use also the
7145 full-view of the parent of the first derivation.
7147 2011-08-04 Tristan Gingold <gingold@adacore.com>
7149 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7150 instead of the locally imported procedure.
7151 * s-taprop-mingw.adb (Enter_Task): Ditto.
7152 * s-valrea.adb (Scan_Real): Ditto.
7153 * s-imgrea.adb (Set_Image_Real): Ditto.
7154 * s-flocon.ads: Make the package pure.
7156 2011-08-04 Thomas Quinot <quinot@adacore.com>
7158 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7159 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7160 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7161 New subprogram, moved here from...
7162 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7163 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7164 rewriting of the last argument into a procedure call statement here...
7165 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7168 2011-08-04 Thomas Quinot <quinot@adacore.com>
7170 * par_sco.adb: Minor reformatting.
7172 2011-08-04 Robert Dewar <dewar@adacore.com>
7174 * erroutc.adb: Minor reformatting.
7176 2011-08-04 Thomas Quinot <quinot@adacore.com>
7178 * par_sco.adb: Comment update.
7180 2011-08-04 Tristan Gingold <gingold@adacore.com>
7182 * s-flocon.ads: New file.
7183 * g-flocon.ads: Now a renaming of s-flocon.
7184 * Makefile.rtl: Add s-flocon.o
7186 2011-08-04 Javier Miranda <miranda@adacore.com>
7188 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7189 constrained, do not attempt to build a subtype of it.
7191 2011-08-04 Yannick Moy <moy@adacore.com>
7193 * errout.ads Change comments: remove 'R'M as an example where quotes
7194 are needed; add ALFA as another case where quotes are not needed
7195 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7196 case where quotes are not needed.
7197 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7198 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7199 Remove all occurrences of 'A'L'F'A
7201 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7203 * sem_ch13.adb: check legality of invariant pragma.
7205 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7207 * bindgen.adb: Add comments.
7209 2011-08-04 Yannick Moy <moy@adacore.com>
7211 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7213 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7214 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7216 2011-08-04 Robert Dewar <dewar@adacore.com>
7218 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7219 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7220 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7222 2011-08-04 Thomas Quinot <quinot@adacore.com>
7224 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7226 2011-08-04 Thomas Quinot <quinot@adacore.com>
7229 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7232 2011-08-04 Robert Dewar <dewar@adacore.com>
7234 * einfo.ads, exp_ch4.adb: Minor reformatting.
7236 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7238 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7240 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7242 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7243 type in all cases to compute list of primitive operations, because full
7244 view may be an itype that is not attached to the list of declarations.
7246 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7248 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7249 library has already been finalized.
7250 (Gen_Adafinal_C): Likewise.
7251 (Gen_Adainit_Ada): Generate an early return if the library has
7252 already been elaborated.
7253 (Gen_Adainit_C): Likewise.
7254 (Gen_Output_File_Ada): Generate an elaboration flag.
7255 (Gen_Output_File_C): Likewise.
7257 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7259 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7260 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7261 built in the first place.
7262 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7263 for CodePeer because Finalize_Address was not built to begin with.
7264 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7266 2011-08-04 Pascal Obry <obry@adacore.com>
7268 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7269 filenames, this ensures unicity of filenames across processes.
7271 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7273 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7274 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7275 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7276 Add False as the actual to From_Abort in the generated call to
7277 Raise_From_Controlled_Operation.
7279 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7281 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7282 so that the ali file name can be retrieved from outside of this package.
7283 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7284 doing nothing in the general case, but used to update the object file
7285 timestamp if directly generated by the backend.
7286 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7287 to a later time than the ali file one.
7289 2011-08-04 Yannick Moy <moy@adacore.com>
7291 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7292 entities whose body contains an Annotate pragma which forces formal
7294 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7295 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7296 Mark_Non_ALFA_Subprogram to pass in a message and node.
7297 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7298 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7299 surrounding subprogram.
7300 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7301 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7302 as not in ALFA is annotated with Formal_Proof being On, then an error
7303 is issued based on the additional parameters for message and node.
7304 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7305 * gcc-interface/Make-lang.in: Update dependencies.
7307 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7309 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7310 Finalize_Address when CodePeer is enabled.
7312 2011-08-04 Pascal Obry <obry@adacore.com>
7314 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7315 the latter returns a pointer to a static buffer which is deallocated
7316 at the end of the routine.
7318 2011-08-04 Yannick Moy <moy@adacore.com>
7320 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7321 after index creation; mark unconstrained base array type generated as
7322 being in/not in ALFA as well
7323 (Make_Index): mark subtype created as in/not in ALFA
7324 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7325 over a loop as in/not in ALFA, depending on its type and form of loop
7328 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7330 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7331 directly to False on .NET and JVM.
7333 2011-08-04 Yannick Moy <moy@adacore.com>
7335 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7336 constraint that subtype must come from source code to be in ALFA, so
7337 that anonymous subtypes can be in ALFA too.
7339 2011-08-04 Yannick Moy <moy@adacore.com>
7341 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7342 reference for ALFA mode.
7343 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7344 procedure public so as to use it from formal verification back-end.
7346 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7348 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7349 invalid checks of the Parameter, making Remove_Switch not working
7352 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7354 * targparm.ads: Update header: no run-time exception is needed on this
7357 2011-08-04 Vincent Celier <celier@adacore.com>
7359 * a-fihema.adb: Use System.IO instead of GNAT.IO
7361 2011-08-04 Thomas Quinot <quinot@adacore.com>
7363 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7364 are forbidden in Compiler_Unit mode.
7366 2011-08-04 Robert Dewar <dewar@adacore.com>
7368 * sem_util.adb: Minor reformatting.
7370 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7372 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7373 library-level finalizers.
7374 (Gen_Finalize_Library_C): Update the import string for library-level
7376 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7377 library-level finalizer.
7378 * exp_ch7.adb: Remove with and use clauses for Stringt.
7379 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7380 Spec_Decl. Add local variable Body_Id. The names of library-level
7381 finalizers are now manually fully qualified and are no longer external.
7382 A single name is now capable of servicing .NET, JVM and non-VM targets.
7383 Pragma Export is no longer required to provide visibility for the name.
7384 (Create_Finalizer_String): Removed.
7385 (New_Finalizer_Name): New routine which mimics New_..._Name.
7387 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7389 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7390 elaboration counter to Standard_Short_Integer.
7391 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7392 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7393 (Gen_Elab_Externals_C): Likewise.
7395 2011-08-04 Ed Falis <falis@adacore.com>
7397 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7398 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7399 system-vxworks-mips.ads, system-vxworks-x86.ads
7400 (Always_Compatible_Rep): set to False for all VxWorks targets.
7402 2011-08-04 Robert Dewar <dewar@adacore.com>
7404 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7405 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7406 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7407 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7408 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7409 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7410 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7411 Minor reformatting and code reorganization.
7413 2011-08-04 Emmanuel Briot <briot@adacore.com>
7415 * projects.texi: Added doc for aggregate projects.
7417 2011-08-04 Emmanuel Briot <briot@adacore.com>
7419 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7420 Add support for overriding the Project_Path in aggregate projects.
7422 2011-08-04 Robert Dewar <dewar@adacore.com>
7424 * a-cofove.ads: Minor reformatting.
7426 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7428 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7429 on the generated code.
7430 (Build_Finalize_Statements): Update the comment on the generated code.
7431 (Build_Initialize_Statements): Update the comment on the generated code.
7432 (Build_Object_Declarations): Add local variable Result. The object
7433 declarations are now built in sequence.
7434 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7437 2011-08-04 Robert Dewar <dewar@adacore.com>
7439 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7441 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7443 * einfo.ads (Elaboration_Entity): Document new definition and use.
7444 (Elaboration_Entity_Required): Adjust to above change.
7445 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7446 * exp_ch12.adb: And with and use for Snames.
7447 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7448 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7449 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7450 <Check_Unit_Name>: Deal with N_Expanded_Name.
7451 <Attribute_Elaborated>: Extend to all unit names.
7452 * sem_elab.adb: And with and use for Uintp.
7453 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7454 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7455 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7456 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7457 from Gen_Adainit_Ada.
7458 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7459 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7460 case, do not call System.Standard_Library.Adafinal; instead call
7461 finalize_library if needed.
7462 (Gen_Adafinal_C): Likewise.
7463 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7464 non-main program case.
7465 (Gen_Adainit_C): Generate a couple of external declarations here.
7466 In the main program case, set SSL.Finalize_Library_Objects.
7467 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7468 (Gen_Elab_Calls_C): Likewise.
7469 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7470 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7471 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7473 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7474 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7476 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7477 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7478 of external declarations. Call Gen_Finalize_Library_C.
7480 2011-08-04 Emmanuel Briot <briot@adacore.com>
7482 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7483 Compute_Compilation_Phases): new subprogram.
7484 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7485 The number of mains as well as the various compilation phases that
7486 need to be run are now project tree specific, since various
7487 aggregated trees might have different requirements. In particular,
7488 they do not all require bind or link phases.
7490 2011-08-04 Emmanuel Briot <briot@adacore.com>
7492 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7493 (Project_Tree_Appdata): New type.
7494 It is now possible to associate application-specific data to a project
7495 tree. In particular, this is used in the gprbuild builder to avoid a
7496 number of global tables and htables, especially now that there can be
7497 several project trees loaded at once because of aggregate projects.
7498 (Debug_Name): new procedure.
7499 * projects.texi: Clarify syntax of "**" for Source_Dirs
7501 2011-08-03 Emmanuel Briot <briot@adacore.com>
7503 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7504 the "roots" for a main.
7505 (Fill_From_Project): add support for aggregate projects. Main units
7506 in aggregated projects are now automatically added in the list of
7507 files to build (although this fails later on in gprbuild, because
7508 these files are not using the root proejct tree, so this needs
7510 * gcc-interface/Make-lang.in: Update dependencies.
7512 2011-08-03 Yannick Moy <moy@adacore.com>
7514 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
7515 conditional expression in ALFA.
7516 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
7517 expressions as not in ALFA.
7519 2011-08-03 Robert Dewar <dewar@adacore.com>
7521 * a-cofove.adb: Minor reformatting.
7523 2011-08-03 Emmanuel Briot <briot@adacore.com>
7525 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
7526 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
7528 These packages are more logically placed in the Queue package, since
7529 they manipulate the queue. It is also likely that they can be adapted
7530 for gnatmake, thus sharing more code.
7531 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
7532 that we could move the above.
7534 2011-08-03 Emmanuel Briot <briot@adacore.com>
7536 * errutil.adb (Finalize): clean up the list of error messages on exit.
7537 Calling this subprogram multiple times will no longer show duplicate
7538 error messages on stderr.
7540 2011-08-03 Emmanuel Briot <briot@adacore.com>
7542 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
7543 Getopt_Switches when we have already define a command line
7546 2011-08-03 Yannick Moy <moy@adacore.com>
7548 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
7549 in ALFA. Instead, they are considered as assertions to prove.
7550 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
7551 nodes as not in ALFA. Instead, include conditional expressions in ALFA
7552 if they have no ELSE part, or if they occur in pre- and postconditions,
7553 where the Condition cannot have side-effects in ALFA
7554 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
7555 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
7556 Instead, include type conversion between scalar types in ALFA.
7557 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
7558 if-and-only-if its type is in ALFA.
7560 2011-08-03 Thomas Quinot <quinot@adacore.com>
7562 * scos.adb, get_scos.adb, put_scos.adb
7563 New code letter for decisions: G (entry guard)
7565 (Traverse_Subprogram_Body): Rename to...
7566 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
7567 (Traverse_Protected_Body): New subprogram
7568 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
7569 protected bodies and entry bodies.
7571 2011-08-03 Yannick Moy <moy@adacore.com>
7573 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
7574 entities with get/set subprograms, which is set on procedure entities
7575 generated by the compiler for a postcondition.
7576 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
7577 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
7578 entity for a declaration
7579 (Get_Unique_Entity_For_Decl): new function returning an entity which
7580 represents a declaration, so that matching spec and body have the same
7583 2011-08-03 Robert Dewar <dewar@adacore.com>
7585 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
7586 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
7588 2011-08-03 Yannick Moy <moy@adacore.com>
7590 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
7591 library-level because retriction No_Implicit_Dynamic_Code in the
7592 front-end prevents its definition as a local subprogram
7593 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
7594 for reuse in other contexts
7595 (Traverse_Declarations_Or_Statements,
7596 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7597 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
7598 procedures take a callback parameter to be called on all declarations
7600 (Traverse_All_Compilation_Units): new generic function to traverse a
7601 compilation unit and call a callback parameter on all declarations
7603 2011-08-03 Javier Miranda <miranda@adacore.com>
7605 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
7606 in Java since they are always enclosed in a namespace that
7607 differentiates them, and overloaded entities are supported by the VM.
7609 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7611 * checks.adb (Determine_Range): If a computed bound of an operation is
7612 outside the range of the base type of the expression, and overflow
7613 checks are enabled, the result is unknown and cannot be used for any
7614 subsequent constant folding.
7615 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
7616 unknown, so is the result of the comparison.
7618 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7620 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
7621 From_Abort. When finalization was triggered by an abort, propagate
7622 Standard'Abort_Signal rather than Program_Error.
7623 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
7625 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
7626 From_Abort. When finalization was triggered by an abort, propagate
7627 Standard'Abort_Signal rather than Program_Error.
7628 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
7630 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
7631 Abort_Id. Update the calls to Build_Object_Declarations and
7632 Build_Raise_Statement to include Abort_Id.
7633 (Build_Adjust_Statements): New local variable Abort_Id. Update the
7634 calls to Build_Object_Declarations and Build_Raise_Statement to include
7636 (Build_Finalize_Statements): New local variable Abort_Id. Update the
7637 calls to Build_Object_Declarations and Build_Raise_Statement to include
7639 (Build_Components): Create an entity for Abort_Id when exceptions are
7640 allowed on the target.
7641 (Build_Finalizer): New local variable Abort_Id.
7642 (Build_Initialize_Statements): New local variable Abort_Id. Update the
7643 calls to Build_Object_Declarations and Build_Raise_Statement to include
7645 (Build_Object_Declarations): Add new formal Abort_Id. Create the
7646 declaration of flag Abort_Id to preserve the original abort status
7647 before finalization code is executed.
7648 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
7649 runtime routine Raise_From_Controlled_Operation.
7650 (Create_Finalizer): Update the call to Build_Raise_Statement to include
7651 Abort_Id. Update the call to Build_Object_Declarations to include
7652 Abort_Id. Update the layout of the finalizer body.
7653 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
7654 (Process_Transient_Objects): New local variable Abort_Id. Remove the
7655 clunky code to create all flags and objects related to
7656 exception propagation and replace it with a call to
7657 Build_Object_Declarations. Update the call to Build_Raise_Statement to
7659 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
7660 Add new formal Abort_Id and associated comment on its use.
7661 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
7663 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
7664 Remove the clunky code to create all flags and objects related to
7665 exception propagation and replace it with a call to
7666 Build_Object_Declarations. Update the call to Build_Raise_Statement.
7668 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7670 * s-tassta.adb: Fix minor typos.
7672 2011-08-03 Robert Dewar <dewar@adacore.com>
7674 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
7675 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
7677 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7679 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
7680 to packages. This ensures that the finalizer body will not end up
7681 inside the freeze node.
7682 (Process_Declarations): Add code to detect whether a freeze node has a
7683 nested finalization collection.
7685 2011-08-03 Pascal Obry <obry@adacore.com>
7687 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
7688 (Current_Session): Return a not null access to Session_Type.
7689 (Default_Session): Likewise.
7691 2011-08-03 Robert Dewar <dewar@adacore.com>
7693 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
7694 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
7696 2011-08-03 Pascal Obry <obry@adacore.com>
7698 * g-awk.ads: Minor comment fix.
7700 2011-08-03 Sergey Rybin <rybin@adacore.com>
7702 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7703 the tree structure related to discriminant constraints.
7704 Original_Discriminant cannot be used any more for computing the
7705 defining name for the reference to a discriminant.
7707 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7709 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
7710 function is not visibly tagged, this is not a dispatching call and
7711 therfore is not Tag_Indeterminate, even if the function is marked as
7712 dispatching on result.
7714 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7716 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
7717 (Expand_N_Free_Statement): Add a guard to protect against run-times
7718 which do not support controlled types.
7719 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
7720 against run-times which do not support controlled types.
7721 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
7722 against run-times which do not support controlled types.
7723 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
7724 against run-times which do not support controlled types.
7725 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
7726 protect against run-times which do not support controlled types.
7728 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7730 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
7731 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
7733 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7735 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
7736 modified in the source, to prevent spurious warnings when compiling
7739 2011-08-03 Thomas Quinot <quinot@adacore.com>
7741 * a-except-2005.adb: Minor reformatting.
7743 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7745 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
7746 is a renaming declaration in the private part of a package, do not emit
7747 a warning that the with_clause could be moved because the renaming may
7748 be used in the body or in a child unit.
7750 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7752 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7753 Propagate the Comes_From_Source attribute from the original return
7754 object to the renaming.
7756 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7758 * exp_ch7.adb (Build_Raise_Statement): Do not call
7759 Raise_From_Controlled_Operation when this routine is not present in
7760 the run-time library.
7761 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
7762 libraries (Ravenscar), tasks are non-terminating, and protected objects
7763 and tasks can only appear at library level, so we do not want
7764 finalization of protected objects nor tasks.
7765 * exp_intr.adb: Minor clarification in comment.
7766 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
7767 Gen_Output_File_C): Remove references to finalization of library-level
7768 objects when using restricted run-time libraries.
7770 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7772 * sem_ch3.adb (Build_Discriminant_Constraints): Set
7773 Original_Discriminant only if the parent type is a generic formal.
7775 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7777 * exp_ch13.adb: Add with and use clause for Targparm;
7778 (Expand_N_Free_Statement): Prevent the generation of a custom
7779 Deallocate on .NET/JVM targets since this requires pools and address
7781 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
7782 .NET/JVM targets, attach the newly allocated object to the access
7783 type's finalization collection. Do not generate a call to
7784 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
7785 exist in the runtime.
7786 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
7787 create a custom Allocate for object that do not require initialization.
7788 Attach a newly allocated object to the access type's finalization
7789 collection on .NET/JVM.
7790 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
7791 assignment of controlled types on .NET/JVM. The two hidden pointers
7792 Prev and Next and stored and later restored after the assignment takes
7794 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
7795 kludge for .NET/JVM to recognize a particular piece of code coming from
7796 Heap_Management and change the call to Finalize into Deep_Finalize.
7797 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
7798 finalization collections on .NET/JVM only for types derived from
7799 Controlled. Separate the association of storage pools with a collection
7800 and only allow it on non-.NET/JVM targets.
7801 (Make_Attach_Call): New routine.
7802 (Make_Detach_Call): New routine.
7803 (Process_Object_Declarations): Suppress the generation of
7804 build-in-place return object clean up code on .NET/JVM since it uses
7806 * exp_ch7.ads (Make_Attach_Call): New routine.
7807 (Make_Detach_Call): New routine.
7808 * exp_intr.adb Add with and use clause for Targparm.
7809 (Expand_Unc_Deallocation): Detach a controlled object from a collection
7810 on .NET/JVM targets.
7811 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
7812 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
7813 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
7814 names used in finalization.
7816 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7818 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
7819 (Attach, Detach): Lock the current task when chaining an object onto a
7822 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7824 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
7825 Rewritten to create the message strings when the exception is not
7826 raised by an abort during finalization.
7827 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
7828 Raise_From_Controlled_Operation and update its associated comment.
7829 * a-fihema.ads, a-fihema.adb: New GNAT unit.
7830 Ada.Finalization.Heap_Management provides key functionality
7831 associated with controlled objects on the heap, their creation,
7832 finalization and reclamation. Type Finalization_Collection is
7833 effectively a wrapper which sits ontop of a storage pool and performs
7834 all necessary bookkeeping for all the objects it contains. Each
7835 access-to-controlled or access-to-class-wide type receives a collection
7836 as part of its expansion. The compiler generates buffer code and
7837 invokes Allocate / Deallocate to create and destroy allocated
7839 * a-finali.adb ("="): Removed.
7840 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
7841 fields Prev and Next.
7842 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
7843 A library unit with at least one controlled object on the library level
7844 has a special finalizer which is invoked by the binder. To signal this,
7845 ali files carry field PF.
7846 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
7847 associated comment on field usage.
7848 * a-tags.adb (Get_RC_Offset): Removed.
7849 (Needs_Finalization): New routine.
7850 * a-tags.ads: Update the structure of the GNAT dispatch tables.
7851 Dispatch tables now carry field Needs_Finalization which provides
7852 runtime indication whether a type is controlled or has controlled
7853 components or both. Remove field RC_Offset.
7854 (Get_RC_Offset): Removed along with its associated pragma Export.
7855 Since tagged types with controlled components no longer carry hidden
7856 field _controller, the special mechanism to retrieve its location is no
7858 (Needs_Finalization): New routine.
7859 * atree.ads, atree.adb (Elist24): New routine.
7860 (Set_Elist24): New routine.
7861 * atree.h: Add a define clause for Elist24.
7862 * bindgen.adb New library-level variable Lib_Final_Built.
7863 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
7864 presence of a VM target, the routine generates calls to the proper
7865 library finalization routine.
7866 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
7867 targets. Set the correct library finalization routine depending on
7868 whether the library has controlled objects or this is a VM compilation.
7869 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
7870 to library-level finalizers of compiled units in reverse order of
7871 elaboration. It also produces exception management code and reraises a
7872 potential exception after all units have been finalized.
7873 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
7874 library-level finalizers of compiled units in reverse order of
7876 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
7877 definitions of all library-level finalizers available to the compilation
7878 (Gen_Main_Ada): Directly call Adafinal which now contails all target
7880 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
7881 System.Standard_Library.Adafinal directly. If the library needs
7882 finalization actions, create the sequence of finalization calls.
7883 (Gen_Output_File_Ada): Alphabetize local variables and constants.
7884 Generate a with clause for System.Soft_Links when compiling for a VM.
7885 Remove the code which imports System.Standard_Library.Adafinal as
7886 Do_Finalize. Generate the library finalization routine.
7887 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
7888 If the library needs finalization actions, create all the definitions
7889 of library- level finalizers.
7890 (Has_Finalizer): New routine. Determines whether at least one compiled
7891 unit has a library-level finalizer.
7892 Add type Qualification_Mode.
7893 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
7894 * einfo.adb: New usage of field 15 as Return_Flag.
7895 Remove Finalization_Chain_Entity from the usages of field 19.
7896 Remove Associated_Final_Chain from the usages of field 23.
7897 New usage of field 23 as Associated_Collection.
7898 New usage of field 24 as Finalizer.
7899 New usage of flag 252 as Is_Processed_Transient.
7900 (Associated_Final_Chain): Removed.
7901 (Associated_Collection): New routine.
7902 (Finalization_Chain_Entity): Removed.
7903 (Finalizer): New routine.
7904 (Is_Finalizer): New routine.
7905 (Is_Processed_Transient): New routine.
7906 (Return_Flag): New routine.
7907 (Set_Associated_Final_Chain): Removed.
7908 (Set_Associated_Collection): New routine.
7909 (Set_Finalization_Chain_Entity): Removed.
7910 (Set_Finalizer): New routine.
7911 (Set_Is_Processed_Transient): New routine.
7912 (Set_Return_Flag): New routine.
7913 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
7915 (Write_Field8_Name): Alphabetize the output.
7916 (Write_Field11_Name): Alphabetize the output.
7917 (Write_Field12_Name): Alphabetize the output.
7918 (Write_Field13_Name): Alphabetize the output.
7919 (Write_Field14_Name): Alphabetize the output.
7920 (Write_Field15_Name): Alphabetize the output.
7921 (Write_Field16_Name): Alphabetize the output.
7922 (Write_Field17_Name): Alphabetize the output.
7923 (Write_Field18_Name): Alphabetize the output.
7924 (Write_Field19_Name): Alphabetize the output. Remove the output of
7925 Finalization_Chain_Entity.
7926 (Write_Field20_Name): Alphabetize the output.
7927 (Write_Field21_Name): Alphabetize the output.
7928 (Write_Field22_Name): Alphabetize the output.
7929 (Write_Field23_Name): Alphabetize the output. Remove the output of
7930 Associated_Final_Chain. Add output for Associated_Collection.
7931 (Write_Field24_Name): Alphabetize the output.
7932 (Write_Field25_Name): Add output for Finalizer.
7933 (Write_Field26_Name): Alphabetize the output.
7934 (Write_Field27_Name): Alphabetize the output.
7935 (Write_Field28_Name): Alphabetize the output.
7936 * einfo.ads: Add new field description for Associated_Collection and
7938 Remove Associated_Final_Chain and its uses in nodes.
7939 Remove Finalization_Chain_Entity and its uses in nodes.
7940 Add new field description for Finalizer and its uses in nodes.
7941 Add new synthesized attribute Is_Finalizer.
7942 Add new flag description for Is_Processed_Transient and its uses in
7944 Add new field description for Return_Flag and its uses in nodes.
7945 (Associated_Final_Chain): Removed along with its pragma Inline.
7946 (Associated_Collection): New routine and pragma Inline.
7947 (Finalization_Chain_Entity): Removed along with its pragma Inline.
7948 (Finalizer): New routine and pragma Inline.
7949 (Is_Finalizer): New routine and pragma Inline.
7950 (Is_Processed_Transient): New routine and pragma Inline.
7951 (Return_Flag): New routine and pragma Inline.
7952 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
7953 (Set_Associated_Collection): New routine and pragma Inline.
7954 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
7955 (Set_Finalizer): New routine and pragma Inline.
7956 (Set_Is_Processed_Transient): New routine and pragma Inline.
7957 (Set_Return_Flag): New routine and pragma Inline.
7958 * exp_aggr.adb: Alphabetize subprograms.
7959 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
7960 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
7961 associated comments. Remove local variables External_Final_List and
7963 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
7964 Ancestor. Remove the retrieval of finalization lists. Update the call to
7966 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
7967 lists. Update the call to Late_Expansion.
7968 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
7969 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
7970 (Gen_Assign): Remove the retrieval of the finalization list used to
7971 build the assignment. Update the calls to Make_Init_Call and
7973 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
7974 Remove the mechanism to determine attachment levels and finalization
7975 list retrieval. Remove the processing for coextensions.
7976 (Init_Controller): Removed. Controllers no longer exist.
7977 (Late_Expansion): Remove formals Flist and Obj along with their
7978 associated comments. Update the calls to Build_Record_Aggr_Code and
7979 Build_Array_Aggr_Code.
7980 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
7981 (Expand_N_Freeze_Entity): Add special processing for finalizers which
7982 appear in entry bodies, protected subprograms and task bodies.
7983 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
7984 * exp_ch3.adb (Add_Final_Chain): Removed.
7985 (Build_Array_Init_Proc): Alphabetize local variables.
7986 (Build_Assignment): Alphabetize local variables. Update the call to
7988 (Build_Class_Wide_Master): Rename local variables to better reflect
7990 (Build_Discriminant_Assignments): Code reformatting.
7991 (Build_Init_Call_Thru): Code reformatting.
7992 (Build_Init_Procedure): Code reformatting. Generate a special version
7993 of Deep_Finalize which is capable of finalizing all initialized
7994 components and ignore the rest.
7995 (Build_Init_Statements): Rename local variables to better reflect their
7997 Reimplement the mechanism to include the creation and update of an index
7998 variable called a "counter". It is used as a bookmark for tracing
7999 initialized and non-initialized components.
8000 (Build_Initialization_Call): Remove local variable Controller_Typ.
8001 Alphabetize all local variables. Remove the initialization of the
8002 record controller and update the call to Make_Init_Call.
8003 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8004 New local variable Counter.
8005 (Constrain_Array): Alphabetize.
8006 (Expand_Freeze_Array_Type): Create a collection instead of a
8008 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8009 Finalize_Address which is used in conjunction with allocated controlled
8011 (Expand_N_Object_Declaration): Remove the creation of a finalization
8012 list for anonymous access types. Update the calls to Make_Init_Call and
8014 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8015 retrieval of finalization lists. Remove the expansion of the record
8016 controller. Create TSS primitive Finalize_Address used in conjunction
8017 with controlled objects on the heap. Create finalization collections
8018 for access-to-controlled record components.
8019 (Expand_Record_Controller): Removed.
8020 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8021 class-wide types now requires additional processing. Create
8022 finalization collections for access-to-controlled types.
8023 (Increment_Counter): New routine.
8024 (Make_Counter): New routine.
8025 (Make_Eq_If): Remove the mention of Name_uController.
8026 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8027 types coming from System.Finalization_Root.
8028 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8029 (Predefined_Primitive_Bodies): There is no longer need to skip types
8030 coming from System.Finalization_Root.
8031 (Stream_Operation_OK): Do not generate stream routines for
8032 type Ada.Finalization.Heap_Management.Finalization_Collection.
8033 * exp_ch3.ads: Alphabetize subprograms.
8034 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8035 Add with and use clause for Lib.
8036 (Complete_Coextension_Finalization): Removed.
8037 (Complete_Controlled_Allocation): New routine. Create a finalization
8038 collection for anonymous access-to-controlled types. Create a custom
8039 Allocate which interfaces with the back end and the machinery in
8041 (Expand_Allocator_Expression): Add necessary calls to
8042 Complete_Controlled_Allocation. Remove the retrieval of finalization
8043 lists. Update the calls to Make_Adjust_Call. Generate a call to
8044 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8045 the associated collection.
8046 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8047 Code clean up. Remove the retrieval of finalization lists and
8049 Update the call to Make_Init_Call. Generate a call to
8050 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8051 the associated collection.
8052 (Get_Allocator_Final_List): Removed. Finalization lists are not
8054 (Suitable_Element): Remove the mention of Name_uController.
8055 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8056 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8057 the left hand side, carry out the assignment and adjust the left hand
8059 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8060 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8061 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8062 BIP_Collection and BIPcollection.
8063 (Build_Heap_Allocator): New routine used to allocate the return object
8064 of a build-in-place function onto a collection.
8065 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8066 (Expand_Call): Do not replace direct calls to Deep routines with their
8068 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8069 and update their occurrences. Add a special return flag to monitor the
8070 [ab]normal execution of the function. The flag is set right before the
8072 Rewrite the mechanism used to allocate a build-in-place return object
8073 on the heap or on a storage pool.
8074 (Is_Direct_Deep_Call): New routine.
8075 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8076 build-in-place function call instead of a final list. Build a call to
8077 Set_Finalize_Address_Ptr to decorate the associated collection.
8078 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8079 order to name the build-in-place function call's result for later
8080 finalization. Add a collection to a build-in-place function call
8081 instead of a final list.
8082 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8083 build-in-place function call instead of a final list. Remove the code
8084 which moves one final list and transforms it into the actual in a
8085 nested build-in-place call.
8086 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8087 build-in-place function call instead of a final list.
8088 (Move_Final_List): Removed.
8089 (Needs_BIP_Collection): New routine.
8090 (Needs_BIP_Final_List): Removed.
8091 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8092 enumeration type BIP_Formal_Kind.
8093 Update the related comment.
8094 (Needs_BIP_Collection): New routine.
8095 (Needs_BIP_Final_List): Removed.
8096 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8097 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8098 majority of subprograms in this unit. Add Name_Finalize_Address to
8099 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8100 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8101 statements for an array type.
8102 (Build_Adjust_Statements): Create the adjust statements for a record
8104 (Build_Cleanup_Statements): New routine. A procedure which given any
8105 construct containing asynchronous calls, references to _master, or is a
8106 task body, a task allocation or a protected body produces the necessary
8107 runtime calls to clean up these constructs.
8108 (Build_Exception_Handler): New routine.
8109 (Build_Final_List): Removed.
8110 (Build_Finalization_Collection): New routine. A core procedure which
8111 creates a collection to service heap allocated controlled objects
8112 associated with an access-to-controlled type.
8113 (Build_Finalize_Statements): Create the finalization statements for a
8115 (Build_Finalizer): New routine. A core procedure which given any
8116 construct with declarations and/or statements detects all objects which
8117 need any type of clean up (controlled objects, protected objects) and
8118 generates all necessary code to clean up the said objects in the proper
8120 (Build_Finalizer_Call): New routine.
8121 (Build_Initialize_Statements): Create the initialization statements for
8122 an array type. The generated routine contains code to finalize partially
8124 (Build_Object_Declarations): New routine.
8125 (Build_Raise_Statement): New routine.
8126 (Clean_Simple_Protected_Objects): Removed.
8127 (Controller_Component): Removed.
8128 (Enclosing_Function): New routine.
8129 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8130 either declarations or statements or both.
8131 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8132 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8134 (Find_Final_List): Removed.
8135 (Global_Flist_Ref): Removed.
8136 (In_Finalization_Root): Removed.
8137 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8138 scope in terms of tree nodes. Process all transient variables within
8140 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8141 generated after the adjust.
8142 (Make_Attach_Call): Removed.
8143 (Make_Call): New routine.
8144 (Make_Clean): Removed.
8145 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8147 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8149 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8151 (Make_Final_Call): Modified to simply create a call to either
8152 Deep_Finalize or Finalize.
8153 (Make_Finalize_Address_Body): New routine.
8154 (Make_Finalize_Address_Stmts): New routine. A function which produces
8155 TSS primitive Finalize_Address used in conjunction with heap allocated
8157 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8158 (Make_Init_Call): Rewritten. There is no longer an attach call
8159 generated after initialization.
8160 (Make_Local_Deep_Finalize): New routine.
8161 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8162 (Make_Transient_Block): Remove the finalization list retrieval and
8164 (Needs_Finalization): Moved to Exp_Util.
8165 (Parent_Field_Type): New routine.
8166 (Preprocess_Components): New routine.
8167 (Process_Transient_Objects): New routine.
8168 (Wrap_HSS_In_Block): New routine.
8169 (Wrap_Transient_Declaration): Remove finalization list management and
8170 controller insertion.
8171 (Wrap_Transient_Expression): Code reformatting.
8172 (Wrap_Transient_Statement): Code reformatting.
8173 * exp_ch7.ads (Build_Final_List): Removed.
8174 (Build_Finalization_Collection): New routine.
8175 (Build_Raise_Statement): New routine.
8176 (Controller_Component): Removed.
8177 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8178 (Find_Final_List): Removed.
8179 (In_Finalization_Root): Removed.
8180 (Is_Simple_Protected_Type): Update related comment.
8181 (Make_Adjust_Call): New parameter profile and associated comments.
8182 (Make_Attach_Call): Removed.
8183 (Make_Final_Call): New parameter profile and associated comments.
8184 (Make_Finalize_Address_Body): New routine.
8185 (Make_Init_Call): New parameter profile and associated comments.
8186 (Make_Local_Deep_Finalize): New routine.
8187 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8188 (Needs_Finalization): Moved to Exp_Util.
8189 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8190 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8191 (Find_Protection_Type): Moved to Exp_Util.
8192 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8193 (Make_DT): Update sequence of dispatch table initialization. Remove the
8194 initialization of field RC_Offset. Add initialization of field Needs_
8196 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8197 Reimplement how an object is first finalized, then deallocated.
8198 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8200 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8201 Register TSS_Finalize_Address with type TSS_Names.
8202 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8203 procedure provides the interface between an allocation / deallocation
8204 and the support machinery in Ada.Finalization.Heap_Management.
8205 (Find_Init_Call): Code reformatting.
8206 (Find_Init_Call_In_List): Code reformatting.
8207 (Find_Protection_Type): Moved from Exp_Ch9.
8208 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8209 (Has_Controlled_Coextensions): Removed.
8210 (Has_Controlled_Objects): New routine.
8211 (In_Library_Level_Package_Body): New routine.
8212 (Insert_Action_After): New routine.
8213 (Is_Finalizable_Transient): New routine. This predicate determines
8214 whether an object declaration is one of the many variants of controlled
8216 (Is_Null_Access_BIP_Func_Call): New routine.
8217 (Is_Non_BIP_Func_Call): New routine.
8218 (Is_Related_To_Func_Return): New routine.
8219 (Needs_Finalization): Moved from Exp_Ch7.
8220 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8221 (Find_Protection_Type): Moved from Exp_Ch9.
8222 (Has_Controlled_Coextensions): Removed.
8223 (Has_Controlled_Objects): New routine.
8224 (In_Library_Level_Package_Body): New routine.
8225 (Insert_Action_After): New routine.
8226 (Is_Finalizable_Transient): New routine.
8227 (Is_Null_Access_BIP_Func_Call): New routine.
8228 (Is_Non_BIP_Func_Call): New routine.
8229 (Is_Related_To_Func_Return): New routine.
8230 (Needs_Finalization): Moved from Exp_ch7.
8231 * expander.adb (Expand): Add a case for N_Free_Statement.
8232 * freeze.adb (Freeze_All): Replace the generation of a finalization
8233 list with a collection for access-to-controlled types.
8234 (Freeze_Entity): Code reformatting.
8235 (Freeze_Record_Type): Remove the freezing of a record controller
8237 (Freeze_Subprogram): Code reformatting.
8238 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8240 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8241 has a library-level finalizer.
8242 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8243 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8244 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8245 files. Add a-fihema to the list of object files.
8247 Alphabetize the associations in type Is_Parameterless_Attribute.
8248 * rtsfind.ads: Ada.Finalization_List.Controller and
8249 System.Finalization_Implementation are no longer a GNAT unit.
8250 Update the range of type Ada_Finalization_Child. Remove the following
8251 recoverable entities:
8253 RE_Attach_To_Final_List
8257 RE_Finalizable_Ptr_Ptr
8258 RE_Global_Final_List
8259 RE_Limited_Record_Controller
8262 RE_Record_Controller
8263 RE_Simple_List_Controller
8265 Add the following recoverable entities:
8267 RE_Add_Offset_To_Address
8271 RE_Exception_Identity
8272 RE_Finalization_Collection
8273 RE_Finalization_Collection_Ptr
8274 RE_Needs_Finalization
8275 RE_Save_Library_Occurrence
8276 RE_Set_Finalize_Address_Ptr
8277 RE_Set_Storage_Pool_Ptr
8279 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8281 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8282 (First_Stored_Discriminant): Remove the mention of Name_uController.
8283 * sem_aux.ads: Comment reformatting.
8284 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8285 to redecorate an already existing class-wide type.
8286 (Decorate_Tagged_Type): New parameter profile and associated comment.
8287 Create a "shadow class-wide type" for a shadow entity.
8288 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8289 of the final chain along with the associated comment.
8290 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8291 Full_Desig and set it to the full view of the designated type.
8292 Initialize the finalization collection to empty.
8293 (Build_Derived_Record_Type): Alphabetize local variables. Code
8295 (Collect_Fixed_Components): Remove the mention of Name_uController.
8296 (Create_Constrained_Components): Remove the mention of Name_uController.
8297 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8298 class-wide type of a shadow entity.
8299 (Process_Full_View): Update the machinery which marks type
8300 Limited_Controlled's entity as limited.
8301 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8302 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8303 list, instead make a collection build-in-place formal.
8304 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8305 a designated type in order to establish a match between the renaming
8306 and the renamed entity.
8307 (Find_Selected_Component): Add guard to prevent spurious exceptions
8308 from being raised on .NET/JVM.
8309 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8310 to the list of primitive that need special processing. Update arrays
8311 C_Names and D_Names.
8312 (Replace_Types): Handle class-wide types.
8313 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8314 different parameter profile, look at the first formal.
8315 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8316 use clauses for Exp_Util.
8317 * sem_res.adb: Remove with and use clauses for Elists.
8318 (Propagate_Coextensions): Removed.
8319 (Resolve_Allocator): Do not propagate the list of coextensions from one
8320 allocator to another.
8321 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8322 Deaccessed_T to Desig_Typ.
8323 (Enter_Name): Remove the mention of Name_uController.
8324 (Gather_Components): Remove the mention of Name_uController.
8325 (Incomplete_Or_Private_View): New routine.
8326 (Is_Coextension_Root): Removed.
8327 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8328 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8329 (Is_Coextension_Root): Removed.
8330 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8331 Controlled types are now derived from a null tagged record. Remove
8332 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8333 * sinfo.adb (Coextensions): Removed.
8334 (Set_Coextensions): Removed.
8335 * sinfo.ads: Remove Coextensions from the explanation of node fields
8336 and its uses in nodes.
8337 Update the field usage of N_Allocator.
8338 (Coextensions): Removed along with its pragma Inline.
8339 (Set_Coextensions): Removed along with its pragma Inline.
8340 * snames.ads-tmpl: Remove names
8345 Name_uLocal_Final_List
8346 Name_Finalization_Root
8353 Name_Finalize_Address
8354 * s-pooglo.adb (Allocate): Add overriding indicator.
8355 (Deallocate): Add overriding indicator.
8356 (Storage_Size): Add overriding indicator.
8357 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8358 than Finalize_Global_List.
8359 (Null_Finalize_Global_List): Removed.
8360 (Save_Library_Occurrence): New routine.
8361 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8362 initialization. Add variable Finalize_Library_Objects along with its
8363 pragma Export. Add variables Library_Exception and
8364 Library_Exception_Set along with their pragma Export.
8365 (Null_Finalize_Global_List): Removed.
8366 (Save_Library_Occurrence): New routine.
8367 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8368 rather than Finalize_Global_List.
8369 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8370 of the constructed node.
8372 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8374 * link.c: Include "auto-host.h" before system headers.
8376 2011-08-03 Vincent Celier <celier@adacore.com>
8378 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8379 that are not extended. Do not check if a library project that is
8380 extended should be regenerated. Do not add to table Library_Paths the
8381 libraries that are in extended projects. Link only with libraries that
8382 are in libray projects that are not extended.
8383 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8384 for a library project that is extended.
8386 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8388 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8389 conforming subprogram renamings that appear to be completions if they
8390 are not fully conformant.
8391 Such renamings are homographs but not completions.
8392 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8393 names in a subprogram renaming that appears in an instance.
8395 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8397 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8398 not immutably limited, build actual subtype from expression to provide
8399 proper bounds to caller.
8401 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8403 * sem_ch8.adb: Minor comment correction.
8405 2011-08-03 Thomas Quinot <quinot@adacore.com>
8407 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8408 returning a limited array, use an extended return statement.
8410 2011-08-03 Vincent Celier <celier@adacore.com>
8412 * make.adb (Initialize): If --subdirs= is used, but no project file is
8413 specified, attempt to create the specify subdir if it does not already
8414 exist and use it as the object directory as if -D had been specified.
8416 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8418 * s-tpopsp-vms.adb: New file.
8419 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8420 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8422 2011-08-03 Emmanuel Briot <briot@adacore.com>
8424 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8427 2011-08-03 Yannick Moy <moy@adacore.com>
8429 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8430 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8431 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8432 detect that an array has static bounds.
8434 2011-08-03 Thomas Quinot <quinot@adacore.com>
8436 * exp_dist.adb: Minor reformatting.
8438 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8440 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8441 (ATCB_Key): Removed, not always used.
8443 2011-08-03 Emmanuel Briot <briot@adacore.com>
8445 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8446 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8447 most remaining global variables.
8449 2011-08-03 Robert Dewar <dewar@adacore.com>
8451 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8452 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8455 2011-08-03 Javier Miranda <miranda@adacore.com>
8457 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8458 that must be passed by copy in VM targets.
8460 2011-08-03 Emmanuel Briot <briot@adacore.com>
8462 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8463 duplicates a similar htable now in the project tree.
8465 2011-08-03 Claire Dross <dross@adacore.com>
8467 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8468 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8469 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8470 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8471 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8472 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8473 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8476 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8478 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8479 (ATCB_Key): Removed, not always used.
8480 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8482 * s-tpopsp-tls.adb: New file.
8483 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8484 x86/x64/ia64/powerpc/sparc Linux.
8486 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8488 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8489 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8491 2011-08-03 Thomas Quinot <quinot@adacore.com>
8493 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8494 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8495 Fix type selection for mapping integer types to PolyORB types.
8497 2011-08-03 Bob Duff <duff@adacore.com>
8499 * sem_ch7.adb: Minor comment clarification.
8501 2011-08-03 Bob Duff <duff@adacore.com>
8503 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8504 an error analyzing a choice, skip further processing. Further
8505 processing could cause a crash or cascade errors.
8507 2011-08-03 Emmanuel Briot <briot@adacore.com>
8509 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
8510 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
8511 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
8512 prj-env.ads (Shared_Project_Tree_Data): new type
8513 An aggregate project and its aggregated trees need to share the common
8514 data structures used for lists of strings, packages,... This makes the
8515 code simpler since otherwise we have to pass the root tree (also used
8516 for the configuration file data) in addition to the current project
8517 tree. This also avoids ambiguities as to which tree should be used.
8518 And finally this saves a bit of memory.
8519 (For_Every_Project_Imported): new parameter Tree.
8520 Since aggregated projects are using a different tree, we need to let
8521 the caller know which tree to use to manipulate the returned project.
8523 2011-08-03 Robert Dewar <dewar@adacore.com>
8525 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
8526 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
8527 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
8528 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
8530 2011-08-03 Javier Miranda <miranda@adacore.com>
8532 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
8533 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
8535 2011-08-03 Bob Duff <duff@adacore.com>
8537 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
8540 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
8542 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
8543 g-sehash.ads: Fix typo. Update header.
8545 2011-08-03 Thomas Quinot <quinot@adacore.com>
8547 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
8550 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8552 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
8553 prefixes of private types along with records, since the selector may be
8555 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
8556 private types along with records, since the selector may be a
8559 2011-08-03 Emmanuel Briot <briot@adacore.com>
8561 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
8563 2011-08-03 Javier Miranda <miranda@adacore.com>
8565 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
8566 Tagged_Type_Expansion.
8568 2011-08-03 Yannick Moy <moy@adacore.com>
8570 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
8571 violation when the argument of concatenation is the name of a
8574 2011-08-03 Emmanuel Briot <briot@adacore.com>
8576 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
8577 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
8578 (Process_Declarative_Items): new parameter Child_Env.
8580 2011-08-03 Yannick Moy <moy@adacore.com>
8582 * alfa.ads: Update format of ALFA section in ALI file in order to
8583 add a mapping from bodies to specs when both are present.
8584 (ALFA_Scope_Record): Add components for spec file/scope.
8585 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
8587 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
8588 collected, fill in the spec information when relevant.
8589 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
8592 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8594 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
8595 code unit to decide whether to add internally generated subprograms.
8597 2011-08-03 Javier Miranda <miranda@adacore.com>
8599 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
8600 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
8601 be handled by copy in VM targets.
8603 2011-08-03 Emmanuel Briot <briot@adacore.com>
8605 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
8606 code with Makeutl.Get_Switches.
8607 * prj-tree.adb: Update comment.
8609 2011-08-03 Thomas Quinot <quinot@adacore.com>
8611 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
8612 subprogram with a limited formal that does not support external
8615 2011-08-03 Yannick Moy <moy@adacore.com>
8617 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
8619 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
8620 not from current unit in two phases, because it is not possible to
8621 change the table while iterating over its content.
8622 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
8624 2011-08-03 Sergey Rybin <rybin@adacore.com>
8626 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
8627 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
8629 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8631 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
8632 and the component type is composite, this is ambiguous for predefined
8633 concatenation, but if the node is not overloaded and the entity is a use
8634 -defined function its profile can be used to resolve that aggregate.
8636 2011-08-03 Robert Dewar <dewar@adacore.com>
8638 * exp_ch4.adb: Minor code cleanup.
8640 2011-08-03 Thomas Quinot <quinot@adacore.com>
8642 * exp_dist.adb: Do not generate distribution stubs if serious errors
8643 have been diagnosed.
8645 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8647 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
8648 the first formal of a primitive operation, go to the base type to
8649 handle properly an access to a derived type with constrained
8651 * sem_type.adb (Disambiguate): an immediately visible operator hides a
8652 user-defined function that is only use-visible.
8654 2011-08-03 Robert Dewar <dewar@adacore.com>
8656 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
8657 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
8658 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
8659 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
8660 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
8661 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
8662 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
8663 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
8665 2011-08-03 Robert Dewar <dewar@adacore.com>
8667 * repinfo.adb (List_Mechanism): Add handling of
8668 Convention_Ada_Pass_By_XXX.
8669 * sem_mech.adb (Set_Mechanism): Ditto.
8670 * sem_prag.adb (Process_Convention): Add entries for
8671 Convention_Ada_Pass_By_XXX.
8672 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
8674 2011-08-03 Pascal Obry <obry@adacore.com>
8676 * makeutl.adb: Minor reformatting.
8678 2011-08-03 Vincent Celier <celier@adacore.com>
8681 (Get_File_Name) If the file cannot be found when there are no config
8682 pragmas file and May_Fail is True, return No_File instead of the file
8683 name, to be consistent.
8685 2011-08-03 Pascal Obry <obry@adacore.com>
8687 * adaint.c (__gnat_is_executable_file_attr): Avoid access
8690 2011-08-03 Javier Miranda <miranda@adacore.com>
8693 (Same_Representation): In VM targets the representation of arrays with
8694 aliased components differs from arrays with non-aliased components.
8696 2011-08-03 Emmanuel Briot <briot@adacore.com>
8698 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
8699 not systematically lower case attribute indexes that contain no "."
8700 Fix definition of several Naming attributes, which take
8701 a unit name as index and therefore should be case insensitive.
8702 Minor refactoring (reduce length of variable names).
8704 2011-08-03 Emmanuel Briot <briot@adacore.com>
8706 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
8708 2011-08-03 Emmanuel Briot <briot@adacore.com>
8710 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
8711 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
8712 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
8713 prj-tree.ads (Prj.Tree.Environment): new type.
8715 2011-08-03 Emmanuel Briot <briot@adacore.com>
8717 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
8718 prj-tree.adb, prj-tree.ads (Environment): new type.
8720 2011-08-03 Emmanuel Briot <briot@adacore.com>
8722 * prj-tree.ads: Remove unused variable.
8724 2011-08-03 Yannick Moy <moy@adacore.com>
8726 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8727 issuing messages related to SPARK restriction violation.
8729 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8731 * sem_ch6.adb: guard against error nodes in return statements.
8733 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8735 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
8736 a warning can only appear on a configuration file, so emit warning
8737 without further checks.
8739 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8741 * s-interr.ads: add overriding keyword.
8743 2011-08-03 Geert Bosch <bosch@adacore.com>
8745 * exp_attr.adb: Fix minor typo.
8747 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8749 * par-ch4.adb: improve error recovery.
8751 2011-08-03 Emmanuel Briot <briot@adacore.com>
8753 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
8754 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
8757 2011-08-03 Emmanuel Briot <briot@adacore.com>
8759 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
8760 "external" as an attribute name in aggregate projects.
8762 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8764 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
8765 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
8766 from 0, so we need to adjust.
8768 2011-08-03 Emmanuel Briot <briot@adacore.com>
8770 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
8771 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
8773 2011-08-03 Yannick Moy <moy@adacore.com>
8775 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
8776 restriction on overloaded entity if the entity is not an operator.
8778 2011-08-03 Yannick Moy <moy@adacore.com>
8780 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
8781 restrict.ads: Rename remaining Check_Formal_Restriction* into
8782 Check_SPARK_Restriction*.
8784 2011-08-03 Emmanuel Briot <briot@adacore.com>
8786 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
8787 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
8789 (Project_Empty): removed
8790 (Empty_Project): new parameter Qualifier
8791 This is used to have fields specific to aggregate projects, cleaner
8792 New field to store the list of aggregated projects.
8793 (Check_Aggregate_Project): removed
8794 (Process_Aggregated_Projects, Free): new subprograms.
8796 2011-08-03 Olivier Hainque <hainque@adacore.com>
8798 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
8800 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8802 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
8803 explicit dereference of an unconstrained type, create a constrained
8804 subtype for it, as is done for function calls that return an
8807 2011-08-03 Thomas Quinot <quinot@adacore.com>
8809 * g-pehage.adb (Finalize): Avoid possible double-free.
8811 2011-08-03 Steve Baird <baird@adacore.com>
8813 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
8814 Elab_Spec/Body attrs in CodePeer_Mode.
8816 2011-08-03 Javier Miranda <miranda@adacore.com>
8818 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
8819 low bound is not known at compile time but they have no others choice.
8820 Done because in this case the bounds can be obtained directly from the
8823 2011-08-03 Ed Falis <falis@adacore.com>
8825 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
8826 on VxWorks SMP. Remove unusable constant ANY_CPU.
8828 2011-08-03 Emmanuel Briot <briot@adacore.com>
8830 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
8831 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
8832 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
8833 Prj.Env.Initialize_Empty): new subprograms
8834 (Get_Env, Find_Project): remove parameter Target_Name.
8836 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8838 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
8839 as a condition for the delayed call to Derived_Subprograms done for the
8840 case of the rewriting of a derived type that constrains the
8841 discriminants of its parent type.
8842 Avoids redundant subprogram derivations for private subtype derivations.
8844 2011-08-03 Javier Miranda <miranda@adacore.com>
8846 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
8847 Build_Record_Aggr_Code.
8848 (Build_Record_Aggr_Code): Add missing support to initialize hidden
8849 discriminants in extension aggregates.
8851 2011-08-03 Emmanuel Briot <briot@adacore.com>
8853 * prj-pp.adb (Print): also output project qualifiers, since in
8854 particular "aggregate" is mandatory in an aggregate project.
8856 2011-08-03 Emmanuel Briot <briot@adacore.com>
8858 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
8859 (Debug_Output): new function.
8861 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8863 * gnat_ugn.texi: Document -Wstack-usage.
8864 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
8866 2011-08-03 Thomas Quinot <quinot@adacore.com>
8868 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
8869 have keyword LIMITED.
8871 2011-08-03 Yannick Moy <moy@adacore.com>
8873 * alfa.adb, alfa.ads, alfa_test.adb: New files.
8874 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
8875 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
8876 section (does not happen in compiler, only if code directly calls
8878 * get_alfa.adb, get_alfa.ads: New files.
8879 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
8881 * lib-xref-alfa.adb: New file.
8882 * lib-xref.adb, lib-xref.ads
8883 (Xref_Entry): redefine information needed in cross-references for ALFA.
8884 Push ALFA treatments in separated local package.
8885 (Enclosing_Subpragram_Or_Package): treat specially subprogram
8886 identifiers. Return entity of package body instead of spec. Return
8887 Empty for a scope with no location.
8888 (Generate_Reference): adapt to new components for ALFA information.
8889 Remove the need for D references on definitions.
8890 (Is_Local_Reference): moved to ALFA local package
8891 (Output_References): extract subfunction as Extract_Source_Name
8892 (Output_Local_References): remove procedure, replaced by filtering of
8893 cross-references in package ALFA and printing in Put_ALFA.
8894 (Write_Entity_Name): remove procedure
8895 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
8896 print exact name of entity as it appears in source file
8897 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
8898 * put_alfa.adb, put_alfa.ads: New files.
8899 * xref_lib.adb (Search_Xref): protect read of cross-references against
8900 reading other sections of the ALI file, in gnatxref
8901 (Search): protect read of cross-references against reading other
8902 sections of the ALI file, in gnatfind.
8903 * gcc-interface/Make-lang.in: Update dependencies.
8905 2011-08-03 Thomas Quinot <quinot@adacore.com>
8907 * sem_ch3.adb: Minor reformatting.
8909 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8911 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
8912 raising an exception.
8914 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8916 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
8917 type, always use 1 as the lower bound or string, even if lower bound of
8918 context is not static, to handle properly null strings in a non-static
8921 2011-08-03 Bob Duff <duff@adacore.com>
8923 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
8924 always legal on the right-hand side of an assignment statement; there
8925 is always an applicable index constraint in this case. Therefore, the
8926 check for Pkind = N_Assignment_Statement is now unconditional -- it
8927 doesn't depend on whether Is_Constrained (Typ).
8929 2011-08-03 Robert Dewar <dewar@adacore.com>
8931 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
8933 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8935 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
8936 for an itype created within a generic unit.
8938 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8940 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
8941 suppresses all inlining.
8943 2011-08-03 Robert Dewar <dewar@adacore.com>
8945 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
8946 exp_aggr.adb: Minor reformatting.
8948 2011-08-03 Thomas Quinot <quinot@adacore.com>
8950 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
8951 tagged assignment when discriminant checks are suppressed. This is
8952 useless and extremely costly in terms of static stack usage.
8954 2011-08-03 Bob Duff <duff@adacore.com>
8956 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
8957 of generics, because this leads to the wrong entity in the wrong scope,
8958 causing (e.g.) pragma Export_Procedure to get an error if the entity is
8960 (Process_Interface_Name): Follow Alias for instances of generics, to
8961 correct for the above change.
8963 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8965 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
8966 is an integer literal it is always safe to replace the reference. In
8967 addition, if the reference appears in the generated code for an object
8968 declaration it is necessary to copy because otherwise the reference
8969 might be to the uninitilized value of the discriminant of the object
8972 2011-08-03 Pascal Obry <obry@adacore.com>
8974 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
8975 ACL used, in this case we want to check for ending .exe, not .exe
8976 anywhere in the path.
8978 2011-08-03 Sergey Rybin <rybin@adacore.com>
8980 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8981 the tree structure (semantic decoration of references to record
8984 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8986 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
8987 choices of a named array aggregate, bail out when any choices are
8988 marked as Errors_Posted.
8990 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8992 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
8993 in which entity is frozen, to handle properly loop variables in
8996 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8998 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
8999 subtype is not static, compute the upper bound using attributes, to
9000 handle properly index types that are not integer types.
9002 2011-08-03 Bob Duff <duff@adacore.com>
9004 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9005 Update copyright notice.
9007 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9009 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9010 Original_Discriminant if within an instance.
9011 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9013 2011-08-03 Thomas Quinot <quinot@adacore.com>
9015 * einfo.ads: Minor reformatting.
9017 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9019 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9020 composite type with an unfrozen subcomponent, in the profile of a
9021 primitive operation.
9023 2011-08-03 Robert Dewar <dewar@adacore.com>
9025 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9027 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9029 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9030 unconstrained type with discriminants is initialized with an aggregate,
9031 use the constrained subtype of the aggregate as the type of the object,
9032 because it is immutable, and this allows the back-end to generate no
9033 code for the object declaration.
9035 2011-08-03 Robert Dewar <dewar@adacore.com>
9037 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9038 comparison operand is variable, and turns out to be zero or negative.
9040 2011-08-03 Javier Miranda <miranda@adacore.com>
9043 (Expand_Dispatching_Constructor_Call): Disable expansion of
9044 code required for native targets. Done to avoid generating
9045 references to unavailable runtime entities in VM targets.
9047 (Expand_N_Object_Declaration): Add missing support to handle
9048 the explicit initialization of class-wide interface objects.
9051 2011-08-03 Matthew Heaney <heaney@adacore.com>
9053 * a-cobove.adb (Merge): Move source onto target, instead of using
9056 2011-08-03 Matthew Heaney <heaney@adacore.com>
9058 * a-cbdlli.adb (Splice): Move source items from first to last.
9060 2011-08-03 Yannick Moy <moy@adacore.com>
9062 * sem_util.ads: Add comment.
9064 2011-08-03 Javier Miranda <miranda@adacore.com>
9067 (Expand_Record_Aggregate): In VM targets disable the expansion into
9068 assignments of aggregates whose type is not known at compile time.
9070 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9072 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9073 protected entries and task entries, to build the proper renaming
9074 declaration for entry formals, used in debugging.
9075 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9076 parameters in the same way.
9078 2011-08-02 Robert Dewar <dewar@adacore.com>
9080 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9081 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9082 code reorganization.
9084 2011-08-02 Robert Dewar <dewar@adacore.com>
9086 * debug.adb: Debug flag d.P to suppress length comparison optimization
9087 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9088 comparison of Length by comparing First/Last instead.
9090 2011-08-02 Matthew Heaney <heaney@adacore.com>
9092 * a-cobove.ads: Code clean up.
9094 2011-08-02 Vincent Celier <celier@adacore.com>
9096 * adaint.c (file_names_case_sensitive_cache): New static int.
9097 (__gnat_get_file_names_case_sensitive): Cache the return value in
9098 file_names_case_sensitive_cache at the first invocation, to avoid
9099 multiple calls to getenv.
9101 2011-08-02 Bob Duff <duff@adacore.com>
9103 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9105 2011-08-02 Yannick Moy <moy@adacore.com>
9107 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9108 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9109 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9110 indicate that we are in a precondition or postcondition. This is used in
9111 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9112 decide whether to flag the spec or body of the current subprogram as
9115 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9117 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9119 * a-extiin.ads: New file.
9121 2011-08-02 Bob Duff <duff@adacore.com>
9123 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9124 now raises Name_Error instead of Use_Error in certain cases. The other
9125 parts of this AI were already implemented properly.
9127 2011-08-02 Vincent Celier <celier@adacore.com>
9129 * link.c: Only import "auto-host.h" when building the gnattools.
9131 2011-08-02 Yannick Moy <moy@adacore.com>
9133 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9134 which calls a local subprogram, so extract subprogram
9135 from Mark_Non_ALFA_Subprogram_Body.
9137 2011-08-02 Javier Miranda <miranda@adacore.com>
9140 (Extract_Dispatching_Call): If the type of the dispatching object is an
9141 access type then return an explicit dereference in the Object out-mode
9144 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9146 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9147 compatibility checks for all indexes of an array subtype, not just the
9148 first. Reset Has_Dynamic_Range_Check on the subtype before each
9149 potential check to ensure that Insert_Range_Checks will not elide any
9150 of the dynamic checks.
9152 2011-08-02 Yannick Moy <moy@adacore.com>
9154 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9155 SPARK restriction at parsing time.
9156 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9157 directive only if the SPARK restriction is set for this unit.
9159 2011-08-02 Yannick Moy <moy@adacore.com>
9161 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9162 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9163 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9164 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9165 Mark_Non_ALFA_Subprogram_Body.
9166 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9169 2011-08-02 Yannick Moy <moy@adacore.com>
9171 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9174 2011-08-02 Robert Dewar <dewar@adacore.com>
9176 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9177 exp_ch3.adb: Minor reformatting.
9179 2011-08-02 Emmanuel Briot <briot@adacore.com>
9181 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9182 files, not any regular file.
9183 (__gnat_locate_file_with_predicate): new subprogram.
9185 2011-08-02 Yannick Moy <moy@adacore.com>
9187 * sinfo.adb, sinfo.ads: Restrict the use of flags
9188 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9189 nodes, plus N_Subtype_Declaration for the 2nd one.
9191 2011-08-02 Sergey Rybin <rybin@adacore.com>
9193 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9194 - fix bugs in the description of Source_Trace;
9195 - get rid of UNIT_NAME;
9197 2011-08-02 Javier Miranda <miranda@adacore.com>
9200 (Build_Dispatching_Requeue): Adding support for VM targets
9201 since we cannot directly reference the Tag entity.
9202 * exp_sel.adb (Build_K): Adding support for VM targets.
9203 (Build_S_Assignment): Adding support for VM targets.
9205 (Default_Prim_Op_Position): In VM targets do not restrict availability
9206 of predefined interface primitives to compiling in Ada 2005 mode.
9207 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9208 restricted to compiling in Ada 2005 mode.
9209 (Make_VM_TSD): Generate code that declares and initializes the OSD
9210 record. Needed to support dispatching calls through synchronized
9213 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9214 primitives associated with synchronized interfaces.
9215 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9216 primitives associated with synchronized interfaces.
9218 2011-08-02 Yannick Moy <moy@adacore.com>
9220 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9221 statements hidden in SPARK if preceded by the HIDE directive
9222 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9223 exception handlers as hidden in SPARK if preceded by the HIDE directive
9224 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9225 if starting with the HIDE directive
9226 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9227 starting with the HIDE directive; mark the declarations in a private
9228 part as hidden in SPARK if the private part starts with the HIDE
9230 * restrict.adb, restrict.ads
9231 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9232 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9233 argument node belongs to a part which is hidden in SPARK
9234 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9235 parts in SPARK; protect the possibly costly call to
9236 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9237 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9238 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9239 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9241 (Scan): recognize special comment starting with '#' and followed by
9242 SPARK keyword "hide" as a HIDE directive.
9244 2011-08-02 Yannick Moy <moy@adacore.com>
9246 * types.ads, erroutc.ads: Minor reformatting.
9248 2011-08-02 Vincent Celier <celier@adacore.com>
9250 * link.c: Add response file support for cross platforms.
9252 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9254 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9255 in an association, set parent field of copy before partial analysis.
9256 * sem_res.adb (Resolve_Slice): create reference to itype only when
9257 expansion is enabled.
9259 2011-08-02 Yannick Moy <moy@adacore.com>
9261 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9262 for new flag denoting which subprogram bodies are in ALFA
9263 * restrict.adb, sem_ch7.adb: Update comment
9264 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9265 sem_ch9.adb, sem_res.adb: Add calls to
9266 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9267 * sem_ch6.adb (Analyze_Function_Return): add calls to
9268 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9269 middle of the body, and extended return.
9270 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9271 False when missing return.
9272 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9273 to True for subprograms whose spec is in ALFA. Remove later on the flag
9274 on the entity used for a subprogram body when there exists a separate
9276 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9277 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9278 False, otherwise do nothing.
9280 2011-08-02 Robert Dewar <dewar@adacore.com>
9282 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9284 2011-08-02 Yannick Moy <moy@adacore.com>
9286 * sem_ch4.ads: minor formatting.
9288 2011-08-02 Yannick Moy <moy@adacore.com>
9290 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9291 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9292 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9293 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9294 opt.ads: cleanup of SPARK mode
9296 2011-08-02 Yannick Moy <moy@adacore.com>
9298 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9300 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9301 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9303 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9304 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9305 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9306 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9308 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9310 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9311 functions whose return type is not in ALFA.
9312 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9314 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9315 parameter's type is not in ALFA.
9316 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9319 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9321 * sem_ch6 (Analyze_Expression_Function): treat the function as
9322 Inline_Always, and introduce a subprogram declaration for it when it is
9324 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9325 expression functions, so that the back-end can determine whether they
9326 can in fact be inlined.
9327 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9328 a function body comes from an expression function.
9330 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9332 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9333 null exclusions to test Can_Never_Be_Null on the anonymous access types
9334 of the formals rather than testing the formals themselves. Exclude this
9335 check in cases where the Old_Formal is marked as a controlling formal,
9336 to avoid issuing spurious errors for bodies completing dispatching
9337 operations (due to the flag not getting set on controlling access
9338 formals in body specs).
9339 (Find_Corresponding_Spec): When checking full and subtype conformance of
9340 subprogram bodies in instances, pass Designated and E in that order, for
9341 consistency with the expected order of the formals (New_Id followed by
9344 2011-08-02 Robert Dewar <dewar@adacore.com>
9346 * sem_ch8.adb: Minor reformatting.
9348 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9350 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9351 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9352 primitive operations of class-wide actuals.
9354 2011-08-02 Javier Miranda <miranda@adacore.com>
9356 * exp_atag.ads, exp_atag.adb
9357 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9358 since its value is implicitly passed in argument Typ.
9359 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9360 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9361 Build_Common_Dispatching_Select_Statements.
9363 2011-08-02 Robert Dewar <dewar@adacore.com>
9365 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9366 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9369 2011-08-02 Robert Dewar <dewar@adacore.com>
9371 * sem_res.adb: Minor reformatting.
9372 * sem_prag.adb: Minor reformatting.
9374 2011-08-02 Javier Miranda <miranda@adacore.com>
9376 * exp_atag.adb, exp_atags.ads
9377 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9378 by the tagged type Entity. Required to use this routine in the VM
9379 targets since we do not have available the Tag entity in the VM
9382 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9383 Ada.Tags has not been previously loaded.
9385 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9386 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9388 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9389 view of enclosing scopes. Required to handle enclosing scopes that
9390 are synchronized types whose full view is a task type.
9392 (Build_VM_TSDs): Minor code improvement to avoid generating and
9393 analyzing lists with empty nodes.
9394 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9395 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9396 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9397 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9398 (Make_Select_Specific_Data_Table): Add support for VM targets.
9399 (Make_VM_TSD): Generate code to initialize the SSD structure of
9402 2011-08-02 Yannick Moy <moy@adacore.com>
9404 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9405 cross-references section in ALI.
9406 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9407 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9409 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9410 subprogram or package entity of a node
9411 (Is_Local_Reference_Type): new function returns True for references
9412 selected in local cross-references.
9413 (Lt): function extracted from Lt in Output_References
9414 (Write_Entity_Name): function extracted from Output_References
9415 (Generate_Definition): generate reference with type 'D' for definition
9416 of objects (object declaration and parameter specification), with
9417 appropriate locations and units, for use in local cross-references.
9418 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9419 references of type 'I' for initialization in object definition.
9420 (Output_References): move part of function Lt and procedure
9421 Write_Entity_Name outside of the body. Ignore references of types 'D'
9422 and 'I' introduced for local cross-references.
9423 (Output_Local_References): new procedure to output the local
9424 cross-references sections.
9425 (Lref_Entity_Status): new array defining whether an entity is a local
9426 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9427 with 'I' type when initialization expression is present.
9428 * get_scos.adb, get_scos.ads: Correct comments and typos
9430 2011-08-02 Javier Miranda <miranda@adacore.com>
9432 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9434 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9436 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9439 2011-08-02 Vincent Celier <celier@adacore.com>
9441 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9442 (No_Space_Img): New function
9443 (Find_Excluded_Sources): When reading from a file, record the file name
9444 and the line number for each excluded source.
9445 (Mark_Excluded_Sources): When reporting an error, if the excluded
9446 sources were read from a file, include file name and line number in
9449 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9451 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9453 2011-08-02 Robert Dewar <dewar@adacore.com>
9455 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9457 2011-08-02 Javier Miranda <miranda@adacore.com>
9459 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9460 generation of TSDs to the DOTNET compiler.
9461 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9462 generation of TSDs to the DOTNET compiler.
9464 2011-08-02 Javier Miranda <miranda@adacore.com>
9466 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9467 record of all the tagged types declared inside library level package
9468 declarations, library level package bodies or library level subprograms.
9469 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9470 associated with a given tagged type.
9471 (Build_VM_TSDs): New subprogram.
9472 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9473 compilation units that are subprograms.
9474 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9475 compilation units that are package bodies.
9476 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9477 units that are a package declaration or a package instantiation.
9478 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9479 reorganization to improve the error generated by the frontend when the
9480 function Ada.Tags.Secondary_Tag is not available.
9481 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9482 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9484 2011-08-02 Javier Miranda <miranda@adacore.com>
9486 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9488 2011-08-02 Robert Dewar <dewar@adacore.com>
9490 * s-imenne.ads: Minor reformatting.
9492 2011-08-02 Robert Dewar <dewar@adacore.com>
9494 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9495 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9496 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9498 2011-08-02 Robert Dewar <dewar@adacore.com>
9500 * einfo.ads (Materialize_Entity): Document this is only for renamings
9501 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9502 required debug information in the case where we transform the object
9503 declaration into a renaming declaration.
9504 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9506 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9509 2011-08-02 Robert Dewar <dewar@adacore.com>
9511 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9512 Suppress_Init_Procs.
9513 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9514 Suppress_Initialization/Initialization_Suppressed.
9515 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9516 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9517 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9518 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9520 2011-08-02 Robert Dewar <dewar@adacore.com>
9522 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9525 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9527 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9528 only have inheritable classwide pre/postconditions.
9530 2011-08-02 Javier Miranda <miranda@adacore.com>
9532 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9533 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9534 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9535 checks if the external tag of a type is the same as the external tag
9536 of some other declaration.
9538 2011-08-02 Thomas Quinot <quinot@adacore.com>
9540 * s-taskin.ads: Minor reformatting.
9542 2011-08-02 Emmanuel Briot <briot@adacore.com>
9544 * g-comlin.adb (Display_Help): swap the order in which it prints the
9545 short help and the general usage.
9547 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9549 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9550 the aspect declarations and attach them to the generic copy for
9551 subsequent analysis.
9552 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9553 declarations of the generic tree to the new subprogram declarations.
9554 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9555 conditions that apply to a subprogram instance.
9557 2011-08-02 Robert Dewar <dewar@adacore.com>
9559 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9561 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9563 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9564 private type with a tagged full view is not derived in the immediate
9565 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9567 2011-08-02 Robert Dewar <dewar@adacore.com>
9569 * exp_ch4.adb: Minor reformatting.
9571 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9573 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9574 Ada2012 iterator, the loop will be rewritten during expansion into a
9575 while loop with a cursor and an element declaration. Do not analyze the
9576 body in this case, because if the container is for indefinite types the
9577 actual subtype of the elements will only be determined when the cursor
9578 declaration is analyzed.
9580 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9582 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9583 size/alignment related attributes in CodePeer_Mode.
9585 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9587 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9588 Prepend_Element, since this can result in the operation getting the
9589 wrong slot in the full type's dispatch table if the full type has
9590 inherited operations. The incomplete type's operation will get added
9591 to the proper position in the full type's primitives
9592 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9593 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9594 dispatching operations, since there are cases where nonprimitive
9595 subprograms can get added to the list of incomplete dependents (such
9596 as subprograms in nested packages).
9597 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9598 private part when determining whether to add a primitive with a
9599 parameter of a tagged incomplete type to the Private_Dependents list.
9600 Such primitives can also occur in the visible part, and should not have
9601 been excluded from being private dependents.
9602 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9603 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9604 list of a Taft-amendment incomplete type is a primitive before issuing
9605 an error that the full type must appear in the same unit. There are
9606 cases where nonprimitives can be in the list (such as subprograms in
9608 * sem_disp.adb (Derives_From): Use correct condition for checking that
9609 a formal's type is derived from the type of the corresponding formal in
9610 the parent subprogram (the condition was completely wrong). Add
9611 checking that was missing for controlling result types being derived
9612 from the result type of the parent operation.
9614 2011-08-02 Yannick Moy <moy@adacore.com>
9616 * errout.adb (First_Node): minor renaming
9617 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9620 2011-08-02 Yannick Moy <moy@adacore.com>
9622 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9623 before accessing operands.
9624 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9625 decide whether an initialization expression respects SPARK rules, as
9626 the plain node is the expanded one. This allows for more valid warnings
9628 * gnat_rm.texi: Minor update.
9630 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9632 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9635 2011-08-02 Robert Dewar <dewar@adacore.com>
9637 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9639 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9641 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9642 loop statements and the element renaming declaration with a block when
9643 the element type is controlled.
9645 2011-08-02 Yannick Moy <moy@adacore.com>
9647 * sinfo.ads: Minor formatting.
9649 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9651 * sem_aggr.adb (Add_Association): if the association has a box and no
9652 expression, use the Sloc of the aggregate itself for the new
9654 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9657 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9659 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9660 When a container is provided via a function call, generate a renaming
9661 of the function result. This avoids the creation of a transient scope
9662 and the premature finalization of the container.
9663 * exp_ch7.adb (Is_Container_Cursor): Removed.
9664 (Wrap_Transient_Declaration): Remove the supression of the finalization
9665 of the list controller when the declaration denotes a container cursor,
9668 2011-08-02 Yannick Moy <moy@adacore.com>
9670 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9671 node is from source, instead of the original node being from source.
9673 (Resolve_Array_Aggregate): refine the check for a static expression, to
9674 recognize also static ranges
9675 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9676 Array_Type_Declaration): postpone the test for the type being a subtype
9677 mark after the type has been resolved, so that component-selection and
9678 expanded-name are discriminated.
9679 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9680 to distinguish the case of an iteration scheme, so that an error is
9681 issed on a non-static range in SPARK except in an iteration scheme.
9682 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9683 In_Iter_Schm = True.
9684 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9685 user-defined operators so that they are allowed in renaming
9687 (Find_Selected_Component): refine the check for prefixing of operators
9688 so that they are allowed in renaming. Move the checks for restrictions
9689 on selector name after analysis discriminated between
9690 component-selection and expanded-name.
9691 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9692 concatenation argument of string type if it is static.
9693 * sem_util.adb, sem_util.ads
9694 (Check_Later_Vs_Basic_Declarations): add a new function
9695 Is_Later_Declarative_Item to decice which declarations are allowed as
9696 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9697 mode, add that renamings are considered as later items.
9698 (Enclosing_Package): new function to return the enclosing package
9699 (Enter_Name): correct the rule for homonyms in SPARK
9700 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9701 from source (result of expansion) to avoid issuing wrong warnings.
9703 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9705 * errout.adb: On anything but an expression First_Node returns its
9708 2011-08-02 Pascal Obry <obry@adacore.com>
9710 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9712 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9714 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9715 Set the associated loop as the related expression of internally
9717 * exp_ch7.adb (Is_Container_Cursor): New routine.
9718 (Wrap_Transient_Declaration): Supress the finalization of the list
9719 controller when the declaration denotes a container cursor.
9721 2011-08-02 Yannick Moy <moy@adacore.com>
9723 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9725 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9726 expression is a simple expression. This check cannot be performed in
9727 the semantics, so just drop it.
9728 (P_Index_Or_Discriminant_Constraint): move check that the index or
9729 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9730 semantics. Other cases were previously checked in the semantics.
9731 * par-ch4.adb (P_Name): move checks that a selector name is not
9732 character literal or an operator symbol to Find_Selected_Component in
9734 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9735 declarations are not placed after later declarations in a separate
9736 procedure in Sem_Util (possibly not the best choice?), to be used both
9737 during parsing, for Ada 83 mode, and during semantic analysis, for
9739 * par-endh.adb (Check_End): move check that end label is not missing
9740 to Process_End_Label in the semantics
9741 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9742 the special case for SPARK restriction
9743 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9744 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9745 parameter Force to issue the error message even on internal node (used
9746 for generated end label). Call Check_Restriction to check when an error
9747 must be issued. In SPARK mode, issue an error message even if the
9748 restriction is not set.
9749 (Check_Restriction): new procedure with an additional out parameter to
9750 inform the caller that a message has been issued
9751 * sem_aggr.adb: Minor modification of message
9752 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9753 instead of issuing an error message directly
9754 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9755 declarations are not placed after later declarations, by calling
9756 Check_Later_Vs_Basic_Declarations
9757 (Analyze_Subtype_Declaration): move here the check that an index or
9758 discriminant constraint must be a subtype mark. Change the check that
9759 a subtype of String must start at one so that it works on subtype marks.
9760 * sem_ch4.adb (Analyze_Call): move here the check that a named
9761 association cannot follow a positional one in a call
9762 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9763 instead of issuing an error message directly
9764 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9765 selector name is not a character literal or an operator symbol. Move
9766 here the check that the prefix of an expanded name cannot be a
9767 subprogram or a loop statement.
9768 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9769 procedure called from parsing and semantics to check that basic
9770 declarations are not placed after later declarations
9771 (Process_End_Label): move here the check that end label is not missing
9773 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9775 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9776 representation clause in codepeer mode, since it confuses CodePeer and
9777 does not bring useful info.
9779 2011-08-02 Ed Falis <falis@adacore.com>
9781 * init.c: initialize fp hw on MILS.
9783 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9785 * errout.adb (First_Node): for bodies, return the node itself (small
9786 optimization). For other nodes, do not check source_unit if the node
9787 comes from Standard.
9789 2011-08-02 Robert Dewar <dewar@adacore.com>
9791 * exp_ch3.adb: Minor comment additions.
9792 * sem_ch13.adb: Minor reformatting.
9794 2011-08-02 Pascal Obry <obry@adacore.com>
9796 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9798 2011-08-02 Robert Dewar <dewar@adacore.com>
9800 * sem_attr.adb: Minor reformatting.
9802 2011-08-02 Robert Dewar <dewar@adacore.com>
9804 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9805 (Has_Default_Component_Value): Removed
9806 * einfo.ads Comment updates
9807 (Has_Default_Aspect): Replaces Has_Default_Value
9808 (Has_Default_Component_Value): Removed
9810 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9812 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9813 (Get_Simple_Init_Val): Handle Default_Value aspect
9814 (Needs_Simple_Initialization): Handle Default_Value aspect
9815 * exp_ch3.ads: Needs_Simple_Initialization
9816 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9817 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9819 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9820 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9821 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9823 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9825 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9826 package containing iteration primitives.
9827 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9829 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9831 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9832 "of", pre-analyze expression in case it is a function call with
9833 finalization actions that must be placed ahead of the loop.
9834 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9835 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9837 2011-08-02 Geert Bosch <bosch@adacore.com>
9839 * cstand.adb (Create_Float_Types): Only consider C's long double for
9840 Long_Long_Float, in addition to double.
9842 2011-08-02 Robert Dewar <dewar@adacore.com>
9844 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9845 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9846 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9849 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9851 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9854 2011-08-02 Javier Miranda <miranda@adacore.com>
9856 * einfo.ads, einfo.adb
9857 (Original_Access_Type): Move this attribute to Node26 since there was
9858 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9859 which causes conflicts and breaks the generation of the .NET compiler.
9860 (Interface_Name): Add missing documentation on JGNAT only uses of
9863 2011-08-02 Geert Bosch <bosch@adacore.com>
9865 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9866 (Find_Back_End_Float_Type): Likewise
9867 (Create_Back_End_Float_Types): Likewise
9868 (Create_Float_Types): Likewise
9869 (Register_Float_Type): Likewise
9870 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9871 Nlist and split out type selection in new local Find_Base_Type function.
9872 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9874 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9876 2011-08-02 Robert Dewar <dewar@adacore.com>
9878 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9880 * opt.ads: Minor comment change.
9881 * sem_ch12.adb: Minor code reorganization.
9883 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9885 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9886 subtype's list of rep items to the list on the full subtype in the case
9887 where the lists are the same.
9889 2011-08-02 Geert Bosch <bosch@adacore.com>
9891 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9892 using the one from System.Strings, which also deallocates all strings.
9894 2011-08-02 Geert Bosch <bosch@adacore.com>
9896 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9898 * gcc-interface/Make-lang.in: Update dependencies.
9900 2011-08-02 Olivier Hainque <hainque@adacore.com>
9902 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9905 2011-08-02 Javier Miranda <miranda@adacore.com>
9907 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9908 associated with anonymous access to subprograms.
9910 2011-08-02 Geert Bosch <bosch@adacore.com>
9913 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9914 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9915 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9916 (Add_Symbol_Definition): Move to switch-c.adb
9917 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9918 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9919 (Add_Symbol_Definition): Move to switch-c.adb.
9920 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9922 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9924 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9925 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9927 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9928 (Add_Symbol_Definition): Moved from Prepcomp.
9929 * switch-c.ads: Update copyright notice. Use String_List instead of
9930 Argument_List, removing dependency on System.OS_Lib.
9932 2011-08-02 Yannick Moy <moy@adacore.com>
9934 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9935 mode on initialization expression which does not respect SPARK
9937 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9938 if the tree referenced by its argument represents an initialization
9939 expression in SPARK, suitable for initializing an object in an object
9942 2011-08-02 Javier Miranda <miranda@adacore.com>
9944 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9945 internally generated access to subprogram with its associated protected
9947 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9949 2011-08-02 Geert Bosch <bosch@adacore.com>
9951 * cstand.adb (Register_Float_Type): Print information about type to
9952 register, if the Debug_Flag_Dot_B is set.
9953 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9954 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9955 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9956 with a requested precision of more than Max_Digits digits and no more
9957 than Max_Base_Digits digits, if a range specification is present and the
9958 Predefined_Float_Types list has a suitable type to derive from.
9959 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9960 case of type completion with pragma Import
9962 (Process_Import_Predefined_Type): Processing to complete a type
9963 with pragma Import. Currently supports floating point types only.
9964 (Set_Convention_From_Pragma): Do nothing without underlying type.
9965 (Process_Convention): Guard against absence of underlying type,
9966 which may happen when importing incomplete types.
9967 (Process_Import_Or_Interface): Handle case of importing predefined
9968 types. Tweak error message.
9970 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9972 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9973 functions to previous change. Reorganize code slightly.
9975 2011-08-02 Geert Bosch <bosch@adacore.com>
9977 * back_end.ads (Register_Type_Proc): New call back procedure type for
9978 allowing the back end to provide information about available types.
9979 (Register_Back_End_Types): New procedure to register back end types.
9980 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9982 * cstand.adb (Back_End_Float_Types): New list for floating point types
9983 supported by the back end.
9984 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9985 (Copy_Float_Type): New procedure to make new copies of predefined types.
9986 (Register_Float_Type): New call back procedure to populate the BEFT list
9987 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9988 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9989 (Create_Float_Types): New procedure to create entities for floating
9990 point types predefined in Standard, and put these and any remaining
9991 BEFTs on the Predefined_Float_Types list.
9992 * stand.ads (Predefined_Float_Types): New list for predefined floating
9993 point types that do not have declarations in package Standard.
9995 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9997 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9998 entity node for the unit containing the parameter.
9999 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10000 (Add_Inlined_Subprogram): Likewise.
10001 * gcc-interface/Make-lang.in: Update dependencies.
10003 2011-08-02 Thomas Quinot <quinot@adacore.com>
10005 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10008 2011-08-02 Geert Bosch <bosch@adacore.com>
10010 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10012 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10014 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10015 computed value of Base_Type.
10017 2011-08-02 Yannick Moy <moy@adacore.com>
10019 * restrict.adb (Check_Restriction): issue an error for any use of
10020 class-wide, even if the No_Dispatch restriction is not set.
10021 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10022 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10023 when completing a private extension, the type named in the private part
10024 is not the same as that named in the visible part.
10025 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10026 of an inherited primitive operations of a tagged type or type extension
10027 that returns the tagged type.
10028 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10029 function which returns True for an implicit operation inherited by the
10030 derived type declaration for the argument type.
10031 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10036 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10037 Process_Bounds, to perform analysis with expansion of a range or an
10038 expression that is the iteration scheme for a loop.
10039 (Analyze_Iterator_Specification): If domain of iteration is given by a
10040 function call with a controlled result, as is the case if call returns
10041 a predefined container, ensure that finalization actions are properly
10043 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10045 2011-08-02 Javier Miranda <miranda@adacore.com>
10047 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10048 * gcc-interface/Make-lang.in: Update dependencies.
10050 2011-08-02 Javier Miranda <miranda@adacore.com>
10052 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10053 determine if the analysis is performed using N or Original_Node (N).
10054 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10055 functionality of routine Is_Variable avoids code duplication.
10056 * checks.adb (Determine_Range): Handle temporaries generated by
10057 Remove_Side_Effects.
10059 2011-08-02 Javier Miranda <miranda@adacore.com>
10061 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10062 expansion of the condition. Required since the previous analysis was
10063 done with expansion disabled (see Resolve_Quantified_Expression) and
10064 hence checks were not inserted and record comparisons have not been
10067 2011-08-02 Ed Falis <falis@adacore.com>
10069 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10072 2011-08-02 Bob Duff <duff@adacore.com>
10074 * opt.ads: Minor comment fix.
10076 2011-08-02 Bob Duff <duff@adacore.com>
10078 * sem_ch12.adb (Analyze_Package_Instantiation,
10079 Analyze_Subprogram_Instantiation): Turn off style checking while
10080 analyzing an instance. Whatever style checks that apply to the generic
10081 unit should apply, so it makes no sense to apply them in an instance.
10082 This was causing trouble when compiling an instance of a runtime
10083 unit that violates the -gnatyO switch.
10084 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10085 one of the two case statements, causing spurious errors.
10087 2011-08-02 Robert Dewar <dewar@adacore.com>
10089 * uname.adb: Minor reformatting.
10090 * gnatcmd.adb: Minor reformatting.
10091 * exp_attr.adb: Minor reformatting.
10093 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10095 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10096 No_Dispatching_Calls, do not look for the Assign primitive, because
10097 predefined primitives are not created in this case.
10099 2011-08-02 Bob Duff <duff@adacore.com>
10101 * stylesw.ads: Minor comment fixes.
10103 2011-08-02 Robert Dewar <dewar@adacore.com>
10105 * freeze.adb (Add_To_Result): New procedure.
10107 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10109 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10110 time, if the specific run-time routines for handling streams of strings
10111 are not available, use the default mechanism.
10113 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10115 * s-regpat.ads: Fix typo.
10117 2011-08-02 Vincent Celier <celier@adacore.com>
10119 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10120 not null, call it to create the in memory config project file without
10121 parsing an existing default config project file.
10123 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10125 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10127 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10129 * sem_elim.adb: an abstract subprogram does not need an eliminate
10130 pragma for its descendant to be eliminable.
10132 2011-08-02 Ed Falis <falis@adacore.com>
10134 * init.c: revert to handling before previous checkin for VxWorks
10135 * s-intman-vxworks.adb: delete unnecessary declarations related to
10136 using Ada interrupt facilities for handling signals.
10137 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10138 * s-intman-vxworks.ads: Import __gnat_install_handler as
10139 Initialize_Interrupts.
10140 * s-taprop-vxworks.adb: Delete Signal_Mask.
10141 (Abort_Handler): change construction of mask to unblock exception
10144 2011-08-02 Jerome Guitton <guitton@adacore.com>
10146 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10147 Debug_Raise_Exception before propagation starts.
10149 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10151 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10152 to Restriction_Check_Required.
10153 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10154 * sem_res.adb (Resolve_Call): Likewise.
10155 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10157 2011-08-02 Bob Duff <duff@adacore.com>
10159 * stylesw.ads: Update comment.
10160 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10161 * errout.ads: Remove obsolete comment.
10163 2011-08-02 Javier Miranda <miranda@adacore.com>
10165 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10166 (Set_Is_Safe_To_Reevaluate): new procedure.
10167 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10168 assignment is allowed on safe-to-reevaluate variables.
10169 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10170 temporary created to remove side effects in expressions that use
10171 the secondary stack as safe-to-reevaluate.
10172 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10173 variables that are not true constants.
10175 2011-08-02 Robert Dewar <dewar@adacore.com>
10177 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10178 sem_res.adb, sem_ch6.adb: Minor reformatting.
10180 2011-08-02 Jerome Guitton <guitton@adacore.com>
10182 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10184 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10186 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10187 not set Overridden_Operation if subprogram is an initialization
10190 2011-08-02 Yannick Moy <moy@adacore.com>
10192 * par-ch6.adb: Correct obsolete name in comments
10193 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10194 which takes two message arguments (existing function takes one), with
10195 second message used for continuation.
10196 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10197 block statements that originate from a source block statement, not
10198 generated block statements
10199 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10200 symmetry with procedure case
10201 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10202 function to issue an error in formal mode if a package specification
10203 contains more than one tagged type or type extension.
10204 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10205 parameters matching formals of tagged types are objects (or ancestor
10206 type conversions of objects), not general expressions. Issue an error
10207 on view conversions that are not involving ancestor conversion of an
10209 (Resolve_Type_Conversion): in formal mode, issue an error on the
10210 operand of an ancestor type conversion which is not an object
10211 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10212 procedure so that it works also for actuals of function calls
10213 (Is_Actual_Tagged_Parameter): new function which determines if its
10214 argument is an actual parameter of a formal of tagged type in a
10216 (Is_SPARK_Object_Reference): new function which determines if the tree
10217 referenced by its argument represents an object in SPARK
10219 2011-08-02 Robert Dewar <dewar@adacore.com>
10221 * sem_ch3.adb: Minor reformatting
10222 Minor comment addition
10223 Minor error msg text change
10225 2011-08-02 Javier Miranda <miranda@adacore.com>
10227 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10228 function. Used to be more precise when we generate a variable plus one
10229 assignment to remove side effects in the evaluation of the Bound
10231 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10232 of the bound expression to force its re-analysis and thus expand the
10233 associated transient scope (if required). Code cleanup replacing the
10234 previous code that declared the constant entity by an invocation to
10235 routine Force_Evaluation which centralizes this work in the frontend.
10237 2011-08-02 Robert Dewar <dewar@adacore.com>
10239 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10240 (Base_Type): Now uses improved Is_Base_Type function
10241 * einfo.ads (Base_Type): Inline this function
10243 2011-08-02 Robert Dewar <dewar@adacore.com>
10245 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10246 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10248 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10250 * gcc-interface/Make-lang.in: Update dependencies.
10251 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10254 2011-08-02 Yannick Moy <moy@adacore.com>
10256 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10257 non-simple expression used in delta constraint
10258 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10259 index constraint which is not a subtype mark
10260 * par.adb: With and use Restrict
10261 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10262 mode on component type which is not a subtype mark and default
10263 expression on component
10264 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10265 of string which does not have a lower index bound equal to 1
10266 (Array_Type_Declaration): issue an error in formal mode on index or
10267 component type which is not a subtype mark, and on aliased keyword on
10269 (Derived_Type_Declaration): issue an error in formal mode on interface,
10270 limited or abstract type
10271 (Record_Type_Declaration): issue an error in formal mode on interface
10272 (Record_Type_Definition): issue an error in formal mode on tagged types
10273 and type extensions not declared in the specification of a library unit
10274 package; on null non-tagged record; on variant part
10276 2011-08-02 Vincent Celier <celier@adacore.com>
10278 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10279 not declared for qualified library project when Library_Name is not
10280 declared, but Library_Dir is.
10282 2011-08-02 Robert Dewar <dewar@adacore.com>
10284 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10285 pragmas (affects aspects [Component_]Default_Value
10286 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10287 component type for the resolution
10289 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10291 * einfo.adb (Base_Type): Tune implementation for speed.
10293 2011-08-02 Robert Dewar <dewar@adacore.com>
10295 * freeze.adb: Minor reformatting.
10297 2011-08-02 Thomas Quinot <quinot@adacore.com>
10299 * scos.ads: Update comments.
10301 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10303 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10304 base type, because the parent may be a subtype of a private type whose
10305 convention is established in a private part.
10307 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10309 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10310 statement in a block when the expansion of the return expression has
10311 created a finalization chain.
10312 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10313 with the parent node.
10314 Add N_Extended_Return_Statement to handle the case where a transient
10315 object declaration appears in the Return_Object_Declarations list of
10316 an extended return statement.
10318 2011-08-02 Matthew Gingell <gingell@adacore.com>
10320 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10321 unused parameter 'name'.
10323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10325 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10326 inherited operation, check whether its alias, which is the source
10327 operastion that it renames, has been marked eliminated.
10329 2011-08-02 Javier Miranda <miranda@adacore.com>
10331 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10332 in-mode parameter whose type is an access type since it can be used to
10333 modify its designated object. Enforce code that handles as safe an
10334 access type that is not access-to-constant but it is the result of a
10335 previous removal of side-effects.
10336 (Remove_Side_Effects): Minor code reorganization of cases which require
10337 no action. Done to incorporate documentation on new cases uncovered
10338 working in this ticket: no action needed if this routine was invoked
10339 too early and the nodes are not yet decorated.
10340 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10341 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10342 were issued with actuals that are implicitly provided by
10345 2011-08-02 Robert Dewar <dewar@adacore.com>
10347 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10349 2011-08-02 Yannick Moy <moy@adacore.com>
10351 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10352 to issue an error in formal mode on attribute not supported in this mode
10353 (Analyze_Attribute): issue errors on standard attributes not supported
10355 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10356 comment, and issue error in formal mode on modulus which is not a power
10358 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10360 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10362 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10363 operator on modular type (except 'not').
10365 2011-08-02 Robert Dewar <dewar@adacore.com>
10367 * gnat_rm.texi: Minor reformatting.
10369 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10371 * s-osinte-linux.ads: Minor comment update and reformatting.
10372 * i-cexten.ads: Make this unit pure, as for its parent.
10373 Will allow its usage in more contexts if needed.
10375 2011-08-02 Robert Dewar <dewar@adacore.com>
10377 * s-utf_32.ads: Minor comment fix.
10379 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10381 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10382 operation of a tagged synchronized type, handle the case where the
10383 controlling argument is overloaded.
10385 2011-08-02 Yannick Moy <moy@adacore.com>
10387 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10388 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10389 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10390 SPARK mode and formal verification mode on processing SPARK restriction
10391 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10392 requiring consistency checking.
10394 2011-08-02 Robert Dewar <dewar@adacore.com>
10396 * sem_res.adb: Minor reformatting.
10398 2011-08-02 Robert Dewar <dewar@adacore.com>
10400 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10401 a-cforse.ads: Remove unneeded with of Ada.Containers
10402 Remove commented out pragma Inline's
10403 Move specifications of new subprograms to the actual specs
10405 2011-08-02 Yannick Moy <moy@adacore.com>
10407 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10408 a-cforse.ads: Update comments.
10410 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10412 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10414 2011-08-02 Robert Dewar <dewar@adacore.com>
10416 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10417 a-cforse.ads, a-cofove.ads: Minor reformatting.
10419 2011-08-02 Claire Dross <dross@adacore.com>
10421 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10422 a-cofove.ads: Add comments.
10424 2011-08-02 Yannick Moy <moy@adacore.com>
10426 * gnat_rm.texi: Document formal containers.
10428 2011-08-02 Emmanuel Briot <briot@adacore.com>
10430 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10431 are empty sections.
10433 2011-08-02 Robert Dewar <dewar@adacore.com>
10435 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10438 2011-08-02 Robert Dewar <dewar@adacore.com>
10440 * aspects.adb: New aspects Default_Value and Default_Component_Value
10441 New format of Aspect_Names table checks for omitted entries
10442 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10443 handling of boolean aspects for derived types.
10444 New aspects Default_Value and Default_Component_Value
10445 New format of Aspect_Names table checks for omitted entries
10446 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10447 (Has_Default_Value): New flag
10448 (Has_Default_Component_Value): New flag
10449 (Has_Default_Value): New flag
10450 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10452 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10453 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10454 Default_Value and Default_Component_Value
10455 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10456 New aspects Default_Value and Default_Component_Value
10457 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10458 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10460 2011-08-02 Vincent Celier <celier@adacore.com>
10462 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10463 inherit library kind.
10465 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10467 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10468 Minor reformatting.
10470 2011-08-02 Robert Dewar <dewar@adacore.com>
10472 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10474 2011-08-02 Yannick Moy <moy@adacore.com>
10476 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10478 2011-08-02 Robert Dewar <dewar@adacore.com>
10480 * impunit.adb: Add comment.
10482 2011-08-02 Yannick Moy <moy@adacore.com>
10484 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10485 qualification of aggregates in formal mode
10486 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10488 (Resolve_Aggregate): complete the test that an aggregate is adequately
10489 qualified in formal mode
10491 2011-08-02 Pascal Obry <obry@adacore.com>
10493 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10494 * mlib-prj.adb: Supress warning when compiling binder generated file.
10495 (Build_Library): Supress all warnings when compiling the binder
10498 2011-08-02 Yannick Moy <moy@adacore.com>
10500 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10502 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10503 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10504 Add with/use clauses to make Check_Formal_Restriction visible
10506 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10508 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10509 in-parameters when type of the generic formal is private in the generic
10510 spec and non-private in the body.
10512 2011-08-02 Claire Dross <dross@adacore.com>
10514 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10515 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10516 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10517 * impunit.adb, Makefile.rtl: Take new files into account.
10519 2011-08-02 Robert Dewar <dewar@adacore.com>
10521 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10522 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10524 2011-08-02 Yannick Moy <moy@adacore.com>
10526 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10528 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10529 matching static array bounds, taking into account the special case of
10531 * sem_ch3.adb: Typo in comment.
10533 2011-08-02 Yannick Moy <moy@adacore.com>
10535 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10536 which issues an error in formal mode if its argument node is originally
10538 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10539 has a discriminant specification so that it does not include the case
10541 (Derived_Type_Declaration): move here the test that a derived type has a
10542 discriminant specification
10543 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10544 first element of a component association before accessing its choices
10545 (presence of component association is not enough)
10546 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10547 declaration is a library item before accessing the next element in a
10548 list, as library items are not member of lists
10549 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10550 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10551 Check_Formal_Restriction whenever possible.
10553 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10555 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10556 reference when needed.
10558 2011-08-02 Bob Duff <duff@adacore.com>
10560 * gnat_ugn.texi: Fix typo.
10562 2011-08-02 Vincent Celier <celier@adacore.com>
10564 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10565 archive file name. Do not use the full path name of archives for Open
10568 2011-08-02 Robert Dewar <dewar@adacore.com>
10570 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10571 Analyze_Aspect_Specifications
10573 (Analyze_Aspect_Specifications): New handling for boolean aspects
10574 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10575 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10576 sequence for Analyze_Aspect_Specifications
10577 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10578 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10580 2011-08-02 Robert Dewar <dewar@adacore.com>
10582 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10583 aspects, since these no longer exist.
10585 2011-08-02 Robert Dewar <dewar@adacore.com>
10587 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10588 semicolon, do not try to see if there are aspects following it.
10589 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10592 2011-08-02 Robert Dewar <dewar@adacore.com>
10594 * sem_ch8.adb, aspects.ads: Minor reformatting.
10596 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10598 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10599 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10601 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10603 2011-08-02 Yannick Moy <moy@adacore.com>
10605 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10606 mode on subprogram declaration outside of package specification, unless
10607 it is followed by a pragma Import
10608 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10609 Access_Type_Declaration): issue error in formal mode on access type
10610 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10612 (Analyze_Object_Declaration): issue error in formal mode on object
10613 declaration which does not respect SPARK restrictions
10614 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10615 declaration which does not respect SPARK restrictions
10616 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10617 error in formal mode on digits or delta constraint
10618 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10619 decimal fixed point type
10620 (Derived_Type_Declaration): issue error in formal mode on derived type
10621 other than type extensions of tagged record types
10622 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10623 with check on access definition
10624 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10625 mode on protected definition.
10626 (Analyze_Task_Definition): issue error in formal mode on task definition
10628 2011-08-02 Robert Dewar <dewar@adacore.com>
10630 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10632 2011-08-02 Javier Miranda <miranda@adacore.com>
10634 * sem_ch6.adb (Can_Override_Operator): New function.
10635 (Verify_Overriding_Indicator): Add missing code to check overriding
10636 indicator in operators. Fixes regression.
10637 (Check_Overriding_Indicator): Minor reformating after replacing the
10638 code that evaluates if the subprogram can override an operator by
10639 invocations to the above new function.
10641 (Write_Field26_Name): Add missing code to ensure that, following
10642 the documentation in einfo.ads, this field is not shown as attribute
10643 "Static_Initialization" on non-dispatching functions.
10645 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10647 * sem_res.adb (Resolve_Call): A call to
10648 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10649 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10650 i.e., when the second parameter is of type Time_Span.
10652 2011-08-02 Vincent Celier <celier@adacore.com>
10654 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10655 with an archive instead of -L<library dir> -l<library name>.
10657 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10659 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10660 mark the base types In_Use in addition to making the operations
10663 2011-08-02 Ed Falis <falis@adacore.com>
10665 * init.c: add and setup __gnat_signal_mask for the exception signals
10666 * s-inmaop-vxworks.adb: new file.
10667 * s-intman-vxworks.adb: remove unnecessary initializations and
10669 * s-intman-vxworks.ads: remove unnecessary variable
10670 * s-taprop-vxworks.adb: simplify signal initialization
10672 2011-08-02 Robert Dewar <dewar@adacore.com>
10674 * sem_ch8.adb: Minor code reorganization, comment updates.
10676 2011-08-02 Robert Dewar <dewar@adacore.com>
10678 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10679 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10681 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10682 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10684 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10686 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10687 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10688 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10689 use_type_clauses, to handle more efficiently use_type and use_all_type
10691 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10692 Ada2012 Use_All_Type clause.
10693 (Use_Class_Wide_Operations): new procedure.
10695 2011-08-02 Robert Dewar <dewar@adacore.com>
10697 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10698 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10699 expression to expression function.
10701 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10703 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10704 if types are compatible.
10706 2011-08-02 Yannick Moy <moy@adacore.com>
10708 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10709 returns True if its argument array types have same dimension and same
10710 static bounds at each index.
10711 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10712 OUT or IN OUT paramaters which are not view conversions in SPARK.
10713 (Resolve_Arithmetic_Op): issue an error in formal mode on
10714 multiplication or division with operands of fixed point types which are
10715 not qualified or explicitly converted.
10716 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10717 Boolean or array type (except String) operands.
10718 (Resolve_Equality_Op): issue an error in formal mode on equality
10719 operators for array types other than String with non-matching static
10721 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10722 for array types with non-matching static bounds. Factorize the code in
10723 Matching_Static_Array_Bounds.
10724 (Resolve_Qualified_Expression): issue an error in formal mode on
10725 qualified expressions for array types with non-matching static bounds.
10726 (Resolve_Type_Conversion): issue an error in formal mode on type
10727 conversion for array types with non-matching static bounds
10729 2011-08-02 Robert Dewar <dewar@adacore.com>
10731 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10733 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10735 * par-ch9.adb: save location of entry for proper error message.
10737 2011-08-02 Javier Miranda <miranda@adacore.com>
10739 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10740 (Use_Full_View) which permits this routine to climb through the
10741 ancestors using the full-view of private parents.
10742 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10743 Use_Full_View to true in calls to Is_Ancestor.
10744 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10745 true in call to Is_Ancestor.
10746 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10747 Use_Full_View to true in call to Is_Ancestor.
10748 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10749 call to Is_Ancestor.
10750 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10751 Use_Full_View to true in calls to Is_Ancestor.
10752 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10753 Make_Select_Specific_Data_Table, Register_Primitive,
10754 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10755 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10756 to true in call to Is_Ancestor.
10757 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10758 Use_Full_View to true in calls to Is_Ancestor.
10760 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10761 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10763 2011-08-02 Robert Dewar <dewar@adacore.com>
10765 * gnat_rm.texi: Minor reformatting.
10766 * sem_prag.adb: Minor reformatting.
10768 2011-08-02 Tristan Gingold <gingold@adacore.com>
10770 * vms_data.ads: Add VMS qualifier for -gnateP.
10772 2011-08-02 Robert Dewar <dewar@adacore.com>
10774 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10775 * par-ch7.adb (P_Package): Proper placement of aspects for package
10776 decl/instantiation.
10777 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10778 (End_Statements): Add Is_Sloc parameterr
10779 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10780 (Check_End): Ad Is_Sloc parameter
10781 (End_Statements): Add Is_Sloc parameterr
10783 2011-08-02 Vincent Celier <celier@adacore.com>
10785 * ug_words: Add VMS qualifier equivalent to -gnateP:
10786 /SYMBOL_PREPROCESSING.
10788 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10790 * gnat-style.texi: For hexadecimal numeric literals the typical
10791 grouping of digits is 4 to represent 2 bytes.
10792 A procedure spec which is split into several lines is indented two
10795 2011-08-02 Yannick Moy <moy@adacore.com>
10797 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10798 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10799 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10801 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10802 choice in array aggregate
10803 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10805 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10806 positional and named aggregate for record, or others in record
10807 aggregate, or multiple choice in record aggregate
10808 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10809 array operands to logical operations AND, OR and XOR do not have the
10810 same static lower and higher bounds
10811 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10813 2011-08-01 Robert Dewar <dewar@adacore.com>
10815 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10816 Replaces Last_Source_Node_In_Sequence.
10817 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10818 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10819 parens and blank in string (this was inconsistently implemented).
10821 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10822 blank in string (this was inconsistently implemented).
10824 (Set_Global_Switches): Set formal mode switches appropriately
10825 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10827 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10828 call Set_Error_Msg_Lang to set "spark" as language name.
10829 * par.adb: Remove unnecessary call to set formal language for errout
10830 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10831 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10833 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10834 calls to it, moved after resolution so that types are known
10835 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10836 result of concatenation is not of type String
10837 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10838 concatenation is not properly restricted
10839 * gnat_rm.texi: Add doc on pragma Spark_95.
10840 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10841 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10842 * gcc-interface/Make-lang.in: Update dependencies.
10844 2011-08-01 Javier Miranda <miranda@adacore.com>
10846 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10847 condition that detects if the overridden operation must replace an
10850 2011-08-01 Javier Miranda <miranda@adacore.com>
10852 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10853 code declarations inserted by Insert_Actions in each alternative of the
10854 N_Case_Expression node.
10856 2011-08-01 Robert Dewar <dewar@adacore.com>
10858 * sem_ch6.adb: Minor code reorganization.
10859 * sem_util.adb: Minor reformatting.
10861 2011-08-01 Pascal Obry <obry@adacore.com>
10863 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10864 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10866 2011-08-01 Yannick Moy <moy@adacore.com>
10868 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10869 literal or operator symbol which is prefixed
10870 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10871 mode on access attributes.
10872 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10873 that concatenation operands are properly restricted in formal mode
10874 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10875 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10876 result of the concatenation has a type different from String.
10877 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10878 Analyze_Quantified_Expression, Analyze_Slice,
10879 Analyze_Null): issue an error in formal mode on unsupported constructs
10881 (Analyze_Block_Statement): only issue error on source block statement
10882 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10883 function which returns the last node in a list of nodes for which
10884 Comes_From_Source returns True, if any
10885 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10886 Last_Source_Node_In_Sequence
10887 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10888 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10889 mode on unsupported constructs
10890 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10891 rest of the actions may be needed later on since the error is marked as
10893 * sinfo.ads: Typos in comments.
10895 2011-08-01 Pascal Obry <obry@adacore.com>
10897 * projects.texi: Minor editing.
10899 2011-08-01 Yannick Moy <moy@adacore.com>
10901 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10902 insertion character ~~
10903 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10904 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10905 with insertion character ~~
10906 (Set_Msg_Text): treat insertion character ~~
10907 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10908 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10909 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10910 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10911 errors related to the formal language restriction not serious
10912 (insertion character |).
10913 * par.adb (Par): set formal language for error messages if needed
10914 * sem_ch6.adb (Check_Missing_Return): take into account possible
10915 generated statements at the end of the function
10916 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10917 enumeration value to define a new pragma SPARK_95
10918 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10919 SPARK_Version): new type and variables to store the SPARK version
10921 (SPARK_Mode): return True when SPARK_Version is set
10922 * par-prag.adb: Correct indentation
10923 (Prag): take Pragma_SPARK_95 into account
10924 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10927 2011-08-01 Robert Dewar <dewar@adacore.com>
10929 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10930 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10931 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10933 2011-08-01 Pascal Obry <obry@adacore.com>
10935 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10936 Target_Name to Get_Path call.
10937 (Parse_Single_Project): Likewise.
10938 (Post_Parse_Context_Clause): Likewise.
10939 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10940 Call Initialise_Project_Path with the proper Target_Name.
10941 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10943 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10944 with the proper Target_Name.
10945 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10946 Part.Parse routine.
10947 (Parse_Project_And_Apply_Config): Likewise.
10948 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10949 This is fine as this part of the code is supporting only native
10951 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10952 is fine as this part of the code is supporting only native compilation.
10954 2011-08-01 Yannick Moy <moy@adacore.com>
10956 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10957 of homonym, unless the homonym is one of the cases allowed in SPARK
10958 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10959 package declaration occurring after a body.
10961 2011-08-01 Robert Dewar <dewar@adacore.com>
10963 * checks.adb, exp_ch4.adb: Minor reformatting.
10965 2011-08-01 Javier Miranda <miranda@adacore.com>
10967 * einfo.ads (Access_Disp_Table): Fix documentation.
10968 (Dispatch_Table_Wrappers): Fix documentation.
10970 2011-08-01 Pascal Obry <obry@adacore.com>
10972 * prj-env.adb, prj-env.ads: Minor reformatting.
10974 2011-08-01 Yannick Moy <moy@adacore.com>
10976 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10977 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10978 procedures out of these packages.
10979 * errout.ads, errout.adb
10980 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10981 procedures in of this package
10982 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10983 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10984 on misplaced later vs initial declarations, like in Ada 83
10985 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10986 formal mode on attribute of private type whose full type declaration
10988 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10989 package declaration inside a package specification
10990 (Analyze_Full_Type_Declaration): issue error in formal mode on
10991 controlled type or discriminant type
10992 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10993 user-defined operator means that it should come from the source
10994 (New_Overloaded_Entity): issue error in formal mode on overloaded
10996 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10998 2011-08-01 Thomas Quinot <quinot@adacore.com>
11000 * atree.adb: Minor reformatting.
11001 * checks.adb: Minor reformatting.
11003 2011-08-01 Vincent Celier <celier@adacore.com>
11005 * s-parame-vms-ia64.ads: Fix typo in comment
11007 * s-parame-vms-restrict.ads: Removed, unused.
11009 2011-08-01 Javier Miranda <miranda@adacore.com>
11012 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11014 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11015 * sem_ch3.ads, sem_ch3.adb
11016 (Is_Constant_Bound): New extended version of the subprogram that was
11017 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11018 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11019 * sem_aux.ads (Constant_Value): Fix typo in comment.
11020 * checks.adb (Generate_Index_Checks): New implementation which, for
11021 array objects with constant bounds, generates the runtime check
11022 referencing the bounds of the array type. For other cases this routine
11023 provides its previous behavior obtaining such values from the array
11025 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11027 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11028 we cannot have semantic interpretations of the new node.
11030 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11032 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11035 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11037 * sem_ch8.adb: Minor code editing.
11038 * s-vxwext.adb: Remove trailing space.
11039 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11040 consistency with other files.
11042 2011-08-01 Thomas Quinot <quinot@adacore.com>
11044 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11046 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11048 * par-ch10.adb: reject parameterized expressions as compilation unit.
11049 * sem_ch4.adb: handle properly conditional expression with overloaded
11050 then_clause and no else_clause.
11052 2011-08-01 Tristan Gingold <gingold@adacore.com>
11054 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11055 like done by System.Aux_DEC.
11056 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11058 2011-08-01 Yannick Moy <moy@adacore.com>
11060 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11061 missing label at end of declaration (subprogram or package)
11062 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11063 of positional and named parameter association
11064 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11065 Error_Msg_SP which adds a prefix to the error message giving the name
11066 of the formal language analyzed
11067 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11068 access result type in subprogram, unconstrained array as result type,.
11069 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11071 * sem_ch8.adb: Code clean up.
11073 2011-08-01 Javier Miranda <miranda@adacore.com>
11075 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11076 * einfo.ads (Access_Disp_Table): Fix documentation.
11077 (Dispatch_Table_Wrappers): Fix documentation.
11078 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11079 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11080 to enforce the documentation of this attribute.
11081 (Set_Is_Interface): Cleanup the assertion.
11082 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11083 the Underlying_Type entity before reading attribute Access_Disp_Table.
11084 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11085 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11086 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11087 the Underlying_Type entity before reading attribute Access_Disp_Table.
11088 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11089 Locate the Underlying_Type entity before reading attribute
11092 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11094 * s-poosiz.ads: Additional overriding indicators.
11096 2011-08-01 Yannick Moy <moy@adacore.com>
11098 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11100 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11101 parameter specification does not include a subtype mark.
11102 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11103 formal mode on abstract subprogram.
11104 (Analyze_Subprogram_Specification): issue error in formal mode on
11105 user-defined operator.
11106 (Process_Formals): issue error in formal mode on access parameter and
11107 default expression.
11108 * sem_ch9.adb (Analyze_Abort_Statement,
11109 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11110 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11111 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11112 Analyze_Requeue, Analyze_Selective_Accept,
11113 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11114 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11115 issue error in formal mode on user-defined raise statement.
11117 2011-08-01 Thomas Quinot <quinot@adacore.com>
11119 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11120 declaration being hidden when overriding an implicit inherited
11122 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11123 (-gnats), do not complain about a source file that contains only a
11126 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11128 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11129 variable if already set.
11131 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11133 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11134 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11135 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11136 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11137 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11138 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11139 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11140 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11141 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11142 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11143 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11144 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11145 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11146 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11147 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11148 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11149 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11150 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11151 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11152 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11153 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11154 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11155 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11156 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11157 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11158 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11159 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11160 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11161 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11162 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11163 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11164 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11165 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11166 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11167 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11168 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11169 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11170 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11171 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11172 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11173 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11174 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11175 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11176 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11177 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11178 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11179 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11180 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11181 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11182 Use GNAT instead of GNARL.
11184 2011-08-01 Bob Duff <duff@adacore.com>
11186 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11187 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11188 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11191 2011-08-01 Yannick Moy <moy@adacore.com>
11193 * debug.adb (d.D) reverve flag for the SPARK mode
11194 (d.E) reverve flag for SPARK generation mode
11195 (d.F) reverve flag for Why generation mode
11196 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11197 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11198 functions which return True when the corresponding modes are set
11199 (Formal_Language): return "spark" or "alfa" when in formal verification
11201 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11202 Error_Msg to prefix the error message with a tag giving the formal
11204 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11205 message with a tag giving the formal language
11206 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11208 (Analyze_Case_Statement): issue error in formal mode on case statement
11209 with a single "others" case alternative
11210 (Analyze_Exit_Statement): issue errors in formal mode on exit
11211 statements which do not respect SPARK restrictions
11212 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11213 (Check_Unreachable_Code): always issue an error (not a warning) in
11214 formal mode on unreachable code (concerns both code after an infinite
11215 loop and after an unconditional jump, both not allowed in SPARK)
11216 * sem_ch6.adb (Analyze_Return_Statement): add call to
11217 Set_Return_Present for a procedure containing a return statement
11218 (already done for functions in Analyze_Function_Return)
11219 (Analyze_Function_Return): issue error in formal mode on extended
11220 return or if return is not last statement in function
11221 (Check_Missing_Return): issue error in formal mode if function does
11222 not end with return or if procedure contains a return
11223 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11224 function to detect if there is an inner scope of its parameter S which
11227 2011-08-01 Thomas Quinot <quinot@adacore.com>
11229 * sem_ch6.ads: Minor reformatting.
11231 2011-08-01 Javier Miranda <miranda@adacore.com>
11233 * sem_util.adb (Abstract_Interface_List): Complete condition when
11234 processing private type declarations to avoid reading unavailable
11236 (Is_Synchronized_Tagged_Type): Complete condition when processing
11237 private extension declaration nodes to avoid reading unavailable
11240 2011-08-01 Thomas Quinot <quinot@adacore.com>
11242 * sem_ch3.adb: Minor reformatting.
11244 2011-08-01 Thomas Quinot <quinot@adacore.com>
11246 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11247 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11248 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11249 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11250 for VMS, instead parametrize the common implementation with
11251 System.Parameters declarations.
11253 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11255 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11257 2011-08-01 Tristan Gingold <gingold@adacore.com>
11259 * seh_init.c: Fix SEH handler installation on win64.
11261 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11263 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11264 double analysis of an anonymous access to subprogram, because it can
11265 lead to improper sharing of profiles and a back-end crash.
11267 2011-08-01 Robert Dewar <dewar@adacore.com>
11269 * make.adb, sem_ch4.adb: Minor reformatting.
11270 * gcc-interface/Make-lang.in: Update dependencies.
11271 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11273 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11275 * gnat_rm.texi: Fix definition of Long_Integer.
11277 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11279 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11280 to prevent storage exhaustion.
11281 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11282 finalized is a function body, insert the cleanup code before the final
11283 return statement, to prevent spurious warnings.
11284 * s-pooglo.ads: add overriding indicator.
11286 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11288 * sem_ch4.adb (Operator_Check): improve error message when both a
11289 with_clause and a use_clause are needed to make operator usage legal.
11290 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11291 determine whether a compilation unit is visible within an other,
11292 either through a with_clause in the current unit, or a with_clause in
11293 its library unit or one one of its parents.
11295 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11297 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11298 over an arbitrary expression of an array or container type.
11299 * lib-xref.adb: clarify comment.
11301 2011-08-01 Bob Duff <duff@adacore.com>
11303 * einfo.ads: Minor reformatting.
11304 * debug.adb: Minor comment improvement.
11306 2011-08-01 Javier Miranda <miranda@adacore.com>
11308 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11309 consider hidden subprograms as valid candidates.
11311 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11313 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11315 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11317 * gnat_ugn.texi: Fix typo.
11319 2011-08-01 Robert Dewar <dewar@adacore.com>
11321 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11322 lib-xref.adb: Minor reformatting
11324 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11326 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11327 when to generate a call to Move_Final_List.
11328 (Has_Controlled_Parts): Remove this function.
11330 2011-08-01 Geert Bosch <bosch@adacore.com>
11332 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11333 "," in choice list.
11335 2011-08-01 Thomas Quinot <quinot@adacore.com>
11337 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11338 explicit raise of a predefined exception as Comes_From_Source if the
11339 original N_Raise_Statement comes from source.
11341 2011-08-01 Robert Dewar <dewar@adacore.com>
11343 * sinfo.ads: Add comment.
11344 * sem_ch6.adb: Minor reformatting.
11346 2011-08-01 Robert Dewar <dewar@adacore.com>
11348 * freeze.adb (Freeze_Entity): Refine check for bad component size
11349 clause to avoid rejecting confirming clause when atomic/aliased present.
11351 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11353 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11354 better determine whether an entity reference is a write.
11355 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11357 * lib-xref.adb (Output_References): Do no suppress a read reference at
11358 the same location as an immediately preceeding modify-reference, to
11359 handle properly in-out actuals.
11361 2011-08-01 Tristan Gingold <gingold@adacore.com>
11363 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11365 2011-08-01 Quentin Ochem <ochem@adacore.com>
11367 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11368 heap to compute the result.
11370 2011-08-01 Robert Dewar <dewar@adacore.com>
11372 * atree.ads: Minor reformatting.
11374 2011-08-01 Emmanuel Briot <briot@adacore.com>
11376 * g-expect.adb (Get_Command_Output): Fix memory leak.
11378 2011-08-01 Geert Bosch <bosch@adacore.com>
11380 * cstand.adb (P_Float_Type): New procedure to print the definition of
11381 predefined fpt types.
11382 (P_Mixed_Name): New procedure to print a name using mixed case
11383 (Print_Standard): Use P_Float_Type for printing floating point types
11384 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11385 precision IEEE float.
11387 2011-08-01 Thomas Quinot <quinot@adacore.com>
11389 * sem_ch3.adb: Minor reformatting.
11391 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11393 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11394 the completion of a generic function, insert the new body rather than
11395 rewriting the original.
11397 2011-08-01 Yannick Moy <moy@adacore.com>
11399 * sinfo.ads, errout.ads: Typos in comments.
11401 2011-08-01 Robert Dewar <dewar@adacore.com>
11403 * par-endh.adb: Minor reformatting.
11405 2011-08-01 Robert Dewar <dewar@adacore.com>
11407 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11408 (Pre_Post_Aspects): New subtype.
11409 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11410 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11411 * par-ch7.adb (P_Package): Remove Decl parameter
11412 (P_Package): Handle new syntax for aspects (before IS)
11413 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11415 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11416 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11417 (P_Package): Remove Decl parameter
11418 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11420 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11422 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11423 * sinfo.ads: Document new syntax for aspects in packages etc.
11424 * sprint.adb: Handle new syntax of aspects before IS in package
11426 2011-08-01 Thomas Quinot <quinot@adacore.com>
11428 * atree.ads: Minor reformatting.
11429 * sem_prag.adb: Minor reformatting.
11431 2011-08-01 Robert Dewar <dewar@adacore.com>
11433 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11434 case expr alternative.
11436 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11438 * sem_ch12.adb: Fix typo.
11440 2011-08-01 Geert Bosch <bosch@adacore.com>
11442 * sem_prag.adb (Check_No_Link_Name): New procedure.
11443 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11444 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11445 instead of Standard_Long_Long_Float_Size global. Preparation for
11446 eventual removal of per type constants.
11447 * exp_util.ads (Get_Stream_Size): New function returning the stream
11448 size value of subtype E.
11449 * exp_util.adb (Get_Stream_Size): Implement new function.
11450 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11452 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11454 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11456 2011-08-01 Geert Bosch <bosch@adacore.com>
11458 * cstand.adb: Fix comments.
11459 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11460 count of arguments.
11462 2011-08-01 Robert Dewar <dewar@adacore.com>
11464 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11466 2011-08-01 Geert Bosch <bosch@adacore.com>
11468 * atree.ads: Fix comment.
11470 2011-08-01 Robert Dewar <dewar@adacore.com>
11472 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11473 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11474 * par.adb: Add with for Namet.Sp.
11475 * par-tchk.adb: Minor reformatting.
11477 2011-08-01 Vincent Celier <celier@adacore.com>
11479 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11480 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11481 of the init procedure of a SAL.
11482 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11485 2011-08-01 Thomas Quinot <quinot@adacore.com>
11487 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11490 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11492 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11494 2011-08-01 Thomas Quinot <quinot@adacore.com>
11496 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11497 conformant with its spec (return True only for types that have
11498 an overriding Initialize primitive operation that prevents them from
11499 having preelaborable initialization).
11500 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11501 initialization for controlled types in Ada 2005 or later mode.
11503 2011-08-01 Robert Dewar <dewar@adacore.com>
11505 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11507 (Same_Aspect): New function.
11508 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11509 Type_Invariant, Precondition, Postcondition.
11510 * snames.ads-tmpl: Add Name_Type_Invariant.
11512 2011-08-01 Robert Dewar <dewar@adacore.com>
11514 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11516 (Freeze_All_Ent): Fix error in handling inherited aspects.
11517 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11518 already analyzed, but don't skip entire processing of a declaration,
11519 that's wrong in some cases of declarations being rewritten.
11520 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11521 Don't delay for integer, string literals
11522 Treat predicates in usual manner for delay, remove special case code,
11524 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11525 (Build_Predicate_Function): Update saved expression in aspect
11526 (Build_Invariant_Procedure): Update saved expression in aspect
11527 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11528 of replacement of discriminant references if the reference is simple.
11530 2011-08-01 Robert Dewar <dewar@adacore.com>
11532 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11533 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11534 Static_Predicate and Dynamic_Predicate.
11535 (Build_Predicate_Function): Add processing for Static_Predicate
11536 and Dynamic_Predicate.
11537 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11538 (From_Static_Predicate): New flag
11539 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11541 2011-08-01 Robert Dewar <dewar@adacore.com>
11543 * usage.adb: Documentation cleanup for Ada version modes in usage.
11544 * expander.adb: Minor reformatting.
11546 2011-08-01 Robert Dewar <dewar@adacore.com>
11548 * atree.ads: Minor comment fix.
11549 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11550 a-witeio.ads, sem_prag.adb: Minor reformatting.
11552 2011-08-01 Doug Rupp <rupp@adacore.com>
11554 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11555 pointers. Use descrip.h header file for convenience. Add some
11558 2011-08-01 Robert Dewar <dewar@adacore.com>
11560 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11561 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11562 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11564 (Check_Aspect_At_End_Of_Declarations): New procedure
11565 (Analye_Aspect_Specification): Minor changes for above procedures
11566 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11567 specification node as well.
11569 2011-08-01 Pascal Obry <obry@adacore.com>
11571 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11572 Windows files. Use GetFilesAttributes() in this case to check for file
11573 existence instead of returning with an error code.
11575 2011-08-01 Vincent Celier <celier@adacore.com>
11577 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11578 High is above Source length.
11580 2011-08-01 Robert Dewar <dewar@adacore.com>
11582 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11584 2011-08-01 Robert Dewar <dewar@adacore.com>
11586 * aspects.ads (Boolean_Aspects): New subtype.
11587 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11588 for derived types in cases where the parent type and derived type have
11590 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11591 with aspects when parent type also has aspects.
11592 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11593 boolean expression at this point).
11594 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11595 accordance with final decision on the Ada 2012 feature.
11596 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11598 2011-08-01 Matthew Heaney <heaney@adacore.com>
11600 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11602 2011-08-01 Pascal Obry <obry@adacore.com>
11604 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11605 Fix Replace_Slice when High is above current string size.
11606 (Replace_Slice): Fix DL computation when High is above current
11609 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11611 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11613 2011-08-01 Matthew Heaney <heaney@adacore.com>
11615 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11618 2011-08-01 Pascal Obry <obry@adacore.com>
11620 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11623 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11625 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11626 access to protected subprograms in generic bodies.
11627 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11628 protected type, indicate that the convention of the subprogram is
11629 Convention_Protected, because it may be used in subsequent declarations
11630 within the protected declaration.
11632 2011-08-01 Vincent Celier <celier@adacore.com>
11634 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11635 and "final" procedures when the name of the library is "ada", to avoid
11636 duplicate symbols "adainit" and "adafinal" in executables.
11638 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11640 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11641 quantified expression that appears within a postcondition and uses the
11642 Ada2012 'Result attribute.
11644 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11646 * init.c (__gnat_error_handler): Cast reason to int.
11647 (__gnat_install_handler): Explain sa_sigaction use.
11649 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11651 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11652 subprogram has copy-in copy-out parameters, try to promote the mode of
11653 the return type if it is passed in registers.
11655 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11657 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11658 left operand as addressable.
11660 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11662 * gcc-interface/gigi.h (build_function_stub): Remove.
11663 (build_return_expr): Likewise.
11664 (convert_vms_descriptor): Declare.
11665 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11666 (build_function_stub): Move to...
11667 * gcc-interface/utils2.c (build_return_expr): Move to...
11668 * gcc-interface/trans.c (build_function_stub): ...here.
11669 (build_return_expr): ...here.
11670 (Subprogram_Body_to_gnu): Add local variable for language_function.
11671 Disconnect the parameter attributes cache, if any, once done with it.
11672 Call end_subprog_body only after setting the end_locus.
11673 Build the stub associated with the function, if any, at the very end.
11674 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11675 variables and streamline control flow.
11677 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11680 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11681 g-trasym-dwarf.adb.
11683 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11686 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11687 Assign to act.sa_sigaction.
11688 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11689 current->return_address to char * before arithmetic.
11691 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11693 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11694 Correct argument types.
11695 Extract code from reason.
11696 (__gnat_install_handler): Assign to act.sa_sigaction.
11698 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11700 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11701 (GNAT1_OBJS): ...here.
11703 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11706 * g-socthi-mingw.adb (Fill): Fix formatting.
11708 * gcc-interface/gigi.h: Move around comment.
11710 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11713 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11715 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11718 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11720 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11722 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11723 range comparison if Pmode is SImode.
11725 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11726 Eric Botcazou <ebotcazou@adacore.com>
11728 * adadecode.c: Wrap up in extern "C" block.
11729 * adadecode.h: Likewise.
11730 * adaint.c: Likewise. Remove 'const' keyword.
11731 * adaint.h: Likewise.
11732 * argv.c: Likewise.
11733 * atree.h: Likewise.
11735 * cstreams.c: Likewise.
11737 * exit.c: Likewise.
11739 * final.c: Likewise.
11740 * init.c: Likewise.
11741 * initialize.c: Likewise.
11742 * link.c: Likewise.
11743 * namet.h: Likewise.
11744 * nlists.h: Likewise.
11745 * raise.c: Likewise.
11746 * raise.h: Likewise.
11747 * repinfo.h: Likewise.
11748 * seh_init.c: Likewise.
11749 * targext.c: Likewise.
11750 * tracebak.c: Likewise.
11751 * uintp.h: Likewise.
11752 * urealp.h: Likewise.
11753 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11754 * xsinfo.adb: Likewise.
11755 * xsnamest.adb: Likewise.
11756 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11757 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11758 * gcc-interface/misc.c: Likewise.
11759 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11760 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11761 ada/targext.o here...
11762 (GNAT_ADA_OBJS): ...and not here.
11763 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11764 (GNATBIND_OBJS): Reorder.
11766 2011-07-07 Richard Henderson <rth@redhat.com>
11768 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11769 dwarf2out_frame_init.
11771 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11773 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11775 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11778 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11780 2011-07-06 Richard Guenther <rguenther@suse.de>
11782 * gcc-interface/misc.c (gnat_init): Merge calls to
11783 build_common_tree_nodes and build_common_tree_nodes_2.
11784 Re-initialize boolean_false_node.
11786 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11787 Olivier Hainque <hainque@adacore.com>
11788 Nicolas Setton <setton@adacore.com>
11790 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11791 the type according to the ARTIFICIAL_P parameter.
11792 (create_type_decl): Likewise.
11793 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11795 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11797 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11798 (gnatbind): Likewise.
11800 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11802 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11804 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11806 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11807 local variable throughout. Remove useless call to Base_Type.
11808 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11809 Take it also into account for the volatileness of the field. Set the
11810 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11812 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11814 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11815 on a dereference built for a by-ref object if it has an address clause.
11817 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11819 * einfo.ads (Address_Taken): Document use for the second argument of
11820 Asm_Input and Asm_Output attributes.
11821 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11822 argument is an entity name, then set Address_Taken on it.
11823 <Attribute_Asm_Output>: Likewise.
11824 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11825 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11826 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11827 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11829 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11831 PR middle-end/46500
11832 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11834 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11836 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11837 (ada/utils.o): Update dependencies.
11838 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11839 ../../../libcpp/libcpp.a.
11840 * gcc-interface/utils.c: Include common/common-target.h.
11841 (process_attributes): Use targetm_common.have_named_sections.
11843 2011-06-07 Richard Guenther <rguenther@suse.de>
11845 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11848 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11850 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11851 TREE_THIS_NOTRAP flag.
11853 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11855 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11858 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11860 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11861 constants whose full view has discriminants specially.
11863 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11865 * gcc-interface/utils.c: Include diagnostic.h.
11866 (gnat_write_global_declarations): Output debug information for all
11867 global type declarations before finalizing the compilation unit.
11868 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11870 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11872 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11874 2011-05-25 Kai Tietz <ktietz@redhat.com>
11876 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11877 initialization instead of const/none-const pointer assignment.
11879 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11881 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11882 $(EXTRA_GNAT1_OBJS).
11883 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11884 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11885 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11886 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11887 libcommon-target.a instead of prefix.o.
11889 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11892 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11894 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11896 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11897 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11898 instead of version.o.
11900 2011-05-18 Kai Tietz <ktietz@redhat.com>
11902 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11903 boolean_false_node instead of integer_zero_node.
11904 (convert_with_check): Likewise.
11905 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11907 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11909 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11910 type of the parameter is an unconstrained array, convert the actual to
11911 the type of the formal in the In Out and Out cases as well.
11913 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11915 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11916 call build_function_type_array or build_varargs_function_type_array
11918 (create_subprog_type): Don't call build_function_type; call
11919 build_function_type_vec instead.
11921 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11923 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11924 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11925 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11927 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11929 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11931 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11932 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11934 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11936 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11938 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11940 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11941 instead of accessing TYPE_ARG_TYPES directly.
11942 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11944 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11947 * gcc-interface/gigi.h (get_variant_part): Declare.
11948 * gcc-interface/decl.c (get_variant_part): Make global.
11949 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11950 types have the same constant size, are record types and T1 has a
11951 variant part while T2 doesn't.
11953 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11955 * gcc-interface/utils.c (begin_subprog_body): Do not call
11957 (end_subprog_body): Likewise.
11959 2011-05-04 Richard Guenther <rguenther@suse.de>
11961 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11963 (pos_to_constructor): Likewise.
11965 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
11966 Eric Botcazou <ebotcazou@adacore.com>
11968 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11969 of build_function_type. Adjust calls to...
11970 (build_raise_check): ...this. Do not take a void_tree parameter.
11971 Call build_function_type_list instead of build_function_type.
11972 Fix head comment and swap couple of conditional blocks.
11974 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11976 * gnatvsn.ads (Library_Version): Bump to 4.7.
11977 (Current_Year): Bump to 2011.
11979 2011-04-29 Michael Matz <matz@suse.de>
11981 * gcc-interface/misc.c (gnat_handle_option): Set
11982 warn_maybe_uninitialized.
11984 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11986 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11987 the Watson/McCabe paper.
11989 2011-04-23 Jim Meyering <meyering@redhat.com>
11991 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11993 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11995 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11998 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12000 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12002 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12003 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12004 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12005 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12006 <all>: Do not set flags on the reused DECL node coming from an alias.
12007 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12008 don't need debug info here...
12009 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12010 (gigi): Adjust calls to create_subprog_decl.
12011 (build_raise_check): Likewise.
12012 (establish_gnat_vms_condition_handler): Likewise.
12013 (Compilation_Unit_to_gnu): Likewise.
12014 (gnat_to_gnu): Likewise.
12016 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12018 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12019 (NO_REORDER_ADAFLAGS): New variable.
12020 (EXTRA_GNATTOOLS): Always define.
12021 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12022 Clean up and adjust list of files compiled with special options.
12023 * gcc-interface/Make-lang.in: Likewise.
12024 (ada/decl.o): Cosmetical change.
12025 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12027 2011-04-20 Jim Meyering <meyering@redhat.com>
12029 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12031 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12033 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12034 $(CFLAGS) on the link line.
12036 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12038 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12039 padded type built for the return type if it is unconstrained.
12041 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12043 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12045 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12047 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12048 before calling TREE_CHAIN.
12049 * gcc-interface/misc.c (gnat_init_ts): New function.
12050 (LANG_HOOKS_INIT_TS): Define.
12052 2011-04-12 Martin Jambor <mjambor@suse.cz>
12054 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12055 instead of cgraph_node.
12057 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12059 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12060 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12063 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12065 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12066 of aggregate types that contain a placeholder.
12068 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12070 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12072 (handle_type_generic_attribute): Likewise.
12074 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12077 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12079 2011-04-04 Kai Tietz <ktietz@redhat.com>
12082 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12085 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12087 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12088 type case, do not strip a padding type around the array type.
12090 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12092 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12095 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12097 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12098 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12099 code for -feliminate-unused-debug-types.
12100 (gnat_post_options): Likewise.
12102 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12104 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12105 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12108 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12110 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12111 DECL_ARTIFICIAL flag on enumeration types.
12113 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12115 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12116 fat pointer types artificial unconditionally.
12117 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12120 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12122 * gcc-interface/gigi.h (get_dummy_type): Declare.
12123 (build_dummy_unc_pointer_types): Likewise.
12124 (finish_fat_pointer_type): Likewise.
12125 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12126 fat pointer type has been built, complete it in place.
12127 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12128 and thin pointers. Remove useless variable.
12129 (finish_fat_pointer_type): Make global and move to...
12130 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12131 (get_dummy_type): New function.
12132 (build_dummy_unc_pointer_types): Likewise.
12133 (gnat_pushdecl): Propage the name to the anonymous variants only.
12134 (update_pointer_to): Only adjust the pointer types in the unconstrained
12137 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12139 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12140 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12141 if this is a Taft amendment type and the full declaration is available.
12142 * gcc-interface/trans.c (process_type): Likewise.
12143 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12144 (process_freeze_entity): Likewise.
12145 * gcc-interface/utils.c (dummy_global): New static variable.
12146 (gnat_write_global_declarations): If there are types declared as used
12147 at the global level, insert them in the global hash table.
12149 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12151 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12152 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12153 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12155 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12156 flag of the type accordingly.
12157 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12159 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12161 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12162 finalizing types when updating the pointers to the designated type.
12163 <all>: Finalize the deferred types even if we didn't defer processing
12164 of incomplete types in this invocation.
12166 2011-04-01 Olivier Hainque <hainque@adacore.com>
12167 Nicolas Setton <setton@adacore.com>
12168 Eric Botcazou <ebotcazou@adacore.com>
12170 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12171 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12173 2011-03-28 Kai Tietz <ktietz@redhat.com>
12175 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12177 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12178 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12180 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12182 2011-03-28 Tristan Gingold <gingold@adacore.com>
12185 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12186 Use ada output of gnatbind.
12187 (ada/b_gnatb.adb): Ditto.
12188 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12189 (ada.mostlyclean, ada.stage1)
12190 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12191 (ada.stagefeedback): Adjust.
12192 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12193 Use ada output of gnatbind.
12194 (b_gnatm.adb): Ditto.
12195 (b_gnatl.o, b_gnatm.o): New rules.
12197 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12199 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12200 for the padded type built to support a specified size or alignment.
12202 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12204 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12205 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12206 unconditionally to the end of the unit when the designated type is
12208 <all>: Rename local variable. Attempt to un-defer types only and do it
12209 for limited_with'ed types as well.
12210 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12211 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12212 consistently and remove redundant call to finalize_from_with_types.
12214 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12216 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12217 subprograms without a previous spec declared in the same unit.
12218 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12219 subprograms at the end of the unit instead of at the beginning.
12220 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12221 isn't public for the special handling of non-inline functions nested
12222 inside inline external functions.
12224 2011-03-25 Jeff Law <law@redhat.com>
12226 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12228 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12230 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12231 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12232 to compute Set_Size_Depends_On_Discriminant.
12233 (Layout_Type): Call it on array types in back-end layout mode.
12234 * sem_util.adb (Requires_Transient_Scope): Return true for array
12235 types only if the size depends on the value of discriminants.
12236 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12237 type if the RHS is a call to a function that returns an unconstrained
12238 type with default discriminant.
12240 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12242 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12243 non-conversion to the nominal result type at the end.
12245 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12247 * gcc-interface/trans.c (create_temporary): New function taken from...
12248 (create_init_temporary): ...here. Call it.
12249 (call_to_gnu): Create the temporary for the return value early, if any.
12250 Create it for a function with copy-in/copy-out parameters if there is
12251 no target; in other cases of copy-in/copy-out, use another temporary.
12252 Push the new binding level lazily. Add and rename local variables.
12254 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12256 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12258 (set_rm_size): Likewise.
12260 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12262 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12263 for the padded type built in order to support a specified alignment.
12264 Fix incorrect formatting.
12266 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12269 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12271 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12273 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12274 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12275 to the end of the list. Adjust recursive call. Rename local variable.
12276 If REORDER is true, reorder components of the record type.
12277 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12278 components_to_record and adjust the parameter list.
12280 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12282 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12283 disabled, use the variable for bounds of loop iteration scheme.
12285 2011-03-21 Kai Tietz <ktietz@redhat.com>
12288 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12290 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12292 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12293 out whether the expression is read-only. Short-circuit placeholder
12294 case and rename a couple of local variables.
12296 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12298 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12299 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12300 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12301 (convert): Deal with conversions from a smaller form type specially.
12303 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12305 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12306 its argument, except for the special -I- switch.
12308 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12310 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12313 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12315 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12317 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12319 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12321 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12322 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12323 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12324 Do not generate the check directly, instead instantiate the template
12325 check present in the descriptor.
12326 (make_descriptor_field): Move around.
12327 (build_vms_descriptor32): Build a template check in the POINTER field.
12328 (build_vms_descriptor): Remove useless suffixes.
12329 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12331 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12334 * targext.c: Include target files if IN_RTS is defined.
12336 2011-01-26 Richard Guenther <rguenther@suse.de>
12339 * targext.c: Include config.h.
12340 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12343 2011-01-04 Pascal Obry <obry@adacore.com>
12344 Eric Botcazou <ebotcazou@adacore.com>
12346 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12348 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12350 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12351 end-of-case on the end label and its associated gotos, if any.
12353 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12355 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12356 expressions of the parameter cache within the statement group of
12357 the CICO mechanism.
12359 2011-01-04 Olivier Hainque <hainque@adacore.com>
12360 Eric Botcazou <ebotcazou@adacore.com>
12362 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12363 (set_end_locus_from_node): New function.
12364 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12365 make and the function end_locus.
12366 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12367 for the elaboration subprogram.
12368 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12369 set the end_locus of the expression as well.
12371 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12374 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12375 variables that are referenced in exception handlers volatile.
12379 Copyright (C) 2011 Free Software Foundation, Inc.
12381 Copying and distribution of this file, with or without modification,
12382 are permitted in any medium without royalty provided the copyright
12383 notice and this notice are preserved.
12385 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12386 - fix bugs in the description of Source_Trace;
12387 - get rid of UNIT_NAME;
12389 2011-08-02 Javier Miranda <miranda@adacore.com>
12392 (Build_Dispatching_Requeue): Adding support for VM targets
12393 since we cannot directly reference the Tag entity.
12394 * exp_sel.adb (Build_K): Adding support for VM targets.
12395 (Build_S_Assignment): Adding support for VM targets.
12397 (Default_Prim_Op_Position): In VM targets do not restrict availability
12398 of predefined interface primitives to compiling in Ada 2005 mode.
12399 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12400 restricted to compiling in Ada 2005 mode.
12401 (Make_VM_TSD): Generate code that declares and initializes the OSD
12402 record. Needed to support dispatching calls through synchronized
12405 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12406 primitives associated with synchronized interfaces.
12407 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12408 primitives associated with synchronized interfaces.
12410 2011-08-02 Yannick Moy <moy@adacore.com>
12412 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12413 statements hidden in SPARK if preceded by the HIDE directive
12414 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12415 exception handlers as hidden in SPARK if preceded by the HIDE directive
12416 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12417 if starting with the HIDE directive
12418 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12419 starting with the HIDE directive; mark the declarations in a private
12420 part as hidden in SPARK if the private part starts with the HIDE
12422 * restrict.adb, restrict.ads
12423 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12424 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12425 argument node belongs to a part which is hidden in SPARK
12426 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12427 parts in SPARK; protect the possibly costly call to
12428 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12429 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12430 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12431 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12433 (Scan): recognize special comment starting with '#' and followed by
12434 SPARK keyword "hide" as a HIDE directive.
12436 2011-08-02 Yannick Moy <moy@adacore.com>
12438 * types.ads, erroutc.ads: Minor reformatting.
12440 2011-08-02 Vincent Celier <celier@adacore.com>
12442 * link.c: Add response file support for cross platforms.
12444 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12446 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12447 in an association, set parent field of copy before partial analysis.
12448 * sem_res.adb (Resolve_Slice): create reference to itype only when
12449 expansion is enabled.
12451 2011-08-02 Yannick Moy <moy@adacore.com>
12453 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12454 for new flag denoting which subprogram bodies are in ALFA
12455 * restrict.adb, sem_ch7.adb: Update comment
12456 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12457 sem_ch9.adb, sem_res.adb: Add calls to
12458 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12459 * sem_ch6.adb (Analyze_Function_Return): add calls to
12460 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12461 middle of the body, and extended return.
12462 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12463 False when missing return.
12464 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12465 to True for subprograms whose spec is in ALFA. Remove later on the flag
12466 on the entity used for a subprogram body when there exists a separate
12468 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12469 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12470 False, otherwise do nothing.
12472 2011-08-02 Robert Dewar <dewar@adacore.com>
12474 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12476 2011-08-02 Yannick Moy <moy@adacore.com>
12478 * sem_ch4.ads: minor formatting.
12480 2011-08-02 Yannick Moy <moy@adacore.com>
12482 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12483 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12484 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12485 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12486 opt.ads: cleanup of SPARK mode
12488 2011-08-02 Yannick Moy <moy@adacore.com>
12490 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12492 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12493 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12495 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12496 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12497 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12498 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12500 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12502 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12503 functions whose return type is not in ALFA.
12504 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12506 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12507 parameter's type is not in ALFA.
12508 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12511 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12513 * sem_ch6 (Analyze_Expression_Function): treat the function as
12514 Inline_Always, and introduce a subprogram declaration for it when it is
12516 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12517 expression functions, so that the back-end can determine whether they
12518 can in fact be inlined.
12519 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12520 a function body comes from an expression function.
12522 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12524 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12525 null exclusions to test Can_Never_Be_Null on the anonymous access types
12526 of the formals rather than testing the formals themselves. Exclude this
12527 check in cases where the Old_Formal is marked as a controlling formal,
12528 to avoid issuing spurious errors for bodies completing dispatching
12529 operations (due to the flag not getting set on controlling access
12530 formals in body specs).
12531 (Find_Corresponding_Spec): When checking full and subtype conformance of
12532 subprogram bodies in instances, pass Designated and E in that order, for
12533 consistency with the expected order of the formals (New_Id followed by
12536 2011-08-02 Robert Dewar <dewar@adacore.com>
12538 * sem_ch8.adb: Minor reformatting.
12540 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12542 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12543 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12544 primitive operations of class-wide actuals.
12546 2011-08-02 Javier Miranda <miranda@adacore.com>
12548 * exp_atag.ads, exp_atag.adb
12549 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12550 since its value is implicitly passed in argument Typ.
12551 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12552 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12553 Build_Common_Dispatching_Select_Statements.
12555 2011-08-02 Robert Dewar <dewar@adacore.com>
12557 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12558 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12559 Minor reformatting.
12561 2011-08-02 Robert Dewar <dewar@adacore.com>
12563 * sem_res.adb: Minor reformatting.
12564 * sem_prag.adb: Minor reformatting.
12566 2011-08-02 Javier Miranda <miranda@adacore.com>
12568 * exp_atag.adb, exp_atags.ads
12569 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12570 by the tagged type Entity. Required to use this routine in the VM
12571 targets since we do not have available the Tag entity in the VM
12574 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12575 Ada.Tags has not been previously loaded.
12577 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12578 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12580 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12581 view of enclosing scopes. Required to handle enclosing scopes that
12582 are synchronized types whose full view is a task type.
12584 (Build_VM_TSDs): Minor code improvement to avoid generating and
12585 analyzing lists with empty nodes.
12586 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12587 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12588 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12589 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12590 (Make_Select_Specific_Data_Table): Add support for VM targets.
12591 (Make_VM_TSD): Generate code to initialize the SSD structure of
12594 2011-08-02 Yannick Moy <moy@adacore.com>
12596 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12597 cross-references section in ALI.
12598 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12599 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12601 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12602 subprogram or package entity of a node
12603 (Is_Local_Reference_Type): new function returns True for references
12604 selected in local cross-references.
12605 (Lt): function extracted from Lt in Output_References
12606 (Write_Entity_Name): function extracted from Output_References
12607 (Generate_Definition): generate reference with type 'D' for definition
12608 of objects (object declaration and parameter specification), with
12609 appropriate locations and units, for use in local cross-references.
12610 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12611 references of type 'I' for initialization in object definition.
12612 (Output_References): move part of function Lt and procedure
12613 Write_Entity_Name outside of the body. Ignore references of types 'D'
12614 and 'I' introduced for local cross-references.
12615 (Output_Local_References): new procedure to output the local
12616 cross-references sections.
12617 (Lref_Entity_Status): new array defining whether an entity is a local
12618 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12619 with 'I' type when initialization expression is present.
12620 * get_scos.adb, get_scos.ads: Correct comments and typos
12622 2011-08-02 Javier Miranda <miranda@adacore.com>
12624 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12626 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12628 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12631 2011-08-02 Vincent Celier <celier@adacore.com>
12633 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12634 (No_Space_Img): New function
12635 (Find_Excluded_Sources): When reading from a file, record the file name
12636 and the line number for each excluded source.
12637 (Mark_Excluded_Sources): When reporting an error, if the excluded
12638 sources were read from a file, include file name and line number in
12641 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12643 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12645 2011-08-02 Robert Dewar <dewar@adacore.com>
12647 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12649 2011-08-02 Javier Miranda <miranda@adacore.com>
12651 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12652 generation of TSDs to the DOTNET compiler.
12653 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12654 generation of TSDs to the DOTNET compiler.
12656 2011-08-02 Javier Miranda <miranda@adacore.com>
12658 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12659 record of all the tagged types declared inside library level package
12660 declarations, library level package bodies or library level subprograms.
12661 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12662 associated with a given tagged type.
12663 (Build_VM_TSDs): New subprogram.
12664 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12665 compilation units that are subprograms.
12666 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12667 compilation units that are package bodies.
12668 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12669 units that are a package declaration or a package instantiation.
12670 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12671 reorganization to improve the error generated by the frontend when the
12672 function Ada.Tags.Secondary_Tag is not available.
12673 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12674 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12676 2011-08-02 Javier Miranda <miranda@adacore.com>
12678 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12680 2011-08-02 Robert Dewar <dewar@adacore.com>
12682 * s-imenne.ads: Minor reformatting.
12684 2011-08-02 Robert Dewar <dewar@adacore.com>
12686 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12687 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12688 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12690 2011-08-02 Robert Dewar <dewar@adacore.com>
12692 * einfo.ads (Materialize_Entity): Document this is only for renamings
12693 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12694 required debug information in the case where we transform the object
12695 declaration into a renaming declaration.
12696 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12698 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12699 Materialize_Entity.
12701 2011-08-02 Robert Dewar <dewar@adacore.com>
12703 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12704 Suppress_Init_Procs.
12705 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12706 Suppress_Initialization/Initialization_Suppressed.
12707 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12708 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12709 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12710 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12712 2011-08-02 Robert Dewar <dewar@adacore.com>
12714 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12715 Minor reformatting.
12717 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12719 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12720 only have inheritable classwide pre/postconditions.
12722 2011-08-02 Javier Miranda <miranda@adacore.com>
12724 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12725 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12726 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12727 checks if the external tag of a type is the same as the external tag
12728 of some other declaration.
12730 2011-08-02 Thomas Quinot <quinot@adacore.com>
12732 * s-taskin.ads: Minor reformatting.
12734 2011-08-02 Emmanuel Briot <briot@adacore.com>
12736 * g-comlin.adb (Display_Help): swap the order in which it prints the
12737 short help and the general usage.
12739 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12741 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12742 the aspect declarations and attach them to the generic copy for
12743 subsequent analysis.
12744 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12745 declarations of the generic tree to the new subprogram declarations.
12746 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12747 conditions that apply to a subprogram instance.
12749 2011-08-02 Robert Dewar <dewar@adacore.com>
12751 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12753 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12755 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12756 private type with a tagged full view is not derived in the immediate
12757 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12759 2011-08-02 Robert Dewar <dewar@adacore.com>
12761 * exp_ch4.adb: Minor reformatting.
12763 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12765 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12766 Ada2012 iterator, the loop will be rewritten during expansion into a
12767 while loop with a cursor and an element declaration. Do not analyze the
12768 body in this case, because if the container is for indefinite types the
12769 actual subtype of the elements will only be determined when the cursor
12770 declaration is analyzed.
12772 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12774 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12775 size/alignment related attributes in CodePeer_Mode.
12777 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12779 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12780 Prepend_Element, since this can result in the operation getting the
12781 wrong slot in the full type's dispatch table if the full type has
12782 inherited operations. The incomplete type's operation will get added
12783 to the proper position in the full type's primitives
12784 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12785 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12786 dispatching operations, since there are cases where nonprimitive
12787 subprograms can get added to the list of incomplete dependents (such
12788 as subprograms in nested packages).
12789 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12790 private part when determining whether to add a primitive with a
12791 parameter of a tagged incomplete type to the Private_Dependents list.
12792 Such primitives can also occur in the visible part, and should not have
12793 been excluded from being private dependents.
12794 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12795 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12796 list of a Taft-amendment incomplete type is a primitive before issuing
12797 an error that the full type must appear in the same unit. There are
12798 cases where nonprimitives can be in the list (such as subprograms in
12800 * sem_disp.adb (Derives_From): Use correct condition for checking that
12801 a formal's type is derived from the type of the corresponding formal in
12802 the parent subprogram (the condition was completely wrong). Add
12803 checking that was missing for controlling result types being derived
12804 from the result type of the parent operation.
12806 2011-08-02 Yannick Moy <moy@adacore.com>
12808 * errout.adb (First_Node): minor renaming
12809 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12812 2011-08-02 Yannick Moy <moy@adacore.com>
12814 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12815 before accessing operands.
12816 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12817 decide whether an initialization expression respects SPARK rules, as
12818 the plain node is the expanded one. This allows for more valid warnings
12820 * gnat_rm.texi: Minor update.
12822 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12824 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12827 2011-08-02 Robert Dewar <dewar@adacore.com>
12829 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12831 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12833 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12834 loop statements and the element renaming declaration with a block when
12835 the element type is controlled.
12837 2011-08-02 Yannick Moy <moy@adacore.com>
12839 * sinfo.ads: Minor formatting.
12841 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12843 * sem_aggr.adb (Add_Association): if the association has a box and no
12844 expression, use the Sloc of the aggregate itself for the new
12846 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12849 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12851 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12852 When a container is provided via a function call, generate a renaming
12853 of the function result. This avoids the creation of a transient scope
12854 and the premature finalization of the container.
12855 * exp_ch7.adb (Is_Container_Cursor): Removed.
12856 (Wrap_Transient_Declaration): Remove the supression of the finalization
12857 of the list controller when the declaration denotes a container cursor,
12860 2011-08-02 Yannick Moy <moy@adacore.com>
12862 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12863 node is from source, instead of the original node being from source.
12865 (Resolve_Array_Aggregate): refine the check for a static expression, to
12866 recognize also static ranges
12867 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12868 Array_Type_Declaration): postpone the test for the type being a subtype
12869 mark after the type has been resolved, so that component-selection and
12870 expanded-name are discriminated.
12871 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12872 to distinguish the case of an iteration scheme, so that an error is
12873 issed on a non-static range in SPARK except in an iteration scheme.
12874 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12875 In_Iter_Schm = True.
12876 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12877 user-defined operators so that they are allowed in renaming
12879 (Find_Selected_Component): refine the check for prefixing of operators
12880 so that they are allowed in renaming. Move the checks for restrictions
12881 on selector name after analysis discriminated between
12882 component-selection and expanded-name.
12883 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12884 concatenation argument of string type if it is static.
12885 * sem_util.adb, sem_util.ads
12886 (Check_Later_Vs_Basic_Declarations): add a new function
12887 Is_Later_Declarative_Item to decice which declarations are allowed as
12888 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12889 mode, add that renamings are considered as later items.
12890 (Enclosing_Package): new function to return the enclosing package
12891 (Enter_Name): correct the rule for homonyms in SPARK
12892 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12893 from source (result of expansion) to avoid issuing wrong warnings.
12895 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12897 * errout.adb: On anything but an expression First_Node returns its
12900 2011-08-02 Pascal Obry <obry@adacore.com>
12902 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12904 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12906 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12907 Set the associated loop as the related expression of internally
12909 * exp_ch7.adb (Is_Container_Cursor): New routine.
12910 (Wrap_Transient_Declaration): Supress the finalization of the list
12911 controller when the declaration denotes a container cursor.
12913 2011-08-02 Yannick Moy <moy@adacore.com>
12915 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12917 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12918 expression is a simple expression. This check cannot be performed in
12919 the semantics, so just drop it.
12920 (P_Index_Or_Discriminant_Constraint): move check that the index or
12921 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12922 semantics. Other cases were previously checked in the semantics.
12923 * par-ch4.adb (P_Name): move checks that a selector name is not
12924 character literal or an operator symbol to Find_Selected_Component in
12926 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12927 declarations are not placed after later declarations in a separate
12928 procedure in Sem_Util (possibly not the best choice?), to be used both
12929 during parsing, for Ada 83 mode, and during semantic analysis, for
12931 * par-endh.adb (Check_End): move check that end label is not missing
12932 to Process_End_Label in the semantics
12933 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12934 the special case for SPARK restriction
12935 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12936 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12937 parameter Force to issue the error message even on internal node (used
12938 for generated end label). Call Check_Restriction to check when an error
12939 must be issued. In SPARK mode, issue an error message even if the
12940 restriction is not set.
12941 (Check_Restriction): new procedure with an additional out parameter to
12942 inform the caller that a message has been issued
12943 * sem_aggr.adb: Minor modification of message
12944 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12945 instead of issuing an error message directly
12946 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12947 declarations are not placed after later declarations, by calling
12948 Check_Later_Vs_Basic_Declarations
12949 (Analyze_Subtype_Declaration): move here the check that an index or
12950 discriminant constraint must be a subtype mark. Change the check that
12951 a subtype of String must start at one so that it works on subtype marks.
12952 * sem_ch4.adb (Analyze_Call): move here the check that a named
12953 association cannot follow a positional one in a call
12954 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12955 instead of issuing an error message directly
12956 * sem_ch8.adb (Find_Selected_Component): move here the check that a
12957 selector name is not a character literal or an operator symbol. Move
12958 here the check that the prefix of an expanded name cannot be a
12959 subprogram or a loop statement.
12960 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12961 procedure called from parsing and semantics to check that basic
12962 declarations are not placed after later declarations
12963 (Process_End_Label): move here the check that end label is not missing
12965 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12967 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12968 representation clause in codepeer mode, since it confuses CodePeer and
12969 does not bring useful info.
12971 2011-08-02 Ed Falis <falis@adacore.com>
12973 * init.c: initialize fp hw on MILS.
12975 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12977 * errout.adb (First_Node): for bodies, return the node itself (small
12978 optimization). For other nodes, do not check source_unit if the node
12979 comes from Standard.
12981 2011-08-02 Robert Dewar <dewar@adacore.com>
12983 * exp_ch3.adb: Minor comment additions.
12984 * sem_ch13.adb: Minor reformatting.
12986 2011-08-02 Pascal Obry <obry@adacore.com>
12988 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12990 2011-08-02 Robert Dewar <dewar@adacore.com>
12992 * sem_attr.adb: Minor reformatting.
12994 2011-08-02 Robert Dewar <dewar@adacore.com>
12996 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12997 (Has_Default_Component_Value): Removed
12998 * einfo.ads Comment updates
12999 (Has_Default_Aspect): Replaces Has_Default_Value
13000 (Has_Default_Component_Value): Removed
13002 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13004 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13005 (Get_Simple_Init_Val): Handle Default_Value aspect
13006 (Needs_Simple_Initialization): Handle Default_Value aspect
13007 * exp_ch3.ads: Needs_Simple_Initialization
13008 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13009 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13011 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13012 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13013 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13015 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13017 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13018 package containing iteration primitives.
13019 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13021 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13023 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13024 "of", pre-analyze expression in case it is a function call with
13025 finalization actions that must be placed ahead of the loop.
13026 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13027 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13029 2011-08-02 Geert Bosch <bosch@adacore.com>
13031 * cstand.adb (Create_Float_Types): Only consider C's long double for
13032 Long_Long_Float, in addition to double.
13034 2011-08-02 Robert Dewar <dewar@adacore.com>
13036 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13037 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13038 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13039 Minor reformatting.
13041 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13043 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13046 2011-08-02 Javier Miranda <miranda@adacore.com>
13048 * einfo.ads, einfo.adb
13049 (Original_Access_Type): Move this attribute to Node26 since there was
13050 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13051 which causes conflicts and breaks the generation of the .NET compiler.
13052 (Interface_Name): Add missing documentation on JGNAT only uses of
13055 2011-08-02 Geert Bosch <bosch@adacore.com>
13057 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13058 (Find_Back_End_Float_Type): Likewise
13059 (Create_Back_End_Float_Types): Likewise
13060 (Create_Float_Types): Likewise
13061 (Register_Float_Type): Likewise
13062 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13063 Nlist and split out type selection in new local Find_Base_Type function.
13064 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13066 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13068 2011-08-02 Robert Dewar <dewar@adacore.com>
13070 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13072 * opt.ads: Minor comment change.
13073 * sem_ch12.adb: Minor code reorganization.
13075 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13077 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13078 subtype's list of rep items to the list on the full subtype in the case
13079 where the lists are the same.
13081 2011-08-02 Geert Bosch <bosch@adacore.com>
13083 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13084 using the one from System.Strings, which also deallocates all strings.
13086 2011-08-02 Geert Bosch <bosch@adacore.com>
13088 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13090 * gcc-interface/Make-lang.in: Update dependencies.
13092 2011-08-02 Olivier Hainque <hainque@adacore.com>
13094 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13097 2011-08-02 Javier Miranda <miranda@adacore.com>
13099 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13100 associated with anonymous access to subprograms.
13102 2011-08-02 Geert Bosch <bosch@adacore.com>
13105 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13106 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13107 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13108 (Add_Symbol_Definition): Move to switch-c.adb
13109 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13110 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13111 (Add_Symbol_Definition): Move to switch-c.adb.
13112 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13114 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13115 Move to warnsw.adb.
13116 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13117 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13118 Move to warnsw.adb.
13119 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13120 (Add_Symbol_Definition): Moved from Prepcomp.
13121 * switch-c.ads: Update copyright notice. Use String_List instead of
13122 Argument_List, removing dependency on System.OS_Lib.
13124 2011-08-02 Yannick Moy <moy@adacore.com>
13126 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13127 mode on initialization expression which does not respect SPARK
13129 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13130 if the tree referenced by its argument represents an initialization
13131 expression in SPARK, suitable for initializing an object in an object
13134 2011-08-02 Javier Miranda <miranda@adacore.com>
13136 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13137 internally generated access to subprogram with its associated protected
13139 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13141 2011-08-02 Geert Bosch <bosch@adacore.com>
13143 * cstand.adb (Register_Float_Type): Print information about type to
13144 register, if the Debug_Flag_Dot_B is set.
13145 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13146 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13147 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13148 with a requested precision of more than Max_Digits digits and no more
13149 than Max_Base_Digits digits, if a range specification is present and the
13150 Predefined_Float_Types list has a suitable type to derive from.
13151 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13152 case of type completion with pragma Import
13154 (Process_Import_Predefined_Type): Processing to complete a type
13155 with pragma Import. Currently supports floating point types only.
13156 (Set_Convention_From_Pragma): Do nothing without underlying type.
13157 (Process_Convention): Guard against absence of underlying type,
13158 which may happen when importing incomplete types.
13159 (Process_Import_Or_Interface): Handle case of importing predefined
13160 types. Tweak error message.
13162 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13164 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13165 functions to previous change. Reorganize code slightly.
13167 2011-08-02 Geert Bosch <bosch@adacore.com>
13169 * back_end.ads (Register_Type_Proc): New call back procedure type for
13170 allowing the back end to provide information about available types.
13171 (Register_Back_End_Types): New procedure to register back end types.
13172 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13174 * cstand.adb (Back_End_Float_Types): New list for floating point types
13175 supported by the back end.
13176 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13177 (Copy_Float_Type): New procedure to make new copies of predefined types.
13178 (Register_Float_Type): New call back procedure to populate the BEFT list
13179 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13180 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13181 (Create_Float_Types): New procedure to create entities for floating
13182 point types predefined in Standard, and put these and any remaining
13183 BEFTs on the Predefined_Float_Types list.
13184 * stand.ads (Predefined_Float_Types): New list for predefined floating
13185 point types that do not have declarations in package Standard.
13187 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13189 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13190 entity node for the unit containing the parameter.
13191 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13192 (Add_Inlined_Subprogram): Likewise.
13193 * gcc-interface/Make-lang.in: Update dependencies.
13195 2011-08-02 Thomas Quinot <quinot@adacore.com>
13197 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13200 2011-08-02 Geert Bosch <bosch@adacore.com>
13202 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13204 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13206 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13207 computed value of Base_Type.
13209 2011-08-02 Yannick Moy <moy@adacore.com>
13211 * restrict.adb (Check_Restriction): issue an error for any use of
13212 class-wide, even if the No_Dispatch restriction is not set.
13213 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13214 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13215 when completing a private extension, the type named in the private part
13216 is not the same as that named in the visible part.
13217 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13218 of an inherited primitive operations of a tagged type or type extension
13219 that returns the tagged type.
13220 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13221 function which returns True for an implicit operation inherited by the
13222 derived type declaration for the argument type.
13223 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13226 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13228 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13229 Process_Bounds, to perform analysis with expansion of a range or an
13230 expression that is the iteration scheme for a loop.
13231 (Analyze_Iterator_Specification): If domain of iteration is given by a
13232 function call with a controlled result, as is the case if call returns
13233 a predefined container, ensure that finalization actions are properly
13235 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13237 2011-08-02 Javier Miranda <miranda@adacore.com>
13239 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13240 * gcc-interface/Make-lang.in: Update dependencies.
13242 2011-08-02 Javier Miranda <miranda@adacore.com>
13244 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13245 determine if the analysis is performed using N or Original_Node (N).
13246 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13247 functionality of routine Is_Variable avoids code duplication.
13248 * checks.adb (Determine_Range): Handle temporaries generated by
13249 Remove_Side_Effects.
13251 2011-08-02 Javier Miranda <miranda@adacore.com>
13253 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13254 expansion of the condition. Required since the previous analysis was
13255 done with expansion disabled (see Resolve_Quantified_Expression) and
13256 hence checks were not inserted and record comparisons have not been
13259 2011-08-02 Ed Falis <falis@adacore.com>
13261 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13264 2011-08-02 Bob Duff <duff@adacore.com>
13266 * opt.ads: Minor comment fix.
13268 2011-08-02 Bob Duff <duff@adacore.com>
13270 * sem_ch12.adb (Analyze_Package_Instantiation,
13271 Analyze_Subprogram_Instantiation): Turn off style checking while
13272 analyzing an instance. Whatever style checks that apply to the generic
13273 unit should apply, so it makes no sense to apply them in an instance.
13274 This was causing trouble when compiling an instance of a runtime
13275 unit that violates the -gnatyO switch.
13276 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13277 one of the two case statements, causing spurious errors.
13279 2011-08-02 Robert Dewar <dewar@adacore.com>
13281 * uname.adb: Minor reformatting.
13282 * gnatcmd.adb: Minor reformatting.
13283 * exp_attr.adb: Minor reformatting.
13285 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13287 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13288 No_Dispatching_Calls, do not look for the Assign primitive, because
13289 predefined primitives are not created in this case.
13291 2011-08-02 Bob Duff <duff@adacore.com>
13293 * stylesw.ads: Minor comment fixes.
13295 2011-08-02 Robert Dewar <dewar@adacore.com>
13297 * freeze.adb (Add_To_Result): New procedure.
13299 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13301 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13302 time, if the specific run-time routines for handling streams of strings
13303 are not available, use the default mechanism.
13305 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13307 * s-regpat.ads: Fix typo.
13309 2011-08-02 Vincent Celier <celier@adacore.com>
13311 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13312 not null, call it to create the in memory config project file without
13313 parsing an existing default config project file.
13315 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13317 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13319 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13321 * sem_elim.adb: an abstract subprogram does not need an eliminate
13322 pragma for its descendant to be eliminable.
13324 2011-08-02 Ed Falis <falis@adacore.com>
13326 * init.c: revert to handling before previous checkin for VxWorks
13327 * s-intman-vxworks.adb: delete unnecessary declarations related to
13328 using Ada interrupt facilities for handling signals.
13329 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13330 * s-intman-vxworks.ads: Import __gnat_install_handler as
13331 Initialize_Interrupts.
13332 * s-taprop-vxworks.adb: Delete Signal_Mask.
13333 (Abort_Handler): change construction of mask to unblock exception
13336 2011-08-02 Jerome Guitton <guitton@adacore.com>
13338 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13339 Debug_Raise_Exception before propagation starts.
13341 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13343 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13344 to Restriction_Check_Required.
13345 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13346 * sem_res.adb (Resolve_Call): Likewise.
13347 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13349 2011-08-02 Bob Duff <duff@adacore.com>
13351 * stylesw.ads: Update comment.
13352 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13353 * errout.ads: Remove obsolete comment.
13355 2011-08-02 Javier Miranda <miranda@adacore.com>
13357 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13358 (Set_Is_Safe_To_Reevaluate): new procedure.
13359 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13360 assignment is allowed on safe-to-reevaluate variables.
13361 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13362 temporary created to remove side effects in expressions that use
13363 the secondary stack as safe-to-reevaluate.
13364 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13365 variables that are not true constants.
13367 2011-08-02 Robert Dewar <dewar@adacore.com>
13369 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13370 sem_res.adb, sem_ch6.adb: Minor reformatting.
13372 2011-08-02 Jerome Guitton <guitton@adacore.com>
13374 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13376 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13378 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13379 not set Overridden_Operation if subprogram is an initialization
13382 2011-08-02 Yannick Moy <moy@adacore.com>
13384 * par-ch6.adb: Correct obsolete name in comments
13385 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13386 which takes two message arguments (existing function takes one), with
13387 second message used for continuation.
13388 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13389 block statements that originate from a source block statement, not
13390 generated block statements
13391 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13392 symmetry with procedure case
13393 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13394 function to issue an error in formal mode if a package specification
13395 contains more than one tagged type or type extension.
13396 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13397 parameters matching formals of tagged types are objects (or ancestor
13398 type conversions of objects), not general expressions. Issue an error
13399 on view conversions that are not involving ancestor conversion of an
13401 (Resolve_Type_Conversion): in formal mode, issue an error on the
13402 operand of an ancestor type conversion which is not an object
13403 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13404 procedure so that it works also for actuals of function calls
13405 (Is_Actual_Tagged_Parameter): new function which determines if its
13406 argument is an actual parameter of a formal of tagged type in a
13408 (Is_SPARK_Object_Reference): new function which determines if the tree
13409 referenced by its argument represents an object in SPARK
13411 2011-08-02 Robert Dewar <dewar@adacore.com>
13413 * sem_ch3.adb: Minor reformatting
13414 Minor comment addition
13415 Minor error msg text change
13417 2011-08-02 Javier Miranda <miranda@adacore.com>
13419 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13420 function. Used to be more precise when we generate a variable plus one
13421 assignment to remove side effects in the evaluation of the Bound
13423 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13424 of the bound expression to force its re-analysis and thus expand the
13425 associated transient scope (if required). Code cleanup replacing the
13426 previous code that declared the constant entity by an invocation to
13427 routine Force_Evaluation which centralizes this work in the frontend.
13429 2011-08-02 Robert Dewar <dewar@adacore.com>
13431 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13432 (Base_Type): Now uses improved Is_Base_Type function
13433 * einfo.ads (Base_Type): Inline this function
13435 2011-08-02 Robert Dewar <dewar@adacore.com>
13437 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13438 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13440 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13442 * gcc-interface/Make-lang.in: Update dependencies.
13443 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13446 2011-08-02 Yannick Moy <moy@adacore.com>
13448 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13449 non-simple expression used in delta constraint
13450 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13451 index constraint which is not a subtype mark
13452 * par.adb: With and use Restrict
13453 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13454 mode on component type which is not a subtype mark and default
13455 expression on component
13456 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13457 of string which does not have a lower index bound equal to 1
13458 (Array_Type_Declaration): issue an error in formal mode on index or
13459 component type which is not a subtype mark, and on aliased keyword on
13461 (Derived_Type_Declaration): issue an error in formal mode on interface,
13462 limited or abstract type
13463 (Record_Type_Declaration): issue an error in formal mode on interface
13464 (Record_Type_Definition): issue an error in formal mode on tagged types
13465 and type extensions not declared in the specification of a library unit
13466 package; on null non-tagged record; on variant part
13468 2011-08-02 Vincent Celier <celier@adacore.com>
13470 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13471 not declared for qualified library project when Library_Name is not
13472 declared, but Library_Dir is.
13474 2011-08-02 Robert Dewar <dewar@adacore.com>
13476 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13477 pragmas (affects aspects [Component_]Default_Value
13478 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13479 component type for the resolution
13481 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13483 * einfo.adb (Base_Type): Tune implementation for speed.
13485 2011-08-02 Robert Dewar <dewar@adacore.com>
13487 * freeze.adb: Minor reformatting.
13489 2011-08-02 Thomas Quinot <quinot@adacore.com>
13491 * scos.ads: Update comments.
13493 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13495 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13496 base type, because the parent may be a subtype of a private type whose
13497 convention is established in a private part.
13499 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13501 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13502 statement in a block when the expansion of the return expression has
13503 created a finalization chain.
13504 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13505 with the parent node.
13506 Add N_Extended_Return_Statement to handle the case where a transient
13507 object declaration appears in the Return_Object_Declarations list of
13508 an extended return statement.
13510 2011-08-02 Matthew Gingell <gingell@adacore.com>
13512 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13513 unused parameter 'name'.
13515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13517 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13518 inherited operation, check whether its alias, which is the source
13519 operastion that it renames, has been marked eliminated.
13521 2011-08-02 Javier Miranda <miranda@adacore.com>
13523 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13524 in-mode parameter whose type is an access type since it can be used to
13525 modify its designated object. Enforce code that handles as safe an
13526 access type that is not access-to-constant but it is the result of a
13527 previous removal of side-effects.
13528 (Remove_Side_Effects): Minor code reorganization of cases which require
13529 no action. Done to incorporate documentation on new cases uncovered
13530 working in this ticket: no action needed if this routine was invoked
13531 too early and the nodes are not yet decorated.
13532 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13533 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13534 were issued with actuals that are implicitly provided by
13537 2011-08-02 Robert Dewar <dewar@adacore.com>
13539 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13541 2011-08-02 Yannick Moy <moy@adacore.com>
13543 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13544 to issue an error in formal mode on attribute not supported in this mode
13545 (Analyze_Attribute): issue errors on standard attributes not supported
13547 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13548 comment, and issue error in formal mode on modulus which is not a power
13550 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13552 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13554 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13555 operator on modular type (except 'not').
13557 2011-08-02 Robert Dewar <dewar@adacore.com>
13559 * gnat_rm.texi: Minor reformatting.
13561 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13563 * s-osinte-linux.ads: Minor comment update and reformatting.
13564 * i-cexten.ads: Make this unit pure, as for its parent.
13565 Will allow its usage in more contexts if needed.
13567 2011-08-02 Robert Dewar <dewar@adacore.com>
13569 * s-utf_32.ads: Minor comment fix.
13571 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13573 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13574 operation of a tagged synchronized type, handle the case where the
13575 controlling argument is overloaded.
13577 2011-08-02 Yannick Moy <moy@adacore.com>
13579 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13580 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13581 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13582 SPARK mode and formal verification mode on processing SPARK restriction
13583 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13584 requiring consistency checking.
13586 2011-08-02 Robert Dewar <dewar@adacore.com>
13588 * sem_res.adb: Minor reformatting.
13590 2011-08-02 Robert Dewar <dewar@adacore.com>
13592 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13593 a-cforse.ads: Remove unneeded with of Ada.Containers
13594 Remove commented out pragma Inline's
13595 Move specifications of new subprograms to the actual specs
13597 2011-08-02 Yannick Moy <moy@adacore.com>
13599 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13600 a-cforse.ads: Update comments.
13602 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13604 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13606 2011-08-02 Robert Dewar <dewar@adacore.com>
13608 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13609 a-cforse.ads, a-cofove.ads: Minor reformatting.
13611 2011-08-02 Claire Dross <dross@adacore.com>
13613 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13614 a-cofove.ads: Add comments.
13616 2011-08-02 Yannick Moy <moy@adacore.com>
13618 * gnat_rm.texi: Document formal containers.
13620 2011-08-02 Emmanuel Briot <briot@adacore.com>
13622 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13623 are empty sections.
13625 2011-08-02 Robert Dewar <dewar@adacore.com>
13627 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13630 2011-08-02 Robert Dewar <dewar@adacore.com>
13632 * aspects.adb: New aspects Default_Value and Default_Component_Value
13633 New format of Aspect_Names table checks for omitted entries
13634 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13635 handling of boolean aspects for derived types.
13636 New aspects Default_Value and Default_Component_Value
13637 New format of Aspect_Names table checks for omitted entries
13638 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13639 (Has_Default_Value): New flag
13640 (Has_Default_Component_Value): New flag
13641 (Has_Default_Value): New flag
13642 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13644 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13645 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13646 Default_Value and Default_Component_Value
13647 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13648 New aspects Default_Value and Default_Component_Value
13649 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13650 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13652 2011-08-02 Vincent Celier <celier@adacore.com>
13654 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13655 inherit library kind.
13657 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13659 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13660 Minor reformatting.
13662 2011-08-02 Robert Dewar <dewar@adacore.com>
13664 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13666 2011-08-02 Yannick Moy <moy@adacore.com>
13668 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13670 2011-08-02 Robert Dewar <dewar@adacore.com>
13672 * impunit.adb: Add comment.
13674 2011-08-02 Yannick Moy <moy@adacore.com>
13676 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13677 qualification of aggregates in formal mode
13678 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13680 (Resolve_Aggregate): complete the test that an aggregate is adequately
13681 qualified in formal mode
13683 2011-08-02 Pascal Obry <obry@adacore.com>
13685 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13686 * mlib-prj.adb: Supress warning when compiling binder generated file.
13687 (Build_Library): Supress all warnings when compiling the binder
13690 2011-08-02 Yannick Moy <moy@adacore.com>
13692 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13694 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13695 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13696 Add with/use clauses to make Check_Formal_Restriction visible
13698 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13700 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13701 in-parameters when type of the generic formal is private in the generic
13702 spec and non-private in the body.
13704 2011-08-02 Claire Dross <dross@adacore.com>
13706 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13707 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13708 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13709 * impunit.adb, Makefile.rtl: Take new files into account.
13711 2011-08-02 Robert Dewar <dewar@adacore.com>
13713 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13714 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13716 2011-08-02 Yannick Moy <moy@adacore.com>
13718 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13720 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13721 matching static array bounds, taking into account the special case of
13723 * sem_ch3.adb: Typo in comment.
13725 2011-08-02 Yannick Moy <moy@adacore.com>
13727 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13728 which issues an error in formal mode if its argument node is originally
13730 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13731 has a discriminant specification so that it does not include the case
13733 (Derived_Type_Declaration): move here the test that a derived type has a
13734 discriminant specification
13735 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13736 first element of a component association before accessing its choices
13737 (presence of component association is not enough)
13738 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13739 declaration is a library item before accessing the next element in a
13740 list, as library items are not member of lists
13741 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13742 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13743 Check_Formal_Restriction whenever possible.
13745 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13747 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13748 reference when needed.
13750 2011-08-02 Bob Duff <duff@adacore.com>
13752 * gnat_ugn.texi: Fix typo.
13754 2011-08-02 Vincent Celier <celier@adacore.com>
13756 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13757 archive file name. Do not use the full path name of archives for Open
13760 2011-08-02 Robert Dewar <dewar@adacore.com>
13762 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13763 Analyze_Aspect_Specifications
13765 (Analyze_Aspect_Specifications): New handling for boolean aspects
13766 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13767 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13768 sequence for Analyze_Aspect_Specifications
13769 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13770 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13772 2011-08-02 Robert Dewar <dewar@adacore.com>
13774 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13775 aspects, since these no longer exist.
13777 2011-08-02 Robert Dewar <dewar@adacore.com>
13779 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13780 semicolon, do not try to see if there are aspects following it.
13781 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13784 2011-08-02 Robert Dewar <dewar@adacore.com>
13786 * sem_ch8.adb, aspects.ads: Minor reformatting.
13788 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13790 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13791 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13793 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13795 2011-08-02 Yannick Moy <moy@adacore.com>
13797 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13798 mode on subprogram declaration outside of package specification, unless
13799 it is followed by a pragma Import
13800 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13801 Access_Type_Declaration): issue error in formal mode on access type
13802 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13804 (Analyze_Object_Declaration): issue error in formal mode on object
13805 declaration which does not respect SPARK restrictions
13806 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13807 declaration which does not respect SPARK restrictions
13808 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13809 error in formal mode on digits or delta constraint
13810 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13811 decimal fixed point type
13812 (Derived_Type_Declaration): issue error in formal mode on derived type
13813 other than type extensions of tagged record types
13814 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13815 with check on access definition
13816 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13817 mode on protected definition.
13818 (Analyze_Task_Definition): issue error in formal mode on task definition
13820 2011-08-02 Robert Dewar <dewar@adacore.com>
13822 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13824 2011-08-02 Javier Miranda <miranda@adacore.com>
13826 * sem_ch6.adb (Can_Override_Operator): New function.
13827 (Verify_Overriding_Indicator): Add missing code to check overriding
13828 indicator in operators. Fixes regression.
13829 (Check_Overriding_Indicator): Minor reformating after replacing the
13830 code that evaluates if the subprogram can override an operator by
13831 invocations to the above new function.
13833 (Write_Field26_Name): Add missing code to ensure that, following
13834 the documentation in einfo.ads, this field is not shown as attribute
13835 "Static_Initialization" on non-dispatching functions.
13837 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13839 * sem_res.adb (Resolve_Call): A call to
13840 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13841 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13842 i.e., when the second parameter is of type Time_Span.
13844 2011-08-02 Vincent Celier <celier@adacore.com>
13846 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13847 with an archive instead of -L<library dir> -l<library name>.
13849 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13851 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13852 mark the base types In_Use in addition to making the operations
13855 2011-08-02 Ed Falis <falis@adacore.com>
13857 * init.c: add and setup __gnat_signal_mask for the exception signals
13858 * s-inmaop-vxworks.adb: new file.
13859 * s-intman-vxworks.adb: remove unnecessary initializations and
13861 * s-intman-vxworks.ads: remove unnecessary variable
13862 * s-taprop-vxworks.adb: simplify signal initialization
13864 2011-08-02 Robert Dewar <dewar@adacore.com>
13866 * sem_ch8.adb: Minor code reorganization, comment updates.
13868 2011-08-02 Robert Dewar <dewar@adacore.com>
13870 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13871 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13873 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13874 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13876 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13878 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13879 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13880 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13881 use_type_clauses, to handle more efficiently use_type and use_all_type
13883 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13884 Ada2012 Use_All_Type clause.
13885 (Use_Class_Wide_Operations): new procedure.
13887 2011-08-02 Robert Dewar <dewar@adacore.com>
13889 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13890 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13891 expression to expression function.
13893 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13895 * sem_ch4.adb: transform simple Ada2012 membership into equality only
13896 if types are compatible.
13898 2011-08-02 Yannick Moy <moy@adacore.com>
13900 * sem_res.adb (Matching_Static_Array_Bounds): new function which
13901 returns True if its argument array types have same dimension and same
13902 static bounds at each index.
13903 (Resolve_Actuals): issue an error in formal mode on actuals passed as
13904 OUT or IN OUT paramaters which are not view conversions in SPARK.
13905 (Resolve_Arithmetic_Op): issue an error in formal mode on
13906 multiplication or division with operands of fixed point types which are
13907 not qualified or explicitly converted.
13908 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13909 Boolean or array type (except String) operands.
13910 (Resolve_Equality_Op): issue an error in formal mode on equality
13911 operators for array types other than String with non-matching static
13913 (Resolve_Logical_Op): issue an error in formal mode on logical operators
13914 for array types with non-matching static bounds. Factorize the code in
13915 Matching_Static_Array_Bounds.
13916 (Resolve_Qualified_Expression): issue an error in formal mode on
13917 qualified expressions for array types with non-matching static bounds.
13918 (Resolve_Type_Conversion): issue an error in formal mode on type
13919 conversion for array types with non-matching static bounds
13921 2011-08-02 Robert Dewar <dewar@adacore.com>
13923 * par-ch10.adb: Minor code reorganization (use Nkind_In).
13925 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13927 * par-ch9.adb: save location of entry for proper error message.
13929 2011-08-02 Javier Miranda <miranda@adacore.com>
13931 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13932 (Use_Full_View) which permits this routine to climb through the
13933 ancestors using the full-view of private parents.
13934 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13935 Use_Full_View to true in calls to Is_Ancestor.
13936 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13937 true in call to Is_Ancestor.
13938 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13939 Use_Full_View to true in call to Is_Ancestor.
13940 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13941 call to Is_Ancestor.
13942 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13943 Use_Full_View to true in calls to Is_Ancestor.
13944 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13945 Make_Select_Specific_Data_Table, Register_Primitive,
13946 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13947 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13948 to true in call to Is_Ancestor.
13949 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13950 Use_Full_View to true in calls to Is_Ancestor.
13952 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13953 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13955 2011-08-02 Robert Dewar <dewar@adacore.com>
13957 * gnat_rm.texi: Minor reformatting.
13958 * sem_prag.adb: Minor reformatting.
13960 2011-08-02 Tristan Gingold <gingold@adacore.com>
13962 * vms_data.ads: Add VMS qualifier for -gnateP.
13964 2011-08-02 Robert Dewar <dewar@adacore.com>
13966 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13967 * par-ch7.adb (P_Package): Proper placement of aspects for package
13968 decl/instantiation.
13969 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13970 (End_Statements): Add Is_Sloc parameterr
13971 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13972 (Check_End): Ad Is_Sloc parameter
13973 (End_Statements): Add Is_Sloc parameterr
13975 2011-08-02 Vincent Celier <celier@adacore.com>
13977 * ug_words: Add VMS qualifier equivalent to -gnateP:
13978 /SYMBOL_PREPROCESSING.
13980 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13982 * gnat-style.texi: For hexadecimal numeric literals the typical
13983 grouping of digits is 4 to represent 2 bytes.
13984 A procedure spec which is split into several lines is indented two
13987 2011-08-02 Yannick Moy <moy@adacore.com>
13989 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13990 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13991 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13993 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13994 choice in array aggregate
13995 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13997 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13998 positional and named aggregate for record, or others in record
13999 aggregate, or multiple choice in record aggregate
14000 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14001 array operands to logical operations AND, OR and XOR do not have the
14002 same static lower and higher bounds
14003 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14005 2011-08-01 Robert Dewar <dewar@adacore.com>
14007 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14008 Replaces Last_Source_Node_In_Sequence.
14009 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14010 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14011 parens and blank in string (this was inconsistently implemented).
14013 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14014 blank in string (this was inconsistently implemented).
14016 (Set_Global_Switches): Set formal mode switches appropriately
14017 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14019 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14020 call Set_Error_Msg_Lang to set "spark" as language name.
14021 * par.adb: Remove unnecessary call to set formal language for errout
14022 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14023 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14025 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14026 calls to it, moved after resolution so that types are known
14027 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14028 result of concatenation is not of type String
14029 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14030 concatenation is not properly restricted
14031 * gnat_rm.texi: Add doc on pragma Spark_95.
14032 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14033 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14034 * gcc-interface/Make-lang.in: Update dependencies.
14036 2011-08-01 Javier Miranda <miranda@adacore.com>
14038 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14039 condition that detects if the overridden operation must replace an
14042 2011-08-01 Javier Miranda <miranda@adacore.com>
14044 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14045 code declarations inserted by Insert_Actions in each alternative of the
14046 N_Case_Expression node.
14048 2011-08-01 Robert Dewar <dewar@adacore.com>
14050 * sem_ch6.adb: Minor code reorganization.
14051 * sem_util.adb: Minor reformatting.
14053 2011-08-01 Pascal Obry <obry@adacore.com>
14055 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14056 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14058 2011-08-01 Yannick Moy <moy@adacore.com>
14060 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14061 literal or operator symbol which is prefixed
14062 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14063 mode on access attributes.
14064 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14065 that concatenation operands are properly restricted in formal mode
14066 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14067 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14068 result of the concatenation has a type different from String.
14069 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14070 Analyze_Quantified_Expression, Analyze_Slice,
14071 Analyze_Null): issue an error in formal mode on unsupported constructs
14073 (Analyze_Block_Statement): only issue error on source block statement
14074 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14075 function which returns the last node in a list of nodes for which
14076 Comes_From_Source returns True, if any
14077 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14078 Last_Source_Node_In_Sequence
14079 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14080 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14081 mode on unsupported constructs
14082 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14083 rest of the actions may be needed later on since the error is marked as
14085 * sinfo.ads: Typos in comments.
14087 2011-08-01 Pascal Obry <obry@adacore.com>
14089 * projects.texi: Minor editing.
14091 2011-08-01 Yannick Moy <moy@adacore.com>
14093 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14094 insertion character ~~
14095 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14096 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14097 with insertion character ~~
14098 (Set_Msg_Text): treat insertion character ~~
14099 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14100 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14101 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14102 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14103 errors related to the formal language restriction not serious
14104 (insertion character |).
14105 * par.adb (Par): set formal language for error messages if needed
14106 * sem_ch6.adb (Check_Missing_Return): take into account possible
14107 generated statements at the end of the function
14108 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14109 enumeration value to define a new pragma SPARK_95
14110 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14111 SPARK_Version): new type and variables to store the SPARK version
14113 (SPARK_Mode): return True when SPARK_Version is set
14114 * par-prag.adb: Correct indentation
14115 (Prag): take Pragma_SPARK_95 into account
14116 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14119 2011-08-01 Robert Dewar <dewar@adacore.com>
14121 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14122 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14123 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14125 2011-08-01 Pascal Obry <obry@adacore.com>
14127 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14128 Target_Name to Get_Path call.
14129 (Parse_Single_Project): Likewise.
14130 (Post_Parse_Context_Clause): Likewise.
14131 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14132 Call Initialise_Project_Path with the proper Target_Name.
14133 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14135 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14136 with the proper Target_Name.
14137 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14138 Part.Parse routine.
14139 (Parse_Project_And_Apply_Config): Likewise.
14140 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14141 This is fine as this part of the code is supporting only native
14143 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14144 is fine as this part of the code is supporting only native compilation.
14146 2011-08-01 Yannick Moy <moy@adacore.com>
14148 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14149 of homonym, unless the homonym is one of the cases allowed in SPARK
14150 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14151 package declaration occurring after a body.
14153 2011-08-01 Robert Dewar <dewar@adacore.com>
14155 * checks.adb, exp_ch4.adb: Minor reformatting.
14157 2011-08-01 Javier Miranda <miranda@adacore.com>
14159 * einfo.ads (Access_Disp_Table): Fix documentation.
14160 (Dispatch_Table_Wrappers): Fix documentation.
14162 2011-08-01 Pascal Obry <obry@adacore.com>
14164 * prj-env.adb, prj-env.ads: Minor reformatting.
14166 2011-08-01 Yannick Moy <moy@adacore.com>
14168 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14169 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14170 procedures out of these packages.
14171 * errout.ads, errout.adb
14172 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14173 procedures in of this package
14174 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14175 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14176 on misplaced later vs initial declarations, like in Ada 83
14177 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14178 formal mode on attribute of private type whose full type declaration
14180 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14181 package declaration inside a package specification
14182 (Analyze_Full_Type_Declaration): issue error in formal mode on
14183 controlled type or discriminant type
14184 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14185 user-defined operator means that it should come from the source
14186 (New_Overloaded_Entity): issue error in formal mode on overloaded
14188 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14190 2011-08-01 Thomas Quinot <quinot@adacore.com>
14192 * atree.adb: Minor reformatting.
14193 * checks.adb: Minor reformatting.
14195 2011-08-01 Vincent Celier <celier@adacore.com>
14197 * s-parame-vms-ia64.ads: Fix typo in comment
14199 * s-parame-vms-restrict.ads: Removed, unused.
14201 2011-08-01 Javier Miranda <miranda@adacore.com>
14204 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14206 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14207 * sem_ch3.ads, sem_ch3.adb
14208 (Is_Constant_Bound): New extended version of the subprogram that was
14209 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14210 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14211 * sem_aux.ads (Constant_Value): Fix typo in comment.
14212 * checks.adb (Generate_Index_Checks): New implementation which, for
14213 array objects with constant bounds, generates the runtime check
14214 referencing the bounds of the array type. For other cases this routine
14215 provides its previous behavior obtaining such values from the array
14217 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14219 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14220 we cannot have semantic interpretations of the new node.
14222 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14224 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14227 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14229 * sem_ch8.adb: Minor code editing.
14230 * s-vxwext.adb: Remove trailing space.
14231 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14232 consistency with other files.
14234 2011-08-01 Thomas Quinot <quinot@adacore.com>
14236 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14238 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14240 * par-ch10.adb: reject parameterized expressions as compilation unit.
14241 * sem_ch4.adb: handle properly conditional expression with overloaded
14242 then_clause and no else_clause.
14244 2011-08-01 Tristan Gingold <gingold@adacore.com>
14246 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14247 like done by System.Aux_DEC.
14248 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14250 2011-08-01 Yannick Moy <moy@adacore.com>
14252 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14253 missing label at end of declaration (subprogram or package)
14254 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14255 of positional and named parameter association
14256 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14257 Error_Msg_SP which adds a prefix to the error message giving the name
14258 of the formal language analyzed
14259 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14260 access result type in subprogram, unconstrained array as result type,.
14261 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14263 * sem_ch8.adb: Code clean up.
14265 2011-08-01 Javier Miranda <miranda@adacore.com>
14267 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14268 * einfo.ads (Access_Disp_Table): Fix documentation.
14269 (Dispatch_Table_Wrappers): Fix documentation.
14270 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14271 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14272 to enforce the documentation of this attribute.
14273 (Set_Is_Interface): Cleanup the assertion.
14274 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14275 the Underlying_Type entity before reading attribute Access_Disp_Table.
14276 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14277 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14278 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14279 the Underlying_Type entity before reading attribute Access_Disp_Table.
14280 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14281 Locate the Underlying_Type entity before reading attribute
14284 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14286 * s-poosiz.ads: Additional overriding indicators.
14288 2011-08-01 Yannick Moy <moy@adacore.com>
14290 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14292 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14293 parameter specification does not include a subtype mark.
14294 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14295 formal mode on abstract subprogram.
14296 (Analyze_Subprogram_Specification): issue error in formal mode on
14297 user-defined operator.
14298 (Process_Formals): issue error in formal mode on access parameter and
14299 default expression.
14300 * sem_ch9.adb (Analyze_Abort_Statement,
14301 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14302 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14303 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14304 Analyze_Requeue, Analyze_Selective_Accept,
14305 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14306 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14307 issue error in formal mode on user-defined raise statement.
14309 2011-08-01 Thomas Quinot <quinot@adacore.com>
14311 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14312 declaration being hidden when overriding an implicit inherited
14314 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14315 (-gnats), do not complain about a source file that contains only a
14318 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14320 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14321 variable if already set.
14323 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14325 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14326 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14327 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14328 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14329 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14330 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14331 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14332 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14333 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14334 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14335 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14336 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14337 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14338 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14339 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14340 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14341 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14342 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14343 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14344 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14345 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14346 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14347 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14348 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14349 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14350 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14351 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14352 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14353 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14354 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14355 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14356 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14357 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14358 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14359 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14360 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14361 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14362 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14363 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14364 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14365 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14366 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14367 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14368 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14369 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14370 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14371 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14372 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14373 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14374 Use GNAT instead of GNARL.
14376 2011-08-01 Bob Duff <duff@adacore.com>
14378 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14379 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14380 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14383 2011-08-01 Yannick Moy <moy@adacore.com>
14385 * debug.adb (d.D) reverve flag for the SPARK mode
14386 (d.E) reverve flag for SPARK generation mode
14387 (d.F) reverve flag for Why generation mode
14388 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14389 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14390 functions which return True when the corresponding modes are set
14391 (Formal_Language): return "spark" or "alfa" when in formal verification
14393 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14394 Error_Msg to prefix the error message with a tag giving the formal
14396 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14397 message with a tag giving the formal language
14398 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14400 (Analyze_Case_Statement): issue error in formal mode on case statement
14401 with a single "others" case alternative
14402 (Analyze_Exit_Statement): issue errors in formal mode on exit
14403 statements which do not respect SPARK restrictions
14404 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14405 (Check_Unreachable_Code): always issue an error (not a warning) in
14406 formal mode on unreachable code (concerns both code after an infinite
14407 loop and after an unconditional jump, both not allowed in SPARK)
14408 * sem_ch6.adb (Analyze_Return_Statement): add call to
14409 Set_Return_Present for a procedure containing a return statement
14410 (already done for functions in Analyze_Function_Return)
14411 (Analyze_Function_Return): issue error in formal mode on extended
14412 return or if return is not last statement in function
14413 (Check_Missing_Return): issue error in formal mode if function does
14414 not end with return or if procedure contains a return
14415 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14416 function to detect if there is an inner scope of its parameter S which
14419 2011-08-01 Thomas Quinot <quinot@adacore.com>
14421 * sem_ch6.ads: Minor reformatting.
14423 2011-08-01 Javier Miranda <miranda@adacore.com>
14425 * sem_util.adb (Abstract_Interface_List): Complete condition when
14426 processing private type declarations to avoid reading unavailable
14428 (Is_Synchronized_Tagged_Type): Complete condition when processing
14429 private extension declaration nodes to avoid reading unavailable
14432 2011-08-01 Thomas Quinot <quinot@adacore.com>
14434 * sem_ch3.adb: Minor reformatting.
14436 2011-08-01 Thomas Quinot <quinot@adacore.com>
14438 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14439 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14440 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14441 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14442 for VMS, instead parametrize the common implementation with
14443 System.Parameters declarations.
14445 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14447 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14449 2011-08-01 Tristan Gingold <gingold@adacore.com>
14451 * seh_init.c: Fix SEH handler installation on win64.
14453 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14455 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14456 double analysis of an anonymous access to subprogram, because it can
14457 lead to improper sharing of profiles and a back-end crash.
14459 2011-08-01 Robert Dewar <dewar@adacore.com>
14461 * make.adb, sem_ch4.adb: Minor reformatting.
14462 * gcc-interface/Make-lang.in: Update dependencies.
14463 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14465 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14467 * gnat_rm.texi: Fix definition of Long_Integer.
14469 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14471 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14472 to prevent storage exhaustion.
14473 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14474 finalized is a function body, insert the cleanup code before the final
14475 return statement, to prevent spurious warnings.
14476 * s-pooglo.ads: add overriding indicator.
14478 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14480 * sem_ch4.adb (Operator_Check): improve error message when both a
14481 with_clause and a use_clause are needed to make operator usage legal.
14482 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14483 determine whether a compilation unit is visible within an other,
14484 either through a with_clause in the current unit, or a with_clause in
14485 its library unit or one one of its parents.
14487 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14489 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14490 over an arbitrary expression of an array or container type.
14491 * lib-xref.adb: clarify comment.
14493 2011-08-01 Bob Duff <duff@adacore.com>
14495 * einfo.ads: Minor reformatting.
14496 * debug.adb: Minor comment improvement.
14498 2011-08-01 Javier Miranda <miranda@adacore.com>
14500 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14501 consider hidden subprograms as valid candidates.
14503 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14505 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14507 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14509 * gnat_ugn.texi: Fix typo.
14511 2011-08-01 Robert Dewar <dewar@adacore.com>
14513 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14514 lib-xref.adb: Minor reformatting
14516 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14518 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14519 when to generate a call to Move_Final_List.
14520 (Has_Controlled_Parts): Remove this function.
14522 2011-08-01 Geert Bosch <bosch@adacore.com>
14524 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14525 "," in choice list.
14527 2011-08-01 Thomas Quinot <quinot@adacore.com>
14529 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14530 explicit raise of a predefined exception as Comes_From_Source if the
14531 original N_Raise_Statement comes from source.
14533 2011-08-01 Robert Dewar <dewar@adacore.com>
14535 * sinfo.ads: Add comment.
14536 * sem_ch6.adb: Minor reformatting.
14538 2011-08-01 Robert Dewar <dewar@adacore.com>
14540 * freeze.adb (Freeze_Entity): Refine check for bad component size
14541 clause to avoid rejecting confirming clause when atomic/aliased present.
14543 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14545 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14546 better determine whether an entity reference is a write.
14547 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14549 * lib-xref.adb (Output_References): Do no suppress a read reference at
14550 the same location as an immediately preceeding modify-reference, to
14551 handle properly in-out actuals.
14553 2011-08-01 Tristan Gingold <gingold@adacore.com>
14555 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14557 2011-08-01 Quentin Ochem <ochem@adacore.com>
14559 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14560 heap to compute the result.
14562 2011-08-01 Robert Dewar <dewar@adacore.com>
14564 * atree.ads: Minor reformatting.
14566 2011-08-01 Emmanuel Briot <briot@adacore.com>
14568 * g-expect.adb (Get_Command_Output): Fix memory leak.
14570 2011-08-01 Geert Bosch <bosch@adacore.com>
14572 * cstand.adb (P_Float_Type): New procedure to print the definition of
14573 predefined fpt types.
14574 (P_Mixed_Name): New procedure to print a name using mixed case
14575 (Print_Standard): Use P_Float_Type for printing floating point types
14576 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14577 precision IEEE float.
14579 2011-08-01 Thomas Quinot <quinot@adacore.com>
14581 * sem_ch3.adb: Minor reformatting.
14583 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14585 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14586 the completion of a generic function, insert the new body rather than
14587 rewriting the original.
14589 2011-08-01 Yannick Moy <moy@adacore.com>
14591 * sinfo.ads, errout.ads: Typos in comments.
14593 2011-08-01 Robert Dewar <dewar@adacore.com>
14595 * par-endh.adb: Minor reformatting.
14597 2011-08-01 Robert Dewar <dewar@adacore.com>
14599 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14600 (Pre_Post_Aspects): New subtype.
14601 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14602 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14603 * par-ch7.adb (P_Package): Remove Decl parameter
14604 (P_Package): Handle new syntax for aspects (before IS)
14605 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14607 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14608 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14609 (P_Package): Remove Decl parameter
14610 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14612 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14614 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14615 * sinfo.ads: Document new syntax for aspects in packages etc.
14616 * sprint.adb: Handle new syntax of aspects before IS in package
14618 2011-08-01 Thomas Quinot <quinot@adacore.com>
14620 * atree.ads: Minor reformatting.
14621 * sem_prag.adb: Minor reformatting.
14623 2011-08-01 Robert Dewar <dewar@adacore.com>
14625 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14626 case expr alternative.
14628 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14630 * sem_ch12.adb: Fix typo.
14632 2011-08-01 Geert Bosch <bosch@adacore.com>
14634 * sem_prag.adb (Check_No_Link_Name): New procedure.
14635 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14636 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14637 instead of Standard_Long_Long_Float_Size global. Preparation for
14638 eventual removal of per type constants.
14639 * exp_util.ads (Get_Stream_Size): New function returning the stream
14640 size value of subtype E.
14641 * exp_util.adb (Get_Stream_Size): Implement new function.
14642 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14644 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14646 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14648 2011-08-01 Geert Bosch <bosch@adacore.com>
14650 * cstand.adb: Fix comments.
14651 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14652 count of arguments.
14654 2011-08-01 Robert Dewar <dewar@adacore.com>
14656 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14658 2011-08-01 Geert Bosch <bosch@adacore.com>
14660 * atree.ads: Fix comment.
14662 2011-08-01 Robert Dewar <dewar@adacore.com>
14664 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14665 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14666 * par.adb: Add with for Namet.Sp.
14667 * par-tchk.adb: Minor reformatting.
14669 2011-08-01 Vincent Celier <celier@adacore.com>
14671 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14672 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14673 of the init procedure of a SAL.
14674 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14677 2011-08-01 Thomas Quinot <quinot@adacore.com>
14679 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14682 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14684 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14686 2011-08-01 Thomas Quinot <quinot@adacore.com>
14688 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14689 conformant with its spec (return True only for types that have
14690 an overriding Initialize primitive operation that prevents them from
14691 having preelaborable initialization).
14692 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14693 initialization for controlled types in Ada 2005 or later mode.
14695 2011-08-01 Robert Dewar <dewar@adacore.com>
14697 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14699 (Same_Aspect): New function.
14700 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14701 Type_Invariant, Precondition, Postcondition.
14702 * snames.ads-tmpl: Add Name_Type_Invariant.
14704 2011-08-01 Robert Dewar <dewar@adacore.com>
14706 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14708 (Freeze_All_Ent): Fix error in handling inherited aspects.
14709 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14710 already analyzed, but don't skip entire processing of a declaration,
14711 that's wrong in some cases of declarations being rewritten.
14712 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14713 Don't delay for integer, string literals
14714 Treat predicates in usual manner for delay, remove special case code,
14716 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14717 (Build_Predicate_Function): Update saved expression in aspect
14718 (Build_Invariant_Procedure): Update saved expression in aspect
14719 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14720 of replacement of discriminant references if the reference is simple.
14722 2011-08-01 Robert Dewar <dewar@adacore.com>
14724 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14725 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14726 Static_Predicate and Dynamic_Predicate.
14727 (Build_Predicate_Function): Add processing for Static_Predicate
14728 and Dynamic_Predicate.
14729 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14730 (From_Static_Predicate): New flag
14731 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14733 2011-08-01 Robert Dewar <dewar@adacore.com>
14735 * usage.adb: Documentation cleanup for Ada version modes in usage.
14736 * expander.adb: Minor reformatting.
14738 2011-08-01 Robert Dewar <dewar@adacore.com>
14740 * atree.ads: Minor comment fix.
14741 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14742 a-witeio.ads, sem_prag.adb: Minor reformatting.
14744 2011-08-01 Doug Rupp <rupp@adacore.com>
14746 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14747 pointers. Use descrip.h header file for convenience. Add some
14750 2011-08-01 Robert Dewar <dewar@adacore.com>
14752 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14753 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14754 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14756 (Check_Aspect_At_End_Of_Declarations): New procedure
14757 (Analye_Aspect_Specification): Minor changes for above procedures
14758 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14759 specification node as well.
14761 2011-08-01 Pascal Obry <obry@adacore.com>
14763 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14764 Windows files. Use GetFilesAttributes() in this case to check for file
14765 existence instead of returning with an error code.
14767 2011-08-01 Vincent Celier <celier@adacore.com>
14769 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14770 High is above Source length.
14772 2011-08-01 Robert Dewar <dewar@adacore.com>
14774 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14776 2011-08-01 Robert Dewar <dewar@adacore.com>
14778 * aspects.ads (Boolean_Aspects): New subtype.
14779 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14780 for derived types in cases where the parent type and derived type have
14782 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14783 with aspects when parent type also has aspects.
14784 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14785 boolean expression at this point).
14786 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14787 accordance with final decision on the Ada 2012 feature.
14788 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14790 2011-08-01 Matthew Heaney <heaney@adacore.com>
14792 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14794 2011-08-01 Pascal Obry <obry@adacore.com>
14796 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14797 Fix Replace_Slice when High is above current string size.
14798 (Replace_Slice): Fix DL computation when High is above current
14801 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14803 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14805 2011-08-01 Matthew Heaney <heaney@adacore.com>
14807 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14810 2011-08-01 Pascal Obry <obry@adacore.com>
14812 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14815 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14817 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14818 access to protected subprograms in generic bodies.
14819 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14820 protected type, indicate that the convention of the subprogram is
14821 Convention_Protected, because it may be used in subsequent declarations
14822 within the protected declaration.
14824 2011-08-01 Vincent Celier <celier@adacore.com>
14826 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14827 and "final" procedures when the name of the library is "ada", to avoid
14828 duplicate symbols "adainit" and "adafinal" in executables.
14830 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14832 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14833 quantified expression that appears within a postcondition and uses the
14834 Ada2012 'Result attribute.
14836 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14838 * init.c (__gnat_error_handler): Cast reason to int.
14839 (__gnat_install_handler): Explain sa_sigaction use.
14841 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14843 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14844 subprogram has copy-in copy-out parameters, try to promote the mode of
14845 the return type if it is passed in registers.
14847 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14849 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14850 left operand as addressable.
14852 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14854 * gcc-interface/gigi.h (build_function_stub): Remove.
14855 (build_return_expr): Likewise.
14856 (convert_vms_descriptor): Declare.
14857 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14858 (build_function_stub): Move to...
14859 * gcc-interface/utils2.c (build_return_expr): Move to...
14860 * gcc-interface/trans.c (build_function_stub): ...here.
14861 (build_return_expr): ...here.
14862 (Subprogram_Body_to_gnu): Add local variable for language_function.
14863 Disconnect the parameter attributes cache, if any, once done with it.
14864 Call end_subprog_body only after setting the end_locus.
14865 Build the stub associated with the function, if any, at the very end.
14866 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14867 variables and streamline control flow.
14869 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14872 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14873 g-trasym-dwarf.adb.
14875 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14878 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14879 Assign to act.sa_sigaction.
14880 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14881 current->return_address to char * before arithmetic.
14883 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14885 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14886 Correct argument types.
14887 Extract code from reason.
14888 (__gnat_install_handler): Assign to act.sa_sigaction.
14890 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14892 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14893 (GNAT1_OBJS): ...here.
14895 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
14898 * g-socthi-mingw.adb (Fill): Fix formatting.
14900 * gcc-interface/gigi.h: Move around comment.
14902 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
14905 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14907 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
14910 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14912 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
14914 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14915 range comparison if Pmode is SImode.
14917 2011-07-12 Laurent GUERBY <laurent@guerby.net>
14918 Eric Botcazou <ebotcazou@adacore.com>
14920 * adadecode.c: Wrap up in extern "C" block.
14921 * adadecode.h: Likewise.
14922 * adaint.c: Likewise. Remove 'const' keyword.
14923 * adaint.h: Likewise.
14924 * argv.c: Likewise.
14925 * atree.h: Likewise.
14927 * cstreams.c: Likewise.
14929 * exit.c: Likewise.
14931 * final.c: Likewise.
14932 * init.c: Likewise.
14933 * initialize.c: Likewise.
14934 * link.c: Likewise.
14935 * namet.h: Likewise.
14936 * nlists.h: Likewise.
14937 * raise.c: Likewise.
14938 * raise.h: Likewise.
14939 * repinfo.h: Likewise.
14940 * seh_init.c: Likewise.
14941 * targext.c: Likewise.
14942 * tracebak.c: Likewise.
14943 * uintp.h: Likewise.
14944 * urealp.h: Likewise.
14945 * xeinfo.adb: Wrap up generated C code in extern "C" block.
14946 * xsinfo.adb: Likewise.
14947 * xsnamest.adb: Likewise.
14948 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14949 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14950 * gcc-interface/misc.c: Likewise.
14951 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14952 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
14953 ada/targext.o here...
14954 (GNAT_ADA_OBJS): ...and not here.
14955 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14956 (GNATBIND_OBJS): Reorder.
14958 2011-07-07 Richard Henderson <rth@redhat.com>
14960 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14961 dwarf2out_frame_init.
14963 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
14965 * gcc-interface/misc.c (gnat_init): Tweak previous change.
14967 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14970 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14972 2011-07-06 Richard Guenther <rguenther@suse.de>
14974 * gcc-interface/misc.c (gnat_init): Merge calls to
14975 build_common_tree_nodes and build_common_tree_nodes_2.
14976 Re-initialize boolean_false_node.
14978 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14979 Olivier Hainque <hainque@adacore.com>
14980 Nicolas Setton <setton@adacore.com>
14982 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14983 the type according to the ARTIFICIAL_P parameter.
14984 (create_type_decl): Likewise.
14985 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14987 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14989 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14990 (gnatbind): Likewise.
14992 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14994 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14996 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14998 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14999 local variable throughout. Remove useless call to Base_Type.
15000 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15001 Take it also into account for the volatileness of the field. Set the
15002 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15004 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15006 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15007 on a dereference built for a by-ref object if it has an address clause.
15009 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15011 * einfo.ads (Address_Taken): Document use for the second argument of
15012 Asm_Input and Asm_Output attributes.
15013 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15014 argument is an entity name, then set Address_Taken on it.
15015 <Attribute_Asm_Output>: Likewise.
15016 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15017 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15018 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15019 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15021 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15023 PR middle-end/46500
15024 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15026 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15028 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15029 (ada/utils.o): Update dependencies.
15030 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15031 ../../../libcpp/libcpp.a.
15032 * gcc-interface/utils.c: Include common/common-target.h.
15033 (process_attributes): Use targetm_common.have_named_sections.
15035 2011-06-07 Richard Guenther <rguenther@suse.de>
15037 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15040 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15042 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15043 TREE_THIS_NOTRAP flag.
15045 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15047 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15050 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15052 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15053 constants whose full view has discriminants specially.
15055 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15057 * gcc-interface/utils.c: Include diagnostic.h.
15058 (gnat_write_global_declarations): Output debug information for all
15059 global type declarations before finalizing the compilation unit.
15060 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15062 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15064 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15066 2011-05-25 Kai Tietz <ktietz@redhat.com>
15068 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15069 initialization instead of const/none-const pointer assignment.
15071 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15073 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15074 $(EXTRA_GNAT1_OBJS).
15075 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15076 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15077 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15078 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15079 libcommon-target.a instead of prefix.o.
15081 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15084 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15086 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15088 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15089 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15090 instead of version.o.
15092 2011-05-18 Kai Tietz <ktietz@redhat.com>
15094 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15095 boolean_false_node instead of integer_zero_node.
15096 (convert_with_check): Likewise.
15097 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15099 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15101 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15102 type of the parameter is an unconstrained array, convert the actual to
15103 the type of the formal in the In Out and Out cases as well.
15105 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15107 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15108 call build_function_type_array or build_varargs_function_type_array
15110 (create_subprog_type): Don't call build_function_type; call
15111 build_function_type_vec instead.
15113 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15115 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15116 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15117 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15119 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15121 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15123 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15124 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15126 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15128 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15130 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15132 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15133 instead of accessing TYPE_ARG_TYPES directly.
15134 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15136 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15139 * gcc-interface/gigi.h (get_variant_part): Declare.
15140 * gcc-interface/decl.c (get_variant_part): Make global.
15141 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15142 types have the same constant size, are record types and T1 has a
15143 variant part while T2 doesn't.
15145 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15147 * gcc-interface/utils.c (begin_subprog_body): Do not call
15149 (end_subprog_body): Likewise.
15151 2011-05-04 Richard Guenther <rguenther@suse.de>
15153 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15155 (pos_to_constructor): Likewise.
15157 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15158 Eric Botcazou <ebotcazou@adacore.com>
15160 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15161 of build_function_type. Adjust calls to...
15162 (build_raise_check): ...this. Do not take a void_tree parameter.
15163 Call build_function_type_list instead of build_function_type.
15164 Fix head comment and swap couple of conditional blocks.
15166 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15168 * gnatvsn.ads (Library_Version): Bump to 4.7.
15169 (Current_Year): Bump to 2011.
15171 2011-04-29 Michael Matz <matz@suse.de>
15173 * gcc-interface/misc.c (gnat_handle_option): Set
15174 warn_maybe_uninitialized.
15176 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15178 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15179 the Watson/McCabe paper.
15181 2011-04-23 Jim Meyering <meyering@redhat.com>
15183 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15185 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15187 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15190 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15192 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15194 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15195 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15196 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15197 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15198 <all>: Do not set flags on the reused DECL node coming from an alias.
15199 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15200 don't need debug info here...
15201 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15202 (gigi): Adjust calls to create_subprog_decl.
15203 (build_raise_check): Likewise.
15204 (establish_gnat_vms_condition_handler): Likewise.
15205 (Compilation_Unit_to_gnu): Likewise.
15206 (gnat_to_gnu): Likewise.
15208 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15210 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15211 (NO_REORDER_ADAFLAGS): New variable.
15212 (EXTRA_GNATTOOLS): Always define.
15213 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15214 Clean up and adjust list of files compiled with special options.
15215 * gcc-interface/Make-lang.in: Likewise.
15216 (ada/decl.o): Cosmetical change.
15217 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15219 2011-04-20 Jim Meyering <meyering@redhat.com>
15221 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15223 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15225 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15226 $(CFLAGS) on the link line.
15228 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15230 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15231 padded type built for the return type if it is unconstrained.
15233 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15235 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15237 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15239 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15240 before calling TREE_CHAIN.
15241 * gcc-interface/misc.c (gnat_init_ts): New function.
15242 (LANG_HOOKS_INIT_TS): Define.
15244 2011-04-12 Martin Jambor <mjambor@suse.cz>
15246 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15247 instead of cgraph_node.
15249 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15251 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15252 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15255 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15257 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15258 of aggregate types that contain a placeholder.
15260 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15262 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15264 (handle_type_generic_attribute): Likewise.
15266 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15269 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15271 2011-04-04 Kai Tietz <ktietz@redhat.com>
15274 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15277 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15279 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15280 type case, do not strip a padding type around the array type.
15282 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15284 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15287 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15289 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15290 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15291 code for -feliminate-unused-debug-types.
15292 (gnat_post_options): Likewise.
15294 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15296 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15297 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15300 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15302 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15303 DECL_ARTIFICIAL flag on enumeration types.
15305 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15307 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15308 fat pointer types artificial unconditionally.
15309 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15312 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15314 * gcc-interface/gigi.h (get_dummy_type): Declare.
15315 (build_dummy_unc_pointer_types): Likewise.
15316 (finish_fat_pointer_type): Likewise.
15317 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15318 fat pointer type has been built, complete it in place.
15319 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15320 and thin pointers. Remove useless variable.
15321 (finish_fat_pointer_type): Make global and move to...
15322 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15323 (get_dummy_type): New function.
15324 (build_dummy_unc_pointer_types): Likewise.
15325 (gnat_pushdecl): Propage the name to the anonymous variants only.
15326 (update_pointer_to): Only adjust the pointer types in the unconstrained
15329 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15331 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15332 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15333 if this is a Taft amendment type and the full declaration is available.
15334 * gcc-interface/trans.c (process_type): Likewise.
15335 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15336 (process_freeze_entity): Likewise.
15337 * gcc-interface/utils.c (dummy_global): New static variable.
15338 (gnat_write_global_declarations): If there are types declared as used
15339 at the global level, insert them in the global hash table.
15341 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15343 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15344 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15345 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15347 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15348 flag of the type accordingly.
15349 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15351 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15353 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15354 finalizing types when updating the pointers to the designated type.
15355 <all>: Finalize the deferred types even if we didn't defer processing
15356 of incomplete types in this invocation.
15358 2011-04-01 Olivier Hainque <hainque@adacore.com>
15359 Nicolas Setton <setton@adacore.com>
15360 Eric Botcazou <ebotcazou@adacore.com>
15362 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15363 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15365 2011-03-28 Kai Tietz <ktietz@redhat.com>
15367 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15369 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15370 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15372 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15374 2011-03-28 Tristan Gingold <gingold@adacore.com>
15377 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15378 Use ada output of gnatbind.
15379 (ada/b_gnatb.adb): Ditto.
15380 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15381 (ada.mostlyclean, ada.stage1)
15382 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15383 (ada.stagefeedback): Adjust.
15384 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15385 Use ada output of gnatbind.
15386 (b_gnatm.adb): Ditto.
15387 (b_gnatl.o, b_gnatm.o): New rules.
15389 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15391 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15392 for the padded type built to support a specified size or alignment.
15394 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15396 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15397 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15398 unconditionally to the end of the unit when the designated type is
15400 <all>: Rename local variable. Attempt to un-defer types only and do it
15401 for limited_with'ed types as well.
15402 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15403 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15404 consistently and remove redundant call to finalize_from_with_types.
15406 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15408 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15409 subprograms without a previous spec declared in the same unit.
15410 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15411 subprograms at the end of the unit instead of at the beginning.
15412 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15413 isn't public for the special handling of non-inline functions nested
15414 inside inline external functions.
15416 2011-03-25 Jeff Law <law@redhat.com>
15418 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15420 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15422 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15423 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15424 to compute Set_Size_Depends_On_Discriminant.
15425 (Layout_Type): Call it on array types in back-end layout mode.
15426 * sem_util.adb (Requires_Transient_Scope): Return true for array
15427 types only if the size depends on the value of discriminants.
15428 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15429 type if the RHS is a call to a function that returns an unconstrained
15430 type with default discriminant.
15432 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15434 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15435 non-conversion to the nominal result type at the end.
15437 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15439 * gcc-interface/trans.c (create_temporary): New function taken from...
15440 (create_init_temporary): ...here. Call it.
15441 (call_to_gnu): Create the temporary for the return value early, if any.
15442 Create it for a function with copy-in/copy-out parameters if there is
15443 no target; in other cases of copy-in/copy-out, use another temporary.
15444 Push the new binding level lazily. Add and rename local variables.
15446 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15448 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15450 (set_rm_size): Likewise.
15452 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15454 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15455 for the padded type built in order to support a specified alignment.
15456 Fix incorrect formatting.
15458 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15461 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15463 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15465 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15466 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15467 to the end of the list. Adjust recursive call. Rename local variable.
15468 If REORDER is true, reorder components of the record type.
15469 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15470 components_to_record and adjust the parameter list.
15472 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15474 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15475 disabled, use the variable for bounds of loop iteration scheme.
15477 2011-03-21 Kai Tietz <ktietz@redhat.com>
15480 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15482 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15484 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15485 out whether the expression is read-only. Short-circuit placeholder
15486 case and rename a couple of local variables.
15488 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15490 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15491 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15492 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15493 (convert): Deal with conversions from a smaller form type specially.
15495 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15497 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15498 its argument, except for the special -I- switch.
15500 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15502 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15505 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15507 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15509 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15511 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15513 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15514 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15515 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15516 Do not generate the check directly, instead instantiate the template
15517 check present in the descriptor.
15518 (make_descriptor_field): Move around.
15519 (build_vms_descriptor32): Build a template check in the POINTER field.
15520 (build_vms_descriptor): Remove useless suffixes.
15521 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15523 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15526 * targext.c: Include target files if IN_RTS is defined.
15528 2011-01-26 Richard Guenther <rguenther@suse.de>
15531 * targext.c: Include config.h.
15532 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15535 2011-01-04 Pascal Obry <obry@adacore.com>
15536 Eric Botcazou <ebotcazou@adacore.com>
15538 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15540 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15542 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15543 end-of-case on the end label and its associated gotos, if any.
15545 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15547 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15548 expressions of the parameter cache within the statement group of
15549 the CICO mechanism.
15551 2011-01-04 Olivier Hainque <hainque@adacore.com>
15552 Eric Botcazou <ebotcazou@adacore.com>
15554 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15555 (set_end_locus_from_node): New function.
15556 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15557 make and the function end_locus.
15558 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15559 for the elaboration subprogram.
15560 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15561 set the end_locus of the expression as well.
15563 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15566 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15567 variables that are referenced in exception handlers volatile.
15571 Copyright (C) 2011 Free Software Foundation, Inc.
15573 Copying and distribution of this file, with or without modification,
15574 are permitted in any medium without royalty provided the copyright
15575 notice and this notice are preserved.