[multiple changes]
[gcc.git] / gcc / ada / ChangeLog
1 2011-10-13 Ed Schonberg <schonberg@adacore.com>
2
3 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
4 New predicate to determine whether some operations on an array
5 type are available when the full view of its component may differ
6 from the view of the point of the array declaration.
7 * sem_ch4.adb (Find_Equality_Types): Use
8 Available_Full_View_Of_Component.
9 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
10
11 2011-10-13 Ed Schonberg <schonberg@adacore.com>
12
13 * sem_ch9.adb: Analyze aspects while discriminants of protected
14 type are visible.
15
16 2011-10-13 Geert Bosch <bosch@adacore.com>
17
18 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
19 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
20 longer depend on an external library.
21 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
22 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
23 Update dependencies.
24 * gcc-interface/Make-lang.in: Update dependencies.
25
26 2011-10-13 Cyrille Comar <comar@adacore.com>
27
28 * gnat_ugn.texi: Minor editing.
29
30 2011-10-13 Vincent Celier <celier@adacore.com>
31
32 * projects.texi: Add documentation on packages and attributes
33 that are inherited from a project being extended into the
34 extended project.
35
36 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
37
38 * exp_ch3.adb (Build_Master): Rewritten.
39 (Expand_N_Full_Type_Declaration): Reformat the declarative
40 region. Update the call to Build_Master_Renaming.
41 (Expand_Previous_Access_Type): Rewritten.
42 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
43 Add local constant Result_Subt and update related usage.
44 (Expand_N_Extended_Return_Statement): Add local constant
45 Result_Subt and update related usage.
46 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
47 new context detection mechanism.
48 (Build_Class_Wide_Master):
49 Use Insert_Action to add the renaming into the tree.
50 (Build_Master_Entity): Rewritten to use the new context detection
51 mechanism.
52 (Build_Master_Renaming): Add formal parameter Ins_Nod
53 and related usage. Use Insert_Action to add the renaming into the
54 tree.
55 (Find_Enclosing_Context): New subsidiary routine. Rather
56 than relying on enclosing scopes, this routine looks at the
57 tree structure to figure out the proper context for a _master
58 or a _chain. This approach eliminates the issues with transient
59 scopes which have not been converted into blocks.
60 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
61 to better reflect the new usage. Update the related comment.
62 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
63 the comment on usage.
64 * sem_ch3.adb (Access_Definition): Update the calls to
65 Build_Master_Entity and Build_Master_Renaming.
66 * sem_ch6.adb (Create_Extra_Formals): Add local variable
67 Full_Subt. Code reformatting.
68 * sem_util.adb (Is_Iterator): Alphabetized.
69 (Is_LHS): Alphabetized.
70 (Is_Limited_Class_Wide_Type): New routine.
71 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
72
73 2011-10-13 Geert Bosch <bosch@adacore.com>
74
75 * a-ngrear.adb (Solve): Make generic and move to
76 System.Generic_Array_Operations.
77 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
78 New generic solvers to compute a vector resp. matrix Y such
79 that A * Y = X, approximately.
80 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
81 Implement using Forward_Eliminate and Back_Substitute
82 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
83 on BLAS and LAPACK.
84 * a-ngcoar.ads ("abs"): Fix return type to be real.
85
86 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
87
88 PR ada/50589
89 * s-linux-alpha.ads: Do not "with" Interfaces.C.
90 * s-linux-sparc.ads: Likewise.
91
92 2011-10-13 Geert Bosch <bosch@adacore.com>
93
94 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
95 returning a Real.
96 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
97 and use formal.
98 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
99 new profile.
100
101 2011-10-13 Geert Bosch <bosch@adacore.com>
102
103 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
104 move to System.Generic_Array_Operations.
105
106 2011-10-13 Geert Bosch <bosch@adacore.com>
107
108 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
109 * s-gearop.ads (L2_Norm): Change profile to be suitable for
110 Complex_Vector
111 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
112 not inner product
113
114 2011-10-13 Robert Dewar <dewar@adacore.com>
115
116 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
117 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
118 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
119 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
120 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
121 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
122
123 2011-10-13 Geert Bosch <bosch@adacore.com>
124
125 * s-gearop.adb: Minor comment additions.
126
127 2011-10-13 Fedor Rybin <frybin@adacore.com>
128
129 * gnat_ugn.texi: Add gnattest section.
130
131 2011-10-13 Ed Schonberg <schonberg@adacore.com>
132
133 * freeze.adb: Do not create body of renaming if declaration has
134 errors.
135
136 2011-10-13 Olivier Hainque <hainque@adacore.com>
137
138 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
139 further, to the ppc+kernel case only.
140
141 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
142
143 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
144 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
145 Do not create a pool formal on .NET/JVM.
146 (Expand_N_Extended_Return_Statement): Alphabetize local
147 variables. Do not create a renaming of the build-in-place pool
148 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
149 Add the user-defined pool only on non-VM targets.
150 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
151 local variables. Do not add a pool actual on .NET/JVM.
152 * sem_ch6.adb: Add with and use clause for Targparm.
153 (Create_Extra_Formals): Add build-in-place pool formal only on
154 non-VM targets.
155 * rtsfind.ads: Alphabetize entries.
156
157 2011-10-13 Sergey Rybin <rybin@adacore.com>
158
159 * gnat_ugn.texi: Minor correction.
160
161 2011-10-13 Ed Schonberg <schonberg@adacore.com>
162
163 * sem_ch8.adb: Minor error message improvement.
164
165 2011-10-13 Robert Dewar <dewar@adacore.com>
166
167 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
168
169 2011-10-13 Gary Dismukes <dismukes@adacore.com>
170
171 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
172 of a for loop for an enumeration type with an enumeration rep
173 clause, which involves moving the original loop parameter into
174 a nested block, the loop parameter's entity must be removed from
175 the entity list of the loop scope.
176
177 2011-10-13 Bob Duff <duff@adacore.com>
178
179 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
180 that gets passed in the same cases where BIP_Alloc_Form is passed
181 (caller-unknown-size results). BIP_Storage_Pool is used when
182 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
183 to the user-defined storage pool is passed at the call site,
184 and this pool is used in callee to allocate the result.
185 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
186 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
187 the additional BIP_Storage_Pool actual.
188 (Expand_N_Extended_Return_Statement): Allocate the function
189 result using the user-defined storage pool, if BIP_Alloc_Form =
190 User_Storage_Pool.
191 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
192 * exp_ch4.adb: Don't overwrite storage pool set by
193 Expand_N_Extended_Return_Statement.
194 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
195 for use in build-in-place function calls within allocators
196 where the access type has a user-defined storage pool.
197
198 2011-10-13 Sergey Rybin <rybin@adacore.com>
199
200 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
201 literal casing.
202
203 2011-10-13 Nicolas Roche <roche@adacore.com>
204
205 * gnatlink.adb: Ensure that -mrtp is passed when
206 runtime name ends with 'rtp'.
207
208 2011-10-13 Ed Schonberg <schonberg@adacore.com>
209
210 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
211 unchecked union type can be limited.
212
213 2011-10-13 Olivier Hainque <hainque@adacore.com>
214
215 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
216 the use of the signal trampoline for PPC in the sjlj case as well.
217 Add legitimate casts, preventing compile time warnings on the
218 (sighandler *) profile.
219
220 2011-10-13 Yannick Moy <moy@adacore.com>
221
222 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
223 analysis in Alfa mode.
224
225 2011-10-13 Ed Schonberg <schonberg@adacore.com>
226
227 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
228 expressions are legal limited return values if each one of their
229 dependent expressions are legal.
230
231 2011-10-13 Ed Schonberg <schonberg@adacore.com>
232
233 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
234 if the prefix of the call is a qualified expression, rewrite as
235 a code statement.
236 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
237 code statement is legal if it is a rewriting of a procedure call.
238
239 2011-10-13 Ed Schonberg <schonberg@adacore.com>
240
241 * exp_aggr.adb (Flatten): If a component association has a box,
242 assume that aggregate is not static.
243 (Safe_Aggregate): If a component association in a non-limited
244 aggregate has a box, assume that it cannot be expanded in place.
245
246 2011-10-13 Vincent Celier <celier@adacore.com>
247
248 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
249 Process_Project_Tree_Phase_1 with Packages_To_Check.
250 (Process_Project_And_Apply_Config): Ditto
251 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
252 Remove default for argument Packages_To_Check.
253 * prj-proc.adb (Recursive_Process): New argument
254 Packages_To_Check.
255 (Process): Ditto.
256 (Process_Project_Tree_Phase_1): Ditto.
257 (Recursive_Project.Process_Aggregated_Projects): Call
258 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
259 Packages_To_Check.
260 * prj-proc.ads (Process): New argument Packages_To_Check
261 (Process_Project_Tree_Phase_1): Ditto
262
263 2011-10-13 Arnaud Charlet <charlet@adacore.com>
264
265 * gcc-interface/Makefile.in: Fix typo.
266
267 2011-10-13 Ed Schonberg <schonberg@adacore.com>
268
269 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
270 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
271 Use sloc of defining identifier of farmal type declaration,
272 as sloc of generated internal entity, to prevent misplaced
273 references in ali.
274
275 2011-10-13 Ed Schonberg <schonberg@adacore.com>
276
277 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
278 is fully defined before checking that it is a numeric type.
279
280 2011-10-13 Ed Schonberg <schonberg@adacore.com>
281
282 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
283 association for component X has a box, then X is covered in the
284 aggregate even if there is not default value for X in the type
285 declaration, and X has to be default-initialized.
286
287 2011-10-13 Ed Schonberg <schonberg@adacore.com>
288
289 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
290 'Value): Mark literals as referenced only if reference is in
291 current source unit.
292
293 2011-10-13 Matthew Heaney <heaney@adacore.com>
294
295 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
296
297 2011-10-13 Olivier Hainque <hainque@adacore.com>
298
299 * sigtramp.h: New file. Prototype and spec of the signal
300 trampoline to be called by an established handler to provide
301 dwarf call frame info before the real signal processing code.
302 * sigtramp-ppcvxw.c: New file. Implementation of the signal
303 trampoline for ppc-vxworks.
304 * init.c (vxworks section): Use it for ppc.
305
306 2011-10-13 Thomas Quinot <quinot@adacore.com>
307
308 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
309 (Check_Future_Identifier): New subprogram,
310 factors duplicated code from Par.Ch2.P_Identifier and
311 Par.Ch3.P_Defining_Identifier.
312
313 2011-10-13 Thomas Quinot <quinot@adacore.com>
314
315 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
316 if we fail to initialize CV attributes or CV.
317
318 2011-10-13 Thomas Quinot <quinot@adacore.com>
319
320 * s-tasren.adb (Timed_Selective_Wait, case
321 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
322 we know abortion is already deferred.
323
324 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
325
326 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
327 (Build_Master_Renaming (function)): Removed.
328 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
329 (Expand_Full_Type_Declaration): Alphabetize
330 variables. Reformatting of code and comments. Rewrite the
331 section on processing of anonymous access-to-task types in
332 record components.
333 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
334 (Build_Master_Renaming): Moved to exp_ch9.
335 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
336 (Build_Master_Entity): Add formal parameter
337 Use_Current. Reformatting of code and comments.
338 (Build_Master_Renaming): Moved from exp_ch3.
339 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
340 exp_ch3. Update comment on usage.
341 (Build_Master_Entity):
342 Add formal parameter Use_Current. Update comment on usage.
343 (Build_Master_Renaming): Moved from exp_ch3.
344 * sem_ch3.adb (Access_Definition): Remove redundant code to
345 create a _master and a renaming.
346
347 2011-10-13 Ed Schonberg <schonberg@adacore.com>
348
349 * lib-xref.adb: Do no emit reference to overridden operation,
350 if it is internally generated.
351
352 2011-10-13 Vincent Celier <celier@adacore.com>
353
354 * bindgen.adb: Remove any processing related to g-trasym
355 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
356 * mlib-prj.adb: Remove any processing related to g-trasym.
357
358 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
359
360 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
361 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
362 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
363 (ADA_FLAGS_TO_PASS): Likewise.
364 (COMMON_FLAGS_TO_PASS): New.
365 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
366 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
367 (gnatlib): Use COMMON_FLAGS_TO_PASS.
368 (ada.install-common): Likewise.
369 (install-gnatlib): Likewise.
370 (install-gnatlib-obj): Likewise.
371 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
372 (gnat-cross): Delete.
373 (gnatboot): Likewise.
374 (gnatboot2): Likewise.
375 (gnatboot3): Likewise.
376 (gnatstage1): Likewise.
377 (gnatstage2): Likewise.
378 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
379 (MOST_ADAFLAGS): Likewise.
380 (LOOSE_CFLAGS): Likewise.
381 (gnat-cross): Likewise.
382 (GNATLIBFLAGS): Add -W -Wall.
383 (GNATLIBCFLAGS_FOR_C): Likewise.
384 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
385 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
386
387 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
388
389 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
390 (push_range_check_info): Likewise.
391 (gnat_to_gnu) <N_Code_Statement>: Likewise.
392 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
393 (gnat_invariant_expr): Likewise.
394 * gcc-interface/utils.c (compute_related_constant): Likewise.
395 (max_size): Fix handling of SAVE_EXPR.
396 (remove_conversions): Fix formatting.
397
398 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
399
400 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
401 (DECL_INDUCTION_VAR): New macro.
402 (SET_DECL_INDUCTION_VAR): Likewise.
403 * gcc-interface/gigi.h (convert_to_index_type): Declare.
404 (gnat_invariant_expr): Likewise.
405 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
406 parameter, set DECL_LOOP_PARM_P on it.
407 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
408 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
409 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
410 (struct range_check_info_d): New type.
411 (struct loop_info_d): Likewise.
412 (gnu_loop_stack): New stack.
413 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
414 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
415 is set, do not test DECL_RENAMED_OBJECT.
416 (push_range_check_info): New function.
417 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
418 the label. Reference the label and the iteration variable from it.
419 Build the special induction variable in the unsigned version of the
420 size type, if it is larger than the base type. And attach it to the
421 iteration variable if the latter isn't by-ref. In the iteration scheme
422 case, initialize the invariant conditions in front of the loop if
423 deemed profitable. Use gnu_loop_stack.
424 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
425 <N_Raise_Constraint_Error>: Always process the reason. In the range
426 check and related cases, and if loop unswitching is enabled, compute
427 invariant conditions and push this information onto the stack.
428 Do not translate again the condition if it has been already translated.
429 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
430 DECL_LOOP_PARM_P isn't set.
431 (convert_to_index_type): New function.
432 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
433 to convert the index from the base index type to sizetype.
434 (gnat_invariant_expr): New function.
435
436 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
437
438 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
439 two parallel arrays to hold standard builtin declarations, and
440 replace it with a function based interface that can support
441 creating builtins on the fly in the future.
442 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
443 (gnat_to_gnu): Ditto.
444
445 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
446
447 PR lto/50492
448 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
449 * gcc-interface/utils.c (global_context): New variable.
450 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
451 that are either public external or at top level. Use "No" macro.
452 (end_subprog_body): Call decl_function_context.
453 (rest_of_subprog_body_compilation): Likewise.
454
455 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
456
457 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
458 (rest_of_subprog_body_compilation): Likewise.
459 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
460 test for useless conversions by means of gnat_useless_type_conversion.
461 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
462 (language_function): Add named_ret_val and other_ret_val.
463 (f_named_ret_val): New macro.
464 (f_other_ret_val): Likewise.
465 (gigi): Call rest_of_subprog_body_compilation.
466 (struct nrv_data): New structure.
467 (is_nrv_p): New predicate.
468 (prune_nrv_r): New helper function.
469 (prune_nrv_in_block): New function.
470 (finalize_nrv_r): New helper function.
471 (finalize_nrv): New function.
472 (return_value_ok_for_nrv_p): New predicate.
473 (build_return_expr): If optimization is enabled, record candidates for
474 the Named Return Value optimization.
475 (build_function_stub): Call rest_of_subprog_body_compilation.
476 (Subprogram_Body_to_gnu): If optimization is enabled and there are
477 candidates, finalize the Named Return Value optimization.
478 Call rest_of_subprog_body_compilation.
479 (call_to_gnu): At the end, if a return value is needed, simplify the
480 result before wrapping it up in a COMPOUND_EXPR.
481 * gcc-interface/utils.c (end_subprog_body): Split into...
482 (rest_of_subprog_body_compilation): ...this. New function.
483 (gnat_useless_type_conversion): Likewise.
484
485 2011-10-06 Thomas Quinot <quinot@adacore.com>
486
487 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
488 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
489 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
490 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
491 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
492 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
493 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
494 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
495
496 2011-10-06 Ed Schonberg <schonberg@adacore.com>
497
498 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
499 references.
500
501 2011-10-06 Matthew Heaney <heaney@adacore.com>
502
503 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
504 (Dequeue_Only_High_Priority): Protected procedure now implemented.
505
506 2011-10-06 Vincent Celier <celier@adacore.com>
507
508 * g-trasym.adb: Replace old implementation with the default
509 implementation that returns list of addresses as "0x...".
510 * g-trasym.ads: Update the list of platforms with the full
511 capability. Indicate that there is a default implementation
512 for other platforms.
513 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
514 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
515 is now a default implementation for all platforms without the full
516 capability.
517
518 2011-10-06 Robert Dewar <dewar@adacore.com>
519
520 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
521 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
522 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
523 reorganization (use conditional expressions).
524
525 2011-10-06 Robert Dewar <dewar@adacore.com>
526
527 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
528 floating divide by zero.
529
530 2011-10-06 Ed Schonberg <schonberg@adacore.com>
531
532 * sem_ch6.adb: Limited interfaces that are not immutably limited
533 are OK in return statements.
534
535 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
536
537 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
538 change to powerpc section.
539
540 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
541
542 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
543 across the port.
544
545 2011-09-27 Ed Schonberg <schonberg@adacore.com>
546
547 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
548 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
549 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
550 indefinite sets.
551 * a-coorma.ads: Minor reformmating.
552 * einfo.ads: Improve the comment describing the
553 Directly_Designated_Type function.
554 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
555 ordered maps.
556 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
557 dependencies.
558
559 2011-09-27 Robert Dewar <dewar@adacore.com>
560
561 * a-comutr.ads: Minor reformatting.
562
563 2011-09-27 Ed Schonberg <schonberg@adacore.com>
564
565 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
566 iterators to multiway trees.
567
568 2011-09-27 Yannick Moy <moy@adacore.com>
569
570 * debug.adb (d.D): New option for strict Alfa mode.
571 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
572 permissions as strictly as possible.
573 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
574 Alfa mode, now, interpret ranges of base types like GNAT does; in
575 strict mode, simply change the range of the implicit base Itype.
576 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
577
578 2011-09-27 Robert Dewar <dewar@adacore.com>
579
580 * exp_ch9.adb: Minor comment fixes.
581
582 2011-09-27 Ed Schonberg <schonberg@adacore.com>
583
584 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
585 trees.
586
587 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
588
589 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
590 instead of Directly_Designated_Type in the indirect array case.
591
592 2011-09-27 Robert Dewar <dewar@adacore.com>
593
594 * exp_util.adb, exp_aggr.adb: Minor reformatting.
595
596 2011-09-27 Ed Schonberg <schonberg@adacore.com>
597
598 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
599 on subtype declarations.
600 * exp_aggr.adb: Minor comment update.
601
602 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
603
604 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
605 test in the N_Explicit_Dereference case. Fold double logical
606 negation in the special loop case and conditionalize it on
607 Variable_Ref being true.
608
609 2011-09-27 Ed Schonberg <schonberg@adacore.com>
610
611 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
612 single protected object and the selector is a discriminant or an
613 entry family, this is a non-overloaded candidate interpretation,
614 and possible primitive operations of the type must not be
615 examined.
616
617 2011-09-27 Arnaud Charlet <charlet@adacore.com>
618
619 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
620
621 2011-09-27 Pascal Obry <obry@adacore.com>
622
623 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
624 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
625 Add dummy definitions for pthread_rwlock_t
626 and pthread_rwlockattr_t on all POSIX platforms.
627 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
628 reference.
629 (Finalize_Lock): Likewise.
630 (Write_Lock): Likewise.
631 (Unlock): Likewise.
632
633 2011-09-27 Tristan Gingold <gingold@adacore.com>
634
635 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
636 windows 64.
637
638 2011-09-27 Pascal Obry <obry@adacore.com>
639
640 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
641 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
642 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
643 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
644 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
645 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
646 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
647 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
648 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
649 s-taprop-posix.adb: Revert previous changes.
650 (Lock): Now a record containing the two possible lock
651 (mutex and read/write) defined in OS_Interface.
652 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
653 'R' locking policy.
654 (Initialize_Protection): Likewise.
655 (Lock): Likewise.
656 (Lock_Read_Only): Likewise.
657 (Unlock): Likewise.
658
659 2011-09-27 Pascal Obry <obry@adacore.com>
660
661 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
662 OS_Interface.pthread_rwlock_t.
663
664 2011-09-27 Robert Dewar <dewar@adacore.com>
665
666 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
667 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
668 sem_ch5.adb, sem_util.adb: Minor reformatting.
669
670 2011-09-27 Pascal Obry <obry@adacore.com>
671
672 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
673 (Finalize_Lock)[RW_Lock]: Likewise.
674 (Write_Lock)[RW_Lock]: Likewise.
675 (Unlock)[RW_Lock]: Likewise.
676 (Read_Lock): Define L as RW_Lock (instead of Lock).
677 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
678 routine for r/w lock.
679 (Finalize_Lock)[RW_Lock]: Likewise.
680 (Write_Lock)[RW_Lock]: Likewise.
681 (Unlock)[RW_Lock]: Likewise.
682 (Read_Lock): Define L as RW_Lock (instead of Lock).
683
684 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
685 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
686 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
687 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
688 routine for standard lock.
689 (Finalize_Lock)[RW_Lock]: Likewise.
690 (Write_Lock)[RW_Lock]: Likewise.
691 (Unlock)[RW_Lock]: Likewise.
692 (Read_Lock): Define L as RW_Lock (instead of Lock).
693 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
694 in the record definition.
695 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
696 lock for 'R' locking policy.
697 (Initialize_Protection): Likewise.
698 (Lock): Likewise.
699 (Lock_Read_Only): Likewise.
700 (Unlock): Likewise.
701 * s-taspri-posix.ads (RW_Lock): New type defined as
702 OS_Interface.pthread_rwlock_t.
703
704 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
705 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
706 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
707 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
708
709 2011-09-27 Pascal Obry <obry@adacore.com>
710
711 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
712
713 2011-09-27 Pascal Obry <obry@adacore.com>
714
715 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
716 s-osinte-hpux.ads, s-osinte-irix.ads,
717 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
718 pthread_mutex_t.
719 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
720 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
721 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
722 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
723 pthread_rwlock_destroy, pthread_rwlock_rdlock,
724 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
725
726 2011-09-27 Pascal Obry <obry@adacore.com>
727
728 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
729 (RE_Id): Add RE_Lock_Read_Only.
730 (RE_Unit_Table): Likewise.
731 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
732 to lift restriction on first character. Handle now the
733 Name_Concurrent_Readers_Locking where policy character is set to
734 'R'.
735 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
736 constant.
737 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
738 read only lock for function in protected object.
739 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
740 this routine is now used.
741
742 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
743
744 * s-atocou-x86.adb (Decrement): Use %;.
745 (Increment): Likewise.
746
747 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
748
749 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
750 dereference of the pointer to the storage area. Remove useless type
751 conversions and factor out common code.
752
753 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
754
755 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
756 variable and use it throughout.
757 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
758 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
759 first step. Also convert to the unpadded type as a last step.
760
761 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
762
763 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
764 DECL_CHAIN in comment.
765 * gcc-interface/trans.c (gigi): Likewise.
766 (Attribute_to_gnu): Likewise.
767 (build_function_stub): Likewise.
768 (gnat_to_gnu): Likewise.
769 * gcc-interface/utils.c (create_subprog_decl): Likewise.
770 (convert_vms_descriptor64): Likewise.
771 (convert_vms_descriptor32): Likewise.
772
773 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
774
775 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
776 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
777 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
778 the type of the record is TYPE_READONLY.
779
780 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
781 Robert Dewar <dewar@adacore.com>
782
783 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
784 OUT formal parameter which is of an null-exclusion access subtype.
785
786 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
787
788 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
789 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
790 (gnat_to_gnu_param): Likewise.
791 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
792 maybe_unconstrained_array instead of doing the work manually.
793 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
794 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
795 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
796 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
797 (gnat_stabilize_reference): Likewise.
798
799 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
800
801 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
802 (SET_TYPE_NULL_BOUNDS): Likewise.
803 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
804 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
805 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
806 pointer types.
807 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
808 check that the initializer is a valid constant expression for use in
809 initializing a static variable. Add missing guard.
810 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
811 (convert_to_fat_pointer): In the null fat pointer case, build a valid
812 pointer for the bounds.
813 * gcc-interface/utils2.c (compare_fat_pointers): New function.
814 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
815
816 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
817
818 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
819 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
820 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
821 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
822 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
823 to the indirect case.
824 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
825 the TREE_THIS_NOTRAP flag.
826
827 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
828
829 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
830 iteration scheme, always generate the do-while form if optimization
831 is enabled. Use more straightforward test at the end.
832
833 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
834
835 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
836 XNEW instead of xmalloc. Do not build useless pointer type.
837 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
838 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
839 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
840
841 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
842
843 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
844 the alignment if this doesn't prevent BLKmode access to the object.
845
846 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
847
848 * gcc-interface/Makefile.in (darwin): Do not issue the
849 '-flat_namespace' linker flag during Ada build.
850 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
851 default shared library options.
852
853 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
854
855 * gcc-interface/decl.c (annotate_value): Look up expression for
856 insertion in the cache at the end.
857
858 2011-09-19 Arnaud Charlet <charlet@adacore.com>
859
860 * gcc-interface/Make-lang.in: Update dependencies.
861
862 2011-09-19 Steve Baird <baird@adacore.com>
863
864 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
865 configuration pragma names so that Is_Configuration_Pragma_Name
866 will return True for Name_Annotate. Make corresponding change in
867 Pragma_Id enumeration type. This is needed to allow an Annotate
868 pragma to occur in a configuration pragma file (typically,
869 a gnat.adc file).
870 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
871 * gnat_rm.texi: Note that pragma Annotate may be used as a
872 configuration pragma.
873
874 2011-09-19 Ed Schonberg <schonberg@adacore.com>
875
876 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
877 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
878
879 2011-09-19 Yannick Moy <moy@adacore.com>
880
881 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
882 for expansion of set membership.
883 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
884 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
885 visible for use in Alfa expansion.
886 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
887 variable in Alfa mode.
888
889 2011-09-19 Thomas Quinot <quinot@adacore.com>
890
891 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
892
893 2011-09-19 Thomas Quinot <quinot@adacore.com>
894
895 * exp_ch9.adb: Minor reformatting.
896
897 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
898
899 * freeze.adb (Build_Renamed_Body): Generic subprograms
900 instantiations cannot be poperly inlined by the compiler, do
901 not set the Body_To_Inline attribute in such cases.
902 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
903 inlining-related flags from the generic subprogram declaration.
904
905 2011-09-19 Thomas Quinot <quinot@adacore.com>
906
907 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
908 (Build_Stub_Type): Remove, instead copy components from
909 System.Partition_Interface.RACW_Stub_Type.
910 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
911 (Copy_Component_List): New subprogram.
912
913 2011-09-19 Yannick Moy <moy@adacore.com>
914
915 * lib-xref.adb (Generate_Reference): Ignore references to
916 constants in Standard.
917
918 2011-09-19 Robert Dewar <dewar@adacore.com>
919
920 * err_vars.ads, errout.ads: Minor reformatting.
921
922 2011-09-19 Robert Dewar <dewar@adacore.com>
923
924 * aspects.ads (Impl_Defined_Aspects): New array
925 * lib-writ.adb (No_Dependences): New name for No_Dependence
926 * restrict.adb (No_Dependences): New name for No_Dependence
927 (Check_Restriction_No_Specification_Of_Aspect): New
928 procedure.
929 (Set_Restriction_No_Specification_Of_Aspect): New procedure
930 (Restricted_Profile_Result): New variable
931 (No_Specification_Of_Aspects): New variable
932 (No_Specification_Of_Aspect_Warning): New variable
933 * restrict.ads (No_Dependences): New name for No_Dependence
934 (Check_Restriction_No_Specification_Of_Aspect): New procedure
935 (Set_Restriction_No_Specification_Of_Aspect): New procedure
936 * s-rident.ads: Add restriction
937 No_Implementation_Aspect_Specifications, this is also added to
938 the No_Implementation_Extensions profile.
939 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
940 No_Implementation_Defined_Aspects
941 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
942 * sem_prag.adb (Analyze_Aspect_Specifications): Check
943 No_Implementation_Aspects
944 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
945 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
946
947 2011-09-19 Yannick Moy <moy@adacore.com>
948
949 * lib-xref.adb (Generate_Reference): Take into account multiple
950 renamings for Alfa refs.
951
952 2011-09-19 Thomas Quinot <quinot@adacore.com>
953
954 * g-socthi-mingw.adb: Minor reformatting.
955
956 2011-09-19 Yannick Moy <moy@adacore.com>
957
958 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
959 expansion to False in mode Alfa
960
961 2011-09-19 Pascal Obry <obry@adacore.com>
962
963 * mingw32.h: Remove obsolete code needed for old versions
964 of MingW.
965
966 2011-09-19 Robert Dewar <dewar@adacore.com>
967
968 * errout.ads: Minor reformatting.
969
970 2011-09-19 Ed Schonberg <schonberg@adacore.com>
971
972 * sem_ch6.adb (Analyze_Expression_Function): When the expression
973 function is transformed into a declaration and a body, insert
974 body at the end of the declarative part, to prevent premature
975 freeze actions, and preserve original specification in the
976 subprogram declaration.
977
978 2011-09-19 Vincent Celier <celier@adacore.com>
979
980 * projects.texi: Minor editing.
981
982 2011-09-19 Robert Dewar <dewar@adacore.com>
983
984 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
985 exp_aggr.adb: Minor reformatting.
986
987 2011-09-19 Yannick Moy <moy@adacore.com>
988
989 * lib-xref.adb (Generate_Reference): Change entity referenced
990 to underlying object if any, or else reference to the HEAP.
991
992 2011-09-15 Arnaud Charlet <charlet@adacore.com>
993
994 * gcc-interface/Make-lang.in: Update dependencies.
995
996 2011-09-15 Robert Dewar <dewar@adacore.com>
997
998 * tree_io.ads: Minor reformatting.
999 * a-intnam.ads: Fix bad header.
1000
1001 2011-09-15 Thomas Quinot <quinot@adacore.com>
1002
1003 * a-exexpr-gcc.adb: Minor reformatting.
1004
1005 2011-09-15 Yannick Moy <moy@adacore.com>
1006
1007 * sem_ch6.adb: Propagate information that an expression function comes
1008 from source (otherwise references to this entity are not stored).
1009
1010 2011-09-15 Robert Dewar <dewar@adacore.com>
1011
1012 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1013 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1014 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1015
1016 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1017
1018 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1019 if the expression function is not a completion, create a
1020 new specification for the generated declaration, and keep the
1021 original specification in the generated body. Shorter code also
1022 ensures that proper warnings are generated for unused formals
1023 in all cases.
1024
1025 2011-09-15 Sergey Rybin <rybin@adacore.com>
1026
1027 * tree_io.ads: Update ASIS_Version_Number because of the changes
1028 in the tree structures for expression functions.
1029
1030 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1031
1032 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1033 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1034 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1035 (CLOCK_REALTIME): Fix wrong value on some OSes.
1036 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1037
1038 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1039
1040 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1041 to unconstrained array case, deal with each branch of a COND_EXPR.
1042 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1043 a COND_EXPR in the initializer, if present.
1044
1045 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1046
1047 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1048 of an addressable type.
1049 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1050 Deal with those cases for which creating a temporary is mandatory.
1051
1052 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1053
1054 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1055 this is a real formal parameter before testing whether it is by ref.
1056
1057 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1058
1059 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1060 (build_call_1_expr): Likewise.
1061 (build_call_2_expr): Likewise.
1062 (build_call_n_expr): New prototype.
1063 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1064 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1065 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1066 (Exception_Handler_to_gnu_zcx): Likewise.
1067 (gnat_to_gnu): Likewise.
1068 (build_binary_op_trapv): Likewise.
1069 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1070 (build_call_1_expr): Likewise.
1071 (build_call_2_expr): Likewise.
1072 (build_call_n_expr): New function.
1073 (build_call_raise): Use build_call_n_expr.
1074 (build_call_raise_range): Likewise.
1075 (build_call_raise_column): Likewise.
1076 (build_call_alloc_dealloc_proc): Likewise.
1077 (maybe_wrap_malloc): Likewise.
1078 (maybe_wrap_free): Likewise.
1079
1080 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1081
1082 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1083 MODIFY_EXPR.
1084 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1085 the result type is null if ENABLE_CHECKING. Set operation_type at the
1086 end unconditionally if not set in the previous cases.
1087 Use build2 and void_type_node for MODIFY_EXPR.
1088 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1089
1090 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1091
1092 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1093 precision when converting to or from an integral type whose precision
1094 is not equal to its size.
1095
1096 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1097
1098 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1099
1100 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1101
1102 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1103 implementation.
1104 * system-darwin-ppc64.ads: New file.
1105
1106 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1107
1108 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1109 reference to "-lm".
1110
1111 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1112
1113 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1114 size switches to the link phase for shared libs.
1115
1116 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1117
1118 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1119 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1120
1121 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1122
1123 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1124 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1125 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1126 New targets.
1127 (TOOLS_FLAGS_TO_PASS): New.
1128 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1129
1130 2011-09-06 Robert Dewar <dewar@adacore.com>
1131
1132 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1133 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1134
1135 2011-09-06 Robert Dewar <dewar@adacore.com>
1136
1137 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1138 * s-rident.ads: New restriction No_Implementation_Units
1139 (this restriction is also part of the profile
1140 No_Implementation_Extensions)
1141 * sem_ch10.adb (Analyze_With_Clause): Add check for
1142 No_Implementation_Units restriction.
1143
1144 2011-09-06 Jerome Guitton <guitton@adacore.com>
1145
1146 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1147 on vThreads.
1148
1149 2011-09-06 Thomas Quinot <quinot@adacore.com>
1150
1151 * s-solita.adb: Minor reformatting.
1152
1153 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1154
1155 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1156 is a rewriting of an expression function does not freeze previous
1157 entities.
1158
1159 2011-09-06 Robert Dewar <dewar@adacore.com>
1160
1161 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1162
1163 2011-09-06 Tristan Gingold <gingold@adacore.com>
1164
1165 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1166 powerpc-wrs-vxworksae.
1167
1168 2011-09-06 Thomas Quinot <quinot@adacore.com>
1169
1170 * s-os_lib.ads (Spawn): Minor documentation clarification,
1171 Success is True for a zero exit status.
1172
1173 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1174
1175 * sem_ch5.adb: Add message for common iterator error.
1176
1177 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1178
1179 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1180 selected component discriminated by a current instance, replace
1181 the constraint with a reference to the target object, regardless
1182 of whether the context is an init_proc.
1183
1184 2011-09-06 Robert Dewar <dewar@adacore.com>
1185
1186 * exp_attr.adb: Descriptor_Size is never static.
1187
1188 2011-09-06 Robert Dewar <dewar@adacore.com>
1189
1190 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1191
1192 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1193
1194 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1195 non-static.
1196
1197 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1198
1199 * sem_res.adb (Resolve): An expression that is the body of an
1200 expression function does not freeze.
1201
1202 2011-09-06 Matthew Heaney <heaney@adacore.com>
1203
1204 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1205 a-cuprqu.adb: Changed copyright notice to indicate current
1206 year only.
1207
1208 2011-09-06 Vincent Celier <celier@adacore.com>
1209
1210 * prj.adb: Minor spelling error fix in comment
1211 * sem_res.adb: Minor reformatting
1212
1213 2011-09-06 Pascal Obry <obry@adacore.com>
1214
1215 * sysdep.c (winflush_nt): Removed as not needed anymore.
1216 (winflush_95): Likewise.
1217 (winflush_init): Likewise.
1218 (winflush_function): Likewise.
1219 (getc_immediate_common): Remove call to winflush_function.
1220
1221 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1222
1223 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1224 processing for Descriptor_Size.
1225 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1226 to account for its broader usage.
1227 * sem_attr.adb (Analyze_Attribute): Change the error detection
1228 circuitry for Descriptor_Size as the attribute is now applicable
1229 to all types.
1230
1231 2011-09-06 Robert Dewar <dewar@adacore.com>
1232
1233 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1234
1235 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1236
1237 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1238 in a parameter association must not set the Referenced flag on
1239 the formal.
1240 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1241
1242 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1243
1244 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1245
1246 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1247
1248 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1249 gnatlink-re): Speed up by using -j0.
1250
1251 2011-09-06 Yannick Moy <moy@adacore.com>
1252
1253 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1254 Set_Corresponding_Aspect when creating pragma from aspect.
1255 (Add_Predicates): Use new field Corresponding_Aspect.
1256 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1257 name when present, for the purpose of issuing error messages;
1258 remove local procedure Error_Pragma_Arg_Alternate_Name.
1259 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1260 N_Pragma node.
1261 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1262 N_Pragma node.
1263
1264 2011-09-06 Robert Dewar <dewar@adacore.com>
1265
1266 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1267
1268 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1269
1270 * exp_ch6.adb (Build_Heap_Allocator): Add new
1271 local variable Desig_Typ. Code and comment reformatting. Add
1272 machinery to ensure that the allocation uses a fat pointer when
1273 the type of the return object is a constrained array and the
1274 function return type is an unconstrained array.
1275
1276 2011-09-06 Vincent Celier <celier@adacore.com>
1277
1278 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1279 parameters in subprograms.
1280
1281 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1282
1283 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1284
1285 2011-09-06 Thomas Quinot <quinot@adacore.com>
1286
1287 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1288 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1289 subprogram.
1290 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1291 is null, destroy task specific data, to make API consistent with
1292 other platforms, and thus compatible with the shared version
1293 of s-tpoaal.adb.
1294 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1295 Document the above assumption.
1296
1297 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1298
1299 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1300 variable for type of return value when return type is
1301 unconstrained and context is an assignment.
1302
1303 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1304
1305 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1306 class-wide operation if expansion is not enabled.
1307
1308 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1309
1310 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1311 type prefix.
1312
1313 2011-09-06 Yannick Moy <moy@adacore.com>
1314
1315 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1316 Aspect_Invariant): Do not issue error at this point on illegal
1317 pragma placement, as this is checked later on when analyzing
1318 the corresponding pragma.
1319 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1320 similar to Error_Pragma_Arg, except the source name of the
1321 aspect/pragma to use in warnings may be equal to parameter
1322 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1323 message to distinguish source name of pragma/aspect, and whether
1324 the illegality resides in the type being public, or being private
1325 without a public declaration
1326
1327 2011-09-06 Thomas Quinot <quinot@adacore.com>
1328
1329 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1330 size check (fd_set is implemented differently on that platform).
1331
1332 2011-09-06 Thomas Quinot <quinot@adacore.com>
1333
1334 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1335 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1336 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1337 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1338 (ATCB_Allocation): New subpackage of
1339 System.Tasking.Primitive_Operations, shared across all targets
1340 with full tasking runtime.
1341 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1342 s-taprop bodies).
1343 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1344 taking care of establishing a local temporary ATCB if the one
1345 being deallocated is Self, to avoid a reference to the freed
1346 ATCB in Abort_Undefer.
1347
1348 2011-09-06 Thomas Quinot <quinot@adacore.com>
1349
1350 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1351 terminated, mark it for deallocation upon termination.
1352 (Terminate_Task): Call Free_Task again if the task is marked
1353 for automatic deallocation upon termination.
1354
1355 2011-09-06 Robert Dewar <dewar@adacore.com>
1356
1357 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1358 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1359 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1360 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1361 a-intnam-solaris.ads, a-intnam-tru64.ads,
1362 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1363 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1364 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1365 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1366 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1367 Add new profile No_Implementation_Extensions
1368 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1369 profile No_Implementation_Extensions
1370 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1371 Check violation of restriction No_Implementation_Identifiers
1372 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1373 Add entry for Name_No_Implementation_Extensions
1374
1375 2011-09-06 Robert Dewar <dewar@adacore.com>
1376
1377 * impunit.ads: Minor reformatting.
1378
1379 2011-09-06 Robert Dewar <dewar@adacore.com>
1380
1381 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1382
1383 2011-09-06 Pascal Obry <obry@adacore.com>
1384
1385 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1386 types.
1387
1388 2011-09-06 Robert Dewar <dewar@adacore.com>
1389
1390 * g-socket.adb: Minor reformatting
1391
1392 2011-09-06 Javier Miranda <miranda@adacore.com>
1393
1394 * ali.adb (Scan_ALI): Add missing support to load references of
1395 entities imported from other languages.
1396 * ali.ads (Xref_Record): Adding new fields to store the language and
1397 name of an imported entity.
1398 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1399 in comment.
1400
1401 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1402
1403 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1404 is allowed on a full type declaration if it is the completion of
1405 a private declarations.
1406 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1407 aspect is allowed on a full type declaration in the private part
1408 of a package.
1409
1410 2011-09-06 Robert Dewar <dewar@adacore.com>
1411
1412 * sem_ch8.ads: Minor reformatting
1413
1414 2011-09-06 Thomas Quinot <quinot@adacore.com>
1415
1416 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1417 Guard against socket values that are not in [0;FD_SETSIZE[
1418
1419 2011-09-06 Robert Dewar <dewar@adacore.com>
1420
1421 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1422 reformatting.
1423
1424 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1425
1426 * s-linux-alpha.ads: Minor reformatting
1427 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1428 Use sizeof instead of corresponding C defines in s-oscons template.
1429
1430 2011-09-06 Vadim Godunko <godunko@adacore.com>
1431
1432 * a-convec.ads, a-iteint.ads: Minor reformatting.
1433
1434 2011-09-06 Vincent Celier <celier@adacore.com>
1435
1436 * projects.texi: Add menus and @node lines.
1437
1438 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1439
1440 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1441 where the return type is an unconstrained array and the context
1442 is an assignment. Optimize the case when the target of the
1443 assignment is a selected component.
1444
1445 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1446
1447 * s-solita.adb: Update comments.
1448
1449 2011-09-06 Pascal Obry <obry@adacore.com>
1450
1451 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1452 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1453 * s-oscons-tmplt.c: Add support for generating pthread related
1454 types size on GNU/Linux as done for Darwin.
1455 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1456
1457 2011-09-06 Robert Dewar <dewar@adacore.com>
1458
1459 * exp_ch6.adb: Fix minor typo.
1460
1461 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1462
1463 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1464 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1465 (Double_Size_Of): Alphabetized. Update the comment on usage.
1466 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1467 (Nearest_Multiple_Rounded_Up): New routine.
1468 (Size_Of): Update comment on usage. The generated expression now
1469 accounts for alignment gaps by rounding the size of the type to the
1470 nearest multiple rounded up of the type's alignment.
1471
1472 2011-09-06 Robert Dewar <dewar@adacore.com>
1473
1474 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1475
1476 2011-09-06 Steve Baird <baird@adacore.com>
1477
1478 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1479 derived subprograms in checking for presence of an
1480 Extra_Accessibility_Of_Result formal parameter.
1481 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1482 checking for presence of an Extra_Accessibility_Of_Result formal
1483 parameter.
1484 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1485 case where the Parameter_Associatiations attribute is already set,
1486 but set to an empty list.
1487 (Needs_Result_Accessibility_Level):
1488 Unconditionally return False. This is a temporary
1489 change, disabling the Extra_Accessibility_Of_Result
1490 mechanism.
1491 (Expand_Simple_Function_Return): Check for
1492 Extra_Accessibility_Of_Result parameter's presence instead of
1493 testing Ada_Version when generating a runtime accessibility
1494 check which makes use of the parameter.
1495
1496 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1497
1498 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1499 expression in a given case alternative must be attached to the
1500 statement list of the ccrresponding case statement alternative
1501 They cannot be propagated ahead of the case statement, because
1502 the validity of the expression that generated the action may
1503 hold only for that alternative.
1504
1505 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1506
1507 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1508 (Alignment_Of): Remove the code for strict alignment targets.
1509 (Double_Alignment_Of): Removed.
1510 (Double_Size_Of): New routine.
1511 (Make_Finalize_Address_Stmts): Change the
1512 calculation of the dope's size. Update relevant comments.
1513 (Size_Of): New routine.
1514
1515 2011-09-06 Steve Baird <baird@adacore.com>
1516
1517 * einfo.ads (Extra_Accessibility): Update associated comment to use
1518 the term "present" correctly ("present" just means that it is not
1519 an error to query the value of the attribute - it does not imply
1520 that the value must be non-null).
1521 (Extra_Constrained): Ditto.
1522 (Is_Visible_Formal): Ditto.
1523 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1524 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1525 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1526 * exp_ch6.adb (Expand_Call): The callee may require an
1527 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1528 < Ada_2012. This can occur if the callee is exported from a Gnat
1529 runtimes unit. Also improve a comment.
1530
1531 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1532
1533 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1534 (Alignment_Of): Rename formal parameter Some_Typ
1535 to Typ, update related comment. Use the allocator alignment on
1536 strict alignment targets such as SPARC.
1537 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1538 related comment.
1539
1540 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1541
1542 * sem_ch9.adb (Check_Interfaces): Test
1543 Is_Limited_Type rather than Is_Limited_Record when checking that
1544 the partial view of a synchronized full view must be limited.
1545
1546 2011-09-06 Emmanuel Briot <briot@adacore.com>
1547
1548 * g-comlin.adb (Free): Fix memory leak.
1549
1550 2011-09-06 Robert Dewar <dewar@adacore.com>
1551
1552 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1553
1554 2011-09-06 Steve Baird <baird@adacore.com>
1555
1556 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1557 (Ada2012) cases described in AI05-0234 where the accessibility
1558 level of a function result is "determined by the point of
1559 call", an implicit parameter representing that accessibility
1560 level is passed in. Extra_Accessibilty_Of_Result yields this
1561 additional formal parameter. Extra_Accessibility_Of_Result
1562 is analogous to the existing Extra_Accessibility
1563 function used in the implementation of access parameters.
1564 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1565 Extra_Accessibility_Of_Result attribute.
1566 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1567 (Set_Extra_Accessibility_Of_Result): New procedure.
1568 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1569 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1570 an accessibility level literal to Natural; introduce a nested
1571 function, Make_Level_Literal, to do this.
1572 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1573 determines whether a given function (or access-to-function
1574 type) needs to have an implicitly-declared accessibility-level
1575 parameter added to its profile.
1576 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1577 previously declared in the body of Exp_Ch6.
1578 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1579 it to exp_ch6.ads.
1580 (Has_Unconstrained_Access_Discriminants): New Function; a
1581 predicate on subtype entities which returns True if the given
1582 subtype is unconstrained and has one or more access discriminants.
1583 (Expand_Call): When expanding a call to a function which takes an
1584 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1585 actual parameter value. In the case of a function call which is
1586 used to initialize an allocator, this may not be possible because
1587 the Etype of the allocator may not have been set yet. In this
1588 case, we defer passing in the parameter and handle it later in
1589 Expand_Allocator_Expression.
1590 (Expand_Simple_Function_Return): When returning from a function which
1591 returns an unconstrained subtype having at least one access
1592 discriminant, generate the accessibility check needed to ensure that
1593 the function result will not outlive any objects designated by its
1594 discriminants.
1595 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1596 description.
1597 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1598 is used to initialize an allocator, we may need to pass in "the
1599 accessibility level determined by the point of call" (AI05-0234)
1600 to the function. Expand_Call, where such actual parameters are
1601 usually generated, is too early in this case because the Etype of
1602 the allocator (which is used in determining the level to be passed
1603 in) may not have been set yet when Expand_Call executes. Instead,
1604 we generate code to pass in the appropriate actual parameter
1605 in Expand_Allocator_Expression.
1606 * sem_ch6.adb (Create_Extra_Formals): Create
1607 the new Extra_Accessibility_Of_Result formal if
1608 Needs_Result_Accessibility_Level returns True. This includes the
1609 introduction of a nested procedure, Check_Against_Result_Level.
1610
1611 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1612
1613 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
1614 declaration.
1615
1616 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1617
1618 * s-finmas.adb (Set_Finalize_Address): Explain the reason
1619 for the synchronization. Move the test for null from
1620 s-stposu.Allocate_Any_Controlled to this routine since the check
1621 needs to be protected too.
1622 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
1623 synchronization code.
1624 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
1625 explaining the context in which this routine is used.
1626 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
1627 to s-finmas.Set_Finalize_Address.
1628
1629 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1630
1631 * einfo.ads: Document that itypes have no parent field.
1632
1633 2011-09-05 Robert Dewar <dewar@adacore.com>
1634
1635 * rtsfind.adb (Check_CRT): Check for overloaded entity
1636 * rtsfind.ads: Document that entities to be found by rtsfind
1637 cannot be overloaded
1638 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
1639 (Lock_Entries_With_Status): New name for Lock_Entries with two
1640 arguments (changed to meet rtsfind no overloading rule).
1641
1642 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1643
1644 * s-finmas.adb (Set_Finalize_Address (Address,
1645 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1646 (Set_Finalize_Address (in out Finalization_Master,
1647 Finalize_Address_Ptr): Add synchronization code.
1648 * s-finmas.ads (Set_Finalize_Address (Address,
1649 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1650 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
1651 Set_Finalize_Address for the heterogeneous case.
1652
1653 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1654
1655 * sem_ch3.adb: Undo previous change, not suitable after all.
1656
1657 2011-09-05 Robert Dewar <dewar@adacore.com>
1658
1659 * einfo.ads: Minor comment clarification.
1660
1661 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1662
1663 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
1664 no longer needs to search through the entities of the return
1665 statement scope to find the _chain.
1666 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
1667 (Analyze_Block_Statement): Add local variable
1668 Is_BIP_Return_Statement. Add machinery to install all entities
1669 produced by the expansion of the return object declaration.
1670 (Install_Return_Entities): New routine.
1671 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
1672
1673 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1674
1675 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
1676 of subunit is incomplete.
1677 (Analyze_Proper_Body): If parent spec is not available, do not
1678 attempt analysis.
1679
1680 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1681
1682 * sem_disp.adb (Find_Controlling_Arg): Add checks for
1683 interface type conversions, that are expanded into dereferences.
1684
1685 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1686
1687 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1688 Examine the parameter and return profile of a subprogram and swap
1689 any incomplete types coming from a limited context with their
1690 corresponding non-limited views.
1691 (Exchange_Limited_Views): New routine.
1692
1693 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1694
1695 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
1696 of internal entity to the subtype declaration, so that when
1697 entities are subsequently exchanged in a package body, the tree
1698 remains properly formatted for ASIS.
1699
1700 2011-09-05 Johannes Kanig <kanig@adacore.com>
1701
1702 * g-comlin.adb (Set_Usage): Additional optional argument to set help
1703 message.
1704 (Display_Help): display the user given help message, if available.
1705
1706 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1707
1708 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
1709 is legal if the original node is an identifier that is a
1710 parameterless function call.
1711
1712 2011-09-05 Pascal Obry <obry@adacore.com>
1713
1714 * prj-nmsc.adb: Minor reformatting.
1715 Add support for standalone aggregate library.
1716 (Check_Stand_Alone_Library): Handle standalone aggregate library.
1717 * projects.texi: Fix documentation for aggregate library projects.
1718
1719 2011-09-05 Robert Dewar <dewar@adacore.com>
1720
1721 * sem_ch6.adb: Minor reformatting.
1722
1723 2011-09-05 Matthew Gingell <gingell@adacore.com>
1724
1725 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
1726 stack guard page on PPC Linux. This patch ensures the 64K guard page at
1727 the bottom of the stack is not overwritten.
1728
1729 2011-09-05 Thomas Quinot <quinot@adacore.com>
1730
1731 * exp_intr.adb, s-tasini.adb: Minor reformatting.
1732
1733 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1734
1735 * sem_ch3.adb (Access_Definition): If an access type declaration
1736 appears in a child unit, the scope of whatever anonymous type
1737 may be generated is the child unit itself.
1738
1739 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1740
1741 * sem_ch6.adb (Analyze_Expression_Function): Do not set
1742 Comes_From_Source on rewritten body.
1743 (Analyze_Subprogram_Body_Helper): Check that the original node for
1744 the body comes from source, when determining whether expansion
1745 of a protected operation is needed.
1746
1747 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1748
1749 * exp_aggr.adb (Replace_Type): If the target of the assignment is
1750 a selected component and the right-hand side is a self-referential
1751 access, the proper prefix of the rewritten attribute is a copy
1752 of the left-hand side, not of its prefix.
1753
1754 2011-09-05 Robert Dewar <dewar@adacore.com>
1755
1756 * sem_ch5.adb: Minor reformatting.
1757 * sem_ch3.adb: Minor code clean up.
1758
1759 2011-09-05 Jose Ruiz <ruiz@adacore.com>
1760
1761 * exp_ch9.adb (Make_Initialize_Protection): The fact that
1762 restriction No_Dynamic_Attachment is in effect or not should
1763 not influence the default priority associated to a protected
1764 object. With this change, when the restriction is in effect (as
1765 is the case for the Ravenscar profile) the default priority of
1766 a protected object with an interrupt handler is in the range of
1767 interrupt priorities (Default_Interrupt_Priority) as required
1768 by D.3(10).
1769
1770 2011-09-05 Arnaud Charlet <charlet@adacore.com>
1771
1772 * a-iteint.ads: Fix header.
1773
1774 2011-09-05 Vincent Celier <celier@adacore.com>
1775
1776 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
1777 with a directory separator to avoid output such as:
1778 "/path/to/objauto.cgpr" has been deleted.
1779
1780 2011-09-05 Robert Dewar <dewar@adacore.com>
1781
1782 * sem_ch3.adb: Minor reformatting.
1783
1784 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1785
1786 * sem_ch5.adb: Better error message.
1787
1788 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1789
1790 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
1791 (Expand_Array_Aggregate): Detect a special case of an aggregate
1792 which contains tasks in the context of an unexpanded return
1793 statement of a build-in-place function.
1794 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
1795 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
1796 which contains tasks and expand it now that the original simple
1797 return statement has been rewritten.
1798 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
1799 reformatting. Do not create a chain for an extended return
1800 statement if one is already available.
1801 (Has_Activation_Chain): New routine.
1802
1803 2011-09-05 Marc Sango <sango@adacore.com>
1804
1805 * sem_ch3.adb (Analyze_Object_Declaration): Remove
1806 the wrong test and add the correct test to detect the violation
1807 of illegal use of unconstrained string type in SPARK mode.
1808
1809 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1810
1811 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
1812 message on an iterator over an array.
1813
1814 2011-09-05 Robert Dewar <dewar@adacore.com>
1815
1816 * lib-xref-alfa.adb: Minor reformatting.
1817
1818 2011-09-05 Robert Dewar <dewar@adacore.com>
1819
1820 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
1821 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
1822
1823 2011-09-05 Gary Dismukes <dismukes@adacore.com>
1824
1825 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
1826
1827 2011-09-05 Johannes Kanig <kanig@adacore.com>
1828
1829 * lib-xref-alfa.adb: Update comments.
1830
1831 2011-09-05 Thomas Quinot <quinot@adacore.com>
1832
1833 * sem_res.adb: Minor reformatting
1834
1835 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1836
1837 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
1838 present, create them now. Needed in case the return type was
1839 a limited view in the function declaration.
1840 (Make_Build_In_Place_Call_In_Allocator): If return type contains
1841 tasks, build the activation chain for it. Pass a reference to
1842 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
1843 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
1844 with build_in_place calls.
1845 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
1846 incomplete, inatialize its Corresponding_Record_Type component.
1847 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
1848 of limited views.
1849
1850 2011-09-05 Johannes Kanig <kanig@adacore.com>
1851
1852 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
1853 information.
1854
1855 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1856
1857 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
1858 appears within a package specification and the token after "IS"
1859 is not a parenthesis, assume that this is an unparenthesized
1860 expression function, even if the token appears in a line by
1861 itself.
1862 * par.adb: Clarify use of Labl field of scope stack in error
1863 recovery.
1864
1865 2011-09-05 Bob Duff <duff@adacore.com>
1866
1867 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
1868 conversions instead of normal type conversions in all cases where a
1869 type conversion would be illegal. In particular, use unchecked
1870 conversions when the operand types are private.
1871
1872 2011-09-05 Johannes Kanig <kanig@adacore.com>
1873
1874 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
1875 objects of task type or protected type.
1876
1877 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1878
1879 * sem_ch6.adb (Analyze_Expression_Function): If the expression
1880 function comes from source, indicate that so does its rewriting,
1881 so it is compatible with any subsequent expansion of the
1882 subprogram body (e.g. when it is a protected operation).
1883 * sem_ch4.adb: minor reformatting
1884
1885 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1886
1887 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
1888 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
1889 may lead to wrong ancestor package in the case of instantiated subunit
1890 bodies. If a subunit is instantiated, follow the chain of instantiations
1891 rather than the stub structure.
1892
1893 2011-09-02 Robert Dewar <dewar@adacore.com>
1894
1895 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1896 * gcc-interface/Make-lang.in: Update dependencies.
1897
1898 2011-09-02 Marc Sango <sango@adacore.com>
1899
1900 * sem_ch3.adb (Analyze_Object_Declaration): Change
1901 comment and add additional check to differentiate constant of
1902 type string from others unconstrained type.
1903
1904 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1905
1906 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
1907 present in incomplete type declarations to refine the error
1908 message the full declaration is in the same unit.
1909 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
1910 an incomplete type, set the Premature_Use for additional message.
1911 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
1912 and Premature_Use is set, place additional information at the
1913 point of premature use.
1914
1915 2011-09-02 Bob Duff <duff@adacore.com>
1916
1917 * sem_ch6.adb: (Check_Post_State): Suppress warning
1918 "postcondition refers only to pre-state" when the expression has not
1919 yet been analyzed, because it causes false alarms. This can happen when
1920 the postcondition contains a quantified expression, because those are
1921 analyzed later. This is a temporary/partial fix.
1922 (Process_Post_Conditions): Minor: change wording of warning.
1923
1924 2011-09-02 Marc Sango <sango@adacore.com>
1925
1926 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
1927 illegal use of unconstrained string type in SPARK mode.
1928 * sem_res.adb (Analyze_Operator_Symbol): Set the
1929 right place where the string operand of concatenation should be
1930 violate in SPARK mode.
1931
1932 2011-09-02 Robert Dewar <dewar@adacore.com>
1933
1934 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
1935 exp_ch3.adb: Minor reformatting.
1936
1937 2011-09-02 Vincent Celier <celier@adacore.com>
1938
1939 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
1940 as the compiler driver so Is_Compilable returns True for sources.
1941 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
1942 for the body.
1943
1944 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1945
1946 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
1947 condition, a reference to a controlling formal must be interpreted
1948 as having the class-wide type (or an access to such) so that the
1949 inherited condition can be properly applied to any overriding
1950 operation (see ARM12 6.6.1 (7)).
1951
1952 2011-09-02 Tristan Gingold <gingold@adacore.com>
1953
1954 * init.c (__gnat_is_vms_v7): Fix case and add prototype
1955 for LIB$GETSYI.
1956
1957 2011-09-02 Javier Miranda <miranda@adacore.com>
1958
1959 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
1960 initializing expression of a class-wide interface object declaration
1961 if its type is limited.
1962
1963 2011-09-02 Johannes Kanig <kanig@adacore.com>
1964
1965 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
1966 literals, take into account the type name; the type is *not*
1967 the scope for an enumeration literal.
1968
1969 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1970
1971 * sem_ch6.adb (Check_Overriding_Indicator): add special check
1972 to reject an overriding indicator on a user-defined Adjust
1973 subprogram for a limited controlled type.
1974
1975 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1976
1977 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
1978 for an actual that is a function call returning an unconstrained
1979 limited controlled type.
1980
1981 2011-09-02 Tristan Gingold <gingold@adacore.com>
1982
1983 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
1984
1985 2011-09-02 Johannes Kanig <kanig@adacore.com>
1986
1987 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
1988 from "HEAP" to __HEAP Change comment that refers to that variable
1989 * put_alfa.adb: Change comment that refers to that variable
1990
1991 2011-09-02 Robert Dewar <dewar@adacore.com>
1992
1993 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
1994
1995 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1996
1997 * exp_util.adb (Extract_Renamed_Object): Renamed to
1998 Find_Renamed_Object. This routine has been reimplemented and now uses
1999 tree traversal to locate a renamed object.
2000 (Is_Aliased): Replace call to Extract_Renamed_Object with
2001 Find_Renamed_Object.
2002
2003 2011-09-02 Tristan Gingold <gingold@adacore.com>
2004
2005 * init.c: (__gnat_is_vms_v7): New function.
2006
2007 2011-09-02 Olivier Hainque <hainque@adacore.com>
2008
2009 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2010 that have a misaligned backchain, necessarily bogus.
2011
2012 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2013
2014 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2015 TSS routine Finalize_Address when compiling in Alfa mode.
2016 (Expand_Freeze_Record_Type): Do not create TSS routine
2017 Finalize_Address when compiling in Alfa mode.
2018 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2019 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2020 not built.
2021 (Expand_N_Allocator): Do not produce a call to
2022 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2023 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2024 produce a call to primitive Set_Finalize_Address in Alfa mode because
2025 Finalize_Address is not built.
2026 * exp_ch7.adb (Build_Finalization_Master): Do not create
2027 finalization masters in Afa mode since they are not needed.
2028 (Build_Finalizer): Do not create scope and library-level
2029 finalizers in Alfa mode since they are not needed.
2030 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2031 "new" and "free" when applied to controlled objects in Alfa mode since
2032 this is not needed.
2033
2034 2011-09-02 Vincent Celier <celier@adacore.com>
2035
2036 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2037 only library names with the syntax of Ada identifiers, to avoid errors
2038 when compiling the binder generated files.
2039 * projects.texi: Document restriction on SAL library names
2040
2041 2011-09-02 Thomas Quinot <quinot@adacore.com>
2042
2043 * a-chtgbo.adb: Minor comment fix.
2044
2045 2011-09-02 Robert Dewar <dewar@adacore.com>
2046
2047 * lib-xref.adb: Minor reformatting
2048
2049 2011-09-02 Vincent Celier <celier@adacore.com>
2050
2051 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2052 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2053 --version and --help in usage.
2054 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2055
2056 2011-09-02 Bob Duff <duff@adacore.com>
2057
2058 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2059 compilers don't understand it.
2060
2061 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2062
2063 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2064 underlying subtype rather than its base type on the call to
2065 Build_Record_Or_Elementary_Input_Function, so that any
2066 constraints on a discriminated subtype will be available for
2067 doing the check required by AI05-0192.
2068 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2069 If the prefix subtype of the 'Input attribute is a constrained
2070 discriminated subtype, then check each constrained discriminant value
2071 against the corresponding value read from the stream.
2072
2073 2011-09-02 Yannick Moy <moy@adacore.com>
2074
2075 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2076 warnings on suspicious contracts, and enable them with -gnatwa.
2077
2078 2011-09-02 Robert Dewar <dewar@adacore.com>
2079
2080 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2081 reformatting.
2082
2083 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2084
2085 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2086 which ensure that restriction No_Dynamic_Attachment has not been
2087 violated.
2088 (Make_Initialize_Protection): Protected types with attach or
2089 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2090 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2091 which ensures that restriction No_Dynamic_Attachment has not been
2092 violated.
2093 * sem_attr.adb: (Eval_Attribute): Transform
2094 VAX_Float_Type'First and 'Last into references to
2095 the temporaries which store the corresponding bounds. The
2096 transformation is needed since the back end cannot evaluate
2097 'First and 'Last on VAX.
2098 (Is_VAX_Float): New routine.
2099
2100 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2101
2102 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2103 generic unit is not intrinsic and has an explicit convention,
2104 the instance inherits it.
2105
2106 2011-09-02 Robert Dewar <dewar@adacore.com>
2107
2108 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2109 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2110
2111 2011-09-02 Thomas Quinot <quinot@adacore.com>
2112
2113 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2114 Guard against a prefix that is an N_Has_Entity but has no
2115 associated entity.
2116
2117 2011-09-02 Yannick Moy <moy@adacore.com>
2118
2119 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2120 references.
2121
2122 2011-09-02 Yannick Moy <moy@adacore.com>
2123
2124 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2125 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2126 contracts.
2127 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2128 procedure looking for suspicious postconditions.
2129 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2130 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2131 options -gnatw.t and -gnatw.T.
2132
2133 2011-09-02 Pascal Obry <obry@adacore.com>
2134
2135 * prj.adb: Minor code refactoring. Move check for null project in
2136 Project_Changed.
2137 * projects.texi: Fix minor typos.
2138
2139 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2140
2141 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2142 of iteration is an expression, its value must be captured in a
2143 renaming declaration, so that modification of the elements is
2144 propagated to the original container.
2145
2146 2011-09-02 Pascal Obry <obry@adacore.com>
2147
2148 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2149 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2150 prj-tree.adb: Minor reformatting and style fixes.
2151
2152 2011-09-02 Robert Dewar <dewar@adacore.com>
2153
2154 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2155 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2156 No_Implicit_Aliasing
2157 (Analyze_Attribute, case Address): ditto
2158 (Analyze_Attribute, case Unrestricted_Access): ditto
2159 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2160 No_Implicit_Aliasing restriction.
2161 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2162
2163 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2164
2165 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2166 is an unchecked conversion, apply test to its expression.
2167
2168 2011-09-02 Javier Miranda <miranda@adacore.com>
2169
2170 * sem_ch3.adb (Check_Abstract_Overriding): When
2171 traversing the chain of aliased subprograms avoid reporting a
2172 redundant error on the current entity.
2173
2174 2011-09-02 Sergey Rybin <rybin@adacore.com>
2175
2176 * gnat_ugn.texi: Minor clean up.
2177
2178 2011-09-02 Bob Duff <duff@adacore.com>
2179
2180 * s-htable.adb (Set_If_Not_Present): Use renaming
2181 instead of ":=", because the type Key is limited in the generic (even
2182 if not in the instances).
2183
2184 2011-09-02 Robert Dewar <dewar@adacore.com>
2185
2186 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2187 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2188 reformatting.
2189
2190 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2191
2192 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2193 inherited component with the enclosing derived type. Code reformatting.
2194
2195 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2196
2197 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2198 return done when overflow checks are enabled, since comparisons against
2199 Lor and Hir should not be done when OK1 is False.
2200
2201 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2202
2203 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2204 Add new formal Master_Exp. When present, add that expression to the
2205 call as an extra actual.
2206 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2207 Fmaster_Actual and in the case of a BIP call initializing a return
2208 object of an enclosing BIP function set it to a
2209 new reference to the implicit finalization master
2210 formal of the enclosing function. Fmaster_Actual is
2211 then passed to the new formal Master_Exp on the call to
2212 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2213 initializations of Enclosing_Func to its declaration.
2214
2215 2011-09-02 Thomas Quinot <quinot@adacore.com>
2216
2217 * csets.ads: Minor reformatting
2218
2219 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2220
2221 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2222 the full view of a private type coming from an instantiation.
2223 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2224 loop to iterate over the declarations rather than use the
2225 First_Entity / Next_Entity scheme.
2226
2227 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2228
2229 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2230 X'range (N) into X'First (N) .. X'Last (N), do not share the
2231 dimension indicator N, if present. Even though it is a static
2232 constant, its source location may be modified when printing
2233 expanded code under -gnatDL, and node sharing will lead to chaos
2234 in Sprint on large files, by generating a sloc value that does
2235 not correspond to any source file.
2236
2237 2011-09-02 Bob Duff <duff@adacore.com>
2238
2239 * einfo.adb: (Has_Xref_Entry): Do not call
2240 Implementation_Base_Type. Lib.Xref has been
2241 rewritten to avoid the need for it, and it was costly.
2242 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2243 functions in support of efficient xref.
2244 * lib-xref-alfa.adb: Misc changes related to Key component of
2245 type Xref_Entry.
2246 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2247 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2248 no longer does. This is the one place where it is needed.
2249
2250 2011-09-02 Johannes Kanig <kanig@adacore.com>
2251
2252 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2253 similar interface as the other Getopt function.
2254
2255 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2256
2257 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2258 a call to Set_Finalize_Address if there is no allocator available.
2259 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2260 a case of allocator expansion where the allocator is not expanded but
2261 needs a custom allocate routine. Code reformatting.
2262 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2263 Ren_Obj. Code reformatting.
2264 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2265 through the use of 'reference.
2266 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2267 as part of build-in-place expansion. They are intentionally marked as
2268 coming from source, but their parents are not.
2269
2270 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2271
2272 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2273 is the generated subprogram declaration for a child unit body
2274 that acts as spec, use the original body in the with_clause,
2275 to prevent binding errors.
2276
2277 2011-09-02 Vincent Celier <celier@adacore.com>
2278
2279 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2280 qualifier /MULTI_UNIT_INDEX=
2281
2282 2011-09-02 Johannes Kanig <kanig@adacore.com>
2283
2284 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2285 instead of calling the callback function
2286
2287 2011-09-02 Robert Dewar <dewar@adacore.com>
2288
2289 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2290 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2291
2292 2011-09-02 Vincent Celier <celier@adacore.com>
2293
2294 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2295 explicitly declared in an extending project, do not warn if a source
2296 for an inherited naming exception is not found.
2297
2298 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2299
2300 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2301 expansion is inactive.
2302
2303 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2304
2305 * sem_util.adb (Note_Possible_Modification): If the entity
2306 being modified is the renaming generated for an Ada2012 iterator
2307 element, the enclosing container or array is modified as well.
2308
2309 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2310
2311 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2312 Initialize): Define and initialize the
2313 mutex attributes and condition variable attributes locally.
2314
2315 2011-09-02 Vincent Celier <celier@adacore.com>
2316
2317 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2318 exception replaced in an extending project.
2319 (Check_Object): No error when the other source is locally removed.
2320
2321 2011-09-02 Yannick Moy <moy@adacore.com>
2322
2323 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2324 unresolved calls.
2325
2326 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2327
2328 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2329 run-time files.
2330 * gcc-interface/Make-lang.in: Update dependencies.
2331
2332 2011-09-01 Robert Dewar <dewar@adacore.com>
2333
2334 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2335
2336 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2337
2338 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2339 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2340 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2341 specific for systems where their glibc version does not define the
2342 routines to handle dynamically allocated CPU sets.
2343
2344 2011-09-01 Vincent Celier <celier@adacore.com>
2345
2346 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2347 prj-env.adb: Implement inheritance of naming exceptions in extending
2348 projects.
2349
2350 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2351
2352 * gnatls.adb: Display simple message instead of content of
2353 gnatlic.adl.
2354
2355 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2356
2357 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2358 access discriminant and anonymous access component scopes.
2359 (Inherit_Component): Reuse the itype of an access discriminant
2360 or anonymous access component by copying it in order to set the proper
2361 scope. This is done only when the parent and the derived type
2362 are in different scopes.
2363 (Set_Anonymous_Etype): New routine.
2364
2365 2011-09-01 Robert Dewar <dewar@adacore.com>
2366
2367 * a-convec.adb: Minor reformatting throughout.
2368
2369 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2370
2371 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2372 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2373 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2374 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2375 CPU_SET_S respectively because we are now using dynamically allocated
2376 CPU sets which are more portable across different glibc versions.
2377 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2378 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2379 masks dynamically according to the number of processors in the target
2380 platform.
2381 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2382 respectively, so we need to pass the size of the masks as
2383 parameters.
2384 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2385 created cpu_set_t masks
2386 with the number of processors available in the target platform,
2387 instead of static bit arrays. It enhances portability because
2388 it uses the information from the target platform.
2389 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2390 are using a restricted run-time library, use the flag
2391 Configurable_Run_Time_Mode instead of Restricted_Profile.
2392
2393 2011-09-01 Vincent Celier <celier@adacore.com>
2394
2395 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2396 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2397
2398 2011-09-01 Nicolas Roche <roche@adacore.com>
2399
2400 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2401 on VxWorks in kernel mode.
2402
2403 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2404
2405 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2406 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2407 directly the bit array.
2408 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2409 the linux macros with the same name.
2410 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2411 wrappers around the CPU_ZERO and CPU_SET linux macros.
2412
2413 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2414
2415 * exp_ch7.adb (Find_Insertion_List): Removed.
2416 (Process_Transient_Objects): Insert the declarations of the hook
2417 access type and the hook object before the associated transient object.
2418
2419 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2420
2421 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2422 package System.Aux_Dec when using restricted run-time libraries which
2423 do not have this package.
2424
2425 2011-09-01 Tristan Gingold <gingold@adacore.com>
2426
2427 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2428
2429 2011-09-01 Bob Duff <duff@adacore.com>
2430
2431 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2432 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2433
2434 2011-09-01 Thomas Quinot <quinot@adacore.com>
2435
2436 * exp_ch5.adb: Minor reformatting
2437 * gnat_ugn.texi: Fix minor typos.
2438 * gcc-interface/Make-lang.in: Update dependencies.
2439
2440 2011-09-01 Robert Dewar <dewar@adacore.com>
2441
2442 * inline.adb, sem_aggr.adb: Minor reformatting.
2443
2444 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2445
2446 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2447
2448 2011-09-01 Robert Dewar <dewar@adacore.com>
2449
2450 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2451
2452 2011-09-01 Bob Duff <duff@adacore.com>
2453
2454 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2455 body" the same as "in inlined body", because visibility shouldn't
2456 apply there.
2457
2458 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2459
2460 * inline.adb (Add_Inlined_Body): Refine previous change.
2461
2462 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2463
2464 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2465 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2466 Test for case where call
2467 initializes an object of a return statement before testing for
2468 a constrained call, to ensure that all such cases get handled
2469 by simply passing on the caller's parameters. Also, in that
2470 case call Needs_BIP_Alloc_Form to determine whether to pass on
2471 the BIP_Alloc_Form parameter of the enclosing function rather
2472 than testing Is_Constrained. Add similar tests for the return
2473 of a BIP call to later processing to ensure consistent handling.
2474 (Needs_BIP_Alloc_Form): New utility function.
2475 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2476 a BIP_Alloc_Form formal with call to new utility function
2477 Needs_BIP_Alloc_Form.
2478
2479 2011-09-01 Pascal Obry <obry@adacore.com>
2480
2481 * prj-part.adb: Minor reformatting.
2482
2483 2011-09-01 Vincent Celier <celier@adacore.com>
2484
2485 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2486 half character in the unit name.
2487
2488 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2489
2490 * exp_ch4.adb: Minor code and comment reformatting.
2491
2492 2011-09-01 Thomas Quinot <quinot@adacore.com>
2493
2494 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2495 for Is_Limited_Type and Is_Tagged_Type in condition checking
2496 for by-reference type.
2497 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2498 subprograms may have a completion because of a previous
2499 Inline_Always clause, but the enclosing package must be marked
2500 inlined for the subprogram body to become visible to the backend.
2501
2502 2011-09-01 Thomas Quinot <quinot@adacore.com>
2503
2504 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2505
2506 2011-09-01 Pascal Obry <obry@adacore.com>
2507
2508 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2509
2510 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2511
2512 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2513 the formals of a subprogram stub that acts as a spec.
2514
2515 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2516
2517 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2518 type, declare a renaming for it, not an object declaration.
2519
2520 2011-09-01 Yannick Moy <moy@adacore.com>
2521
2522 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2523 Ignore_Errors to ignore failures to read ALI files when True.
2524
2525 2011-09-01 Javier Miranda <miranda@adacore.com>
2526
2527 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2528 constructor calls associated with non-tagged record types.
2529
2530 2011-09-01 Robert Dewar <dewar@adacore.com>
2531
2532 * g-socthi-vms.adb: Minor reformatting.
2533
2534 2011-09-01 Nicolas Roche <roche@adacore.com>
2535
2536 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2537 in order to avoid impact of imcompatible changes.
2538 * cstreams.c: Likewise
2539 * cio.c: Likewise
2540 * aux-io.c: Likewise
2541
2542 2011-09-01 Yannick Moy <moy@adacore.com>
2543
2544 * lib-writ.adb (Write_With_Lines): Always output complete information
2545 on "with" line in Alfa mode, as this is required by formal verification
2546 back-end.
2547
2548 2011-09-01 Tristan Gingold <gingold@adacore.com>
2549
2550 * g-socthi-vms.adb: Add comments.
2551
2552 2011-09-01 Pascal Obry <obry@adacore.com>
2553
2554 * prj.ads: Minor reformatting.
2555
2556 2011-09-01 Vincent Celier <celier@adacore.com>
2557
2558 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2559 exceptions in the config pragmas file.
2560
2561 2011-09-01 Tristan Gingold <gingold@adacore.com>
2562
2563 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2564
2565 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2566
2567 * exp_ch7.adb (Find_Insertion_List): New routine.
2568 (Process_Transient_Objects): Add code to handle the abnormal
2569 finalization of a controlled transient associated with a subprogram
2570 call. Since transients are cleaned up right after the associated
2571 context, an exception raised during a subprogram call may bypass the
2572 finalization code.
2573
2574 2011-09-01 Robert Dewar <dewar@adacore.com>
2575
2576 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2577 aliased.
2578
2579 2011-09-01 Robert Dewar <dewar@adacore.com>
2580
2581 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2582
2583 2011-09-01 Robert Dewar <dewar@adacore.com>
2584
2585 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2586
2587 2011-09-01 Thomas Quinot <quinot@adacore.com>
2588
2589 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2590 GNATRTL_NONTASKING_OBJS.
2591
2592 2011-09-01 Robert Dewar <dewar@adacore.com>
2593
2594 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2595 possibility of this flag being set for formals in Ada 2012 mode.
2596 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2597 2012.
2598 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2599 mode.
2600 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2601 Ada 2012.
2602 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2603 Ada 2012.
2604
2605 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2606
2607 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2608 insertion node in a tree of nested Expression_With_Actions nodes.
2609 (Process_Transient_Object): In the case where a complex if statement
2610 has been converted into nested Expression_With_Actions nodes, the
2611 "hook" object and the associated access type must be inserted before
2612 the top most Expression_With_Actions.
2613
2614 2011-09-01 Robert Dewar <dewar@adacore.com>
2615
2616 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
2617 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
2618
2619 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2620
2621 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
2622
2623 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2624
2625 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
2626 aspect.
2627 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
2628 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
2629 in a similar way as we do for the Priority or Dispatching_Domain aspect.
2630 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
2631 Dispatching_Domains_Frozen): Move this local data to package
2632 System.Tasking because with the CPU aspect we need to have access
2633 to this data when creating the task in System.Tasking.Stages.Create_Task
2634 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
2635 Move these variables from the body of
2636 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
2637 we need to have access to this data when creating the task in
2638 System.Tasking.Stages.Create_Task.
2639 * s-taskin.adb (Initialize): Signal the allocation of the environment
2640 task to a CPU, if any, so that we know whether the CPU can be
2641 transferred to a different dispatching domain.
2642 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
2643 is being allocated belongs to the dispatching domain where the task
2644 lives. Signal the allocation of the task to a CPU, if any, so that we
2645 know whether the CPU can be transferred to a different dispatching
2646 domain.
2647
2648 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2649
2650 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
2651 attributes Same_Storage and Overlaps_Storage.
2652
2653 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2654
2655 * exp_strm.adb: Remove with and use clause for Opt.
2656 (Build_Array_Input_Function): Remove the version-dependent generation
2657 of the return statement. The Ada 2005 tree is now the default.
2658
2659 2011-09-01 Yannick Moy <moy@adacore.com>
2660
2661 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
2662 it is never empty when compiling in Alfa mode.
2663
2664 2011-09-01 Robert Dewar <dewar@adacore.com>
2665
2666 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
2667 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
2668 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
2669 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
2670
2671 2011-09-01 Matthew Heaney <heaney@adacore.com>
2672
2673 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
2674 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
2675 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
2676 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
2677 unbounded queue container.
2678 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
2679 bounded queue container.
2680 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
2681 unbounded priority queue container.
2682 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
2683 bounded priority queue container.
2684
2685 2011-08-31 Pascal Obry <obry@adacore.com>
2686
2687 * a-direct.adb: Do not try to create an UNC path on Windows.
2688 (Create_Path): Skip leading computer name in UNC path if any.
2689
2690 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2691
2692 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
2693 version-dependent generation of the return statement. The Ada 2005 tree
2694 is now the default.
2695
2696 2011-08-31 Thomas Quinot <quinot@adacore.com>
2697
2698 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
2699 types Stream_Element_Offset and Storage_Offset have a different native
2700 type depending on whether the platform is 32 or 64 bits. When
2701 exchanging them, always convert to 64 bits.
2702
2703 2011-08-31 Yannick Moy <moy@adacore.com>
2704
2705 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
2706 --force-alfa to gnat2why.
2707
2708 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2709
2710 * sem_ch12.adb (Save_References): If the node has aspects, save
2711 references within the corresponding expressions in a separate step,
2712 because the aspects are not directly in the tree for the declaration
2713 to which they belong.
2714
2715 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2716
2717 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
2718 in CodePeer mode, since representation clauses are partially ignored.
2719 * gcc-interface/Make-lang.in: Update dependencies.
2720
2721 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2722
2723 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2724 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
2725 to any dispatching domain.
2726
2727 2011-08-31 Thomas Quinot <quinot@adacore.com>
2728
2729 * exp_ch4.adb: Minor reformatting.
2730
2731 2011-08-31 Bob Duff <duff@adacore.com>
2732
2733 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
2734 on nodes for which it is not defined.
2735 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
2736 parent type.
2737
2738 2011-08-31 Bob Duff <duff@adacore.com>
2739
2740 * sem_ch3.adb (Process_Full_View): Disable legality check if
2741 In_Instance, to avoid spurious errors.
2742 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
2743 if In_Instance, to avoid spurious errors.
2744
2745 2011-08-31 Pascal Obry <obry@adacore.com>
2746
2747 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
2748 directory speparators.
2749 (Compose): Use Dir_Seps to handle both forms.
2750 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
2751 changes.
2752 (Extension): Use Dir_Seps to handle both forms.
2753
2754 2011-08-31 Pascal Obry <obry@adacore.com>
2755
2756 * prj-conf.adb: Minor reformatting.
2757
2758 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2759
2760 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
2761 dispatching domain aspect.
2762 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
2763 aspect.
2764 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
2765 Dispatching_Domain aspect in a similar way as we do for the Priority
2766 aspect.
2767 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
2768 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
2769 is present.
2770 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
2771 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
2772 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
2773 Dispatching_Domain and add it to the task definition.
2774 (Sig_Flags): Add Pragma_Dispatching_Domain.
2775 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
2776 support to find the types Dispatching_Domain and
2777 Dispatching_Domain_Access.
2778 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
2779 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
2780 query the availability of a pragma Dispatching_Domain.
2781 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
2782 the expander to pass the Dispatching_Domain when creating a task.
2783 (Name_Dispatching_Domain): Add this new name for a pragma.
2784 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
2785 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
2786 task has been allocated at creation time.
2787 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
2788 Ravenscar is always null.
2789 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
2790 the task has been allocated at creation time.
2791 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
2792 a specific dispatching domain.
2793 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
2794 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
2795 and CPU are specified for the task, and the CPU value is not contained
2796 within the range of processors for the domain.
2797
2798 2011-08-31 Vincent Celier <celier@adacore.com>
2799
2800 * make.adb (Original_Gcc) : New constant String_Access.
2801 (Gnatmake): For VM targets, do not use VM version of the compiler if
2802 --GCC= has been specified.
2803
2804 2011-08-31 Thomas Quinot <quinot@adacore.com>
2805
2806 * sem_ch5.adb: Minor reformatting.
2807
2808 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2809
2810 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
2811 not reanalyze it.
2812
2813 2011-08-31 Bob Duff <duff@adacore.com>
2814
2815 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
2816 the access type is private; we don't care about privacy in expansion.
2817
2818 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2819
2820 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
2821 subcomponents tnat may be limited, because they originate in view
2822 conflicts. If the original aggregate is legal and the actuals are
2823 legal, the aggregate itself is legal.
2824
2825 2011-08-31 Matthew Heaney <heaney@adacore.com>
2826
2827 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
2828 status.
2829
2830 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2831
2832 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
2833 errors in B tests.
2834
2835 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2836
2837 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
2838 Interrupt_Priority aspects, force the analysis of the aspect expression
2839 (when building the equivalent pragma). Otherwise, its analysis is done
2840 too late, after the task or protected object has been created.
2841 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
2842 Analyze_Single_Task_Declaration): Remove the code to move the aspects
2843 to the object declaration because they are needed in the type
2844 declaration.
2845
2846 2011-08-31 Robert Dewar <dewar@adacore.com>
2847
2848 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
2849 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
2850 reformatting.
2851
2852 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2853
2854 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
2855 if the corresponding type is malformed due to restriction violations.
2856
2857 2011-08-31 Robert Dewar <dewar@adacore.com>
2858
2859 * s-ransee.ads, s-ransee.adb: Minor reformatting.
2860
2861 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2862
2863 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
2864 would cause the generation of Set_Finalize_Address if the target is a
2865 VM and the designated type is not derived from [Limited_]Controlled.
2866
2867 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2868
2869 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
2870 subprogram.
2871 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
2872 case of a compilation error.
2873
2874 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2875
2876 * init.c (__gnat_error_handler): Standardize the stack overflow or
2877 erroneous memory access message.
2878 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
2879 or erroneous memory access message.
2880
2881 2011-08-31 Robert Dewar <dewar@adacore.com>
2882
2883 * sem_ch4.adb: Minor reformatting.
2884 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
2885
2886 2011-08-31 Thomas Quinot <quinot@adacore.com>
2887
2888 * scos.ads: Minor documentation clarification.
2889 * put_scos.adb: Do not generate SCO unit header line for a unit that
2890 has no SCO lines.
2891
2892 2011-08-31 Robert Dewar <dewar@adacore.com>
2893
2894 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
2895
2896 2011-08-31 Tristan Gingold <gingold@adacore.com>
2897
2898 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
2899 hold variables between these following subprograms.
2900 (Build_Exception_Handler, Build_Object_Declarations,
2901 Build_Raise_Statement): Use the above type as parameter.
2902 Make the above adjustments.
2903 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
2904
2905 2011-08-31 Pascal Obry <obry@adacore.com>
2906
2907 * projects.texi: Minor reformatting.
2908
2909 2011-08-31 Tristan Gingold <gingold@adacore.com>
2910
2911 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
2912 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
2913
2914 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2915
2916 * exp_ch5.adb: Minor code cleanup.
2917 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
2918 prevent cascaded errors.
2919 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
2920 variable of an iterator specification in current scope.
2921 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
2922 postconditions on the stack, as they contain no return statements.
2923
2924 2011-08-31 Yannick Moy <moy@adacore.com>
2925
2926 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
2927 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
2928 call Qualify_Entity_Names.
2929 (Expand_Alfa): call Qualify_Entity_Names in more cases
2930 * lib-xref-alfa.adb: Take into account system package.
2931 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
2932 CodePeer mode in which we are interested in finding bugs even if
2933 compiler cannot compile source.
2934 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
2935 deferred constant.
2936
2937 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2938
2939 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
2940 denoted by the subtype mark to ensure getting the concurrent type in
2941 the case where the subtype mark denotes a private subtype of a
2942 concurrent type (needed when using -gnatc).
2943 (Process_Subtype): For the processing specific to type kinds, case on
2944 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
2945 subtype denotes a private subtype whose base type is nonprivate (needed
2946 for subtypes of private fulfilled by task types when compiling with
2947 -gnatc).
2948
2949 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2950
2951 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
2952 late primitives that override interface operations when the full
2953 expander is not active, to avoid blowups in Register_Primitive when
2954 types don't have associated secondary dispatch tables.
2955
2956 2011-08-31 Yannick Moy <moy@adacore.com>
2957
2958 * alfa_test.adb: Code clean up.
2959
2960 2011-08-31 Marc Sango <sango@adacore.com>
2961
2962 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
2963 by Comes_From_Source (Original_Node (N)) in order to treat also the
2964 nodes which have been rewritten.
2965 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
2966 explicit dereference and slice violation in spark mode on the nodes
2967 coming only from the source code.
2968
2969 2011-08-31 Robert Dewar <dewar@adacore.com>
2970
2971 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
2972 lib-xref-alfa.adb: Minor reformatting.
2973
2974 2011-08-31 Matthew Heaney <heaney@adacore.com>
2975
2976 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
2977
2978 2011-08-31 Javier Miranda <miranda@adacore.com>
2979
2980 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
2981 only for class-wide subprograms conflicting with entities of concurrent
2982 tagged types.
2983
2984 2011-08-31 Matthew Heaney <heaney@adacore.com>
2985
2986 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
2987 node to null value.
2988
2989 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2990
2991 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
2992 general description of the routine.
2993
2994 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2995
2996 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
2997 doubly-linked lists.
2998
2999 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3000
3001 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3002 check is needed for a left-hand side that is a dereference, and the
3003 base type is private without discriminants (whereas the full type does
3004 have discriminants), an extra retrieval of the underlying type may be
3005 needed in the case where the subtype is a record subtype whose base
3006 type is private. Update comments.
3007
3008 2011-08-31 Javier Miranda <miranda@adacore.com>
3009
3010 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3011 found check if there is a class-wide subprogram covering the primitive.
3012
3013 2011-08-31 Yannick Moy <moy@adacore.com>
3014
3015 * sem_res.adb: Further cases where full expansion test is needed,
3016 rather than expansion test.
3017
3018 2011-08-31 Pascal Obry <obry@adacore.com>
3019
3020 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3021
3022 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3023
3024 * exp_ch5.adb: Handle iterators over derived container types.
3025
3026 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3027
3028 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3029 (Has_Anonymous_Master): New routine.
3030 (Set_Has_Anonymous_Master): New routine.
3031 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3032 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3033 (Current_Anonymous_Master): New routine.
3034 (Current_Unit_First_Declaration): Removed.
3035 (Current_Unit_Scope): Removed.
3036 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3037 their objects on a per-unit heterogeneous finalization master.
3038
3039 2011-08-31 Matthew Heaney <heaney@adacore.com>
3040
3041 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3042 array.
3043
3044 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3045
3046 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3047 when not needed.
3048
3049 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3050
3051 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3052 where the actual is an unexpanded call to 'Input.
3053
3054 2011-08-31 Yannick Moy <moy@adacore.com>
3055
3056 * sem_ch4.adb: Code clean up.
3057
3058 2011-08-31 Yannick Moy <moy@adacore.com>
3059
3060 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3061
3062 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3063
3064 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3065 and TSS primitive Finalize_Address if finalization is suppressed.
3066 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3067 primitive Finalize_Address if finalization is suppressed.
3068
3069 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3070
3071 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3072 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3073 sure that the underlying task has already been created before trying
3074 to change its affinity.
3075 (Set_CPU): Use the term processor instead of CPU, as we do in
3076 Assign_Task.
3077
3078 2011-08-31 Vincent Celier <celier@adacore.com>
3079
3080 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3081 * prj-nmsc.adb (Process_Compiler): Process attribute
3082 Source_File_Switches.
3083 * prj.ads (Language_Config): New name list component
3084 Name_Source_File_Switches.
3085 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3086
3087 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3088
3089 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3090 discriminated component of an actual, expand at once to prevent
3091 ouf-of-order references with generated subtypes.
3092
3093 2011-08-31 Yannick Moy <moy@adacore.com>
3094
3095 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3096 reference to operator in Alfa xrefs.
3097
3098 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3099
3100 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3101 where the parent instance was frozen before the current instance due to
3102 the presence of a source body. Update calls to Insert_After_Last_Decl.
3103 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3104 Update the comment which illustrates the purpose of the routine.
3105 Package instances are now frozen by source bodies which appear after
3106 the instance. This ensures that entities coming from within the
3107 instance are available for use in the said bodies.
3108 (Install_Body): Add code to handle the case where the parent instance
3109 was frozen before the current instance due to the presence of a source
3110 body. Update calls to Insert_After_Last_Decl.
3111
3112 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3113
3114 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3115 access types.
3116 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3117
3118 2011-08-31 Yannick Moy <moy@adacore.com>
3119
3120 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3121 full-expander test.
3122 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3123 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3124 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3125 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3126 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3127 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3128 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3129 ALFA in Alfa (we dropped acronym).
3130 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3131 operations in a case where it returned previously No_Elist.
3132
3133 2011-08-31 Robert Dewar <dewar@adacore.com>
3134
3135 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3136 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3137 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3138 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3139 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3140 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3141 reformatting.
3142
3143 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3144
3145 * sem_ch12 (Check_Private_View): Revert previous change.
3146 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3147 conversion is in a generic instance.
3148
3149 2011-08-31 Matthew Heaney <heaney@adacore.com>
3150
3151 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3152 * a-chtgbo.adb (Free): Allow 0 as index value.
3153
3154 2011-08-31 Matthew Heaney <heaney@adacore.com>
3155
3156 * a-cborma.adb (Insert): Add comment to explain why no element
3157 assignment.
3158
3159 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3160
3161 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3162 spec discriminant is already a concurrent type, in which case just use
3163 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3164
3165 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3166
3167 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3168 system-linux-mips.ads, system-linux-mipsel.ads,
3169 system-linux-mips64el.ads, system-linux-ppc64.ads,
3170 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3171
3172 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3173
3174 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3175 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3176 (build_unary_op): Likewise.
3177
3178 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3179
3180 * raise-gcc.c: Do not include coretypes.h and tm.h.
3181 (setup_to_install): Remove test for compiler macro.
3182 * targext.c: Document use for the library.
3183 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3184
3185 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3186
3187 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3188 the expression to the nominal type if the latter is a record type with
3189 a variant part and the type of the former is a record type without one.
3190
3191 2011-08-30 Yannick Moy <moy@adacore.com>
3192
3193 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3194 expansion in Alfa mode.
3195 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3196 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3197 Alfa mode.
3198 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3199 * sem_res.adb: Ditto.
3200 * gcc-interface/Make-lang.in: Update dependencies.
3201
3202 2011-08-30 Thomas Quinot <quinot@adacore.com>
3203
3204 * g-socket.ads: Minor documentation adjustment.
3205
3206 2011-08-30 Robert Dewar <dewar@adacore.com>
3207
3208 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3209
3210 2011-08-30 Yannick Moy <moy@adacore.com>
3211
3212 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3213 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3214 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3215 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3216 Revert change which introduced files for "light"
3217 expansion, to be replaced by a single file for Alfa expansion.
3218
3219 2011-08-30 Robert Dewar <dewar@adacore.com>
3220
3221 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3222 Minor code reorg/reformatting.
3223
3224 2011-08-30 Yannick Moy <moy@adacore.com>
3225
3226 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3227 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3228 used for testing full expansion, that is active expansion not in the
3229 reduced mode for Alfa
3230 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3231 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3232 of the verbose (Expander_Active and not ALFA_Mode)
3233
3234 2011-08-30 Tristan Gingold <gingold@adacore.com>
3235
3236 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3237 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3238 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3239 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3240
3241 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3242
3243 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3244 access conversions to check that the conversion is a rewritten node,
3245 rather than just having Comes_From_Source set to False, which wasn't
3246 sufficient.
3247
3248 2011-08-30 Robert Dewar <dewar@adacore.com>
3249
3250 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3251 g-socket.ads: Minor reformatting.
3252
3253 2011-08-30 Thomas Quinot <quinot@adacore.com>
3254
3255 * sem_util.adb: Minor reformatting.
3256
3257 2011-08-30 Tristan Gingold <gingold@adacore.com>
3258
3259 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3260 to be compliant with the ABI.
3261
3262 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3263
3264 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3265 of a designated type when the related access type is an actual in an
3266 instance. This ensures that the full view of designated type is
3267 available when inside the body of the instance.
3268
3269 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3270
3271 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3272 in a position to be modified, a slice is treated like an indexed
3273 component.
3274
3275 2011-08-30 Thomas Quinot <quinot@adacore.com>
3276
3277 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3278 field tv_sec in struct timeval.
3279
3280 2011-08-30 Yannick Moy <moy@adacore.com>
3281
3282 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3283 blocks of code doing full expansion, previously only guarded by
3284 Expander_Active, by anding the test that ALFA_Mode is not set
3285
3286 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3287
3288 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3289 add the function to the list of private dependents, for subsequent
3290 legality check on Taft amendment types.
3291 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3292 Private_Dependents, as for other incomplete types.
3293 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3294 Taft-amendment type is used as the return type of a function.
3295
3296 2011-08-30 Javier Miranda <miranda@adacore.com>
3297
3298 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3299 which emits an error by a call to a new routine which report the error.
3300 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3301 entity does not cover an existing interface.
3302 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3303 code.
3304 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3305 protected procedures or entries whose mode is not conformant.
3306 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3307 an error by a call to a new routine which report the error.
3308
3309 2011-08-30 Robert Dewar <dewar@adacore.com>
3310
3311 * gnat_rm.texi: Minor change.
3312 * exp_attr_light.adb: Minor reformatting.
3313
3314 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3315
3316 * sem_ch3.adb: Patch inheritance of aspects in
3317 Complete_Private_Subtype, to avoid infinite loop.
3318
3319 2011-08-30 Javier Miranda <miranda@adacore.com>
3320
3321 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3322 been reported and a subprogram covering an interface primitive is not
3323 found then skip generating the internal entity. Done to avoid crashing
3324 the frontend.
3325 (Check_Abstract_Overriding): Change text of error of wrong formal of
3326 protected subprogram or entry. Done for consistency to emit exactly the
3327 same error reported by Check_Synchronized_Overriding. In addition, the
3328 error is restricted to protected types (bug found working on AI05-0090)
3329
3330 2011-08-30 Yannick Moy <moy@adacore.com>
3331
3332 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3333 expansion in Alfa mode.
3334 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3335 * exp_light.adb, exp_light.ads: New package defining light expansion.
3336 * expander.adb (Expand): Call light expansion in Alfa mode
3337 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3338 constructs.
3339 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3340 constructs.
3341 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3342 * gnat1drv.adb (Adjust_Global_Switches): Comment
3343
3344 2011-08-30 Yannick Moy <moy@adacore.com>
3345
3346 * lib-xref-alfa.adb: Minor refactoring.
3347
3348 2011-08-30 Yannick Moy <moy@adacore.com>
3349
3350 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3351 mode.
3352 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3353 expansion in Alfa mode.
3354 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3355 mode.
3356
3357 2011-08-30 Robert Dewar <dewar@adacore.com>
3358
3359 * debug_a.adb: Update comment.
3360
3361 2011-08-30 Robert Dewar <dewar@adacore.com>
3362
3363 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3364 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3365 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3366 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3367
3368 2011-08-30 Robert Dewar <dewar@adacore.com>
3369
3370 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3371 volatile.
3372
3373 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3374
3375 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3376 Build_Finalization_Master by supplying an insertion node and enclosing
3377 scope. In its old version, the call did not generate a finalization
3378 master.
3379 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3380 recognize anonymous access-to-controlled components. Rewrite the
3381 machinery which creates finalization masters to service anonymous
3382 access-to-controlled components of a record type. In its current state,
3383 only one heterogeneous master is necessary to handle multiple anonymous
3384 components.
3385 (Freeze_Type): Comment reformatting.
3386 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3387 RE_Unit_Table.
3388 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3389 associates TSS primitive Finalize_Address with either the master itself
3390 or with the internal hash table depending on the mode of operation of
3391 the master.
3392
3393 2011-08-30 Javier Miranda <miranda@adacore.com>
3394
3395 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3396 interface type then do not generate code to compare this component.
3397 Required since they have no components and their equality operator is
3398 abstract.
3399
3400 2011-08-30 Steve Baird <baird@adacore.com>
3401
3402 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3403 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3404 returns the (static) accessibility level of the object. Otherwise, the
3405 same as Type_Access_Level.
3406 (Dynamic_Accessibility_Level): New function; given an expression which
3407 could occur as the rhs of an assignment to a saooaaat (i.e., an
3408 expression of an access-to-object type), return the new value for the
3409 saooaaat's associated Extra_Accessibility object.
3410 (Effective_Extra_Accessibility): New function; same as
3411 Einfo.Extra_Accessibility except that object renames are looked through.
3412 * sem_util.adb
3413 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3414 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3415 description.
3416 (Effective_Extra_Accessibility): New function; see sem_util.ads
3417 description.
3418 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3419 (Extra_Accessibility): Update comments.
3420 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3421 except RM_Size field (which is only for types) is unaffected.
3422 * einfo.adb
3423 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3424 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3425 formals.
3426 (Init_Size): Add assertion that we are not trashing the
3427 Extra_Accessibility attribute of an object.
3428 (Init_Size_Align): Add assertion that we are not trashing the
3429 Extra_Accessibility attribute of an object.
3430 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3431 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3432 differently for the type of a (non-library-level) saooaaat depending
3433 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3434 is queried in this set of changes - everything else (in particular,
3435 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3436 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3437 The special treatment of library-level saooaaats is an optimization,
3438 not required for correctnesss. This is based on the observation that the
3439 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3440 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3441 * exp_ch3.adb
3442 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3443 false for the type of a saooaaat, declare and initialize its
3444 accessibility level object and set the Extra_Accessibility attribute
3445 of the saooaaat to refer to this object.
3446 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3447 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3448 calls to Effective_Extra_Accessibility in order to support
3449 renames of saooaaats.
3450 (Expand_N_Type_Conversion): Add new local function,
3451 Has_Extra_Accessibility, and call it when determining whether an
3452 accessibility check is needed.
3453 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3454 evaluate to True (without raising an exception).
3455 * exp_ch5.adb
3456 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3457 saooaaat, update its associated Extra_Accessibility object (if
3458 it has one). This includes an accessibility check.
3459 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3460 a saooaaat, update its Extra_Accessibility object too (if it
3461 has one).
3462 (Expand_Call): Replace a couple of calls to Type_Access_Level
3463 with calls to Dynamic_Access_Level to handle cases where
3464 passing a literal (any literal) is incorrect.
3465 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3466 checks associated with "Saooaat := Some_Object'Access;"; this must
3467 be rejected if Some_Object is declared in a more nested scope
3468 than Saooaat.
3469 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3470 assignment to a saooaaat even if Is_Local_Anonymous_Access
3471 returns False for its type (indicating a 2012-style saooaaat).
3472 * sem_ch8.adb
3473 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3474 (which is only appropriate for objects, not types) with a call
3475 of Init_Object_Size_Align in order to avoid trashing the
3476 Extra_Accessibility attribute of a rename (the two attributes
3477 share storage).
3478 * sem_res.adb
3479 (Valid_Conversion) Replace six calls to Type_Access_Level with
3480 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3481 Ada2012 non-library-level saooaaat, the former returns library level
3482 while the latter returns the (static) accessibility level of the
3483 saooaaat. A type conversion to the anonymous type of a saooaaat
3484 can only occur as part of an assignment to the saooaaat, so we
3485 know that such a conversion must be in a lhs context, so Deepest
3486 yields the result that we need. If such a conversion could occur,
3487 say, as the operand of an equality operator, then this might not
3488 be right. Also add a test so that static accessibilty checks are
3489 performed for converting to a saooaaat's type even if
3490 Is_Local_Anonymous_Access yields False for the type.
3491
3492 2011-08-30 Javier Miranda <miranda@adacore.com>
3493
3494 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3495 controls generation of a warning associated with late declaration of
3496 dispatching functions. Required to avoid generating spurious
3497 warnings.
3498
3499 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3500
3501 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3502 return object has an anonymous access type and the function's type is
3503 a named access type.
3504 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3505 conversions on implicit conversions, since such conversions can occur
3506 for anonymous access cases due to expansion. Issue error for attempt
3507 to rename an anonymous expression as an object of a named access type.
3508 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3509 to indicate whether this function should report errors on invalid
3510 conversions.
3511 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3512 the expression is of an anonymous access type and the expected type is
3513 a named general access type, rewrite the expression as a type
3514 conversion, unless this is an expression of a membership test.
3515 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3516 calling of Error_Msg_N on new formal Report_Errs.
3517 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3518 calling of Error_Msg_NE on new formal Report_Errs.
3519 (Valid_Conversion): Move declaration of this function to the package
3520 spec, to allow calls from membership test processing. For Ada 2012,
3521 enforce legality restrictions on implicit conversions of anonymous
3522 access values to general access types, disallowing such conversions in
3523 cases where the expression has a dynamic accessibility level (access
3524 parameters, stand-alone anonymous access objects, or a component of a
3525 dereference of one of the first two cases).
3526 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3527 in the context of a named general access expected type.
3528 * exp_ch4.adb Add with and use of Exp_Ch2.
3529 (Expand_N_In): Add processing for membership tests applied to
3530 expressions of an anonymous access type. First, Valid_Conversion is
3531 called to check whether the test is statically False, and then the
3532 conversion is expanded to test that the expression's accessibility
3533 level is no deeper than that of the tested type. In the case of
3534 anonymous access-to-tagged types, a tagged membership test is applied
3535 as well.
3536 (Tagged_Membership): Extend to handle access type cases, applying the
3537 test to the designated types.
3538 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3539 accessibility level, and the actual is a 'Access applied to a current
3540 instance, pass the accessibility level of the type of the current
3541 instance rather than applying Object_Access_Level to the prefix. Add a
3542 ??? comment, since this level isn't quite right either (will eventually
3543 need to pass an implicit level parameter to init procs).
3544
3545 2011-08-30 Bob Duff <duff@adacore.com>
3546
3547 * s-taskin.ads: Minor comment fix.
3548
3549 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3550
3551 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3552 component and the selector is a dispatching operation, check if it is
3553 a prefixed call before rewriting as a parameterless function call.
3554
3555 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3556
3557 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3558 tsystem.h into $(RTSDIR) instead of rts.
3559
3560 2011-08-29 Robert Dewar <dewar@adacore.com>
3561
3562 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3563 reformatting.
3564 * gcc-interface/Make-lang.in: Update dependencies.
3565
3566 2011-08-29 Yannick Moy <moy@adacore.com>
3567
3568 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3569 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3570 table to hold dereferences.
3571 (Add_ALFA_Xrefs): Take into account dereferences as special
3572 reads/writes to the variable "HEAP".
3573 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3574 (Generate_Dereference): New procedure to store a read/write dereferencew
3575 in the table Drefs.
3576 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3577 the special "HEAP" var.
3578 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3579 in ALFA mode.
3580 * sem_util.adb (Note_Possible_Modification): Store write dereference
3581 in ALFA mode.
3582
3583 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3584
3585 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3586 ensures that the level of the subpool access type is not deeper than
3587 that of the pool object.
3588 * sem_util.adb (Object_Access_Level): Expand to handle defining
3589 identifiers.
3590 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3591 subpool handle name of a rewritten allocator.
3592
3593 2011-08-29 Robert Dewar <dewar@adacore.com>
3594
3595 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3596
3597 2011-08-29 Thomas Quinot <quinot@adacore.com>
3598
3599 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3600 values, we generate multiple triples of parameters in the TypeCode.
3601 Bump Choice_Index for each such triple so that a subsequent default
3602 choice is associated with the correct index in the typecode.
3603
3604 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3605
3606 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3607 container.
3608 (First, Last): Handle properly an iterator over a null container.
3609
3610 2011-08-29 Bob Duff <duff@adacore.com>
3611
3612 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
3613 processing if we run across a node with no Scope. This can happen if
3614 we're with-ing an library-level instance, and that instance got errors
3615 that caused "instantiation abandoned".
3616 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
3617 an exception instead of using Assert, so it won't go into an infinite
3618 loop, even when assertions are turned off.
3619
3620 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3621
3622 * a-coorse.adb: Proper handling of empty ordered sets.
3623
3624 2011-08-29 Johannes Kanig <kanig@adacore.com>
3625
3626 * debug.adb: Add comments.
3627
3628 2011-08-29 Thomas Quinot <quinot@adacore.com>
3629
3630 * a-except.adb, a-except-2005.adb: Minor comment rewording and
3631 reformatting.
3632
3633 2011-08-29 Yannick Moy <moy@adacore.com>
3634
3635 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
3636 declaration for Itypes in Alfa mode.
3637
3638 2011-08-29 Robert Dewar <dewar@adacore.com>
3639
3640 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
3641 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3642 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
3643 reformatting.
3644
3645 2011-08-29 Tristan Gingold <gingold@adacore.com>
3646
3647 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
3648 package spec.
3649 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
3650 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
3651 while raising PE.
3652
3653 2011-08-29 Robert Dewar <dewar@adacore.com>
3654
3655 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
3656
3657 2011-08-29 Javier Miranda <miranda@adacore.com>
3658
3659 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
3660 renamings of formal subprograms when the actual for a formal type is
3661 class-wide.
3662
3663 2011-08-29 Matthew Heaney <heaney@adacore.com>
3664
3665 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
3666 to Target.
3667
3668 2011-08-29 Matthew Heaney <heaney@adacore.com>
3669
3670 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
3671 components of record type.
3672 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
3673 to Target.
3674
3675 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3676
3677 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
3678 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
3679 container packages.
3680
3681 2011-08-29 Robert Dewar <dewar@adacore.com>
3682
3683 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
3684 reformatting.
3685
3686 2011-08-29 Matthew Heaney <heaney@adacore.com>
3687
3688 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
3689 components of record type.
3690
3691 2011-08-29 Bob Duff <duff@adacore.com>
3692
3693 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
3694 by the termination handler.
3695
3696 2011-08-29 Yannick Moy <moy@adacore.com>
3697
3698 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
3699 created in Alfa mode, instead of inserting artificial declarations of
3700 non-Itypes in the tree.
3701 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
3702 know if an Itype has a corresponding declaration, as defined in
3703 itypes.ads.
3704
3705 2011-08-29 Yannick Moy <moy@adacore.com>
3706
3707 * gnat1drv.adb: Minor rewrite.
3708
3709 2011-08-29 Bob Duff <duff@adacore.com>
3710
3711 * s-tasuti.adb (Make_Passive): Work around race condition in
3712 Make_Independent, which can cause Wait_Count to be zero. So instead of
3713 asserting that Wait_Count > 0, and then decrementing it, decrement it
3714 only if Wait_Count > 0.
3715 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
3716 should be nonnegative, so declare them Natural instead of Integer.
3717
3718 2011-08-29 Robert Dewar <dewar@adacore.com>
3719
3720 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
3721 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
3722 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
3723 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
3724 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
3725
3726 2011-08-29 Tristan Gingold <gingold@adacore.com>
3727
3728 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
3729
3730 2011-08-29 Vadim Godunko <godunko@adacore.com>
3731
3732 * s-parint.ads: Minor comment clarification.
3733
3734 2011-08-29 Vincent Celier <celier@adacore.com>
3735
3736 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
3737 may be used as identifiers.
3738
3739 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3740
3741 * a-coinho.ads: Minor reformating.
3742
3743 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3744
3745 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
3746 container of a derived type.
3747
3748 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3749
3750 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3751 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
3752
3753 2011-08-29 Pascal Obry <obry@adacore.com>
3754
3755 * exp_disp.adb: Minor comment fix.
3756 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
3757 to avoid warnings when compiling with -Wall.
3758 (Make_Disp_Conditional_Select_Body): Likewise.
3759 (Make_Disp_Timed_Select_Body): Likewise.
3760
3761 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3762
3763 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
3764 an entity name, generate reference for it.
3765
3766 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3767
3768 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
3769 iterator form.
3770 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
3771 the class-wide type.
3772 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
3773
3774 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3775
3776 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
3777 subtype for an object whose type is an unconstrained union.
3778
3779 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3780
3781 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
3782 is allowed in a component definition, by AI95-406.
3783
3784 2011-08-29 Matthew Heaney <heaney@adacore.com>
3785
3786 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
3787
3788 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3789
3790 * a-except-2005.adb: Alphabetize all routines.
3791 (Triggered_By_Abort): New routine.
3792 * a-except-2005.ads (Triggered_By_Abort): New routine.
3793 * a-except.adb Alphabetize all routines.
3794 (Triggered_By_Abort): New routine.
3795 * a-except.ads (Triggered_By_Abort): New routine.
3796 * exp_ch7.adb: Update all comments involving the detection of aborts in
3797 finalization code.
3798 (Build_Object_Declarations): Do not generate code to detect the
3799 presence of an abort at the start of finalization code, use a runtime
3800 routine istead.
3801 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
3802 RE_Unit_Table.
3803 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
3804 allocate a task on a subpool.
3805 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
3806 The flag disables all actions related to the maintenance of
3807 Finalize_Address_Table when subpools are not in use.
3808 (Allocate_Any_Controlled): Signal the machinery that subpools are in
3809 use.
3810 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
3811 performs costly task locking when subpools are not in use.
3812
3813 2011-08-29 Yannick Moy <moy@adacore.com>
3814
3815 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
3816 types and dispatching calls in Alfa mode.
3817 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
3818 correspondance between body and spec scopes, to reuse utility functions
3819 (Traverse_Declarations_Or_Statements): Protect access to body for stub
3820 by testing the presence of the library unit for the body
3821 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
3822 mode the expansion of accept statements is skipped
3823 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
3824 the unique entity corresponding to the one returned by
3825 Unique_Defining_Entity applied to the enclosing declaration of the
3826 argument.
3827
3828 2011-08-29 Bob Duff <duff@adacore.com>
3829
3830 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
3831 gdb when x is not a node (it can be a node list, name_id, etc). pp is
3832 an alias for pn. ppp is an alias for pt.
3833
3834 2011-08-29 Javier Miranda <miranda@adacore.com>
3835
3836 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
3837 aggregate to take a consistent decision on the need to convert into
3838 assignments aggregates that initialize constant objects.
3839
3840 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3841
3842 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
3843 Build_Allocate_Deallocate_Proc in order to handle allocation of
3844 non-controlled objects on subpools.
3845 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
3846 to be end-user visible.
3847 * s-finmas.adb: Add with and use clause for System.HTable.
3848 Add an instantiation of Simple_HTable which provides a mapping between
3849 the address of a controlled object and the corresponding
3850 Finalize_Address used to clean up the object. The table is used when a
3851 master is operating in heterogeneous mode.
3852 (Attach): Explain why the input node is not verified on being already
3853 attached.
3854 (Delete_Finalize_Address): New routine.
3855 (Detach): Add pragma Assert which ensures that a node is already
3856 attached.
3857 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
3858 since nodes are no longer removed on traversal. Explain why node
3859 detachment is undesirable in this case.
3860 (Get_Finalize_Address): New routine.
3861 (Hash): New routine.
3862 (Is_Empty_List): Removed.
3863 (pm): Renamed to Print_Master. Add output for discriminant
3864 Is_Homogeneous.
3865 Comment reformatting.
3866 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3867 * s-finmas.ads: Various comments additions / improvements.
3868 Type Finalization_Master has a discriminant which determines the mode of
3869 operation.
3870 (Delete_Finalize_Address): New routine.
3871 (Get_Finalize_Address): New routine.
3872 (pm): Renamed to Print_Master.
3873 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3874 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
3875 use clause for System.IO.
3876 (Allocate_Any_Controlled): Add machinery to set TSS primitive
3877 Finalize_Address depending on the mode of allocation and the mode of
3878 the master.
3879 (Deallocate_Any_Controlled): Remove the relation pair object -
3880 Finalize_Address regardless of the master mode. Add comment explaining
3881 the reason.
3882 (Detach): Ensure that fields Prev and Next are null after detachment.
3883 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
3884 scheme to check whether the list of subpools is empty. There is no
3885 longer need to store the next subpool or advance the current pointer.
3886 (Is_Empty_List): New routine.
3887 (Print_Pool): New routine.
3888 (Print_Subpool): New routine.
3889 * s-stposu.ads: Various comments additions / improvements.
3890 Field Master of type Root_Subpool is now a heterogeneous collection.
3891 (Print_Pool): New routine.
3892 (Print_Subpool): New routine.
3893
3894 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3895
3896 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
3897 forms, using aspects of container types.
3898 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
3899 Has_Implicit_Dereference flags, that may be set on the partial view.
3900 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
3901 container type with an indexing aspect.
3902 (Analyze_Quantified_Expression): Analyze construct with expansion
3903 disabled, because it will be rewritten as a loop during expansion.
3904 (Try_Container_Indexing): The prefix itself may be a container type
3905 with an indexing aspect, as with a vector of vectors.
3906 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
3907 the original doamin of iteration, for name capture.
3908 (Analyze_Iterator_Specification): If the domain is an expression that
3909 needs finalization, create a separate declaration for it.
3910 For an iterator with "of" retrieve default iterator info from aspect of
3911 container type. For "in" iterator, retrieve type of Iterate function.
3912 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
3913 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
3914 analysis, to prevent spurious errors about late attributes.
3915 * sprint.adb: Handle quantified expression with either loop or iterator
3916 specification.
3917 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
3918 iterator.
3919
3920 2011-08-29 Vincent Celier <celier@adacore.com>
3921
3922 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
3923 Binder or Linker of the main project file.
3924
3925 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3926
3927 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
3928 unit.
3929
3930 2011-08-29 Yannick Moy <moy@adacore.com>
3931
3932 * exp_ch9.adb: Partial revert of previous change for Alfa mode
3933
3934 2011-08-29 Yannick Moy <moy@adacore.com>
3935
3936 * exp_ch11.adb: Minor expansion of comment.
3937
3938 2011-08-29 Yannick Moy <moy@adacore.com>
3939
3940 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
3941
3942 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3943
3944 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
3945 interpretation, set the type before resolving the operands, because
3946 legality checks on an exponention operand need to know the type of the
3947 context.
3948
3949 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3950
3951 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
3952 cleanups on a master if the instance is within a generic unit.
3953 Complement to the corresponding fix to inline.adb for K520-030.
3954
3955 2011-08-29 Tristan Gingold <gingold@adacore.com>
3956
3957 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
3958 occurrence.
3959 * exp_intr.adb: Minor comment fix.
3960
3961 2011-08-29 Bob Duff <duff@adacore.com>
3962
3963 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
3964 Delay_Required was used as an uninitialized variable.
3965
3966 2011-08-29 Robert Dewar <dewar@adacore.com>
3967
3968 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
3969 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
3970 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
3971
3972 2011-08-29 Thomas Quinot <quinot@adacore.com>
3973
3974 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
3975 Remove unused variables.
3976
3977 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3978
3979 * sem_res.adb: Remove Build_Explicit_Dereference.
3980 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
3981 from sem_res.adb, used in analysis of additional constructs.
3982 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
3983 expansion of iterators.
3984 (Is_Object_Reference): Recognize variables rewritten as explicit
3985 dereferences in Ada2012.
3986 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
3987 Reversible_Iterator names, for expansion of Ada2012 iterators.
3988 * aspects.ads, aspects.adb (Find_Aspect): Utility.
3989 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
3990 linked list container.
3991 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
3992 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
3993
3994 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3995
3996 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
3997 containers.
3998
3999 2011-08-29 Vincent Celier <celier@adacore.com>
4000
4001 * make.adb (Gnatmake): Get the maximum number of simultaneous
4002 compilation processes after the Builder switches has been scanned, as
4003 there may include -jnn.
4004
4005 2011-08-29 Matthew Heaney <heaney@adacore.com>
4006
4007 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4008
4009 2011-08-29 Tristan Gingold <gingold@adacore.com>
4010
4011 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4012 GNAT_DRIVER_COMMAND_LINE to 255.
4013
4014 2011-08-29 Pascal Obry <obry@adacore.com>
4015
4016 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4017 reformatting and style fix (class attribute casing).
4018
4019 2011-08-29 Yannick Moy <moy@adacore.com>
4020
4021 * exp_ch11.adb: Yet another case where expansion should be common
4022 between CodePeer and Alfa.
4023
4024 2011-08-29 Yannick Moy <moy@adacore.com>
4025
4026 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4027
4028 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4029
4030 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4031 incomplete type and its completion match.
4032
4033 2011-08-29 Yannick Moy <moy@adacore.com>
4034
4035 * exp_ch13.adb: Adjust previous change.
4036
4037 2011-08-29 Robert Dewar <dewar@adacore.com>
4038
4039 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4040 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4041 Minor reformatting.
4042
4043 2011-08-29 Emmanuel Briot <briot@adacore.com>
4044
4045 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4046 initialize aggregated projects.
4047
4048 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4049
4050 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4051 depth of candidates to resolve a potentially spurious ambiguity between
4052 two visible subprograms.
4053
4054 2011-08-29 Yannick Moy <moy@adacore.com>
4055
4056 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4057 Requires/Ensures.
4058 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4059 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4060 Requires/Ensures.
4061
4062 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4063
4064 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4065 Add comment.
4066
4067 2011-08-29 Thomas Quinot <quinot@adacore.com>
4068
4069 * sem_res.adb: Minor reformatting.
4070
4071 2011-08-29 Johannes Kanig <kanig@adacore.com>
4072
4073 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4074 mode.
4075 * gnat1drv.adb (Adjust_Global_Switches): Set
4076 Use_Expressions_With_Actions to False in ALFA mode.
4077 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4078 ALFA mode.
4079
4080 2011-08-29 Yannick Moy <moy@adacore.com>
4081
4082 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4083 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4084 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4085 tagged types and dispatching calls in Alfa mode.
4086
4087 2011-08-29 Javier Miranda <miranda@adacore.com>
4088
4089 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4090 we do not report an error on an Empty node.
4091
4092 2011-08-29 Geert Bosch <bosch@adacore.com>
4093
4094 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4095 a-nlrear.o and a-nurear.o.
4096
4097 2011-08-29 Robert Dewar <dewar@adacore.com>
4098
4099 * freeze.adb: Minor code reorganization.
4100 Minor reformatting.
4101 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4102 sem_ch6.adb: Minor reformatting
4103
4104 2011-08-29 Tristan Gingold <gingold@adacore.com>
4105
4106 * s-except.ads, s-except.adb: Provide dummy body.
4107
4108 2011-08-29 Yannick Moy <moy@adacore.com>
4109
4110 * sem_warn.adb (Within_Postcondition): Take into account the case of
4111 an Ensures component in a Test_Case.
4112
4113 2011-08-29 Tristan Gingold <gingold@adacore.com>
4114
4115 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4116 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4117 System_Exceptions_Debug
4118 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4119 * a-except.adb: With and use System.Exceptions_Debug instead of
4120 System.Exceptions.
4121 * a-except-2005.adb: Likewise.
4122 * s-assert.adb: Likewise.
4123 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4124 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4125 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4126 s-excdeb. Update dependencies.
4127 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4128 as these no longer need external libraries.
4129
4130 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4131
4132 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4133 exponentiation operator on universal values in a context that requires
4134 a fixed-point type.
4135
4136 2011-08-29 Tristan Gingold <gingold@adacore.com>
4137
4138 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4139 before calling notify_handled_exception.
4140 * a-exextr.adb: Fix comment.
4141
4142 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4143
4144 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4145 Finalize_Address of the access type's finalization master.
4146 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4147 access type's finalization master. Add a guard to prevent
4148 Associated_Storage_Pool from being set on .NET/JVM.
4149 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4150 attribute Finalize_Address of the access type's finalization master.
4151 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4152 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4153 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4154 RE_Unit_Table.
4155 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4156 use clause for System.IO
4157 (Detach): Relax the assertion, to be reinstated later.
4158 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4159 Relax the assertion on Finalize_Address, to be reinstated later.
4160 (Is_Empty_List): New routine.
4161 (pm): New debug routine.
4162 (Set_Finalize_Address): New routine.
4163 * s-finmas.ads (pm): New debug routine.
4164 (Set_Finalize_Address): New routine.
4165 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4166
4167 2011-08-29 Tristan Gingold <gingold@adacore.com>
4168
4169 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4170 Remove convention C.
4171
4172 2011-08-29 Tristan Gingold <gingold@adacore.com>
4173
4174 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4175 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4176 (Finalize_TCB): Remove its finalization.
4177 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4178 * s-soflin.adb (NT_Exc_Stack): Remove
4179 (Get_Exc_Stack_Addr_NT): Likewise.
4180 (Get_Exc_Stack_Addr_Soft): Likewise.
4181 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4182 (Get_Exc_Stack_Addr): Likewise.
4183 (Get_Exc_Stack_Addr_Soft): Likewise
4184 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4185 (Exc_Stack_Ptr_T): Likewise.
4186 (Private_Data): Remove Exc_Stack_Ptr component.
4187
4188 2011-08-29 Tristan Gingold <gingold@adacore.com>
4189
4190 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4191
4192 2011-08-29 Tristan Gingold <gingold@adacore.com>
4193
4194 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4195
4196 2011-08-29 Geert Bosch <bosch@adacore.com>
4197
4198 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4199 L2_Norm, Swap_Column): New generic subprograms
4200 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4201 L2_Norm, Swap_Column): Implement new subprograms in order to
4202 eliminate dependency on BLAS and LAPACK libraries in
4203 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4204 version. Forward_Eliminate/Back_Substitute can be used to put a
4205 matrix in row echelon or reduced row echelon form using partial
4206 pivoting.
4207 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4208 Swap_Column): Instantiate from System.Generic_Array_Operations.
4209 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4210 (Sqrt): Local function for simple computation of square root without
4211 adding dependencies on Generic_Elementary_Functions.
4212 (Swap): New subprogram to exchange floating point numbers.
4213 (Inverse): Reimplement using Jordan-Gauss elimination.
4214 (Jacobi): New procedure implementing Jacobi's method for computation
4215 of eigensystems, based on Rutishauser's implementation.
4216 (L2_Norm): Implement directly using the inner product.
4217 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4218 decreasing eigenvalue as required by the Ada RM.
4219 (Swap_Column): New helper procedure for Sort_Eigensystem.
4220 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4221 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4222 Sort_Eigensystems.
4223
4224 2011-08-29 Thomas Quinot <quinot@adacore.com>
4225
4226 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4227 statements line.
4228
4229 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4230
4231 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4232 than the current node.
4233 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4234 Finalization_Master. The list headers have two fields instead of three.
4235 This should fix alignment issue but subpool allocations are now
4236 unusable. Alphabetize subprograms.
4237 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4238 the size of the header when converting the beginning of the object to
4239 a FM_Node. Set the master's Finalize_Address attribute if not already
4240 set.
4241 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4242 header when converting the beginning of the object to a FM_Node.
4243
4244 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4245
4246 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4247 reraise when compiling for CodePeer.
4248
4249 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4250
4251 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4252 now needed by a-convec.adb. Fix warning.
4253
4254 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4255
4256 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4257 processing of TSS routine Finalize_Address when compiling in
4258 CodePeer_Mode.
4259
4260 2011-08-29 Thomas Quinot <quinot@adacore.com>
4261
4262 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4263 sem_warn.adb: Minor reformatting.
4264
4265 2011-08-29 Emmanuel Briot <briot@adacore.com>
4266
4267 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4268 languages from aggregated projects.
4269
4270 2011-08-29 Yannick Moy <moy@adacore.com>
4271
4272 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4273 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4274 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4275 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4276 for stubs are traversed too when parameter is set
4277 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4278 (Traverse_Declarations_Or_Statements): Do the special traversing for
4279 stubs when required.
4280 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4281 return subprogram or package body from stub.
4282 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4283 stubs without prior subprogram decl.
4284
4285 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4286
4287 * gnat_ugn.texi: Fix typo.
4288
4289 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4290
4291 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4292 which accounts for size vs alignment issues and calculates the size of
4293 the list header.
4294 (Deallocate_Any_Controlled): Ditto.
4295 (Nearest_Multiple_Rounded_Up): New routine.
4296
4297 2011-08-29 Tristan Gingold <gingold@adacore.com>
4298
4299 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4300 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4301 (Set_Exception_Msg): Ditto.
4302 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4303 Private_Data.
4304 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4305 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4306 (Raise_With_Msg): Remove Cleanup_Flag.
4307 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4308 Clean_Flag and Private_Data components.
4309
4310 2011-08-29 Yannick Moy <moy@adacore.com>
4311
4312 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4313 in CodePeer mode.
4314 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4315 of an explicitly declared type, so that the base types of the original
4316 type and this generated type are the same, and a "type" (not a subtype
4317 like previously).
4318 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4319 small" in Alfa mode, like in CodePeer mode.
4320 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4321 clauses in Alfa mode.
4322
4323 2011-08-29 Javier Miranda <miranda@adacore.com>
4324
4325 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4326 function to the package spec.
4327 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4328 internally generated bodies of null procedures locate the internally
4329 generated spec enforcing mode conformance.
4330 (Is_Interface_Conformant): Ensure that the controlling formal of the
4331 primitives match.
4332
4333 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4334
4335 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4336 reject the pragma if it appears to apply to a formal subprogram.
4337
4338 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4339
4340 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4341 inner expression, to prevent double evaluation.
4342
4343 2011-08-29 Tristan Gingold <gingold@adacore.com>
4344
4345 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4346 they were unused.
4347 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4348 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4349 (Raise_Current_Excep): Adjust call.
4350 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4351
4352 2011-08-29 Thomas Quinot <quinot@adacore.com>
4353
4354 * exp_disp.adb: Minor reformatting.
4355
4356 2011-08-29 Tristan Gingold <gingold@adacore.com>
4357
4358 * a-exexpr.adb (Setup_Exception): Removed.
4359 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4360 * a-except.adb (Exception_Propagation): Removed.
4361 * a-except-2005.adb (Setup_Exception): Removed.
4362 (Reraise): Remove call to Setup_Exception.
4363 (Reraise_Occurrence): Ditto.
4364 (Reraise_Occurrence_Always): Ditto.
4365 (Reraise_Occurrence_No_Defer): Ditto.
4366 (Transfer_Occurrence): Ditto.
4367 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4368 (Set_Exception_Msg): Ditto.
4369
4370 2011-08-29 Robert Dewar <dewar@adacore.com>
4371
4372 * a-convec.adb, exp_disp.adb: Minor reformatting.
4373
4374 2011-08-29 Tristan Gingold <gingold@adacore.com>
4375
4376 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4377
4378 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4379
4380 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4381 Exception_Handlers to No_List instead of Empty_List in the case where
4382 there are no handlers.
4383
4384 2011-08-29 Tristan Gingold <gingold@adacore.com>
4385
4386 * gcc-interface/gigi.h (enum standard_datatypes): Add
4387 ADT_reraise_zcx_decl
4388 (reraise_zcx_decl): New macro.
4389 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4390 (gigi): Set reraise_zcx_decl.
4391 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4392 (gnat_to_gnu): Handle N_Raise_Statement.
4393
4394 2011-08-29 Robert Dewar <dewar@adacore.com>
4395
4396 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4397 a-undesu.adb: Minor reformatting.
4398
4399 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4400
4401 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4402 table, accept an unfrozen untagged component if it is an actual for a
4403 formal incomplete type.
4404 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4405 provide new iterator forms over vectors.
4406 Introduce type Iterator in package body to implement operations of
4407 Reversible_Iterator interface.
4408 * a-iteint.ads: Make package pure so it is usable with new container
4409 packages, that are categorized Remote_Types.
4410
4411 2011-08-29 Robert Dewar <dewar@adacore.com>
4412
4413 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4414
4415 2011-08-29 Bob Duff <duff@adacore.com>
4416
4417 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4418 of <>, because this is the routine that checks for dimensionality
4419 errors (for example, for a two-dimensional array, (others => <>) should
4420 be (others => (others => <>)).
4421
4422 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4423
4424 * impunit.adb: Add new run-time units.
4425 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4426 s-stposu.ads, s-stposu.adb: Code clean up.
4427 Handle protected class-wide or task class-wide types
4428 Handle C/C++/CIL/Java types.
4429 * s-spsufi.adb, s-spsufi.ads: New files.
4430
4431 2011-08-29 Yannick Moy <moy@adacore.com>
4432
4433 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4434 library-level subprogram.
4435 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4436 placement.
4437 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4438 component.
4439 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4440 component.
4441 * gnat_rm.texi: Update doc for Test_Case pragma.
4442
4443 2011-08-29 Tristan Gingold <gingold@adacore.com>
4444
4445 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4446 convention C.
4447 (GCC_Exception_Access): New type.
4448 (Unwind_DeleteException): New imported procedure
4449 (Foreign_Exception): Import it.
4450 (GNAT_GCC_Exception): Simply have the occurrence inside.
4451 (To_GCC_Exception): New function.
4452 (To_GNAT_GCC_Exception): New function.
4453 (GNAT_GCC_Exception_Cleanup): New procedure..
4454 (Propagate_GCC_Exception): New procedure.
4455 (Reraise_GCC_Exception): New procedure.
4456 (Setup_Current_Excep): New procedure.
4457 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4458 (Unwind_RaiseException): Ditto.
4459 (Unwind_ForcedUnwind): Ditto.
4460 (Remove): Removed.
4461 (Begin_Handler): Change type of parameter.
4462 (End_Handler): Ditto. Now delete the exception if still present.
4463 (Setup_Key): Removed.
4464 (Is_Setup_And_Not_Propagated): Removed.
4465 (Set_Setup_And_Not_Propagated): Ditto.
4466 (Clear_Setup_And_Not_Propagated): Ditto.
4467 (Save_Occurrence_And_Private): Ditto.
4468 (EID_For): Add 'not null' constraint on parameter.
4469 (Setup_Exception): Does nothing.
4470 (Propagate_Exception): Simplified.
4471 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4472 re-raise is not expanded anymore.
4473 * s-except.ads (Foreign_Exception): New exception - placeholder for
4474 non Ada exceptions.
4475 * raise-gcc.c (__gnat_setup_current_excep): Declare
4476 (CXX_EXCEPTION_CLASS): Define (not yet used)
4477 (GNAT_EXCEPTION_CLASS): Define.
4478 (is_handled_by): Handle foreign exceptions.
4479 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4480
4481 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4482
4483 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4484
4485 2011-08-29 Thomas Quinot <quinot@adacore.com>
4486
4487 * a-synbar-posix.adb: Minor reformatting.
4488
4489 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4490
4491 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4492 a-exetim-default.ads (Interrupt_Clocks_Supported,
4493 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4494 definitions to be compliant with AI-0171. The target systems do not
4495 support separate account for the execution time of interrupt handlers.
4496
4497 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4498
4499 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4500 in the barrier to put first the easiest to evaluate (and the one which
4501 will be True more often). More efficient.
4502
4503 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4504
4505 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4506
4507 2011-08-29 Bob Duff <duff@adacore.com>
4508
4509 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4510 attributes that are now aspects, as specified by AI05-0229-1.
4511 * sem_ch13.adb (Analyze_Aspect_Specifications,
4512 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4513 pragmas or attribute references, as appropriate.
4514
4515 2011-08-29 Robert Dewar <dewar@adacore.com>
4516
4517 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4518 a-synbar-posix.ads: Minor reformatting.
4519
4520 2011-08-29 Yannick Moy <moy@adacore.com>
4521
4522 * snames.ads-tmpl: Add name Force.
4523
4524 2011-08-29 Pascal Obry <obry@adacore.com>
4525
4526 * prj-nmsc.adb: Minor reformatting.
4527
4528 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4529
4530 * a-exetim.ads (Interrupt_Clocks_Supported,
4531 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4532 definitions to be compliant with AI-0171.
4533
4534 2011-08-29 Robert Dewar <dewar@adacore.com>
4535
4536 * a-ngelfu.adb: Add comments.
4537
4538 2011-08-29 Geert Bosch <bosch@adacore.com>
4539
4540 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4541 the closest machine number to Pi / 2.0.
4542
4543 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4544
4545 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4546 package Ada.Synchronous_Barriers.
4547 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4548 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4549 default implementation using protected objects and another one
4550 a-synbar-posix using POSIX barriers as the underlying support.
4551 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4552 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4553 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4554 Clean up dependencies.
4555 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4556
4557 2011-08-29 Robert Dewar <dewar@adacore.com>
4558
4559 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4560 exp_dist.adb: Minor code reorganization.
4561 Minor reformatting.
4562
4563 2011-08-29 Thomas Quinot <quinot@adacore.com>
4564
4565 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4566 primitive operation must support external streaming if it is not a
4567 controlling access result.
4568
4569 2011-08-29 Thomas Quinot <quinot@adacore.com>
4570
4571 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4572
4573 2011-08-29 Bob Duff <duff@adacore.com>
4574
4575 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4576 restriction on allocators, as required by AI05-0013-1.
4577 * restrict.ads: Minor comment fix.
4578
4579 2011-08-29 Tristan Gingold <gingold@adacore.com>
4580
4581 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4582 (To_Jmpbuf_Address): Ditto
4583 (builtin_longjmp): Ditto
4584
4585 2011-08-29 Thomas Quinot <quinot@adacore.com>
4586
4587 * sem_res.adb: Minor reformatting.
4588
4589 2011-08-29 Vincent Celier <celier@adacore.com>
4590
4591 * make.adb (Gnatmake): Move special processing for VM targets after the
4592 call to Get_Target_Parameters.
4593
4594 2011-08-29 Thomas Quinot <quinot@adacore.com>
4595
4596 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4597
4598 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4599
4600 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4601 where an anonymous access discriminant of a limited designated type
4602 appears in a non-immutably limited discriminated type and issue an
4603 error message. Add local variable Desig_T and replace all occurrences
4604 of Designated_Type.
4605
4606 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4607
4608 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4609 implementation is compliant to RM D.15(15/2) after the modification
4610 imposed by AI05-0094-1 (binding interpretation).
4611
4612 2011-08-29 Robert Dewar <dewar@adacore.com>
4613
4614 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
4615 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
4616
4617 2011-08-29 Thomas Quinot <quinot@adacore.com>
4618
4619 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
4620 the scope name, do not report a missing label as a style violation (it
4621 will be diagnosed as an illegality).
4622 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
4623 variant records: Get_Enum_Lit_From_Pos already returns a usage
4624 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
4625 on Expr in Integer_Literal case so that it can be used by
4626 Build_To_Any_Call.
4627
4628 2011-08-29 Tristan Gingold <gingold@adacore.com>
4629
4630 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
4631 Adjust comment.
4632 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
4633 (Build_Abort_Block_Handler): New function to build an Abort_Signal
4634 exception handler.
4635 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
4636 Build_Abort_Block_Handler to build the exception handler. Do not
4637 undefer aborts for the Abort_Signal exception handler if back-end
4638 exception mechanism.
4639 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
4640 back_end exceptions for all others and abort_signal.
4641 * s-except.ads (ZCX_By_Default): New constant.
4642 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
4643 (Raise_Exception_Always): Ditto.
4644 (Raise_From_Signal_Handler): Ditto.
4645 (Raise_With_Location_And_Msg): Ditto.
4646 (Raise_With_Msg): Ditto.
4647 (Reraise): Ditto.
4648 (Reraise_Occurence): Ditto.
4649 (Reraise_Occurrence_Always): Ditto.
4650 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
4651 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
4652
4653 2011-08-29 Thomas Quinot <quinot@adacore.com>
4654
4655 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
4656
4657 2011-08-29 Robert Dewar <dewar@adacore.com>
4658
4659 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
4660 Minor code reorganization.
4661
4662 2011-08-29 Bob Duff <duff@adacore.com>
4663
4664 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
4665 2012, not just Ada 2005.
4666
4667 2011-08-29 Vincent Celier <celier@adacore.com>
4668
4669 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
4670 with a project file or with gprbuid, if -gnatep= is specified, the
4671 builder may need to be invoked with -x.
4672
4673 2011-08-29 Tristan Gingold <gingold@adacore.com>
4674
4675 * a-exexpr-gcc.adb: Minor comment fix.
4676
4677 2011-08-29 Robert Dewar <dewar@adacore.com>
4678
4679 * sem_ch8.adb: Minor reformatting.
4680
4681 2011-08-29 Bob Duff <duff@adacore.com>
4682
4683 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
4684 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
4685 treating "some" as unreserved in earlier Ada versions. This is now
4686 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
4687 rather than Name_Some, since Tok_Some is now recognized as reserved.
4688 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
4689 reserved word.
4690 * scans.ads: Minor comment fixes.
4691 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
4692 for other language versions.
4693 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
4694 treating "some" as unreserved in earlier Ada versions. This is now
4695 handled in Snames.Is_Keyword_Name.
4696 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
4697 Ada 2012.
4698 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
4699 unreserved in earlier Ada versions. This is now handled in
4700 Snames.Is_Keyword_Name.
4701 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
4702 words as for other language versions.
4703 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
4704 Ada 2012, not just Ada 2005.
4705
4706 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4707
4708 * sem_ch13.adb: Additional semantic checks for aspects involved in
4709 iterators.
4710
4711 2011-08-29 Matthew Heaney <heaney@adacore.com>
4712
4713 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
4714 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
4715 Container parameter.
4716 (Ancestor_Find): ditto.
4717
4718 2011-08-29 Thomas Quinot <quinot@adacore.com>
4719
4720 * par-endh.adb: Minor reformatting.
4721
4722 2011-08-29 Tristan Gingold <gingold@adacore.com>
4723
4724 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
4725 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
4726 (Adjust_N_CLeanups_For): Remove.
4727 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
4728 stack is reached.
4729 (Propgate_Exception): Adjust.
4730 * raise-gcc.c: Add a few static/const.
4731 (Adjust_N_Cleanups_For): Remove declaration.
4732 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
4733
4734 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4735
4736 * sem_ch8.adb: Use type of function return when rewriting as object
4737 declaration.
4738
4739 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4740
4741 * sem_type.adb: Minor reformatting.
4742
4743 2011-08-29 Robert Dewar <dewar@adacore.com>
4744
4745 * makeutl.adb: Minor reformatting.
4746
4747 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4748
4749 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
4750 function call of a limited type, the expansion of the renaming is
4751 complicated by the presence of various temporaries and subtypes that
4752 capture constraints of the renamed object.
4753 Rewrite node as an object declaration, whose expansion is simpler.
4754 Given that the object is limited there is no copy involved and no
4755 performance hit.
4756
4757 2011-08-29 Robert Dewar <dewar@adacore.com>
4758
4759 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
4760 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
4761
4762 2011-08-29 Tristan Gingold <gingold@adacore.com>
4763
4764 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
4765 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
4766 system-linux-hppa.ads, system-linux-s390.ads,
4767 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
4768 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
4769 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
4770 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
4771 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
4772 system-solaris-sparc.ads, system-lynxos-x86.ads,
4773 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
4774 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
4775 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
4776 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
4777 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
4778 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
4779 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
4780 * opt.ads: Adjust comment.
4781 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
4782 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
4783 * system.ads: Move GCC_ZCX_Support to obsolete entries.
4784
4785 2011-08-29 Emmanuel Briot <briot@adacore.com>
4786
4787 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
4788 file name is specified on the gnatmake or gprbuild command line, and
4789 before we search for that file in the project.
4790
4791 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4792
4793 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
4794 used to determine whether a possible interpretation for an overloadable
4795 entity is declared within the current instantiation and should be
4796 included in the candidate set.
4797
4798 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4799
4800 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
4801
4802 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4803
4804 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
4805 access subtype is access_to_subprogram, when applying checks for
4806 RM 3.10.2 (27).
4807
4808 2011-08-29 Matthew Heaney <heaney@adacore.com>
4809
4810 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
4811 for sibling when common parent.
4812
4813 2011-08-29 Thomas Quinot <quinot@adacore.com>
4814
4815 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
4816 "pragma_".
4817
4818 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4819
4820 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
4821 for the return type when in ASIS mode.
4822
4823 2011-08-29 Vincent Celier <celier@adacore.com>
4824
4825 * make.adb (Gnatmake): Get the default search dirs, then the target
4826 parameters after getting the Builder switches, as the Builder switches
4827 may include --RTS= and that could change the default search dirs.
4828
4829 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4830
4831 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
4832 Make_Final_Call. Move the processing for class-wide types before the
4833 processing for derivations from [Limited_]Controlled.
4834 (Make_Final_Call): Move the processing for class-wide types before the
4835 processing for derivations from [Limited_]Controlled.
4836 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
4837 Add code to account for alignments larger than the list header. Add a
4838 comment illustrating the structure of the allocated object + padding +
4839 header.
4840 (Deallocate_Any_Controlled): Add code to account for alignments larger
4841 than the list header.
4842
4843 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4844
4845 * sinfo.ads, sinfo.adb: New node kind
4846 N_Formal_Incomplete_Type_Definition, related flags.
4847 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
4848 Parse formal incomplete types.
4849 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
4850 sem_ch12.
4851 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
4852 Formal incomplete types do not need completion.
4853 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
4854 Validate_Incomplete_Type_Instance): New procedures to handle formal
4855 incomplete types.
4856 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
4857 that corresponds to a formal incomplete type.
4858 * sprint.adb: Handle formal incomplete type declarations.
4859 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
4860 an insertion point.
4861
4862 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4863
4864 * a-fihema.ads, a-fihema.adb: Unit removed.
4865 * a-undesu.ads, a-undesu.adb: New unit implementing
4866 Ada.Unchecked_Deallocate_Subpool.
4867 * einfo.adb: Remove Associated_Collection from the node usage.
4868 Add Finalization_Master to the node usage.
4869 (Associated_Collection): Removed.
4870 (Finalization_Master): New routine.
4871 (Set_Associated_Collection): Removed.
4872 (Set_Finalization_Master): New routine.
4873 (Write_Field23_Name): Remove Associated_Collection from the output. Add
4874 Finalization_Master to the output.
4875 * einfo.ads: Remove attribute Associated_Collection and its uses in
4876 entities.
4877 Add new attribute Finalization_Master along with its uses in entitites.
4878 (Associated_Collection): Removed along with its pragma import.
4879 (Finalization_Master): New routine along with a pragma import.
4880 (Set_Associated_Collection): Removed along with its pragma import.
4881 (Set_Finalization_Master): New routine along with a pragma import.
4882 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
4883 Build_Finalization_Collection with Build_Finalization_Master.
4884 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
4885 before the bodies of the predefined routines. Add comment explaining
4886 this. Replace call to Build_Finalization_Collection with
4887 Build_Finalization_Master.
4888 (Freeze_Type): Replace call to Build_Finalization_Collection with
4889 Build_Finalization_Master.
4890 (Make_Finalize_Address_Body): Comment reformatting.
4891 (Make_Predefined_Primitive_Specs): Code reformatting.
4892 (Stream_Operation_OK): Update comment mentioning finalization
4893 collections. Replace RE_Finalization_Collection with
4894 RE_Finalization_Master.
4895 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
4896 Associated_Collection with Finalization_Master. Replace call to
4897 Build_Finalization_Collection with Build_Finalization_Master.
4898 (Expand_Allocator_Expression): Replace call to Associated_Collection
4899 with Finalization_Master. Replace call to Set_Associated_Collection with
4900 Set_Finalization_Master. Remove the generation of
4901 Set_Finalize_Address_Ptr.
4902 (Expand_N_Allocator): Replace call to Associated_Collection with
4903 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
4904 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
4905 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
4906 comment on usage. Replace call to Needs_BIP_Collection with
4907 Needs_BIP_Finalization_Master Remplace BIP_Collection with
4908 BIP_Finalization_Master. Update all comments which mention finalization
4909 collections. Replace Associated_Collection with
4910 Finalization_Master. Replace Build_Finalization_Collection with
4911 Build_Finalization_Master.
4912 (BIP_Formal_Suffix): Update BIP_Collection's case.
4913 (Build_Heap_Allocator): Update the related comment. Rename local
4914 variable Collect to Fin_Mas_Id and update its occurrences. Update
4915 comments which mention finalization collections. Replace
4916 Set_Associated_Collection with Set_Finalization_Master.
4917 (Expand_Call): Update the code which detects a special piece of library
4918 code for .NET/JVM.
4919 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
4920 Add_Collection_Actual_To_Build_In_Place_Call with
4921 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
4922 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
4923 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
4924 Add_Collection_Actual_To_Build_In_Place_Call with
4925 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4926 (Make_Build_In_Place_Call_In_Assignment): Replace call to
4927 Add_Collection_Actual_To_Build_In_Place_Call with
4928 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4929 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4930 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
4931 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4932 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
4933 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
4934 Replace call to Set_Associated_Collection with Set_Finalization_Master.
4935 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
4936 Replace the call to Associated_Collection with Finalization_Master.
4937 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
4938 Update the way finalization master names are generated. Update the
4939 retrieval of the correct access type which will carry the pool and
4940 master attributes.
4941 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
4942 (Make_Finalize_Address_Body): Abstract types do not need
4943 Finalize_Address. Code reformatting.
4944 (Make_Finalize_Address_Stmts): Update comment on usage.
4945 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4946 (Process_Declarations): Update comments.
4947 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
4948 Build_Finalization_Master. Update associated comment.
4949 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4950 * exp_ch13.adb: Update comments which mention finalization collections.
4951 (Expand_N_Free_Statement): Replace the call to Associated_Collection
4952 with Finalization_Master.
4953 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
4954 create calls to routines Allocate_Any_Controlled and
4955 Deallocate_Any_Controlled.
4956 (Find_Finalize_Address): New routine.
4957 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
4958 comparison.
4959 (Requires_Cleanup_Actions): Update the comment on freeze node
4960 inspection.
4961 * exp_util.ads: Remove comment on generated code for
4962 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
4963 is better to simply look in the body.
4964 * freeze.adb (Freeze_All): Update the comment of finalization
4965 collections. Replace the call to Associated_Collection with
4966 Finalization_Master. Replace the call to Build_Finalization_Collection
4967 with Build_Finalization_Master.
4968 * impunit.adb: Add a-undesu and s-stposu to the list of units.
4969 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
4970 a-fihema.
4971 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
4972 Ada.Finalization. Add processing for children of System.Storage_Pools.
4973 * rtsfind.ads: Remove the naming of second level children of
4974 Ada.Finalization.
4975 Remove Ada_Finalization_Heap_Management from the list of units.
4976 Remove subtype Ada_Finalization_Child.
4977 Remove the following subprogram entities:
4978
4979 RE_Allocate
4980 RE_Deallocate
4981 RE_Finalization_Collection
4982 RE_Finalization_Collection_Ptr
4983 RE_Set_Finalize_Address_Ptr
4984
4985 Add the naming of second level children of System.Storage_Pools.
4986 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
4987 the list of units.
4988 Add subtype System_Storage_Pools_Child.
4989 Add the following subprogram entities to System.Finalization_Masters:
4990
4991 RE_Finalization_Master
4992 RE_Finalization_Master_Ptr
4993
4994 Add the following subprogram entities to System.Storage_Pools.Subpools:
4995
4996 RE_Allocate_Any_Controlled
4997 RE_Deallocate_Any_Controlled
4998 RE_Root_Storage_Pool_With_Subpools
4999 RE_Root_Subpool
5000 RE_Subpool_Handle
5001
5002 Move the following subprogram entities from
5003 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5004
5005 RE_Add_Offset_To_Address
5006 RE_Attach
5007 RE_Base_Pool
5008 RE_Detach
5009
5010 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5011 Set_Associated_Collection with Set_Finalization_Master.
5012 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5013 BIP_Finalization_Master is created.
5014 * s-finmas.adb: New unit System.Finalization_Masters.
5015 * s-finmas.ads: New unit System.Finalization_Masters.
5016 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5017 * s-stposu.ads, s-stposu.adb: New unit implementing
5018 System.Storage_Pools.Subpools.
5019
5020 2011-08-29 Bob Duff <duff@adacore.com>
5021
5022 * tbuild.adb: Add assertion.
5023
5024 2011-08-29 Thomas Quinot <quinot@adacore.com>
5025
5026 * s-pooglo.adb: Minor reformatting.
5027
5028 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5029
5030 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5031 an indexed component of a packed array whose element type is a record
5032 with a representation clause different from that of the right-hand
5033 side, generate a temporary to minimuze the number of bit-field
5034 operations generated.
5035
5036 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5037
5038 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5039 declarations, and thus are likely insertion points for actions.
5040
5041 2011-08-29 Bob Duff <duff@adacore.com>
5042
5043 * einfo.ads: Minor comment fix.
5044
5045 2011-08-29 Robert Dewar <dewar@adacore.com>
5046
5047 * frontend.adb, gnat1drv.adb: Minor reformatting.
5048
5049 2011-08-29 Tristan Gingold <gingold@adacore.com>
5050
5051 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5052 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5053 space in front of the header.
5054
5055 2011-08-29 Johannes Kanig <kanig@adacore.com>
5056
5057 * frontend.adb (Frontend): Exit after creating Standard package when
5058 -gnatd.H is present.
5059 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5060 present.
5061
5062 2011-08-29 Robert Dewar <dewar@adacore.com>
5063
5064 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5065 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5066 snames.ads-tmpl: Minor reformatting.
5067
5068 2011-08-29 Philippe Gil <gil@adacore.com>
5069
5070 * prj.adb (Reset_Units_In_Table): New procedure.
5071 Reset units to avoid access to freed memory.
5072
5073 2011-08-29 Thomas Quinot <quinot@adacore.com>
5074
5075 * get_scos.adb: When reading a P statement SCO without a pragma name
5076 (from an older ALI file), ensure that the Pragma_Name component is set
5077 to Unknown_Pragma (not left uninitialized).
5078
5079 2011-08-29 Vincent Celier <celier@adacore.com>
5080
5081 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5082 modified to compute correctly the object path of a SAL project that is
5083 extending another library project.
5084 (Write_Path_File): New procedure.
5085 * makeutl.ads (Directories): New table moved from Buildgpr
5086 (Get_Directories): New procedure moved from Buildgpr
5087 (Write_Path_File): New procedure
5088 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5089 paths before binding SALs, instead of Set_Ada_Paths.
5090 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5091 Prj.
5092 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5093 (Current_Source_Path_File_Of): New function
5094 (Set_Current_Object_Path_File_Of): New procedure
5095 (Current_Source_Object_File_Of): New function
5096 (Set_Current_Object_Path_File_Of): New procedure
5097 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5098 (Current_Source_Path_File_Of): New function
5099 (Set_Current_Object_Path_File_Of): New procedure
5100 (Current_Source_Object_File_Of): New function
5101 (Set_Current_Object_Path_File_Of): New procedure
5102
5103 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5104
5105 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5106 packed entity, use a bit-field assignment only if there is no change of
5107 representation.
5108
5109 2011-08-29 Thomas Quinot <quinot@adacore.com>
5110
5111 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5112 Is_RTU instead of using Chars comparisons.
5113
5114 2011-08-29 Thomas Quinot <quinot@adacore.com>
5115
5116 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5117 temporary object if the actual is constrained, and the discriminants
5118 read from the stream don't match.
5119
5120 2011-08-29 Tristan Gingold <gingold@adacore.com>
5121
5122 * sem_attr.adb, exp_attr.adb: Add handling of
5123 Attribute_System_Allocator_Alignment
5124 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5125 Attribute_System_Allocator_Alignment.
5126 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5127 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5128 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5129 get_target_system_allocator_alignment.
5130
5131 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5132
5133 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5134 dependencies.
5135
5136 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5137
5138 * exp_ch3.adb (In_Runtime): Fix typo.
5139
5140 2011-08-29 Bob Duff <duff@adacore.com>
5141
5142 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5143
5144 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5145
5146 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5147 and a separate tag assignment is generated, ensure that the tag
5148 assignment is analyzed.
5149
5150 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5151
5152 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5153 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5154 of statement lists that may contain local declarations.
5155 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5156 duplicate the triggering statements needed for the expansion of this
5157 construct, when the trigger is a dispatching call to a synchronized
5158 primitive.
5159
5160 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5161
5162 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5163 * bindgen.adb: Add comments.
5164 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5165 in CodePeer mode.
5166
5167 2011-08-29 Robert Dewar <dewar@adacore.com>
5168
5169 * exp_attr.adb: Minor reformatting.
5170 Minor code reorganization and commenting.
5171 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5172 reformatting.
5173
5174 2011-08-29 Thomas Quinot <quinot@adacore.com>
5175
5176 * get_scos.adb: Ignore chaining indicators not currently supported
5177 by Ada.
5178
5179 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5180
5181 * system.ads: Minor editing.
5182
5183 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5184
5185 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5186 CodePeer mode.
5187 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5188 Attribute_Elab_Subp_Body.
5189 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5190 * sem_util.adb: Update comments.
5191
5192 2011-08-29 Thomas Quinot <quinot@adacore.com>
5193
5194 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5195 pragma name for each SCO statement corresponding to a pragma.
5196
5197 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5198
5199 * opt.ads: Minor editing.
5200
5201 2011-08-29 Yannick Moy <moy@adacore.com>
5202
5203 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5204 that only made sense for CodePeer mode.
5205
5206 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5207
5208 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5209 which is no longer used.
5210 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5211 handling of the 64-bit division check.
5212 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5213 division available.
5214 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5215 longer used.
5216
5217 2011-08-29 Thomas Quinot <quinot@adacore.com>
5218
5219 * get_scos.adb: Minor reformatting.
5220
5221 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5222
5223 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5224 statement list is wrapped in a block, the block is explicitly analyzed
5225 in order to properly redecorate the entities and create a servicing
5226 finalizer.
5227
5228 2011-08-29 Tristan Gingold <gingold@adacore.com>
5229
5230 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5231 (Set_Zero_Cost_Handling): Remove.
5232
5233 2011-08-29 Thomas Quinot <quinot@adacore.com>
5234
5235 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5236
5237 2011-08-29 Geert Bosch <bosch@adacore.com>
5238
5239 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5240 instruction, as the latter may produce -0.0, which is not a valid VAX
5241 F float number.
5242 (Neg_G): Likewise for VAX F float.
5243
5244 2011-08-29 Robert Dewar <dewar@adacore.com>
5245
5246 * exp_util.adb: Minor reformatting.
5247
5248 2011-08-29 Yannick Moy <moy@adacore.com>
5249
5250 * sem_ch3.adb: Minor comment update.
5251
5252 2011-08-29 Thomas Quinot <quinot@adacore.com>
5253
5254 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5255 the operand type.
5256
5257 2011-08-29 Thomas Quinot <quinot@adacore.com>
5258
5259 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5260 current statement sequence on a generic instantiation or a subprogram
5261 declaration.
5262
5263 2011-08-29 Robert Dewar <dewar@adacore.com>
5264
5265 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5266 Minor reformatting.
5267
5268 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5269
5270 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5271 Correct the check which involves the freeze node of a controlled or
5272 access-to-controlled type.
5273
5274 2011-08-29 Geert Bosch <bosch@adacore.com>
5275
5276 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5277 statements.
5278 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5279 Asm statements.
5280
5281 2011-08-29 Yannick Moy <moy@adacore.com>
5282
5283 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5284 for every index type and component type that is not a subtype_mark.
5285 (Process_Subtype): Set Etype of subtype.
5286
5287 2011-08-29 Robert Dewar <dewar@adacore.com>
5288
5289 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5290 reorganization. Minor reformatting.
5291
5292 2011-08-29 Steve Baird <baird@adacore.com>
5293
5294 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5295 for CodePeer and ALFA modes.
5296
5297 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5298
5299 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5300 that comes from an enclosing scope if it is not the renaming of an
5301 actual, to handle properly a spurious ambiguity in an instance.
5302
5303 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5304
5305 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5306 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5307 use it instead of the Esize of the first parameter.
5308 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5309 above change.
5310 <Size>: Likewise. Call it for composite types on the RM size.
5311
5312 2011-08-29 Yannick Moy <moy@adacore.com>
5313
5314 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5315 * sem_util.adb (Unique_Name): Correct behaviour for names of
5316 compilation units.
5317
5318 2011-08-29 Yannick Moy <moy@adacore.com>
5319
5320 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5321 verification mode, analyze pragma expression for correctness, for
5322 pre/post on library-level subprogram, as it is not expanded later.
5323
5324 2011-08-29 Yannick Moy <moy@adacore.com>
5325
5326 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5327 in formal verification.
5328
5329 2011-08-29 Thomas Quinot <quinot@adacore.com>
5330
5331 * sem_util.adb: Minor reformatting.
5332 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5333 there's no pragma.
5334 * par_sco.ads, par_sco.adb: Update comments.
5335
5336 2011-08-29 Yannick Moy <moy@adacore.com>
5337
5338 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5339 associated getter/setter.
5340 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5341
5342 2011-08-29 Vincent Celier <celier@adacore.com>
5343
5344 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5345 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5346 with declarations for Language_Kind and Dependency_Kind for Ada.
5347 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5348 (Process_Compiler): Take into account the new attributes Dependency_Kind
5349 and Language_Kind.
5350 (Check_Configuration): Check if language kind is unit based, not if the
5351 language name is Ada.
5352 (Process_Exceptions_Unit_Based): Ditto
5353 (Add_Language): Remove default additions of language and dependency kind
5354 * prj.ads: Minor comment change
5355 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5356
5357 2011-08-29 Johannes Kanig <kanig@adacore.com>
5358
5359 * debug.adb: Update comments.
5360
5361 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5362
5363 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5364 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5365 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5366 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5367 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5368
5369 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5370
5371 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5372 (GNATLIBCFLAGS_FOR_C): Replace
5373 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5374 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5375 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5376 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5377
5378 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5379
5380 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5381
5382 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5383
5384 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5385
5386 2011-08-05 Nicolas Roche <roche@adacore.com>
5387
5388 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5389 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5390 canadian cross.
5391 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5392
5393 2011-08-05 Matthew Heaney <heaney@adacore.com>
5394
5395 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5396 subprogram bodies declared out-of-order.
5397
5398 2011-08-05 Yannick Moy <moy@adacore.com>
5399
5400 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5401 entities directly in package Standard, otherwise skip the standard
5402 prefix.
5403
5404 2011-08-05 Robert Dewar <dewar@adacore.com>
5405
5406 * a-cbmutr.adb: Minor reformatting
5407 (Allocate_Node): refactor node allocation algorithm
5408
5409 2011-08-05 Robert Dewar <dewar@adacore.com>
5410
5411 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5412 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5413 mode.
5414 (Analyze_Pragma, case Check_Policy): Ditto.
5415 * sem_prag.ads (Check_Disabled): New function
5416 * snames.ads-tmpl: Add Name_Disable.
5417
5418 2011-08-05 Robert Dewar <dewar@adacore.com>
5419
5420 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5421 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5422
5423 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5424
5425 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5426 that appears in a generic formal part and applies to a formal
5427 subprogram.
5428
5429 2011-08-05 Robert Dewar <dewar@adacore.com>
5430
5431 * a-cbmutr.ads: Minor reformatting.
5432
5433 2011-08-05 Matthew Heaney <heaney@adacore.com>
5434
5435 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5436 to check count, check sign of value instead.
5437 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5438 (Copy_Subtree): allocate copy of source element
5439 (Equal_Subtree): compare elements, not access objects
5440
5441 2011-08-05 Vincent Celier <celier@adacore.com>
5442
5443 * gnat_ugn.texi: Fix VMS alternative.
5444
5445 2011-08-05 Thomas Quinot <quinot@adacore.com>
5446
5447 * sem_ch11.adb: Add comment.
5448
5449 2011-08-05 Robert Dewar <dewar@adacore.com>
5450
5451 * exp_util.adb: Minor comment fix.
5452
5453 2011-08-05 Robert Dewar <dewar@adacore.com>
5454
5455 * scng.adb (Error_Unterminated_String): Improve flag position when
5456 comma present.
5457
5458 2011-08-05 Matthew Heaney <heaney@adacore.com>
5459
5460 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5461 tree containers).
5462 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5463 multiway tree containers.
5464
5465 2011-08-05 Robert Dewar <dewar@adacore.com>
5466
5467 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5468 * stylesw.adb: Implement -gnatyC to control comment spacing
5469 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5470 -gnatyc/C).
5471 * usage.adb: Add line for -gnatyC.
5472
5473 2011-08-05 Robert Dewar <dewar@adacore.com>
5474
5475 * gnat_ugn.texi: Document -gnatyC.
5476 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5477 synonym for COMMENTS2).
5478
5479 2011-08-05 Robert Dewar <dewar@adacore.com>
5480
5481 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5482 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5483 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5484 a-comutr.ads, lib-xref.adb: Minor reformatting.
5485
5486 2011-08-05 Robert Dewar <dewar@adacore.com>
5487
5488 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5489 warning if there is an exception handler present.
5490
5491 2011-08-05 Pascal Obry <obry@adacore.com>
5492
5493 * a-iteint.ads: Fix copyright year.
5494
5495 2011-08-05 Thomas Quinot <quinot@adacore.com>
5496
5497 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5498 statement SCO for a USE clause or a representation clause.
5499
5500 2011-08-05 Yannick Moy <moy@adacore.com>
5501
5502 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5503 between body and spec for stub.
5504 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5505 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5506 pragma precondition or postcondition, for which the enclosing
5507 subprogram or package in the AST is not the desired one, return empty.
5508
5509 2011-08-05 Thomas Quinot <quinot@adacore.com>
5510
5511 * g-expect.adb: Minor reformatting.
5512
5513 2011-08-05 Bob Duff <duff@adacore.com>
5514
5515 * a-fihema.adb: Comment out OS_Lib.
5516
5517 2011-08-05 Matthew Heaney <heaney@adacore.com>
5518
5519 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5520 (unbounded multiway tree containers) and a-iteint.ads.
5521 * a-comutr.ads, a-comutr.adb:
5522 This is the new Ada 2012 unit for unbounded multiway tree containers
5523 * a-cimutr.ads, a-cimutr.adb
5524 This is the new Ada 2012 unit for indefinite multiway tree containers
5525 * a-iteint.ads: New file.
5526
5527 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5528
5529 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5530
5531 2011-08-05 Bob Duff <duff@adacore.com>
5532
5533 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5534 subpools.
5535 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5536
5537 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5538
5539 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5540 general indexing aspects of Ada2012. Called when analyzing indexed
5541 components when other interpretations fail.
5542 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5543 in an expression context where overloading is meaningful. This excludes
5544 the occurrence in an aspect specification (efficiency only).
5545 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5546 related to iterators can be set by an attribute specification, but
5547 cannot be queried.
5548 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5549 Constant_Indexing and Variable_Indexing.
5550 (Check_Indexing_Functions): New procedure to perform legality checks.
5551 Additional semantic checks at end of declarations.
5552
5553 2011-08-05 Sergey Rybin <rybin@adacore.com>
5554
5555 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5556 order of calling Tree_Write/Tree_Read routines made for aspects.
5557
5558 2011-08-05 Bob Duff <duff@adacore.com>
5559
5560 * a-fihema.adb (Finalize): Fix race condition.
5561
5562 2011-08-05 Yannick Moy <moy@adacore.com>
5563
5564 * sem_ch12.adb (Analyze_Package_Instantiation,
5565 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5566 mode.
5567
5568 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5569
5570 * sem_type.adb (Specific_Type): in an instance, the type-specific
5571 operand of an equality check that involves null may have a private
5572 type. Use full view to determine legality of construct.
5573
5574 2011-08-05 Vincent Celier <celier@adacore.com>
5575
5576 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5577 delete or close the file when the call to gnatmake was successful.
5578
5579 2011-08-05 Yannick Moy <moy@adacore.com>
5580
5581 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5582 Global_Discard_Names.
5583
5584 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5585
5586 * sinfo.ads: comments on use of entity field for aspect specifications.
5587
5588 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5589
5590 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5591 node is not itself an entity but a selected component, it is a
5592 rewritten parameterless call to an en enclosing synchronized operation,
5593 and this expansion will be performed again in the instance, so there is
5594 no global information to preserve.
5595
5596 2011-08-05 Javier Miranda <miranda@adacore.com>
5597
5598 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5599 for renamings of predefined primitives.
5600 (In_Predef_Prims_DT): New subprogram.
5601
5602 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5603
5604 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5605 possible interpretation of name is a reference type, add an
5606 interpretation that is the designated type of the reference
5607 discriminant of that type.
5608 * sem_res.adb (resolve): If the interpretation imposed by context is an
5609 implicit dereference, rewrite the node as the deference of the
5610 reference discriminant.
5611 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
5612 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
5613 parent type or base type.
5614 * sem_ch4.adb (Process_Indexed_Component,
5615 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
5616 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
5617 Check for implicit dereference.
5618 (List_Operand_Interps): Indicate when an implicit dereference is
5619 ambiguous.
5620 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
5621
5622 2011-08-05 Thomas Quinot <quinot@adacore.com>
5623
5624 * scos.ads: Update documentation of SCO table. Pragma statements can now
5625 be marked as disabled (using 'p' instead of 'P' as the statement kind).
5626 * par_sco.ads, par_sco.adb: Implement the above change.
5627 (Process_Decisions_Defer): Generate a P decision for the first parameter
5628 of a dyadic pragma Debug.
5629 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
5630 necessary.
5631 * put_scos.adb: Code simplification based on above change.
5632
5633 2011-08-05 Robert Dewar <dewar@adacore.com>
5634
5635 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
5636 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5637 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
5638 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
5639
5640 2011-08-05 Bob Duff <duff@adacore.com>
5641
5642 * a-stunau.ads, g-spipat.adb: Update comments.
5643
5644 2011-08-05 Bob Duff <duff@adacore.com>
5645
5646 * a-fihema.ads: Minor comment fix.
5647 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
5648 correct.
5649 (Attach, Detach): Remove some unnecessary code.
5650 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
5651
5652 2011-08-05 Bob Duff <duff@adacore.com>
5653
5654 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
5655 allocation for Objects component. This simplifies the code somewhat. It
5656 is also a little more efficient in the not-so-unusual case where there
5657 are no controlled objects allocated.
5658 Make Finalization_Started flag atomic.
5659 (Finalize): Avoid unnecessary detachment of items from the list.
5660 (pcol): Minor cleanup.
5661
5662 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5663
5664 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
5665 package whose name is the same as that of the generic unit, or its
5666 ultimate prefix.
5667
5668 2011-08-05 Bob Duff <duff@adacore.com>
5669
5670 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
5671 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
5672 Minor comment fixes.
5673
5674 2011-08-05 Arnaud Charlet <charlet@adacore.com>
5675
5676 * make.adb (Linking_Phase): No longer need to set source search path
5677 before calling gnatlink in CodePeer mode.
5678 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
5679 gcc in CodePeer mode, since the binder generated file no longer has a
5680 'with Main'.
5681 * switch.ads, switch.adb (Is_Language_Switch): Removed.
5682 * switch-c.adb: Update comment.
5683
5684 2011-08-05 Thomas Quinot <quinot@adacore.com>
5685
5686 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
5687
5688 2011-08-05 Nicolas Roche <roche@adacore.com>
5689
5690 * gnat_ugn.texi: Fix minor syntax error issue.
5691
5692 2011-08-05 Vincent Celier <celier@adacore.com>
5693
5694 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5695 delete or close the file when the call to gnatmake returns a non
5696 successful return code.
5697
5698 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5699
5700 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
5701 check, indicate that the copy of the original node does not come from
5702 source, to prevent an infinite recursion of the expansion.
5703
5704 2011-08-05 Johannes Kanig <kanig@adacore.com>
5705
5706 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
5707 VC generation for subprogram bodies.
5708
5709 2011-08-05 Yannick Moy <moy@adacore.com>
5710
5711 * einfo.ads: Typo.
5712 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
5713 the base type with the smallest allowed base type.
5714
5715 2011-08-05 Sergey Rybin <rybin@adacore.com>
5716
5717 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
5718 aspects.
5719
5720 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5721
5722 * sem_ch12.ads: minor comment updates.
5723
5724 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5725
5726 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
5727 instantiation and a formal package the compiler generates a package
5728 renaming declaration so that the generic name within the declaration
5729 is interpreted as a renaming of the instance. At the end of a formal
5730 package declaration, this renaming must become invisible.
5731
5732 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5733
5734 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
5735 comparison and rely on concrete entities instead.
5736
5737 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5738
5739 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
5740 and discriminants, to indicate that the type has an access discriminant
5741 that supports implicit dereference.
5742 * snames.ads-tmpl: Add names of aspects and attributes related to
5743 Ada2012 iterators: constant_indexing, default_iterator,
5744 iterator_element, implicit_dereference, variable_indexing.
5745 * aspects.ads, aspects.adb: entries for iterator-related aspects.
5746 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
5747 iterator-related aspects.
5748 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
5749
5750 2011-08-05 Sergey Rybin <rybin@adacore.com>
5751
5752 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
5753 metrics in gnatmetric to cover new kinds of coupling mentrics.
5754
5755 2011-08-05 Steve Baird <baird@adacore.com>
5756
5757 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
5758 of calling the user-defined main subprogram.
5759 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
5760 is set) Call_Main_Subprogram ahead of, as opposed to
5761 inside of, Main.
5762 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
5763 generation of a "with" of the user-defined main subprogram.
5764 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
5765 (which is now called from Gen_Main instead).
5766
5767 2011-08-05 Emmanuel Briot <briot@adacore.com>
5768
5769 * projects.texi: Added reference to the Makefile package.
5770
5771 2011-08-05 Thomas Quinot <quinot@adacore.com>
5772
5773 * exp_ch7.adb: Minor comment rewording.
5774
5775 2011-08-05 Ed Falis <falis@adacore.com>
5776
5777 * env.c: Fix comment.
5778
5779 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5780
5781 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
5782 character comparison and rely on concrete entities instead.
5783
5784 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5785
5786 * sem_ch3.adb: (Check_Private_Overriding): better error message,
5787 suggested by AI95-0068.
5788
5789 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5790
5791 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
5792 the two potential initialization calls. This accounts for any
5793 access-before-elaboration checks which may precede the initialization
5794 calls.
5795 (Next_Suitable_Statement): New routine. Returns the next real statement
5796 after the input node while skipping generated checks.
5797 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
5798 with comment on usage.
5799 Do not generate Elaborate_All when the trigger is a finalization call
5800 coming from a type init proc.
5801 (Check_Elab_Call): Propagate the initialization procedure context to
5802 subsequent calls to Check_A_Call.
5803 (Check_Internal_Call_Continue): Propagate the initialization procedure
5804 context to subsequent calls to Check_Elab_Call.
5805 (Is_Finalization_Procedure): New routine. Returns True if the input
5806 entity denotes a [Deep_]Finalize routine.
5807 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
5808 along with comment on usage.
5809
5810 2011-08-05 Vadim Godunko <godunko@adacore.com>
5811
5812 * s-atocou.ads: Add list of supported platforms.
5813
5814 2011-08-05 Yannick Moy <moy@adacore.com>
5815
5816 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
5817
5818 * opt.ads (Disable_ALI_File): new Boolean flag
5819 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
5820
5821 2011-08-05 Ed Falis <falis@adacore.com>
5822
5823 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
5824 environ is properly defined.
5825
5826 2011-08-05 Vincent Celier <celier@adacore.com>
5827
5828 * make.adb (Compilation_Phase): Exit immediately when all objects have
5829 been found up to date, to avoid multiple exit messages.
5830 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
5831 same project for languages with no compiler.
5832 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
5833 -eI.
5834 2011-08-05 Robert Dewar <dewar@adacore.com>
5835
5836 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
5837 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
5838 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
5839 s-atocou-builtin.adb: Minor reformatting.
5840
5841 2011-08-05 Yannick Moy <moy@adacore.com>
5842
5843 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
5844 if the node to wrap is a pragma check, this node and enclosed
5845 expression are not expanded, so do not apply any transformations here.
5846 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
5847 introducing transient scopes.
5848
5849 2011-08-05 Jose Ruiz <ruiz@adacore.com>
5850
5851 * adaint.c (__gnat_set_writable, __gnat_set_readable,
5852 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
5853 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
5854 routine is available, so we use the default implementation of these
5855 functions.
5856 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
5857 support for copying attributes on VxWorks 6.
5858
5859 2011-08-05 Yannick Moy <moy@adacore.com>
5860
5861 * debug.adb: Remove use of -gnatd.D.
5862 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
5863 * opt.ads: Simplify variables for ALFA mode, to keep one only
5864 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
5865 to ALFA mode.
5866
5867 2011-08-05 Vincent Celier <celier@adacore.com>
5868
5869 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
5870 Builder'Default_Switches.
5871
5872 2011-08-05 Vincent Celier <celier@adacore.com>
5873
5874 * makeusg.adb: Add lines for --create-map-file switches.
5875
5876 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5877
5878 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
5879 profile is incomplete and the full view is available, replace it with
5880 the full view.
5881 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
5882 incomplete, freezing the subprogram is delayed until the full view is
5883 frozen.
5884 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
5885 fixed-point multiplication operator and the predefined operator is
5886 resolved in favor of the user-defined one.
5887
5888 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5889
5890 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
5891 CONST_CAST.
5892
5893 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5894
5895 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
5896 whether a type lacks user-defined Read or Write operations, or has a
5897 component that lacks them.
5898 * sem_attr.adb (Check_Stream_Attribute): if restriction
5899 No_Default_Stream_Attributes is active, verify that all subcomponent
5900 types of the target have user-defined stream operations, and report
5901 error otherwise.
5902 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
5903 * exp_strm.adb: Build_Elementary_Input_Call,
5904 Build_Elementary_Write_Call): remove checks for restriction
5905 No_Default_Stream_Attributes, now checked in semantics.
5906
5907 2011-08-04 Vincent Celier <celier@adacore.com>
5908
5909 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
5910 switches on the command line, look for all valid --RTS switches in the
5911 Builder switches and for each language use the first runtime name found
5912 to invoke gprconfig.
5913 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
5914 command line and there is no auto-configuration.
5915 (Runtime_Name_Set_For): New function.
5916
5917 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5918
5919 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
5920 elaborate initialization expression for variable Abort when processing
5921 a package body or a declaration.
5922 (Create_Finalizer): Propagate the package context when creating the
5923 exception-related variables.
5924 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
5925 For_Package along with usage comment.
5926
5927 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5928
5929 * gcc-interface/Makefile.in: Clean up targets.
5930 Enable new package for atomic counters and copy-on-write implementation
5931 of unbounded strings on x86 platforms.
5932 * gcc-interface/Make-lang.in: Update dependencies.
5933
5934 2011-08-04 Robert Dewar <dewar@adacore.com>
5935
5936 * exp_ch7.adb: Minor reformatting.
5937
5938 2011-08-04 Robert Dewar <dewar@adacore.com>
5939
5940 * exp_strm.adb: Minor reformatting.
5941
5942 2011-08-04 Vadim Godunko <godunko@adacore.com>
5943
5944 * s-atocou.adb: Replace by dummy version and use on targets where atomic
5945 operations are not supported.
5946 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
5947 * s-atocou-x86.adb: New file.
5948 * Makefile.rtl: Add s-atocou.o file
5949
5950 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5951
5952 * make.adb (Compile): Move setting of CodePeer_Mode to ...
5953 (Compilation_Phase): ... here.
5954 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
5955
5956 2011-08-04 Thomas Quinot <quinot@adacore.com>
5957
5958 * Make-generated.in: Fix minor typo in comment.
5959
5960 2011-08-04 Thomas Quinot <quinot@adacore.com>
5961
5962 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
5963 the project path.
5964
5965 2011-08-04 Robert Dewar <dewar@adacore.com>
5966
5967 * a-coinho.adb: Minor reformatting.
5968
5969 2011-08-04 Robert Dewar <dewar@adacore.com>
5970
5971 * a-coinho.ads: Minor reformatting.
5972
5973 2011-08-04 Vadim Godunko <godunko@adacore.com>
5974
5975 * s-atocou.ads, s-atocou.adb: New files.
5976 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
5977 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
5978 direct use of GCC's atomic builtins and replace them by use of new
5979 atomic counter package.
5980
5981 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5982
5983 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
5984
5985 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5986
5987 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
5988 with a call to Get_External_Tag.
5989 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
5990 subprogram usage. Remove the guard against package declarations and
5991 bodies since Build_Cleanup_Statements is no longer invoked in that
5992 context.
5993 (Build_Components): Initialize Tagged_Type_Stmts when the context
5994 contains at least one library-level tagged type.
5995 (Build_Finalizer): New local variables Has_Tagged_Types and
5996 Tagged_Type_Stmts along with associated comments on usage. Update the
5997 logic to include tagged type processing.
5998 (Create_Finalizer): Insert all library-level tagged type unregistration
5999 code before the jump block circuitry.
6000 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6001 (Expand_N_Package_Declaration): Remove the call to
6002 Build_Cleanup_Statements.
6003 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6004 unregister the external tag of a tagged type.
6005 (Processing_Actions): Reimplemented to handle tagged types.
6006 (Process_Declarations): Detect the declaration of a library-level
6007 tagged type and carry out the appropriate actions.
6008 (Unregister_Tagged_Types): Removed. The machinery has been directly
6009 merged with Build_Finalizer.
6010
6011 2011-08-04 Robert Dewar <dewar@adacore.com>
6012
6013 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6014 gnatls.adb, exp_ch3.adb: Minor reformatting.
6015
6016 2011-08-04 Marc Sango <sango@adacore.com>
6017
6018 * sem_attr.adb (Analyze_Attribute): Replace the message
6019 "invisible attribute of}" of the spark restriction violation in
6020 attribute reference by the simple message "invisible attribute of type".
6021 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6022 two insertion characters: '&' and '}'.
6023
6024 2011-08-04 Vadim Godunko <godunko@adacore.com>
6025
6026 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6027 * a-coinho.ads, a-coinho.adb: New file.
6028 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6029
6030 2011-08-04 Nicolas Roche <roche@adacore.com>
6031
6032 * alfa_test.adb: Not all ali files are containing alfa information even
6033 if compiled with -gnatd.F. So suppress warning about missing ALFA
6034 information.
6035
6036 2011-08-04 Yannick Moy <moy@adacore.com>
6037
6038 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6039 scope.
6040 * put_alfa.adb: Check that scope name is not empty.
6041
6042 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6043
6044 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6045 Needs_Elementary_Stream_Operation, to determine whether user-defined
6046 Read and Write attributes are available for the elementary components
6047 of the given type. If only the predefined attributes are available,
6048 then when restriction No_Default_Stream_Attributes is active the
6049 predefined stream attributes for the composite type cannot be created.
6050
6051 2011-08-04 Robert Dewar <dewar@adacore.com>
6052
6053 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6054 Put routines in alpha order
6055
6056 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6057
6058 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6059 * gcc-interface/Make-lang.in: Update dependencies.
6060
6061 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6062
6063 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6064 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6065 gnat1why).
6066
6067 2011-08-04 Robert Dewar <dewar@adacore.com>
6068
6069 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6070 lib-xref-alfa.adb: Minor reformatting.
6071
6072 2011-08-04 Marc Sango <sango@adacore.com>
6073
6074 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6075 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6076 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6077 mode.
6078
6079 2011-08-04 Tristan Gingold <gingold@adacore.com>
6080
6081 * bindgen.adb (Gen_Adainit_C): Remove.
6082 (Gen_Adafinal_C): Ditto.
6083 (Gen_Elab_Externals_C): Ditto.
6084 (Gen_Elab_Calls_C): Ditto.
6085 (Gen_Elab_Order_C): Ditto.
6086 (Gen_Elab_Defs_C): Ditto.
6087 (Gen_Finalize_Library_C): Ditto.
6088 (Gen_Finalize_Library_Defs_C): Ditto.
6089 (Gen_Main_C): Ditto.
6090 (Gen_Output_File_C): Ditto.
6091 (Gen_Restrictions_C): Ditto.
6092 (Gen_Versions_C): Ditto.
6093 (Write_Info_Ada_C): Ditto.
6094 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6095 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6096 Always call Gen_Output_File_Ada.
6097 * gnatlink.adb (Begin_Info): Now a constant.
6098 (End_Info): Ditto.
6099 (Ada_Bind_File): Remove
6100 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6101 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6102 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6103 * opt.ads (Ada_Bind_File): Remove.
6104
6105 2011-08-04 Thomas Quinot <quinot@adacore.com>
6106
6107 * projects.texi: Document target-specific directory in default project
6108 path for gnatmake.
6109
6110 2011-08-04 Thomas Quinot <quinot@adacore.com>
6111
6112 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6113 path in all cases .
6114
6115 2011-08-04 Yannick Moy <moy@adacore.com>
6116
6117 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6118 opt.ads, lib-xref.ads: Code clean up.
6119
6120 2011-08-04 Yannick Moy <moy@adacore.com>
6121
6122 * gnat_rm.texi: Update description of Test_Case
6123 * gnat_ugn.texi: Typo.
6124
6125 2011-08-04 Ed Falis <falis@adacore.com>
6126
6127 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6128
6129 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6130
6131 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6132 it is of type Root_Controlled. This action eliminates fields Prev and
6133 Next from type equality.
6134
6135 2011-08-04 Yannick Moy <moy@adacore.com>
6136
6137 * lib-xref-alfa.adb: Correct typo.
6138
6139 2011-08-04 Matthew Heaney <heaney@adacore.com>
6140
6141 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6142 component.
6143
6144 2011-08-04 Yannick Moy <moy@adacore.com>
6145
6146 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6147 (Analyze_Pragma): allow static string expression for name of Test_Case,
6148 instead of simply string literals.
6149 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6150 expressions.
6151
6152 2011-08-04 Vincent Celier <celier@adacore.com>
6153
6154 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6155 case suffixes to find truncated main sources.
6156
6157 2011-08-04 Tristan Gingold <gingold@adacore.com>
6158
6159 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6160 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6161 (Compute_Current_Task): Ditto.
6162
6163 2011-08-04 Tristan Gingold <gingold@adacore.com>
6164
6165 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6166
6167 2011-08-04 Yannick Moy <moy@adacore.com>
6168
6169 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6170 library-level constant.
6171 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6172 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6173 used as selector of parameter association, in ALFA mode.
6174
6175 2011-08-04 Robert Dewar <dewar@adacore.com>
6176
6177 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6178 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6179 reformatting.
6180
6181 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6182
6183 * make.adb (Linking_Phase): Set source search path before calling
6184 gnatlink in CodePeer mode.
6185
6186 2011-08-04 Javier Miranda <miranda@adacore.com>
6187
6188 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6189 Remove code which takes care of building TSDs.
6190 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6191 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6192 the accessibility check in VM targets.
6193 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6194 (Building_Static_DT): Now returns false for VM targets.
6195 (Build_VM_TSDs): Removed.
6196 (Expand_Interface_Conversion): Generate missing runtime check for
6197 conversions to interface types whose target type is unknown at compile
6198 time.
6199 (Make_VM_TSD): Add missing code to disable the generation of calls to
6200 Check_TSD if the tagged type is not defined at library level, or not
6201 has a representation clause specifying its external tag, or -gnatdQ is
6202 active.
6203 * exp_disp.ads (Build_VM_TSDs): Removed.
6204 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6205 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6206 register primitives in the dispatch tables in VM targets.
6207 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6208 initialization of class-wide interface objects in VM targets.
6209 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6210 of Make_DT).
6211
6212 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6213
6214 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6215 when dotnet-ld cannot be found.
6216
6217 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6218
6219 * bindgen.adb: Simplify significantly generation of binder body file in
6220 CodePeer mode.
6221 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6222 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6223 not expanded).
6224
6225 2011-08-04 Yannick Moy <moy@adacore.com>
6226
6227 * sem_prag.adb, sem.ads: Code cleanup.
6228
6229 2011-08-04 Tristan Gingold <gingold@adacore.com>
6230
6231 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6232 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6233 results if possible.
6234 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6235 * gnat_ugn.texi: Update dynamic stack usage section.
6236
6237 2011-08-04 Steve Baird <baird@adacore.com>
6238
6239 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6240 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6241 contains only a call to the user-defined main subprogram.
6242 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6243 call the "wrapper" subprogram instead of directly
6244 calling the user-defined main subprogram.
6245
6246 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6247
6248 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6249 alternatives of a case statement for controlled objects. Rename local
6250 variable A to Dead_Alt.
6251 (Expand_N_If_Statement): Check the then and else statements of an if
6252 statement for controlled objects. Check the then statements of all
6253 elsif parts of an if statement for controlled objects.
6254 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6255 objects.
6256 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6257 detects a loop associated with the expansion of an array object.
6258 Augment the processing of the loop statements to account for a possible
6259 wrap done by Process_Statements_For_Controlled_Objects.
6260 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6261 statements and abortable part of an asynchronous select for controlled
6262 objects.
6263 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6264 conditional entry call for controlled objects.
6265 (Expand_N_Selective_Accept): Check the alternatives of a selective
6266 accept for controlled objects.
6267 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6268 alternatives of a timed entry call for controlled objects.
6269 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6270 exception handler for controlled objects.
6271 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6272 Add formal parameter Nested_Constructs along with its associated
6273 comment.
6274 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6275 Requires_Cleanup_Actions.
6276 (Process_Statements_For_Controlled_Objects): New routine.
6277 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6278 routine. Inspect a node which contains a non-handled sequence of
6279 statements for controlled objects. If such an object is found, the
6280 statements are wrapped in a block.
6281
6282 2011-08-04 Bob Duff <duff@adacore.com>
6283
6284 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6285 need to compare with Class_Wide_Type (T2), in order to get at the
6286 original class-wide type node.
6287 * sem_type.ads (Covers): Improve the comment.
6288 * einfo.ads (Class_Wide_Type): Improve the comment.
6289 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6290 the type of the Deref.
6291
6292 2011-08-04 Yannick Moy <moy@adacore.com>
6293
6294 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6295 separate declarations.
6296 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6297 check identifier of pragma argument.
6298 (Chain_TC): check that no other test case associated to the same entity
6299 share the same name.
6300 (Check_Test_Case): disallow test case inside subprogram body
6301 (Analyze_Pragma): correct call to check identifier and not argument
6302 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6303 function gets name from test case pragma.
6304
6305 2011-08-04 Yannick Moy <moy@adacore.com>
6306
6307 * gnat_rm.texi: Document new pragma and aspect.
6308 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6309 (No_Duplicates_Allowed): new constant array defining whether duplicates
6310 aspects of each kind can appear on the same declaration.
6311 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6312 field, which points to a node holding the previous Spec_PPC_List.
6313 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6314 through the indirection with Contract.
6315 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6316 * par-prag.adb (Prag): do nothing on Test_Case pragma
6317 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6318 be called directly.
6319 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6320 component Ensures of Test_Case.
6321 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6322 (Analyze_Generic_Subprogram_Declaration,
6323 Analyze_Subprogram_Instantiation,
6324 Analyze_Abstract_Subprogram_Declaration,
6325 Analyze_Subprogram_Body_Helper,
6326 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6327 insert contract in subprogram node at point of definition
6328 * sem_ch13.adb
6329 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6330 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6331 corresponding pragma
6332 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6333 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6334 similar to the analysis of pre/post
6335 (Derive_Subprogram): insert contract in subprogram node at point of
6336 derivation.
6337 * sem_prag.adb, sem_prag.ads
6338 (Check_Arg_Is_String_Literal, Check_Identifier):
6339 new checking procedures to be called in treatment of pragmas
6340 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6341 pragma is well-formed. This does not check currently that 'Result is
6342 used only in the Ensures component of a Test_Case.
6343 (Analyze_Pragma): add case for Test_Case
6344 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6345 components of a Test_Case.
6346 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6347 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6348 pragma, treated as spec expressions.
6349 (Sig_Flags): add value -1 for Test_Case.
6350 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6351 Get_Requires_From_Test_Case_Pragma): getters for both expression
6352 components of a Test_Case.
6353 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6354 indirection between an entry or [generic] subprogram entity and its
6355 pre/post + test-cases.
6356 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6357 get/set for fields of an N_Contract node.
6358 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6359 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6360 names and pragma for Test_Case.
6361 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6362
6363 2011-08-04 Vincent Celier <celier@adacore.com>
6364
6365 * gnat_ugn.texi: Improve documentation of gnatmake switch
6366 --source-info-file=.
6367
6368 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6369
6370 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6371 type). Initialize Atyp to the appropriate type which is later checked
6372 for completion. Rewrite the assertion associated with private type
6373 completion.
6374
6375 2011-08-04 Ed Falis <falis@adacore.com>
6376
6377 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6378 initialize the number of CPUs.
6379
6380 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6381
6382 * sem_type.adb (Disambiguate): New subsidiary routine
6383 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6384 equality on an anonymous access type whose designated type is private
6385 does not lead to an ambiguity with the universal access equality
6386 operator in the body or child units of the defining package. The same
6387 is true for a multiplication operator on a private type completed with
6388 a fixed-point-type.
6389
6390 2011-08-04 Javier Miranda <miranda@adacore.com>
6391
6392 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6393 (Normalize_Scalars_Config): Removed.
6394 * opt.adb
6395 (Register_Opt_Config_Switches): Remove registering config values of
6396 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6397 (Restore_Opt_Config_Switches): Remove code which restores the values of
6398 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6399 Init_Or_Norm_Scalars.
6400 (Save_Opt_Config_Switches): Remove code which saves values of
6401 Init_Or_Norm_Scalars and Normalize_Scalars.
6402 (Set_Opt_Config_Switches): Remove code which restores config values of
6403 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6404 Init_Or_Norm_Scalars.
6405
6406 2011-08-04 Yannick Moy <moy@adacore.com>
6407
6408 * frontend.adb (Frontend): remove previous patch to avoid full
6409 qualification in ALFA mode.
6410 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6411 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6412 unique name for an entity, which could be used to identify the entity
6413 across compilation units.
6414
6415 2011-08-04 Thomas Quinot <quinot@adacore.com>
6416
6417 * prj-env.adb
6418 (Initialize_Default_Project_Path): Add target specific directory
6419 ($prefix/$target/lib/gnat) in front of project path in all cases
6420 (making gnatmake's behaviour consistent with gprbuild).
6421 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6422 Pass target name from Sdefault to project subsystem.
6423 * gnatls.adb: Show new target specific default project directory.
6424
6425 2011-08-04 Johannes Kanig <kanig@adacore.com>
6426
6427 * cstand.adb: Add Information to Identifier in Standard
6428 (Identifer_For): Set Entity to the corresponding entity
6429
6430 2011-08-04 Sergey Rybin <rybin@adacore.com>
6431
6432 * gnat_ugn.texi: Update doc on gnatcheck.
6433
6434 2011-08-04 Yannick Moy <moy@adacore.com>
6435
6436 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6437 xrefs in a scope.
6438
6439 2011-08-04 Yannick Moy <moy@adacore.com>
6440
6441 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6442 performing expansion.
6443 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6444 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6445 it is not called in ALFA mode.
6446
6447 2011-08-04 Emmanuel Briot <briot@adacore.com>
6448
6449 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6450 after all, so removed.
6451
6452 2011-08-04 Sergey Rybin <rybin@adacore.com>
6453
6454 * vms_data.ads: Add missing VMS qualifiers.
6455
6456 2011-08-04 Emmanuel Briot <briot@adacore.com>
6457
6458 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6459 the list of files on the command line after processing it through
6460 Complete_Mains.
6461
6462 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6463
6464 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6465 processing for .NET/JVM. These targets can now benefit from
6466 Raise_From_Controlled_Operation and they share the same processing with
6467 standard targets.
6468 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6469 These targets need transient scopes in order to properly finalize short
6470 lived controlled objects.
6471 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6472 NET/JVM. These targets can now benefit from
6473 Raise_From_Controlled_Operation and they share the same processing with
6474 standard targets.
6475
6476 2011-08-04 Geert Bosch <bosch@adacore.com>
6477
6478 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6479
6480 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6481
6482 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6483 Expand_Record_Aggregate, to determine whether aggregate must be
6484 expanded into assignments. This is the case if the ancestor part is
6485 private, regarless of the setting of the flag Has_Private_Ancestor.
6486
6487 2011-08-04 Ed Falis <falis@adacore.com>
6488
6489 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6490
6491 2011-08-04 Bob Duff <duff@adacore.com>
6492
6493 * sinfo.ads: Fix comment.
6494
6495 2011-08-04 Steve Baird <baird@adacore.com>
6496
6497 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6498 choose a package name in much the same way as is
6499 done for JGNAT when VM_Target /= No_VM, except that
6500 a slightly more distinctive prefix string is used.
6501
6502 2011-08-04 Emmanuel Briot <briot@adacore.com>
6503
6504 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6505 gnatmake command line.
6506 This behavior was never documented (and was supported only because of
6507 an early bug in the code). This case might lead to ambiguous cases
6508 (between unit names and truncated base names without suffixes).
6509
6510 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6511
6512 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6513 Remove the external tag of a tagged type from the internal hash table.
6514 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6515 expanded usage of the routine. Strenghten the check for Is_Master. Add
6516 processing for tagged types.
6517 (Build_Finalizer): Create all the necessary lists used in finalizer
6518 creation when the processed context is a package that may contain
6519 tagged types.
6520 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6521 Requires_Cleanup_Actions.
6522 (Expand_N_Package_Body): Package bodies may need clean up code
6523 depending on whether they contain tagged types.
6524 (Expand_N_Package_Declaration): Package declarations may need clean up
6525 code depending on whether they contain tagged types.
6526 (Unregister_Tagged_Types): New routine. Search through a list of
6527 declarations or statements, looking for non-abstract Ada tagged types.
6528 For each such type, generate code to unregister the external tag.
6529 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6530 Requires_Cleanup_Actions.
6531 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6532 through a list of declarations or statements looking for non-abstract
6533 Ada tagged types or controlled objects.
6534 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6535 Requires_Cleanup_Actions.
6536 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6537 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6538 RE_Unit_Table.
6539
6540 2011-08-04 Vincent Celier <celier@adacore.com>
6541
6542 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6543 has Ada sources, not project Project, because if the root project
6544 Project has no sources of its own, all projects will be deemed without
6545 sources.
6546
6547 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6548
6549 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6550 of the No_Param_Proc acc-to-subp type used for initialization of
6551 __gnat_finalize_library_objects so that it's declared at library level
6552 rather than nested inside of the adainit routine.
6553
6554 2011-08-04 Javier Miranda <miranda@adacore.com>
6555
6556 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6557 if the tagged type has a representation clause which specifies its
6558 external tag.
6559
6560 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6561
6562 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6563 Remove previous procedure with that name.
6564 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6565 when appropriate.
6566 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6567 subtype mark, the ancestor cannot have unknown discriminants.
6568 (Resolve_Record_Aggregate): if the type has invisible components
6569 because of a private ancestor, the aggregate is illegal.
6570
6571 2011-08-04 Vincent Celier <celier@adacore.com>
6572
6573 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6574 account switches -gnat2005, -gnat12 and -gnat2012.
6575
6576 2011-08-04 Bob Duff <duff@adacore.com>
6577
6578 * s-tasdeb.ads: Minor comment fix.
6579
6580 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6581
6582 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6583 CodePeer mode.
6584 * switch.ads, switch.adb (Is_Language_Switch): New function.
6585
6586 2011-08-04 Vincent Celier <celier@adacore.com>
6587
6588 * switch-c.adb: Minor comment addition.
6589
6590 2011-08-04 Vincent Celier <celier@adacore.com>
6591
6592 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6593 ending with '=' is followed by a space (missing file name).
6594
6595 2011-08-04 Pascal Obry <obry@adacore.com>
6596
6597 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6598
6599 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6600
6601 * sem_ch12.adb (Analyze_Associations): New routine
6602 Check_Overloaded_Formal_Subprogram to reject a formal package when
6603 there is a named association or a box initialisation for an overloaded
6604 formal subprogram of the corresponding generic.
6605
6606 2011-08-04 Yannick Moy <moy@adacore.com>
6607
6608 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6609 * get_alfa.adb, put_alfa.adb: Read and write new component of
6610 cross-reference.
6611 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
6612
6613 2011-08-04 Pascal Obry <obry@adacore.com>
6614
6615 * urealp.adb: Minor reformatting.
6616
6617 2011-08-04 Tristan Gingold <gingold@adacore.com>
6618
6619 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
6620 Handle the case when Cleanup_Protected_Object returns Empty.
6621
6622 2011-08-04 Yannick Moy <moy@adacore.com>
6623
6624 * frontend.adb (Frontend): only qualify names in non-ALFA mode
6625
6626 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6627
6628 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
6629 call, ignore functions.
6630
6631 2011-08-04 Geert Bosch <bosch@adacore.com>
6632
6633 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
6634 point.
6635
6636 2011-08-04 Emmanuel Briot <briot@adacore.com>
6637
6638 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
6639 as an index for Builder'Switches. This conforms to the documentation.
6640 * make.adb (Insert_Project_Sources): avoid duplicate code
6641
6642 2011-08-04 Emmanuel Briot <briot@adacore.com>
6643
6644 * makeutl.adb (Complete_Mains): if the user has passed a relative file
6645 name on the command line (for instance "../dummy"), never assume it can
6646 be a unit name.
6647
6648 2011-08-04 Tristan Gingold <gingold@adacore.com>
6649
6650 * bindgen.adb: Remove code the reference or create the
6651 Break_Start/__gnat_break_start procedure.
6652 * s-stalib.adb (Break_Start): Removed.
6653
6654 2011-08-04 Emmanuel Briot <briot@adacore.com>
6655
6656 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
6657 shared with gprbuild.
6658
6659 2011-08-04 Yannick Moy <moy@adacore.com>
6660
6661 * par-ch4.adb (P_Primary): preferentially issue an error message about
6662 a missing parenthesis arount a conditional or case expression in Ada
6663 2012 mode, if we detect that the alignment is not correct for a
6664 statement.
6665
6666 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6667
6668 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
6669 tag-to-class-wide conversion as needing finalization actions.
6670 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
6671 a tag-to-class-wide conversion as needing finalization actions.
6672 (Is_Finalizable_Transient): The result of a tag-to-class-wide
6673 conversion does not need finalization actions.
6674 (Is_Tag_To_CW_Conversion): New routine.
6675 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
6676 whether an object is the result of a tag-to-class-wide conversion.
6677
6678 2011-08-04 Yannick Moy <moy@adacore.com>
6679
6680 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
6681 the left-hand-side and right-hand-side of a conjunct are inserted when
6682 translating a pre- or postcondition
6683 * sem_ch6.adb: Correct typo in comment
6684
6685 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6686
6687 * gnat_rm.texi: Ravenscar does not prohibit dependence on
6688 Unchecked_Conversion and Unchecked_Deallocation.
6689
6690 2011-08-04 Thomas Quinot <quinot@adacore.com>
6691
6692 * make.adb: Minor reformatting.
6693
6694 2011-08-04 Emmanuel Briot <briot@adacore.com>
6695
6696 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
6697 sources in the project and its imported projects, but not in the whole
6698 tree.
6699
6700 2011-08-04 Emmanuel Briot <briot@adacore.com>
6701
6702 * make.adb: Remove debug trace.
6703
6704 2011-08-04 Vincent Celier <celier@adacore.com>
6705
6706 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
6707 path in canonical form, to be able to compare path names on platforms
6708 such as Windows or Darwin.
6709
6710 2011-08-04 Thomas Quinot <quinot@adacore.com>
6711
6712 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
6713 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
6714 * scos.ads: Update documentation accordingly.
6715 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
6716 pragmas.
6717
6718 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6719
6720 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
6721 attribute only if prefix type is scalar.
6722
6723 2011-08-04 Emmanuel Briot <briot@adacore.com>
6724
6725 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
6726 in gnatmake for specifying mains on the command line that do not belong
6727 to the main project. These mains must currently all belong to the same
6728 project, though.
6729 (Ultimate_Extension_Of): removed, since duplicated
6730 Ultimate_Extending_Project.
6731
6732 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6733
6734 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
6735 instead.
6736 (CodePeer_Mode_String): New.
6737 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
6738 CodePeer mode.
6739 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
6740 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
6741 mode, since no useful elaboration subprogram is needed by CodePeer.
6742 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
6743 In this mode, compile binder file with -gnatC and do stop after this
6744 step.
6745
6746 2011-08-04 Vincent Celier <celier@adacore.com>
6747
6748 * exp_ch7.adb: Minor comment fix.
6749
6750 2011-08-04 Robert Dewar <dewar@adacore.com>
6751
6752 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
6753 exp_ch4.adb, makeutl.adb: Minor reformatting.
6754
6755 2011-08-04 Emmanuel Briot <briot@adacore.com>
6756
6757 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
6758 Create several new subprograms to move code out of Make. This makes the
6759 code more readable, removes code duplication, and is a preparation work
6760 for adding support for aggregate projects.
6761
6762 2011-08-04 Tristan Gingold <gingold@adacore.com>
6763
6764 * s-po32gl.ads, s-po32gl.adb: New files.
6765 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
6766 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
6767 (Build_Finalization_Collection): Use it.
6768 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
6769 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
6770 literals.
6771 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
6772 * gcc-interface/Make-lang.in: Update dependencies.
6773
6774 2011-08-04 Emmanuel Briot <briot@adacore.com>
6775
6776 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
6777 the command line.
6778
6779 2011-08-04 Emmanuel Briot <briot@adacore.com>
6780
6781 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
6782 command line is not a file name, also check whether it could be a unit
6783 name.
6784
6785 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6786
6787 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
6788 the header of the finalization routine.
6789 If the unit has no finalizer but is a body whose spec has one, then
6790 generate the decrement of the elaboration entity only.
6791 If the unit has a finalizer and is a spec, then do not generate the
6792 decrement of the elaboration entity.
6793 (Gen_Finalize_Library_C): Likewise.
6794
6795 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6796
6797 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
6798 (Bounds_Size_Expression): Removed.
6799 (Double_Alignment_Of): New subsidiary routine.
6800 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
6801 for a hole in the dope vector of unconstrained arrays due to different
6802 index and element alignments.
6803
6804 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6805
6806 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
6807 raise program_error because body has not been seen yet.
6808
6809 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6810
6811 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
6812 an unresolved name.
6813
6814 2011-08-04 Vincent Celier <celier@adacore.com>
6815
6816 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
6817
6818 2011-08-04 Yannick Moy <moy@adacore.com>
6819
6820 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
6821 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
6822
6823 2011-08-04 Thomas Quinot <quinot@adacore.com>
6824
6825 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
6826 instantiation in RCI.
6827
6828 2011-08-04 Emmanuel Briot <briot@adacore.com>
6829
6830 * make.adb: Share more code with gprbuild
6831
6832 2011-08-04 Emmanuel Briot <briot@adacore.com>
6833
6834 * projects.texi: Added documentation for the IDE'Gnat project file
6835 attribute.
6836
6837 2011-08-04 Nicolas Roche <roche@adacore.com>
6838
6839 * gnat_rm.texi: Minor editing.
6840
6841 2011-08-04 Javier Miranda <miranda@adacore.com>
6842
6843 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
6844 and the library case for VM targets.
6845 (Gen_Adainit_Ada): Likewise.
6846
6847 2011-08-04 Robert Dewar <dewar@adacore.com>
6848
6849 * g-altive.ads: Minor comment updates.
6850 * prj-nmsc.adb: Minor reformatting.
6851
6852 2011-08-04 Javier Miranda <miranda@adacore.com>
6853
6854 * opt.ads
6855 (Normalize_Scalars_Config): Value of the configuration switch set by
6856 pragma Normalize_Scalars when it appears in the gnat.adc file.
6857 (Normalize_Scalars): New field for record Config_Switches_Type. Used
6858 to save and restore settings of this pragma.
6859 * opt.adb
6860 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
6861 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
6862
6863 2011-08-04 Vincent Celier <celier@adacore.com>
6864
6865 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
6866
6867 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6868
6869 * makeutl.adb: Minor reformatting.
6870
6871 2011-08-04 Olivier Hainque <hainque@adacore.com>
6872
6873 * g-altive.ads: Update comments to reflect that only the soft
6874 binding is available today.
6875
6876 2011-08-04 Robert Dewar <dewar@adacore.com>
6877
6878 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
6879 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
6880 * gcc-interface/Make-lang.in: Update dependencies.
6881
6882 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6883
6884 * prj-env.adb: Remove local debug traces.
6885
6886 2011-08-04 Yannick Moy <moy@adacore.com>
6887
6888 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
6889 was used instead of Hi_OK, which could cause a read of an uninitialized
6890 value later on. Detected while working on the new warning.
6891 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
6892 to local variable.
6893 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
6894 in more cases, in order to detect more unreferenced values.
6895 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
6896 object for expression, if any.
6897
6898 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6899
6900 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
6901 the operand types instead of the Esize.
6902
6903 2011-08-04 Steve Baird <baird@adacore.com>
6904
6905 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
6906 enable CodePeer_Mode.
6907 * bindusg.adb (Display): Add help message describing -P binder switch.
6908 * gnat_ugn.texi: Document -P binder switch.
6909 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
6910 user-defined main program directly.
6911 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
6912 user-defined main program in the context clause of the package body.
6913
6914 2011-08-04 Yannick Moy <moy@adacore.com>
6915
6916 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
6917 duplicate of Defining_Entity
6918 (Get_Unique_Entity_For_Decl): rename function into
6919 Unique_Defining_Entity
6920 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
6921 (Formal_Proof_On): remove synthesized flag
6922 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6923 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
6924 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
6925 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
6926 Annotate (Formal_Proof)
6927
6928 2011-08-04 Emmanuel Briot <briot@adacore.com>
6929
6930 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
6931 source files with non-standard naming schemes, in imported projects
6932
6933 2011-08-04 Emmanuel Briot <briot@adacore.com>
6934
6935 * makeutl.adb (Complete_Mains): when a multi-unit source file is
6936 specified on the gprbuild command line, we need to compile all units
6937 within that file, not just the first one we find
6938 Fix error message for mains that are not found.
6939
6940 2011-08-04 Thomas Quinot <quinot@adacore.com>
6941
6942 * sem_ch6.adb: Update comment.
6943 * sem_ch12.adb: Minor reformatting.
6944
6945 2011-08-04 Bob Duff <duff@adacore.com>
6946
6947 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
6948 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
6949 race condition whose symptom is to fail to lock Parent. That, in turn,
6950 causes Parent.Awake_Count to be accessed without locking Parent, which
6951 causes another race condition whose symptom is that Parent.Awake_Count
6952 can be off by 1 (either too high or too low). The solution is to lock
6953 Parent unconditionally, and then lock Acceptor, before reading
6954 Acceptor.Terminate_Alternative.
6955
6956 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6957
6958 * debug.adb: Update comment.
6959
6960 2011-08-04 Robert Dewar <dewar@adacore.com>
6961
6962 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
6963 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
6964 exp_ch6.adb: Minor reformatting.
6965
6966 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6967
6968 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
6969 checks for -gnateE.
6970
6971 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6972
6973 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
6974
6975 2011-08-04 Thomas Quinot <quinot@adacore.com>
6976
6977 * sinfo.ads: Minor reformatting.
6978
6979 2011-08-04 Emmanuel Briot <briot@adacore.com>
6980
6981 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
6982 even if there is no location.
6983
6984 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6985
6986 * sem_res.adb, sem_ch4.adb: move check for restriction
6987 No_Task_Hierarchy to resolve_allocator.
6988
6989 2011-08-04 Thomas Quinot <quinot@adacore.com>
6990
6991 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
6992 This flag of N_Pragma nodes is not used, remove it as well as all of
6993 the associated circuitry.
6994
6995 2011-08-04 Javier Miranda <miranda@adacore.com>
6996
6997 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
6998 runtime check on duplicated externa tags
6999 * debug.adb Document switch -gnatdQ.
7000
7001 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7002
7003 * a-fihema.ads: Minor typo fix.
7004
7005 2011-08-04 Yannick Moy <moy@adacore.com>
7006
7007 * sem_ch10.adb: Minor comment update.
7008
7009 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7010
7011 * einfo.adb: Update the node field usage to reflect the renaming of
7012 Return_Flag to Return_ Flag_Or_Transient_Decl.
7013 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7014 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7015 (Write_Field15_Name): Change Return_Flag to
7016 Return_Flag_Or_Transient_Decl.
7017 * einfo.ads: Rename node field Return_Flag to
7018 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7019 occurrences in entities.
7020 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7021 associated Inline pragma.
7022 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7023 associated Inline pragma.
7024 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7025 routine.
7026 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7027 Return_Flag and Set_Return_Flag.
7028 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7029 objects generated for controlled transients declared inside an
7030 Exception_With_Actions. Update the calls to Return_Flag.
7031 (Process_Object_Declaration): Add code to add a null guard for hook
7032 objects generated for controlled transients declared inside an
7033 Exception_With_Actions. Update related comment.
7034 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7035 objects generated for controlled transients declared inside an
7036 Exception_With_Actions. Update the calls to Return_Flag.
7037 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7038
7039 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7040
7041 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7042 positional aggregate.
7043
7044 2011-08-04 Vincent Celier <celier@adacore.com>
7045
7046 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7047 SLOC only for pragmas.
7048
7049 2011-08-04 Emmanuel Briot <briot@adacore.com>
7050
7051 * projects.texi: Minor typo fix.
7052
7053 2011-08-04 Emmanuel Briot <briot@adacore.com>
7054
7055 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7056 on case-sensitive file systems.
7057
7058 2011-08-04 Thomas Quinot <quinot@adacore.com>
7059
7060 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7061 nested in a disabled pragma.
7062 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7063 enclosing pragma, if any, for X decisions.
7064
7065 2011-08-04 Thomas Quinot <quinot@adacore.com>
7066
7067 * sem_prag.adb: Minor reformatting.
7068
7069 2011-08-04 Vincent Celier <celier@adacore.com>
7070
7071 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7072 allowed in no run time mode.
7073
7074 2011-08-04 Vincent Celier <celier@adacore.com>
7075
7076 * make.adb (Check): When -gnatc is used, check for the source file
7077 inside the ALI file with a canonical case file name.
7078
7079 2011-08-04 Emmanuel Briot <briot@adacore.com>
7080
7081 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7082 overriding the separator.
7083
7084 2011-08-04 Robert Dewar <dewar@adacore.com>
7085
7086 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7087 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7088
7089 2011-08-04 Robert Dewar <dewar@adacore.com>
7090
7091 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7092
7093 2011-08-04 Yannick Moy <moy@adacore.com>
7094
7095 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7096 'Result only appears in postcondition of function.
7097
7098 2011-08-04 Thomas Quinot <quinot@adacore.com>
7099
7100 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7101 external tag, include the value of the external tag in the exception
7102 message.
7103
7104 2011-08-04 Yannick Moy <moy@adacore.com>
7105
7106 * sem_attr.adb (Result): modify error message for misplaced 'Result
7107
7108 2011-08-04 Sergey Rybin <rybin@adacore.com>
7109
7110 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7111 clear that the second argument must be an identifier.
7112
7113 2011-08-04 Thomas Quinot <quinot@adacore.com>
7114
7115 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7116 -fpreserve-control-flow, insert an IF statement on the barrier
7117 condition to ensure that a conditional branch instruction is generated.
7118
7119 2011-08-04 Emmanuel Briot <briot@adacore.com>
7120
7121 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7122 (Processing_Flags.Ignore_Missing_With): new flag.
7123
7124 2011-08-04 Emmanuel Briot <briot@adacore.com>
7125
7126 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7127 Source_List_File on case-insensitive systems where the file is actually
7128 on a case-sensitive file system (NFS,...).
7129
7130 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7131
7132 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7133 function return contains a controlled [extension] aggregate and the
7134 return statement is not part of a handled sequence of statements, wrap
7135 the return in a block. This ensures that all controlled temporaries
7136 generated during aggregate resolution will be picked up by the
7137 finalization machinery.
7138
7139 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7140
7141 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7142 components, freeze type before resolution, to ensure that default
7143 initializations are present for all components.
7144 * sem_res.adb (Resolve_Actuals): the designated object of an
7145 accces-to-constant type is a legal actual in a call to an
7146 initialization procedure.
7147
7148 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7149
7150 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7151 N_Unchecked_Type_Conversion to the possible containers of a renamed
7152 transient variable.
7153
7154 2011-08-04 Yannick Moy <moy@adacore.com>
7155
7156 * par-ch13.adb (Aspect_Specifications_Present): recognize
7157 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7158 is issued in Strict mode.
7159 * par.adb: Fix typos in comments.
7160
7161 2011-08-04 Yannick Moy <moy@adacore.com>
7162
7163 * sem_attr.adb (Result): modify error message to take into account Post
7164 aspect when compiling Ada 2012 (or newer) code.
7165
7166 2011-08-04 Nicolas Roche <roche@adacore.com>
7167
7168 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7169 remove need for GCC exceptions.
7170
7171 2011-08-04 Vincent Celier <celier@adacore.com>
7172
7173 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7174 project, not the source file name.
7175 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7176 excluded, continue looking. This excluded source will only be returned
7177 if there is no other source with the same base name that is not locally
7178 removed.
7179
7180 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7181
7182 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7183 private and one of the operands is a real literal, use a qualified
7184 expression rather than a conversion which is not meaningful to the
7185 back-end.
7186
7187 2011-08-04 Yannick Moy <moy@adacore.com>
7188
7189 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7190 corresponding aspect X'Class are allowed, proceed with analysis of the
7191 aspect instead of skipping it.
7192
7193 2011-08-04 Tristan Gingold <gingold@adacore.com>
7194
7195 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7196 This will allow to have an Ada implementation for the subprogram.
7197
7198 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7199
7200 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7201 completion and aspects are present, apply them to the entity for the
7202 type which is currently the partial view, but which is the one that
7203 will be frozen.
7204 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7205 applies to a partial view, indicate that the full view has predicates
7206 and delayed aspects.
7207 (Replace_Type_Reference): Handle properly predicates that apply to the
7208 full view of a private completion.
7209
7210 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7211
7212 * layout.adb (Layout_Type): For composite types, do not set Esize.
7213 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7214 set Esize.
7215 (Size_Known): Look at the RM size of components instead of the Esize.
7216 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7217 issue warning and activate Implicit_Packing.
7218 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7219 if the Esize is not known.
7220 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7221 for elementary types only.
7222 (Analyze_Record_Representation_Clause): Look at the RM size instead
7223 of the Esize to issue errors.
7224 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7225 is not known.
7226 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7227 obsolete block.
7228 Look at the RM size instead of the Esize for types if the latter is
7229 not known.
7230 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7231
7232 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7233
7234 * sem_type.adb: proper handling of equality not involving anonymous
7235 access types.
7236
7237 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7238
7239 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7240 Vis_Decls. When creating a library-level finalizer for a package spec,
7241 both the declaration and body of the finalizer are inserted either in
7242 the visible or private declarations of the package spec.
7243
7244 2011-08-04 Javier Miranda <miranda@adacore.com>
7245
7246 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7247 use of the full-view of a type when invoking Is_Ancestor.
7248 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7249 the full-view of private parents is requested, then use also the
7250 full-view of the parent of the first derivation.
7251
7252 2011-08-04 Tristan Gingold <gingold@adacore.com>
7253
7254 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7255 instead of the locally imported procedure.
7256 * s-taprop-mingw.adb (Enter_Task): Ditto.
7257 * s-valrea.adb (Scan_Real): Ditto.
7258 * s-imgrea.adb (Set_Image_Real): Ditto.
7259 * s-flocon.ads: Make the package pure.
7260
7261 2011-08-04 Thomas Quinot <quinot@adacore.com>
7262
7263 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7264 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7265 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7266 New subprogram, moved here from...
7267 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7268 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7269 rewriting of the last argument into a procedure call statement here...
7270 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7271 instead.
7272
7273 2011-08-04 Thomas Quinot <quinot@adacore.com>
7274
7275 * par_sco.adb: Minor reformatting.
7276
7277 2011-08-04 Robert Dewar <dewar@adacore.com>
7278
7279 * erroutc.adb: Minor reformatting.
7280
7281 2011-08-04 Thomas Quinot <quinot@adacore.com>
7282
7283 * par_sco.adb: Comment update.
7284
7285 2011-08-04 Tristan Gingold <gingold@adacore.com>
7286
7287 * s-flocon.ads: New file.
7288 * g-flocon.ads: Now a renaming of s-flocon.
7289 * Makefile.rtl: Add s-flocon.o
7290
7291 2011-08-04 Javier Miranda <miranda@adacore.com>
7292
7293 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7294 constrained, do not attempt to build a subtype of it.
7295
7296 2011-08-04 Yannick Moy <moy@adacore.com>
7297
7298 * errout.ads Change comments: remove 'R'M as an example where quotes
7299 are needed; add ALFA as another case where quotes are not needed
7300 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7301 case where quotes are not needed.
7302 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7303 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7304 Remove all occurrences of 'A'L'F'A
7305
7306 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7307
7308 * sem_ch13.adb: check legality of invariant pragma.
7309
7310 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7311
7312 * bindgen.adb: Add comments.
7313
7314 2011-08-04 Yannick Moy <moy@adacore.com>
7315
7316 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7317 synthesized flag.
7318 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7319 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7320
7321 2011-08-04 Robert Dewar <dewar@adacore.com>
7322
7323 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7324 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7325 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7326
7327 2011-08-04 Thomas Quinot <quinot@adacore.com>
7328
7329 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7330
7331 2011-08-04 Thomas Quinot <quinot@adacore.com>
7332
7333 PR ada/47880
7334 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7335 allocated object.
7336
7337 2011-08-04 Robert Dewar <dewar@adacore.com>
7338
7339 * einfo.ads, exp_ch4.adb: Minor reformatting.
7340
7341 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7342
7343 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7344
7345 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7346
7347 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7348 type in all cases to compute list of primitive operations, because full
7349 view may be an itype that is not attached to the list of declarations.
7350
7351 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7352
7353 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7354 library has already been finalized.
7355 (Gen_Adafinal_C): Likewise.
7356 (Gen_Adainit_Ada): Generate an early return if the library has
7357 already been elaborated.
7358 (Gen_Adainit_C): Likewise.
7359 (Gen_Output_File_Ada): Generate an elaboration flag.
7360 (Gen_Output_File_C): Likewise.
7361
7362 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7363
7364 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7365 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7366 built in the first place.
7367 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7368 for CodePeer because Finalize_Address was not built to begin with.
7369 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7370
7371 2011-08-04 Pascal Obry <obry@adacore.com>
7372
7373 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7374 filenames, this ensures unicity of filenames across processes.
7375
7376 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7377
7378 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7379 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7380 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7381 Add False as the actual to From_Abort in the generated call to
7382 Raise_From_Controlled_Operation.
7383
7384 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7385
7386 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7387 so that the ali file name can be retrieved from outside of this package.
7388 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7389 doing nothing in the general case, but used to update the object file
7390 timestamp if directly generated by the backend.
7391 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7392 to a later time than the ali file one.
7393
7394 2011-08-04 Yannick Moy <moy@adacore.com>
7395
7396 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7397 entities whose body contains an Annotate pragma which forces formal
7398 proof on this body.
7399 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7400 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7401 Mark_Non_ALFA_Subprogram to pass in a message and node.
7402 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7403 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7404 surrounding subprogram.
7405 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7406 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7407 as not in ALFA is annotated with Formal_Proof being On, then an error
7408 is issued based on the additional parameters for message and node.
7409 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7410 * gcc-interface/Make-lang.in: Update dependencies.
7411
7412 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7413
7414 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7415 Finalize_Address when CodePeer is enabled.
7416
7417 2011-08-04 Pascal Obry <obry@adacore.com>
7418
7419 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7420 the latter returns a pointer to a static buffer which is deallocated
7421 at the end of the routine.
7422
7423 2011-08-04 Yannick Moy <moy@adacore.com>
7424
7425 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7426 after index creation; mark unconstrained base array type generated as
7427 being in/not in ALFA as well
7428 (Make_Index): mark subtype created as in/not in ALFA
7429 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7430 over a loop as in/not in ALFA, depending on its type and form of loop
7431 iteration.
7432
7433 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7434
7435 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7436 directly to False on .NET and JVM.
7437
7438 2011-08-04 Yannick Moy <moy@adacore.com>
7439
7440 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7441 constraint that subtype must come from source code to be in ALFA, so
7442 that anonymous subtypes can be in ALFA too.
7443
7444 2011-08-04 Yannick Moy <moy@adacore.com>
7445
7446 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7447 reference for ALFA mode.
7448 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7449 procedure public so as to use it from formal verification back-end.
7450
7451 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7452
7453 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7454 invalid checks of the Parameter, making Remove_Switch not working
7455 correctly.
7456
7457 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7458
7459 * targparm.ads: Update header: no run-time exception is needed on this
7460 file.
7461
7462 2011-08-04 Vincent Celier <celier@adacore.com>
7463
7464 * a-fihema.adb: Use System.IO instead of GNAT.IO
7465
7466 2011-08-04 Thomas Quinot <quinot@adacore.com>
7467
7468 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7469 are forbidden in Compiler_Unit mode.
7470
7471 2011-08-04 Robert Dewar <dewar@adacore.com>
7472
7473 * sem_util.adb: Minor reformatting.
7474
7475 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7476
7477 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7478 library-level finalizers.
7479 (Gen_Finalize_Library_C): Update the import string for library-level
7480 finalizers.
7481 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7482 library-level finalizer.
7483 * exp_ch7.adb: Remove with and use clauses for Stringt.
7484 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7485 Spec_Decl. Add local variable Body_Id. The names of library-level
7486 finalizers are now manually fully qualified and are no longer external.
7487 A single name is now capable of servicing .NET, JVM and non-VM targets.
7488 Pragma Export is no longer required to provide visibility for the name.
7489 (Create_Finalizer_String): Removed.
7490 (New_Finalizer_Name): New routine which mimics New_..._Name.
7491
7492 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7493
7494 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7495 elaboration counter to Standard_Short_Integer.
7496 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7497 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7498 (Gen_Elab_Externals_C): Likewise.
7499
7500 2011-08-04 Ed Falis <falis@adacore.com>
7501
7502 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7503 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7504 system-vxworks-mips.ads, system-vxworks-x86.ads
7505 (Always_Compatible_Rep): set to False for all VxWorks targets.
7506
7507 2011-08-04 Robert Dewar <dewar@adacore.com>
7508
7509 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7510 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7511 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7512 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7513 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7514 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7515 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7516 Minor reformatting and code reorganization.
7517
7518 2011-08-04 Emmanuel Briot <briot@adacore.com>
7519
7520 * projects.texi: Added doc for aggregate projects.
7521
7522 2011-08-04 Emmanuel Briot <briot@adacore.com>
7523
7524 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7525 Add support for overriding the Project_Path in aggregate projects.
7526
7527 2011-08-04 Robert Dewar <dewar@adacore.com>
7528
7529 * a-cofove.ads: Minor reformatting.
7530
7531 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7532
7533 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7534 on the generated code.
7535 (Build_Finalize_Statements): Update the comment on the generated code.
7536 (Build_Initialize_Statements): Update the comment on the generated code.
7537 (Build_Object_Declarations): Add local variable Result. The object
7538 declarations are now built in sequence.
7539 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7540 RE_Unit_Table.
7541
7542 2011-08-04 Robert Dewar <dewar@adacore.com>
7543
7544 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7545
7546 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7547
7548 * einfo.ads (Elaboration_Entity): Document new definition and use.
7549 (Elaboration_Entity_Required): Adjust to above change.
7550 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7551 * exp_ch12.adb: And with and use for Snames.
7552 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7553 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7554 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7555 <Check_Unit_Name>: Deal with N_Expanded_Name.
7556 <Attribute_Elaborated>: Extend to all unit names.
7557 * sem_elab.adb: And with and use for Uintp.
7558 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7559 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7560 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7561 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7562 from Gen_Adainit_Ada.
7563 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7564 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7565 case, do not call System.Standard_Library.Adafinal; instead call
7566 finalize_library if needed.
7567 (Gen_Adafinal_C): Likewise.
7568 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7569 non-main program case.
7570 (Gen_Adainit_C): Generate a couple of external declarations here.
7571 In the main program case, set SSL.Finalize_Library_Objects.
7572 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7573 (Gen_Elab_Calls_C): Likewise.
7574 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7575 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7576 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7577 objects here.
7578 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7579 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7580 Gen_Adafinal_Ada.
7581 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7582 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7583 of external declarations. Call Gen_Finalize_Library_C.
7584
7585 2011-08-04 Emmanuel Briot <briot@adacore.com>
7586
7587 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7588 Compute_Compilation_Phases): new subprogram.
7589 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7590 The number of mains as well as the various compilation phases that
7591 need to be run are now project tree specific, since various
7592 aggregated trees might have different requirements. In particular,
7593 they do not all require bind or link phases.
7594
7595 2011-08-04 Emmanuel Briot <briot@adacore.com>
7596
7597 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7598 (Project_Tree_Appdata): New type.
7599 It is now possible to associate application-specific data to a project
7600 tree. In particular, this is used in the gprbuild builder to avoid a
7601 number of global tables and htables, especially now that there can be
7602 several project trees loaded at once because of aggregate projects.
7603 (Debug_Name): new procedure.
7604 * projects.texi: Clarify syntax of "**" for Source_Dirs
7605
7606 2011-08-03 Emmanuel Briot <briot@adacore.com>
7607
7608 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7609 the "roots" for a main.
7610 (Fill_From_Project): add support for aggregate projects. Main units
7611 in aggregated projects are now automatically added in the list of
7612 files to build (although this fails later on in gprbuild, because
7613 these files are not using the root proejct tree, so this needs
7614 further cleanup)
7615 * gcc-interface/Make-lang.in: Update dependencies.
7616
7617 2011-08-03 Yannick Moy <moy@adacore.com>
7618
7619 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
7620 conditional expression in ALFA.
7621 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
7622 expressions as not in ALFA.
7623
7624 2011-08-03 Robert Dewar <dewar@adacore.com>
7625
7626 * a-cofove.adb: Minor reformatting.
7627
7628 2011-08-03 Emmanuel Briot <briot@adacore.com>
7629
7630 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
7631 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
7632 gprbuild sources.
7633 These packages are more logically placed in the Queue package, since
7634 they manipulate the queue. It is also likely that they can be adapted
7635 for gnatmake, thus sharing more code.
7636 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
7637 that we could move the above.
7638
7639 2011-08-03 Emmanuel Briot <briot@adacore.com>
7640
7641 * errutil.adb (Finalize): clean up the list of error messages on exit.
7642 Calling this subprogram multiple times will no longer show duplicate
7643 error messages on stderr.
7644
7645 2011-08-03 Emmanuel Briot <briot@adacore.com>
7646
7647 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
7648 Getopt_Switches when we have already define a command line
7649 configuration.
7650
7651 2011-08-03 Yannick Moy <moy@adacore.com>
7652
7653 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
7654 in ALFA. Instead, they are considered as assertions to prove.
7655 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
7656 nodes as not in ALFA. Instead, include conditional expressions in ALFA
7657 if they have no ELSE part, or if they occur in pre- and postconditions,
7658 where the Condition cannot have side-effects in ALFA
7659 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
7660 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
7661 Instead, include type conversion between scalar types in ALFA.
7662 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
7663 if-and-only-if its type is in ALFA.
7664
7665 2011-08-03 Thomas Quinot <quinot@adacore.com>
7666
7667 * scos.adb, get_scos.adb, put_scos.adb
7668 New code letter for decisions: G (entry guard)
7669 * par_sco.adb
7670 (Traverse_Subprogram_Body): Rename to...
7671 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
7672 (Traverse_Protected_Body): New subprogram
7673 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
7674 protected bodies and entry bodies.
7675
7676 2011-08-03 Yannick Moy <moy@adacore.com>
7677
7678 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
7679 entities with get/set subprograms, which is set on procedure entities
7680 generated by the compiler for a postcondition.
7681 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
7682 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
7683 entity for a declaration
7684 (Get_Unique_Entity_For_Decl): new function returning an entity which
7685 represents a declaration, so that matching spec and body have the same
7686 entity.
7687
7688 2011-08-03 Robert Dewar <dewar@adacore.com>
7689
7690 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
7691 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
7692
7693 2011-08-03 Yannick Moy <moy@adacore.com>
7694
7695 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
7696 library-level because retriction No_Implicit_Dynamic_Code in the
7697 front-end prevents its definition as a local subprogram
7698 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
7699 for reuse in other contexts
7700 (Traverse_Declarations_Or_Statements,
7701 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7702 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
7703 procedures take a callback parameter to be called on all declarations
7704 * lib-xref.ads
7705 (Traverse_All_Compilation_Units): new generic function to traverse a
7706 compilation unit and call a callback parameter on all declarations
7707
7708 2011-08-03 Javier Miranda <miranda@adacore.com>
7709
7710 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
7711 in Java since they are always enclosed in a namespace that
7712 differentiates them, and overloaded entities are supported by the VM.
7713
7714 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7715
7716 * checks.adb (Determine_Range): If a computed bound of an operation is
7717 outside the range of the base type of the expression, and overflow
7718 checks are enabled, the result is unknown and cannot be used for any
7719 subsequent constant folding.
7720 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
7721 unknown, so is the result of the comparison.
7722
7723 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7724
7725 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
7726 From_Abort. When finalization was triggered by an abort, propagate
7727 Standard'Abort_Signal rather than Program_Error.
7728 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
7729 From_Abort.
7730 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
7731 From_Abort. When finalization was triggered by an abort, propagate
7732 Standard'Abort_Signal rather than Program_Error.
7733 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
7734 From_Abort.
7735 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
7736 Abort_Id. Update the calls to Build_Object_Declarations and
7737 Build_Raise_Statement to include Abort_Id.
7738 (Build_Adjust_Statements): New local variable Abort_Id. Update the
7739 calls to Build_Object_Declarations and Build_Raise_Statement to include
7740 Abort_Id.
7741 (Build_Finalize_Statements): New local variable Abort_Id. Update the
7742 calls to Build_Object_Declarations and Build_Raise_Statement to include
7743 Abort_Id.
7744 (Build_Components): Create an entity for Abort_Id when exceptions are
7745 allowed on the target.
7746 (Build_Finalizer): New local variable Abort_Id.
7747 (Build_Initialize_Statements): New local variable Abort_Id. Update the
7748 calls to Build_Object_Declarations and Build_Raise_Statement to include
7749 Abort_Id.
7750 (Build_Object_Declarations): Add new formal Abort_Id. Create the
7751 declaration of flag Abort_Id to preserve the original abort status
7752 before finalization code is executed.
7753 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
7754 runtime routine Raise_From_Controlled_Operation.
7755 (Create_Finalizer): Update the call to Build_Raise_Statement to include
7756 Abort_Id. Update the call to Build_Object_Declarations to include
7757 Abort_Id. Update the layout of the finalizer body.
7758 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
7759 (Process_Transient_Objects): New local variable Abort_Id. Remove the
7760 clunky code to create all flags and objects related to
7761 exception propagation and replace it with a call to
7762 Build_Object_Declarations. Update the call to Build_Raise_Statement to
7763 include Abort_Id.
7764 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
7765 Add new formal Abort_Id and associated comment on its use.
7766 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
7767 on its use.
7768 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
7769 Remove the clunky code to create all flags and objects related to
7770 exception propagation and replace it with a call to
7771 Build_Object_Declarations. Update the call to Build_Raise_Statement.
7772
7773 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7774
7775 * s-tassta.adb: Fix minor typos.
7776
7777 2011-08-03 Robert Dewar <dewar@adacore.com>
7778
7779 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
7780 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
7781
7782 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7783
7784 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
7785 to packages. This ensures that the finalizer body will not end up
7786 inside the freeze node.
7787 (Process_Declarations): Add code to detect whether a freeze node has a
7788 nested finalization collection.
7789
7790 2011-08-03 Pascal Obry <obry@adacore.com>
7791
7792 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
7793 (Current_Session): Return a not null access to Session_Type.
7794 (Default_Session): Likewise.
7795
7796 2011-08-03 Robert Dewar <dewar@adacore.com>
7797
7798 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
7799 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
7800
7801 2011-08-03 Pascal Obry <obry@adacore.com>
7802
7803 * g-awk.ads: Minor comment fix.
7804
7805 2011-08-03 Sergey Rybin <rybin@adacore.com>
7806
7807 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7808 the tree structure related to discriminant constraints.
7809 Original_Discriminant cannot be used any more for computing the
7810 defining name for the reference to a discriminant.
7811
7812 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7813
7814 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
7815 function is not visibly tagged, this is not a dispatching call and
7816 therfore is not Tag_Indeterminate, even if the function is marked as
7817 dispatching on result.
7818
7819 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7820
7821 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
7822 (Expand_N_Free_Statement): Add a guard to protect against run-times
7823 which do not support controlled types.
7824 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
7825 against run-times which do not support controlled types.
7826 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
7827 against run-times which do not support controlled types.
7828 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
7829 against run-times which do not support controlled types.
7830 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
7831 protect against run-times which do not support controlled types.
7832
7833 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7834
7835 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
7836 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
7837
7838 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7839
7840 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
7841 modified in the source, to prevent spurious warnings when compiling
7842 with -gnatg.
7843
7844 2011-08-03 Thomas Quinot <quinot@adacore.com>
7845
7846 * a-except-2005.adb: Minor reformatting.
7847
7848 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7849
7850 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
7851 is a renaming declaration in the private part of a package, do not emit
7852 a warning that the with_clause could be moved because the renaming may
7853 be used in the body or in a child unit.
7854
7855 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7856
7857 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7858 Propagate the Comes_From_Source attribute from the original return
7859 object to the renaming.
7860
7861 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7862
7863 * exp_ch7.adb (Build_Raise_Statement): Do not call
7864 Raise_From_Controlled_Operation when this routine is not present in
7865 the run-time library.
7866 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
7867 libraries (Ravenscar), tasks are non-terminating, and protected objects
7868 and tasks can only appear at library level, so we do not want
7869 finalization of protected objects nor tasks.
7870 * exp_intr.adb: Minor clarification in comment.
7871 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
7872 Gen_Output_File_C): Remove references to finalization of library-level
7873 objects when using restricted run-time libraries.
7874
7875 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7876
7877 * sem_ch3.adb (Build_Discriminant_Constraints): Set
7878 Original_Discriminant only if the parent type is a generic formal.
7879
7880 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7881
7882 * exp_ch13.adb: Add with and use clause for Targparm;
7883 (Expand_N_Free_Statement): Prevent the generation of a custom
7884 Deallocate on .NET/JVM targets since this requires pools and address
7885 arithmetic.
7886 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
7887 .NET/JVM targets, attach the newly allocated object to the access
7888 type's finalization collection. Do not generate a call to
7889 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
7890 exist in the runtime.
7891 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
7892 create a custom Allocate for object that do not require initialization.
7893 Attach a newly allocated object to the access type's finalization
7894 collection on .NET/JVM.
7895 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
7896 assignment of controlled types on .NET/JVM. The two hidden pointers
7897 Prev and Next and stored and later restored after the assignment takes
7898 place.
7899 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
7900 kludge for .NET/JVM to recognize a particular piece of code coming from
7901 Heap_Management and change the call to Finalize into Deep_Finalize.
7902 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
7903 finalization collections on .NET/JVM only for types derived from
7904 Controlled. Separate the association of storage pools with a collection
7905 and only allow it on non-.NET/JVM targets.
7906 (Make_Attach_Call): New routine.
7907 (Make_Detach_Call): New routine.
7908 (Process_Object_Declarations): Suppress the generation of
7909 build-in-place return object clean up code on .NET/JVM since it uses
7910 pools.
7911 * exp_ch7.ads (Make_Attach_Call): New routine.
7912 (Make_Detach_Call): New routine.
7913 * exp_intr.adb Add with and use clause for Targparm.
7914 (Expand_Unc_Deallocation): Detach a controlled object from a collection
7915 on .NET/JVM targets.
7916 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
7917 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
7918 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
7919 names used in finalization.
7920
7921 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7922
7923 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
7924 (Attach, Detach): Lock the current task when chaining an object onto a
7925 collection.
7926
7927 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7928
7929 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
7930 Rewritten to create the message strings when the exception is not
7931 raised by an abort during finalization.
7932 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
7933 Raise_From_Controlled_Operation and update its associated comment.
7934 * a-fihema.ads, a-fihema.adb: New GNAT unit.
7935 Ada.Finalization.Heap_Management provides key functionality
7936 associated with controlled objects on the heap, their creation,
7937 finalization and reclamation. Type Finalization_Collection is
7938 effectively a wrapper which sits ontop of a storage pool and performs
7939 all necessary bookkeeping for all the objects it contains. Each
7940 access-to-controlled or access-to-class-wide type receives a collection
7941 as part of its expansion. The compiler generates buffer code and
7942 invokes Allocate / Deallocate to create and destroy allocated
7943 controlled objects.
7944 * a-finali.adb ("="): Removed.
7945 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
7946 fields Prev and Next.
7947 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
7948 A library unit with at least one controlled object on the library level
7949 has a special finalizer which is invoked by the binder. To signal this,
7950 ali files carry field PF.
7951 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
7952 associated comment on field usage.
7953 * a-tags.adb (Get_RC_Offset): Removed.
7954 (Needs_Finalization): New routine.
7955 * a-tags.ads: Update the structure of the GNAT dispatch tables.
7956 Dispatch tables now carry field Needs_Finalization which provides
7957 runtime indication whether a type is controlled or has controlled
7958 components or both. Remove field RC_Offset.
7959 (Get_RC_Offset): Removed along with its associated pragma Export.
7960 Since tagged types with controlled components no longer carry hidden
7961 field _controller, the special mechanism to retrieve its location is no
7962 longer needed.
7963 (Needs_Finalization): New routine.
7964 * atree.ads, atree.adb (Elist24): New routine.
7965 (Set_Elist24): New routine.
7966 * atree.h: Add a define clause for Elist24.
7967 * bindgen.adb New library-level variable Lib_Final_Built.
7968 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
7969 presence of a VM target, the routine generates calls to the proper
7970 library finalization routine.
7971 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
7972 targets. Set the correct library finalization routine depending on
7973 whether the library has controlled objects or this is a VM compilation.
7974 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
7975 to library-level finalizers of compiled units in reverse order of
7976 elaboration. It also produces exception management code and reraises a
7977 potential exception after all units have been finalized.
7978 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
7979 library-level finalizers of compiled units in reverse order of
7980 elaboration.
7981 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
7982 definitions of all library-level finalizers available to the compilation
7983 (Gen_Main_Ada): Directly call Adafinal which now contails all target
7984 dependent code.
7985 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
7986 System.Standard_Library.Adafinal directly. If the library needs
7987 finalization actions, create the sequence of finalization calls.
7988 (Gen_Output_File_Ada): Alphabetize local variables and constants.
7989 Generate a with clause for System.Soft_Links when compiling for a VM.
7990 Remove the code which imports System.Standard_Library.Adafinal as
7991 Do_Finalize. Generate the library finalization routine.
7992 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
7993 If the library needs finalization actions, create all the definitions
7994 of library- level finalizers.
7995 (Has_Finalizer): New routine. Determines whether at least one compiled
7996 unit has a library-level finalizer.
7997 Add type Qualification_Mode.
7998 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
7999 * einfo.adb: New usage of field 15 as Return_Flag.
8000 Remove Finalization_Chain_Entity from the usages of field 19.
8001 Remove Associated_Final_Chain from the usages of field 23.
8002 New usage of field 23 as Associated_Collection.
8003 New usage of field 24 as Finalizer.
8004 New usage of flag 252 as Is_Processed_Transient.
8005 (Associated_Final_Chain): Removed.
8006 (Associated_Collection): New routine.
8007 (Finalization_Chain_Entity): Removed.
8008 (Finalizer): New routine.
8009 (Is_Finalizer): New routine.
8010 (Is_Processed_Transient): New routine.
8011 (Return_Flag): New routine.
8012 (Set_Associated_Final_Chain): Removed.
8013 (Set_Associated_Collection): New routine.
8014 (Set_Finalization_Chain_Entity): Removed.
8015 (Set_Finalizer): New routine.
8016 (Set_Is_Processed_Transient): New routine.
8017 (Set_Return_Flag): New routine.
8018 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8019 displayed flags.
8020 (Write_Field8_Name): Alphabetize the output.
8021 (Write_Field11_Name): Alphabetize the output.
8022 (Write_Field12_Name): Alphabetize the output.
8023 (Write_Field13_Name): Alphabetize the output.
8024 (Write_Field14_Name): Alphabetize the output.
8025 (Write_Field15_Name): Alphabetize the output.
8026 (Write_Field16_Name): Alphabetize the output.
8027 (Write_Field17_Name): Alphabetize the output.
8028 (Write_Field18_Name): Alphabetize the output.
8029 (Write_Field19_Name): Alphabetize the output. Remove the output of
8030 Finalization_Chain_Entity.
8031 (Write_Field20_Name): Alphabetize the output.
8032 (Write_Field21_Name): Alphabetize the output.
8033 (Write_Field22_Name): Alphabetize the output.
8034 (Write_Field23_Name): Alphabetize the output. Remove the output of
8035 Associated_Final_Chain. Add output for Associated_Collection.
8036 (Write_Field24_Name): Alphabetize the output.
8037 (Write_Field25_Name): Add output for Finalizer.
8038 (Write_Field26_Name): Alphabetize the output.
8039 (Write_Field27_Name): Alphabetize the output.
8040 (Write_Field28_Name): Alphabetize the output.
8041 * einfo.ads: Add new field description for Associated_Collection and
8042 its uses in nodes.
8043 Remove Associated_Final_Chain and its uses in nodes.
8044 Remove Finalization_Chain_Entity and its uses in nodes.
8045 Add new field description for Finalizer and its uses in nodes.
8046 Add new synthesized attribute Is_Finalizer.
8047 Add new flag description for Is_Processed_Transient and its uses in
8048 nodes.
8049 Add new field description for Return_Flag and its uses in nodes.
8050 (Associated_Final_Chain): Removed along with its pragma Inline.
8051 (Associated_Collection): New routine and pragma Inline.
8052 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8053 (Finalizer): New routine and pragma Inline.
8054 (Is_Finalizer): New routine and pragma Inline.
8055 (Is_Processed_Transient): New routine and pragma Inline.
8056 (Return_Flag): New routine and pragma Inline.
8057 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8058 (Set_Associated_Collection): New routine and pragma Inline.
8059 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8060 (Set_Finalizer): New routine and pragma Inline.
8061 (Set_Is_Processed_Transient): New routine and pragma Inline.
8062 (Set_Return_Flag): New routine and pragma Inline.
8063 * exp_aggr.adb: Alphabetize subprograms.
8064 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8065 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8066 associated comments. Remove local variables External_Final_List and
8067 Attach.
8068 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8069 Ancestor. Remove the retrieval of finalization lists. Update the call to
8070 Make_Adjust_Call.
8071 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8072 lists. Update the call to Late_Expansion.
8073 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8074 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8075 (Gen_Assign): Remove the retrieval of the finalization list used to
8076 build the assignment. Update the calls to Make_Init_Call and
8077 Make_Adjust_Call.
8078 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8079 Remove the mechanism to determine attachment levels and finalization
8080 list retrieval. Remove the processing for coextensions.
8081 (Init_Controller): Removed. Controllers no longer exist.
8082 (Late_Expansion): Remove formals Flist and Obj along with their
8083 associated comments. Update the calls to Build_Record_Aggr_Code and
8084 Build_Array_Aggr_Code.
8085 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8086 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8087 appear in entry bodies, protected subprograms and task bodies.
8088 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8089 * exp_ch3.adb (Add_Final_Chain): Removed.
8090 (Build_Array_Init_Proc): Alphabetize local variables.
8091 (Build_Assignment): Alphabetize local variables. Update the call to
8092 Maked_Adjust_Call.
8093 (Build_Class_Wide_Master): Rename local variables to better reflect
8094 their role.
8095 (Build_Discriminant_Assignments): Code reformatting.
8096 (Build_Init_Call_Thru): Code reformatting.
8097 (Build_Init_Procedure): Code reformatting. Generate a special version
8098 of Deep_Finalize which is capable of finalizing all initialized
8099 components and ignore the rest.
8100 (Build_Init_Statements): Rename local variables to better reflect their
8101 role.
8102 Reimplement the mechanism to include the creation and update of an index
8103 variable called a "counter". It is used as a bookmark for tracing
8104 initialized and non-initialized components.
8105 (Build_Initialization_Call): Remove local variable Controller_Typ.
8106 Alphabetize all local variables. Remove the initialization of the
8107 record controller and update the call to Make_Init_Call.
8108 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8109 New local variable Counter.
8110 (Constrain_Array): Alphabetize.
8111 (Expand_Freeze_Array_Type): Create a collection instead of a
8112 finalization list.
8113 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8114 Finalize_Address which is used in conjunction with allocated controlled
8115 objects.
8116 (Expand_N_Object_Declaration): Remove the creation of a finalization
8117 list for anonymous access types. Update the calls to Make_Init_Call and
8118 Make_Adjust_Call.
8119 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8120 retrieval of finalization lists. Remove the expansion of the record
8121 controller. Create TSS primitive Finalize_Address used in conjunction
8122 with controlled objects on the heap. Create finalization collections
8123 for access-to-controlled record components.
8124 (Expand_Record_Controller): Removed.
8125 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8126 class-wide types now requires additional processing. Create
8127 finalization collections for access-to-controlled types.
8128 (Increment_Counter): New routine.
8129 (Make_Counter): New routine.
8130 (Make_Eq_If): Remove the mention of Name_uController.
8131 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8132 types coming from System.Finalization_Root.
8133 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8134 (Predefined_Primitive_Bodies): There is no longer need to skip types
8135 coming from System.Finalization_Root.
8136 (Stream_Operation_OK): Do not generate stream routines for
8137 type Ada.Finalization.Heap_Management.Finalization_Collection.
8138 * exp_ch3.ads: Alphabetize subprograms.
8139 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8140 Add with and use clause for Lib.
8141 (Complete_Coextension_Finalization): Removed.
8142 (Complete_Controlled_Allocation): New routine. Create a finalization
8143 collection for anonymous access-to-controlled types. Create a custom
8144 Allocate which interfaces with the back end and the machinery in
8145 Heap_Management.
8146 (Expand_Allocator_Expression): Add necessary calls to
8147 Complete_Controlled_Allocation. Remove the retrieval of finalization
8148 lists. Update the calls to Make_Adjust_Call. Generate a call to
8149 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8150 the associated collection.
8151 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8152 Code clean up. Remove the retrieval of finalization lists and
8153 attachment levels.
8154 Update the call to Make_Init_Call. Generate a call to
8155 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8156 the associated collection.
8157 (Get_Allocator_Final_List): Removed. Finalization lists are not
8158 available.
8159 (Suitable_Element): Remove the mention of Name_uController.
8160 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8161 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8162 the left hand side, carry out the assignment and adjust the left hand
8163 side.
8164 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8165 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8166 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8167 BIP_Collection and BIPcollection.
8168 (Build_Heap_Allocator): New routine used to allocate the return object
8169 of a build-in-place function onto a collection.
8170 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8171 (Expand_Call): Do not replace direct calls to Deep routines with their
8172 aliases.
8173 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8174 and update their occurrences. Add a special return flag to monitor the
8175 [ab]normal execution of the function. The flag is set right before the
8176 return statement.
8177 Rewrite the mechanism used to allocate a build-in-place return object
8178 on the heap or on a storage pool.
8179 (Is_Direct_Deep_Call): New routine.
8180 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8181 build-in-place function call instead of a final list. Build a call to
8182 Set_Finalize_Address_Ptr to decorate the associated collection.
8183 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8184 order to name the build-in-place function call's result for later
8185 finalization. Add a collection to a build-in-place function call
8186 instead of a final list.
8187 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8188 build-in-place function call instead of a final list. Remove the code
8189 which moves one final list and transforms it into the actual in a
8190 nested build-in-place call.
8191 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8192 build-in-place function call instead of a final list.
8193 (Move_Final_List): Removed.
8194 (Needs_BIP_Collection): New routine.
8195 (Needs_BIP_Final_List): Removed.
8196 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8197 enumeration type BIP_Formal_Kind.
8198 Update the related comment.
8199 (Needs_BIP_Collection): New routine.
8200 (Needs_BIP_Final_List): Removed.
8201 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8202 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8203 majority of subprograms in this unit. Add Name_Finalize_Address to
8204 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8205 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8206 statements for an array type.
8207 (Build_Adjust_Statements): Create the adjust statements for a record
8208 type.
8209 (Build_Cleanup_Statements): New routine. A procedure which given any
8210 construct containing asynchronous calls, references to _master, or is a
8211 task body, a task allocation or a protected body produces the necessary
8212 runtime calls to clean up these constructs.
8213 (Build_Exception_Handler): New routine.
8214 (Build_Final_List): Removed.
8215 (Build_Finalization_Collection): New routine. A core procedure which
8216 creates a collection to service heap allocated controlled objects
8217 associated with an access-to-controlled type.
8218 (Build_Finalize_Statements): Create the finalization statements for a
8219 record types.
8220 (Build_Finalizer): New routine. A core procedure which given any
8221 construct with declarations and/or statements detects all objects which
8222 need any type of clean up (controlled objects, protected objects) and
8223 generates all necessary code to clean up the said objects in the proper
8224 order.
8225 (Build_Finalizer_Call): New routine.
8226 (Build_Initialize_Statements): Create the initialization statements for
8227 an array type. The generated routine contains code to finalize partially
8228 initialized arrays.
8229 (Build_Object_Declarations): New routine.
8230 (Build_Raise_Statement): New routine.
8231 (Clean_Simple_Protected_Objects): Removed.
8232 (Controller_Component): Removed.
8233 (Enclosing_Function): New routine.
8234 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8235 either declarations or statements or both.
8236 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8237 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8238 package.
8239 (Find_Final_List): Removed.
8240 (Global_Flist_Ref): Removed.
8241 (In_Finalization_Root): Removed.
8242 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8243 scope in terms of tree nodes. Process all transient variables within
8244 that range.
8245 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8246 generated after the adjust.
8247 (Make_Attach_Call): Removed.
8248 (Make_Call): New routine.
8249 (Make_Clean): Removed.
8250 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8251 build routines.
8252 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8253 in Deep routines.
8254 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8255 build routines.
8256 (Make_Final_Call): Modified to simply create a call to either
8257 Deep_Finalize or Finalize.
8258 (Make_Finalize_Address_Body): New routine.
8259 (Make_Finalize_Address_Stmts): New routine. A function which produces
8260 TSS primitive Finalize_Address used in conjunction with heap allocated
8261 controlled objects.
8262 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8263 (Make_Init_Call): Rewritten. There is no longer an attach call
8264 generated after initialization.
8265 (Make_Local_Deep_Finalize): New routine.
8266 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8267 (Make_Transient_Block): Remove the finalization list retrieval and
8268 manipulation.
8269 (Needs_Finalization): Moved to Exp_Util.
8270 (Parent_Field_Type): New routine.
8271 (Preprocess_Components): New routine.
8272 (Process_Transient_Objects): New routine.
8273 (Wrap_HSS_In_Block): New routine.
8274 (Wrap_Transient_Declaration): Remove finalization list management and
8275 controller insertion.
8276 (Wrap_Transient_Expression): Code reformatting.
8277 (Wrap_Transient_Statement): Code reformatting.
8278 * exp_ch7.ads (Build_Final_List): Removed.
8279 (Build_Finalization_Collection): New routine.
8280 (Build_Raise_Statement): New routine.
8281 (Controller_Component): Removed.
8282 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8283 (Find_Final_List): Removed.
8284 (In_Finalization_Root): Removed.
8285 (Is_Simple_Protected_Type): Update related comment.
8286 (Make_Adjust_Call): New parameter profile and associated comments.
8287 (Make_Attach_Call): Removed.
8288 (Make_Final_Call): New parameter profile and associated comments.
8289 (Make_Finalize_Address_Body): New routine.
8290 (Make_Init_Call): New parameter profile and associated comments.
8291 (Make_Local_Deep_Finalize): New routine.
8292 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8293 (Needs_Finalization): Moved to Exp_Util.
8294 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8295 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8296 (Find_Protection_Type): Moved to Exp_Util.
8297 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8298 (Make_DT): Update sequence of dispatch table initialization. Remove the
8299 initialization of field RC_Offset. Add initialization of field Needs_
8300 Finalization.
8301 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8302 Reimplement how an object is first finalized, then deallocated.
8303 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8304 Code reformatting.
8305 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8306 Register TSS_Finalize_Address with type TSS_Names.
8307 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8308 procedure provides the interface between an allocation / deallocation
8309 and the support machinery in Ada.Finalization.Heap_Management.
8310 (Find_Init_Call): Code reformatting.
8311 (Find_Init_Call_In_List): Code reformatting.
8312 (Find_Protection_Type): Moved from Exp_Ch9.
8313 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8314 (Has_Controlled_Coextensions): Removed.
8315 (Has_Controlled_Objects): New routine.
8316 (In_Library_Level_Package_Body): New routine.
8317 (Insert_Action_After): New routine.
8318 (Is_Finalizable_Transient): New routine. This predicate determines
8319 whether an object declaration is one of the many variants of controlled
8320 transients.
8321 (Is_Null_Access_BIP_Func_Call): New routine.
8322 (Is_Non_BIP_Func_Call): New routine.
8323 (Is_Related_To_Func_Return): New routine.
8324 (Needs_Finalization): Moved from Exp_Ch7.
8325 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8326 (Find_Protection_Type): Moved from Exp_Ch9.
8327 (Has_Controlled_Coextensions): Removed.
8328 (Has_Controlled_Objects): New routine.
8329 (In_Library_Level_Package_Body): New routine.
8330 (Insert_Action_After): New routine.
8331 (Is_Finalizable_Transient): New routine.
8332 (Is_Null_Access_BIP_Func_Call): New routine.
8333 (Is_Non_BIP_Func_Call): New routine.
8334 (Is_Related_To_Func_Return): New routine.
8335 (Needs_Finalization): Moved from Exp_ch7.
8336 * expander.adb (Expand): Add a case for N_Free_Statement.
8337 * freeze.adb (Freeze_All): Replace the generation of a finalization
8338 list with a collection for access-to-controlled types.
8339 (Freeze_Entity): Code reformatting.
8340 (Freeze_Record_Type): Remove the freezing of a record controller
8341 component.
8342 (Freeze_Subprogram): Code reformatting.
8343 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8344 finalization list.
8345 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8346 has a library-level finalizer.
8347 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8348 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8349 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8350 files. Add a-fihema to the list of object files.
8351 * par-ch4.adb:
8352 Alphabetize the associations in type Is_Parameterless_Attribute.
8353 * rtsfind.ads: Ada.Finalization_List.Controller and
8354 System.Finalization_Implementation are no longer a GNAT unit.
8355 Update the range of type Ada_Finalization_Child. Remove the following
8356 recoverable entities:
8357
8358 RE_Attach_To_Final_List
8359 RE_Deep_Tag_Attach
8360 RE_Finalize_List
8361 RE_Finalize_One
8362 RE_Finalizable_Ptr_Ptr
8363 RE_Global_Final_List
8364 RE_Limited_Record_Controller
8365 RE_List_Controller
8366 RE_Move_Final_List
8367 RE_Record_Controller
8368 RE_Simple_List_Controller
8369
8370 Add the following recoverable entities:
8371
8372 RE_Add_Offset_To_Address
8373 RE_Allocate
8374 RE_Base_Pool
8375 RE_Deallocate
8376 RE_Exception_Identity
8377 RE_Finalization_Collection
8378 RE_Finalization_Collection_Ptr
8379 RE_Needs_Finalization
8380 RE_Save_Library_Occurrence
8381 RE_Set_Finalize_Address_Ptr
8382 RE_Set_Storage_Pool_Ptr
8383 RE_Storage_Count
8384 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8385 Name_uController.
8386 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8387 (First_Stored_Discriminant): Remove the mention of Name_uController.
8388 * sem_aux.ads: Comment reformatting.
8389 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8390 to redecorate an already existing class-wide type.
8391 (Decorate_Tagged_Type): New parameter profile and associated comment.
8392 Create a "shadow class-wide type" for a shadow entity.
8393 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8394 of the final chain along with the associated comment.
8395 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8396 Full_Desig and set it to the full view of the designated type.
8397 Initialize the finalization collection to empty.
8398 (Build_Derived_Record_Type): Alphabetize local variables. Code
8399 reformatting.
8400 (Collect_Fixed_Components): Remove the mention of Name_uController.
8401 (Create_Constrained_Components): Remove the mention of Name_uController.
8402 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8403 class-wide type of a shadow entity.
8404 (Process_Full_View): Update the machinery which marks type
8405 Limited_Controlled's entity as limited.
8406 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8407 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8408 list, instead make a collection build-in-place formal.
8409 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8410 a designated type in order to establish a match between the renaming
8411 and the renamed entity.
8412 (Find_Selected_Component): Add guard to prevent spurious exceptions
8413 from being raised on .NET/JVM.
8414 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8415 to the list of primitive that need special processing. Update arrays
8416 C_Names and D_Names.
8417 (Replace_Types): Handle class-wide types.
8418 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8419 different parameter profile, look at the first formal.
8420 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8421 use clauses for Exp_Util.
8422 * sem_res.adb: Remove with and use clauses for Elists.
8423 (Propagate_Coextensions): Removed.
8424 (Resolve_Allocator): Do not propagate the list of coextensions from one
8425 allocator to another.
8426 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8427 Deaccessed_T to Desig_Typ.
8428 (Enter_Name): Remove the mention of Name_uController.
8429 (Gather_Components): Remove the mention of Name_uController.
8430 (Incomplete_Or_Private_View): New routine.
8431 (Is_Coextension_Root): Removed.
8432 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8433 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8434 (Is_Coextension_Root): Removed.
8435 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8436 Controlled types are now derived from a null tagged record. Remove
8437 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8438 * sinfo.adb (Coextensions): Removed.
8439 (Set_Coextensions): Removed.
8440 * sinfo.ads: Remove Coextensions from the explanation of node fields
8441 and its uses in nodes.
8442 Update the field usage of N_Allocator.
8443 (Coextensions): Removed along with its pragma Inline.
8444 (Set_Coextensions): Removed along with its pragma Inline.
8445 * snames.ads-tmpl: Remove names
8446
8447 Name_uClean
8448 Name_uController
8449 Name_uFinal_List
8450 Name_uLocal_Final_List
8451 Name_Finalization_Root
8452 Name_Next
8453 Name_Prev
8454
8455 Add names
8456
8457 Name_uFinalizer
8458 Name_Finalize_Address
8459 * s-pooglo.adb (Allocate): Add overriding indicator.
8460 (Deallocate): Add overriding indicator.
8461 (Storage_Size): Add overriding indicator.
8462 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8463 than Finalize_Global_List.
8464 (Null_Finalize_Global_List): Removed.
8465 (Save_Library_Occurrence): New routine.
8466 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8467 initialization. Add variable Finalize_Library_Objects along with its
8468 pragma Export. Add variables Library_Exception and
8469 Library_Exception_Set along with their pragma Export.
8470 (Null_Finalize_Global_List): Removed.
8471 (Save_Library_Occurrence): New routine.
8472 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8473 rather than Finalize_Global_List.
8474 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8475 of the constructed node.
8476
8477 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8478
8479 * link.c: Include "auto-host.h" before system headers.
8480
8481 2011-08-03 Vincent Celier <celier@adacore.com>
8482
8483 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8484 that are not extended. Do not check if a library project that is
8485 extended should be regenerated. Do not add to table Library_Paths the
8486 libraries that are in extended projects. Link only with libraries that
8487 are in libray projects that are not extended.
8488 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8489 for a library project that is extended.
8490
8491 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8492
8493 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8494 conforming subprogram renamings that appear to be completions if they
8495 are not fully conformant.
8496 Such renamings are homographs but not completions.
8497 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8498 names in a subprogram renaming that appears in an instance.
8499
8500 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8501
8502 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8503 not immutably limited, build actual subtype from expression to provide
8504 proper bounds to caller.
8505
8506 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8507
8508 * sem_ch8.adb: Minor comment correction.
8509
8510 2011-08-03 Thomas Quinot <quinot@adacore.com>
8511
8512 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8513 returning a limited array, use an extended return statement.
8514
8515 2011-08-03 Vincent Celier <celier@adacore.com>
8516
8517 * make.adb (Initialize): If --subdirs= is used, but no project file is
8518 specified, attempt to create the specify subdir if it does not already
8519 exist and use it as the object directory as if -D had been specified.
8520
8521 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8522
8523 * s-tpopsp-vms.adb: New file.
8524 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8525 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8526
8527 2011-08-03 Emmanuel Briot <briot@adacore.com>
8528
8529 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8530 package.
8531
8532 2011-08-03 Yannick Moy <moy@adacore.com>
8533
8534 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8535 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8536 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8537 detect that an array has static bounds.
8538
8539 2011-08-03 Thomas Quinot <quinot@adacore.com>
8540
8541 * exp_dist.adb: Minor reformatting.
8542
8543 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8544
8545 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8546 (ATCB_Key): Removed, not always used.
8547
8548 2011-08-03 Emmanuel Briot <briot@adacore.com>
8549
8550 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8551 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8552 most remaining global variables.
8553
8554 2011-08-03 Robert Dewar <dewar@adacore.com>
8555
8556 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8557 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8558 reformatting.
8559
8560 2011-08-03 Javier Miranda <miranda@adacore.com>
8561
8562 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8563 that must be passed by copy in VM targets.
8564
8565 2011-08-03 Emmanuel Briot <briot@adacore.com>
8566
8567 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8568 duplicates a similar htable now in the project tree.
8569
8570 2011-08-03 Claire Dross <dross@adacore.com>
8571
8572 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8573 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8574 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8575 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8576 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8577 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8578 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8579 update.
8580
8581 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8582
8583 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8584 (ATCB_Key): Removed, not always used.
8585 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8586 s-taprop-posix.adb.
8587 * s-tpopsp-tls.adb: New file.
8588 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8589 x86/x64/ia64/powerpc/sparc Linux.
8590
8591 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8592
8593 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8594 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8595
8596 2011-08-03 Thomas Quinot <quinot@adacore.com>
8597
8598 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8599 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8600 Fix type selection for mapping integer types to PolyORB types.
8601
8602 2011-08-03 Bob Duff <duff@adacore.com>
8603
8604 * sem_ch7.adb: Minor comment clarification.
8605
8606 2011-08-03 Bob Duff <duff@adacore.com>
8607
8608 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8609 an error analyzing a choice, skip further processing. Further
8610 processing could cause a crash or cascade errors.
8611
8612 2011-08-03 Emmanuel Briot <briot@adacore.com>
8613
8614 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
8615 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
8616 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
8617 prj-env.ads (Shared_Project_Tree_Data): new type
8618 An aggregate project and its aggregated trees need to share the common
8619 data structures used for lists of strings, packages,... This makes the
8620 code simpler since otherwise we have to pass the root tree (also used
8621 for the configuration file data) in addition to the current project
8622 tree. This also avoids ambiguities as to which tree should be used.
8623 And finally this saves a bit of memory.
8624 (For_Every_Project_Imported): new parameter Tree.
8625 Since aggregated projects are using a different tree, we need to let
8626 the caller know which tree to use to manipulate the returned project.
8627
8628 2011-08-03 Robert Dewar <dewar@adacore.com>
8629
8630 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
8631 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
8632 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
8633 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
8634
8635 2011-08-03 Javier Miranda <miranda@adacore.com>
8636
8637 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
8638 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
8639
8640 2011-08-03 Bob Duff <duff@adacore.com>
8641
8642 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
8643 the Base_Type.
8644
8645 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
8646
8647 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
8648 g-sehash.ads: Fix typo. Update header.
8649
8650 2011-08-03 Thomas Quinot <quinot@adacore.com>
8651
8652 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
8653 expansion.
8654
8655 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8656
8657 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
8658 prefixes of private types along with records, since the selector may be
8659 a discriminant.
8660 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
8661 private types along with records, since the selector may be a
8662 discriminant.
8663
8664 2011-08-03 Emmanuel Briot <briot@adacore.com>
8665
8666 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
8667
8668 2011-08-03 Javier Miranda <miranda@adacore.com>
8669
8670 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
8671 Tagged_Type_Expansion.
8672
8673 2011-08-03 Yannick Moy <moy@adacore.com>
8674
8675 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
8676 violation when the argument of concatenation is the name of a
8677 constant.
8678
8679 2011-08-03 Emmanuel Briot <briot@adacore.com>
8680
8681 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
8682 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
8683 (Process_Declarative_Items): new parameter Child_Env.
8684
8685 2011-08-03 Yannick Moy <moy@adacore.com>
8686
8687 * alfa.ads: Update format of ALFA section in ALI file in order to
8688 add a mapping from bodies to specs when both are present.
8689 (ALFA_Scope_Record): Add components for spec file/scope.
8690 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
8691 present.
8692 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
8693 collected, fill in the spec information when relevant.
8694 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
8695 present.
8696
8697 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8698
8699 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
8700 code unit to decide whether to add internally generated subprograms.
8701
8702 2011-08-03 Javier Miranda <miranda@adacore.com>
8703
8704 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
8705 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
8706 be handled by copy in VM targets.
8707
8708 2011-08-03 Emmanuel Briot <briot@adacore.com>
8709
8710 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
8711 code with Makeutl.Get_Switches.
8712 * prj-tree.adb: Update comment.
8713
8714 2011-08-03 Thomas Quinot <quinot@adacore.com>
8715
8716 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
8717 subprogram with a limited formal that does not support external
8718 streaming.
8719
8720 2011-08-03 Yannick Moy <moy@adacore.com>
8721
8722 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
8723 continuation line
8724 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
8725 not from current unit in two phases, because it is not possible to
8726 change the table while iterating over its content.
8727 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
8728
8729 2011-08-03 Sergey Rybin <rybin@adacore.com>
8730
8731 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
8732 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
8733
8734 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8735
8736 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
8737 and the component type is composite, this is ambiguous for predefined
8738 concatenation, but if the node is not overloaded and the entity is a use
8739 -defined function its profile can be used to resolve that aggregate.
8740
8741 2011-08-03 Robert Dewar <dewar@adacore.com>
8742
8743 * exp_ch4.adb: Minor code cleanup.
8744
8745 2011-08-03 Thomas Quinot <quinot@adacore.com>
8746
8747 * exp_dist.adb: Do not generate distribution stubs if serious errors
8748 have been diagnosed.
8749
8750 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8751
8752 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
8753 the first formal of a primitive operation, go to the base type to
8754 handle properly an access to a derived type with constrained
8755 discriminants.
8756 * sem_type.adb (Disambiguate): an immediately visible operator hides a
8757 user-defined function that is only use-visible.
8758
8759 2011-08-03 Robert Dewar <dewar@adacore.com>
8760
8761 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
8762 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
8763 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
8764 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
8765 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
8766 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
8767 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
8768 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
8769
8770 2011-08-03 Robert Dewar <dewar@adacore.com>
8771
8772 * repinfo.adb (List_Mechanism): Add handling of
8773 Convention_Ada_Pass_By_XXX.
8774 * sem_mech.adb (Set_Mechanism): Ditto.
8775 * sem_prag.adb (Process_Convention): Add entries for
8776 Convention_Ada_Pass_By_XXX.
8777 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
8778
8779 2011-08-03 Pascal Obry <obry@adacore.com>
8780
8781 * makeutl.adb: Minor reformatting.
8782
8783 2011-08-03 Vincent Celier <celier@adacore.com>
8784
8785 * fname-uf.adb
8786 (Get_File_Name) If the file cannot be found when there are no config
8787 pragmas file and May_Fail is True, return No_File instead of the file
8788 name, to be consistent.
8789
8790 2011-08-03 Pascal Obry <obry@adacore.com>
8791
8792 * adaint.c (__gnat_is_executable_file_attr): Avoid access
8793 to null pointer.
8794
8795 2011-08-03 Javier Miranda <miranda@adacore.com>
8796
8797 * sem_ch13.adb
8798 (Same_Representation): In VM targets the representation of arrays with
8799 aliased components differs from arrays with non-aliased components.
8800
8801 2011-08-03 Emmanuel Briot <briot@adacore.com>
8802
8803 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
8804 not systematically lower case attribute indexes that contain no "."
8805 Fix definition of several Naming attributes, which take
8806 a unit name as index and therefore should be case insensitive.
8807 Minor refactoring (reduce length of variable names).
8808
8809 2011-08-03 Emmanuel Briot <briot@adacore.com>
8810
8811 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
8812
8813 2011-08-03 Emmanuel Briot <briot@adacore.com>
8814
8815 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
8816 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
8817 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
8818 prj-tree.ads (Prj.Tree.Environment): new type.
8819
8820 2011-08-03 Emmanuel Briot <briot@adacore.com>
8821
8822 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
8823 prj-tree.adb, prj-tree.ads (Environment): new type.
8824
8825 2011-08-03 Emmanuel Briot <briot@adacore.com>
8826
8827 * prj-tree.ads: Remove unused variable.
8828
8829 2011-08-03 Yannick Moy <moy@adacore.com>
8830
8831 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8832 issuing messages related to SPARK restriction violation.
8833
8834 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8835
8836 * sem_ch6.adb: guard against error nodes in return statements.
8837
8838 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8839
8840 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
8841 a warning can only appear on a configuration file, so emit warning
8842 without further checks.
8843
8844 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8845
8846 * s-interr.ads: add overriding keyword.
8847
8848 2011-08-03 Geert Bosch <bosch@adacore.com>
8849
8850 * exp_attr.adb: Fix minor typo.
8851
8852 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8853
8854 * par-ch4.adb: improve error recovery.
8855
8856 2011-08-03 Emmanuel Briot <briot@adacore.com>
8857
8858 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
8859 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
8860 to Errout_Handling.
8861
8862 2011-08-03 Emmanuel Briot <briot@adacore.com>
8863
8864 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
8865 "external" as an attribute name in aggregate projects.
8866
8867 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8868
8869 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
8870 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
8871 from 0, so we need to adjust.
8872
8873 2011-08-03 Emmanuel Briot <briot@adacore.com>
8874
8875 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
8876 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
8877
8878 2011-08-03 Yannick Moy <moy@adacore.com>
8879
8880 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
8881 restriction on overloaded entity if the entity is not an operator.
8882
8883 2011-08-03 Yannick Moy <moy@adacore.com>
8884
8885 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
8886 restrict.ads: Rename remaining Check_Formal_Restriction* into
8887 Check_SPARK_Restriction*.
8888
8889 2011-08-03 Emmanuel Briot <briot@adacore.com>
8890
8891 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
8892 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
8893 qualifier.
8894 (Project_Empty): removed
8895 (Empty_Project): new parameter Qualifier
8896 This is used to have fields specific to aggregate projects, cleaner
8897 New field to store the list of aggregated projects.
8898 (Check_Aggregate_Project): removed
8899 (Process_Aggregated_Projects, Free): new subprograms.
8900
8901 2011-08-03 Olivier Hainque <hainque@adacore.com>
8902
8903 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
8904
8905 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8906
8907 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
8908 explicit dereference of an unconstrained type, create a constrained
8909 subtype for it, as is done for function calls that return an
8910 unconstrained type.
8911
8912 2011-08-03 Thomas Quinot <quinot@adacore.com>
8913
8914 * g-pehage.adb (Finalize): Avoid possible double-free.
8915
8916 2011-08-03 Steve Baird <baird@adacore.com>
8917
8918 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
8919 Elab_Spec/Body attrs in CodePeer_Mode.
8920
8921 2011-08-03 Javier Miranda <miranda@adacore.com>
8922
8923 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
8924 low bound is not known at compile time but they have no others choice.
8925 Done because in this case the bounds can be obtained directly from the
8926 aggregate.
8927
8928 2011-08-03 Ed Falis <falis@adacore.com>
8929
8930 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
8931 on VxWorks SMP. Remove unusable constant ANY_CPU.
8932
8933 2011-08-03 Emmanuel Briot <briot@adacore.com>
8934
8935 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
8936 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
8937 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
8938 Prj.Env.Initialize_Empty): new subprograms
8939 (Get_Env, Find_Project): remove parameter Target_Name.
8940
8941 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8942
8943 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
8944 as a condition for the delayed call to Derived_Subprograms done for the
8945 case of the rewriting of a derived type that constrains the
8946 discriminants of its parent type.
8947 Avoids redundant subprogram derivations for private subtype derivations.
8948
8949 2011-08-03 Javier Miranda <miranda@adacore.com>
8950
8951 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
8952 Build_Record_Aggr_Code.
8953 (Build_Record_Aggr_Code): Add missing support to initialize hidden
8954 discriminants in extension aggregates.
8955
8956 2011-08-03 Emmanuel Briot <briot@adacore.com>
8957
8958 * prj-pp.adb (Print): also output project qualifiers, since in
8959 particular "aggregate" is mandatory in an aggregate project.
8960
8961 2011-08-03 Emmanuel Briot <briot@adacore.com>
8962
8963 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
8964 (Debug_Output): new function.
8965
8966 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8967
8968 * gnat_ugn.texi: Document -Wstack-usage.
8969 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
8970
8971 2011-08-03 Thomas Quinot <quinot@adacore.com>
8972
8973 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
8974 have keyword LIMITED.
8975
8976 2011-08-03 Yannick Moy <moy@adacore.com>
8977
8978 * alfa.adb, alfa.ads, alfa_test.adb: New files.
8979 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
8980 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
8981 section (does not happen in compiler, only if code directly calls
8982 Scan_ALI).
8983 * get_alfa.adb, get_alfa.ads: New files.
8984 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
8985 needed.
8986 * lib-xref-alfa.adb: New file.
8987 * lib-xref.adb, lib-xref.ads
8988 (Xref_Entry): redefine information needed in cross-references for ALFA.
8989 Push ALFA treatments in separated local package.
8990 (Enclosing_Subpragram_Or_Package): treat specially subprogram
8991 identifiers. Return entity of package body instead of spec. Return
8992 Empty for a scope with no location.
8993 (Generate_Reference): adapt to new components for ALFA information.
8994 Remove the need for D references on definitions.
8995 (Is_Local_Reference): moved to ALFA local package
8996 (Output_References): extract subfunction as Extract_Source_Name
8997 (Output_Local_References): remove procedure, replaced by filtering of
8998 cross-references in package ALFA and printing in Put_ALFA.
8999 (Write_Entity_Name): remove procedure
9000 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9001 print exact name of entity as it appears in source file
9002 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9003 * put_alfa.adb, put_alfa.ads: New files.
9004 * xref_lib.adb (Search_Xref): protect read of cross-references against
9005 reading other sections of the ALI file, in gnatxref
9006 (Search): protect read of cross-references against reading other
9007 sections of the ALI file, in gnatfind.
9008 * gcc-interface/Make-lang.in: Update dependencies.
9009
9010 2011-08-03 Thomas Quinot <quinot@adacore.com>
9011
9012 * sem_ch3.adb: Minor reformatting.
9013
9014 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9015
9016 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9017 raising an exception.
9018
9019 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9020
9021 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9022 type, always use 1 as the lower bound or string, even if lower bound of
9023 context is not static, to handle properly null strings in a non-static
9024 context.
9025
9026 2011-08-03 Bob Duff <duff@adacore.com>
9027
9028 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9029 always legal on the right-hand side of an assignment statement; there
9030 is always an applicable index constraint in this case. Therefore, the
9031 check for Pkind = N_Assignment_Statement is now unconditional -- it
9032 doesn't depend on whether Is_Constrained (Typ).
9033
9034 2011-08-03 Robert Dewar <dewar@adacore.com>
9035
9036 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9037
9038 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9039
9040 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9041 for an itype created within a generic unit.
9042
9043 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9044
9045 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9046 suppresses all inlining.
9047
9048 2011-08-03 Robert Dewar <dewar@adacore.com>
9049
9050 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9051 exp_aggr.adb: Minor reformatting.
9052
9053 2011-08-03 Thomas Quinot <quinot@adacore.com>
9054
9055 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9056 tagged assignment when discriminant checks are suppressed. This is
9057 useless and extremely costly in terms of static stack usage.
9058
9059 2011-08-03 Bob Duff <duff@adacore.com>
9060
9061 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9062 of generics, because this leads to the wrong entity in the wrong scope,
9063 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9064 an instance.
9065 (Process_Interface_Name): Follow Alias for instances of generics, to
9066 correct for the above change.
9067
9068 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9069
9070 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9071 is an integer literal it is always safe to replace the reference. In
9072 addition, if the reference appears in the generated code for an object
9073 declaration it is necessary to copy because otherwise the reference
9074 might be to the uninitilized value of the discriminant of the object
9075 itself.
9076
9077 2011-08-03 Pascal Obry <obry@adacore.com>
9078
9079 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9080 ACL used, in this case we want to check for ending .exe, not .exe
9081 anywhere in the path.
9082
9083 2011-08-03 Sergey Rybin <rybin@adacore.com>
9084
9085 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9086 the tree structure (semantic decoration of references to record
9087 discriminants).
9088
9089 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9090
9091 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9092 choices of a named array aggregate, bail out when any choices are
9093 marked as Errors_Posted.
9094
9095 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9096
9097 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9098 in which entity is frozen, to handle properly loop variables in
9099 iterators.
9100
9101 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9102
9103 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9104 subtype is not static, compute the upper bound using attributes, to
9105 handle properly index types that are not integer types.
9106
9107 2011-08-03 Bob Duff <duff@adacore.com>
9108
9109 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9110 Update copyright notice.
9111
9112 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9113
9114 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9115 Original_Discriminant if within an instance.
9116 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9117
9118 2011-08-03 Thomas Quinot <quinot@adacore.com>
9119
9120 * einfo.ads: Minor reformatting.
9121
9122 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9123
9124 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9125 composite type with an unfrozen subcomponent, in the profile of a
9126 primitive operation.
9127
9128 2011-08-03 Robert Dewar <dewar@adacore.com>
9129
9130 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9131
9132 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9133
9134 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9135 unconstrained type with discriminants is initialized with an aggregate,
9136 use the constrained subtype of the aggregate as the type of the object,
9137 because it is immutable, and this allows the back-end to generate no
9138 code for the object declaration.
9139
9140 2011-08-03 Robert Dewar <dewar@adacore.com>
9141
9142 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9143 comparison operand is variable, and turns out to be zero or negative.
9144
9145 2011-08-03 Javier Miranda <miranda@adacore.com>
9146
9147 * exp_intr.adb
9148 (Expand_Dispatching_Constructor_Call): Disable expansion of
9149 code required for native targets. Done to avoid generating
9150 references to unavailable runtime entities in VM targets.
9151 * exp_ch3.adb
9152 (Expand_N_Object_Declaration): Add missing support to handle
9153 the explicit initialization of class-wide interface objects.
9154 Fix documentation.
9155
9156 2011-08-03 Matthew Heaney <heaney@adacore.com>
9157
9158 * a-cobove.adb (Merge): Move source onto target, instead of using
9159 Assign.
9160
9161 2011-08-03 Matthew Heaney <heaney@adacore.com>
9162
9163 * a-cbdlli.adb (Splice): Move source items from first to last.
9164
9165 2011-08-03 Yannick Moy <moy@adacore.com>
9166
9167 * sem_util.ads: Add comment.
9168
9169 2011-08-03 Javier Miranda <miranda@adacore.com>
9170
9171 * exp_aggr.adb
9172 (Expand_Record_Aggregate): In VM targets disable the expansion into
9173 assignments of aggregates whose type is not known at compile time.
9174
9175 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9176
9177 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9178 protected entries and task entries, to build the proper renaming
9179 declaration for entry formals, used in debugging.
9180 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9181 parameters in the same way.
9182
9183 2011-08-02 Robert Dewar <dewar@adacore.com>
9184
9185 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9186 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9187 code reorganization.
9188
9189 2011-08-02 Robert Dewar <dewar@adacore.com>
9190
9191 * debug.adb: Debug flag d.P to suppress length comparison optimization
9192 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9193 comparison of Length by comparing First/Last instead.
9194
9195 2011-08-02 Matthew Heaney <heaney@adacore.com>
9196
9197 * a-cobove.ads: Code clean up.
9198
9199 2011-08-02 Vincent Celier <celier@adacore.com>
9200
9201 * adaint.c (file_names_case_sensitive_cache): New static int.
9202 (__gnat_get_file_names_case_sensitive): Cache the return value in
9203 file_names_case_sensitive_cache at the first invocation, to avoid
9204 multiple calls to getenv.
9205
9206 2011-08-02 Bob Duff <duff@adacore.com>
9207
9208 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9209
9210 2011-08-02 Yannick Moy <moy@adacore.com>
9211
9212 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9213 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9214 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9215 indicate that we are in a precondition or postcondition. This is used in
9216 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9217 decide whether to flag the spec or body of the current subprogram as
9218 not in ALFA.
9219
9220 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9221
9222 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9223 list.
9224 * a-extiin.ads: New file.
9225
9226 2011-08-02 Bob Duff <duff@adacore.com>
9227
9228 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9229 now raises Name_Error instead of Use_Error in certain cases. The other
9230 parts of this AI were already implemented properly.
9231
9232 2011-08-02 Vincent Celier <celier@adacore.com>
9233
9234 * link.c: Only import "auto-host.h" when building the gnattools.
9235
9236 2011-08-02 Yannick Moy <moy@adacore.com>
9237
9238 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9239 which calls a local subprogram, so extract subprogram
9240 from Mark_Non_ALFA_Subprogram_Body.
9241
9242 2011-08-02 Javier Miranda <miranda@adacore.com>
9243
9244 * exp_ch9.adb
9245 (Extract_Dispatching_Call): If the type of the dispatching object is an
9246 access type then return an explicit dereference in the Object out-mode
9247 parameter.
9248
9249 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9250
9251 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9252 compatibility checks for all indexes of an array subtype, not just the
9253 first. Reset Has_Dynamic_Range_Check on the subtype before each
9254 potential check to ensure that Insert_Range_Checks will not elide any
9255 of the dynamic checks.
9256
9257 2011-08-02 Yannick Moy <moy@adacore.com>
9258
9259 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9260 SPARK restriction at parsing time.
9261 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9262 directive only if the SPARK restriction is set for this unit.
9263
9264 2011-08-02 Yannick Moy <moy@adacore.com>
9265
9266 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9267 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9268 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9269 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9270 Mark_Non_ALFA_Subprogram_Body.
9271 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9272 inlined.
9273
9274 2011-08-02 Yannick Moy <moy@adacore.com>
9275
9276 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9277 might be costly.
9278
9279 2011-08-02 Robert Dewar <dewar@adacore.com>
9280
9281 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9282 exp_ch3.adb: Minor reformatting.
9283
9284 2011-08-02 Emmanuel Briot <briot@adacore.com>
9285
9286 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9287 files, not any regular file.
9288 (__gnat_locate_file_with_predicate): new subprogram.
9289
9290 2011-08-02 Yannick Moy <moy@adacore.com>
9291
9292 * sinfo.adb, sinfo.ads: Restrict the use of flags
9293 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9294 nodes, plus N_Subtype_Declaration for the 2nd one.
9295
9296 2011-08-02 Sergey Rybin <rybin@adacore.com>
9297
9298 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9299 - fix bugs in the description of Source_Trace;
9300 - get rid of UNIT_NAME;
9301
9302 2011-08-02 Javier Miranda <miranda@adacore.com>
9303
9304 * exp_ch9.adb
9305 (Build_Dispatching_Requeue): Adding support for VM targets
9306 since we cannot directly reference the Tag entity.
9307 * exp_sel.adb (Build_K): Adding support for VM targets.
9308 (Build_S_Assignment): Adding support for VM targets.
9309 * exp_disp.adb
9310 (Default_Prim_Op_Position): In VM targets do not restrict availability
9311 of predefined interface primitives to compiling in Ada 2005 mode.
9312 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9313 restricted to compiling in Ada 2005 mode.
9314 (Make_VM_TSD): Generate code that declares and initializes the OSD
9315 record. Needed to support dispatching calls through synchronized
9316 interfaces.
9317 * exp_ch3.adb
9318 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9319 primitives associated with synchronized interfaces.
9320 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9321 primitives associated with synchronized interfaces.
9322
9323 2011-08-02 Yannick Moy <moy@adacore.com>
9324
9325 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9326 statements hidden in SPARK if preceded by the HIDE directive
9327 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9328 exception handlers as hidden in SPARK if preceded by the HIDE directive
9329 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9330 if starting with the HIDE directive
9331 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9332 starting with the HIDE directive; mark the declarations in a private
9333 part as hidden in SPARK if the private part starts with the HIDE
9334 directive
9335 * restrict.adb, restrict.ads
9336 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9337 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9338 argument node belongs to a part which is hidden in SPARK
9339 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9340 parts in SPARK; protect the possibly costly call to
9341 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9342 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9343 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9344 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9345 Tok_SPARK_Hide.
9346 (Scan): recognize special comment starting with '#' and followed by
9347 SPARK keyword "hide" as a HIDE directive.
9348
9349 2011-08-02 Yannick Moy <moy@adacore.com>
9350
9351 * types.ads, erroutc.ads: Minor reformatting.
9352
9353 2011-08-02 Vincent Celier <celier@adacore.com>
9354
9355 * link.c: Add response file support for cross platforms.
9356
9357 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9358
9359 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9360 in an association, set parent field of copy before partial analysis.
9361 * sem_res.adb (Resolve_Slice): create reference to itype only when
9362 expansion is enabled.
9363
9364 2011-08-02 Yannick Moy <moy@adacore.com>
9365
9366 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9367 for new flag denoting which subprogram bodies are in ALFA
9368 * restrict.adb, sem_ch7.adb: Update comment
9369 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9370 sem_ch9.adb, sem_res.adb: Add calls to
9371 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9372 * sem_ch6.adb (Analyze_Function_Return): add calls to
9373 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9374 middle of the body, and extended return.
9375 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9376 False when missing return.
9377 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9378 to True for subprograms whose spec is in ALFA. Remove later on the flag
9379 on the entity used for a subprogram body when there exists a separate
9380 declaration.
9381 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9382 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9383 False, otherwise do nothing.
9384
9385 2011-08-02 Robert Dewar <dewar@adacore.com>
9386
9387 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9388
9389 2011-08-02 Yannick Moy <moy@adacore.com>
9390
9391 * sem_ch4.ads: minor formatting.
9392
9393 2011-08-02 Yannick Moy <moy@adacore.com>
9394
9395 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9396 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9397 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9398 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9399 opt.ads: cleanup of SPARK mode
9400
9401 2011-08-02 Yannick Moy <moy@adacore.com>
9402
9403 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9404 types.
9405 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9406 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9407 * sem_ch3.adb
9408 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9409 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9410 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9411 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9412 types.
9413 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9414 non-static range.
9415 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9416 functions whose return type is not in ALFA.
9417 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9418 specifications.
9419 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9420 parameter's type is not in ALFA.
9421 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9422 types are in ALFA.
9423
9424 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9425
9426 * sem_ch6 (Analyze_Expression_Function): treat the function as
9427 Inline_Always, and introduce a subprogram declaration for it when it is
9428 not a completion.
9429 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9430 expression functions, so that the back-end can determine whether they
9431 can in fact be inlined.
9432 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9433 a function body comes from an expression function.
9434
9435 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9436
9437 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9438 null exclusions to test Can_Never_Be_Null on the anonymous access types
9439 of the formals rather than testing the formals themselves. Exclude this
9440 check in cases where the Old_Formal is marked as a controlling formal,
9441 to avoid issuing spurious errors for bodies completing dispatching
9442 operations (due to the flag not getting set on controlling access
9443 formals in body specs).
9444 (Find_Corresponding_Spec): When checking full and subtype conformance of
9445 subprogram bodies in instances, pass Designated and E in that order, for
9446 consistency with the expected order of the formals (New_Id followed by
9447 Old_Id).
9448
9449 2011-08-02 Robert Dewar <dewar@adacore.com>
9450
9451 * sem_ch8.adb: Minor reformatting.
9452
9453 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9454
9455 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9456 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9457 primitive operations of class-wide actuals.
9458
9459 2011-08-02 Javier Miranda <miranda@adacore.com>
9460
9461 * exp_atag.ads, exp_atag.adb
9462 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9463 since its value is implicitly passed in argument Typ.
9464 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9465 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9466 Build_Common_Dispatching_Select_Statements.
9467
9468 2011-08-02 Robert Dewar <dewar@adacore.com>
9469
9470 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9471 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9472 Minor reformatting.
9473
9474 2011-08-02 Robert Dewar <dewar@adacore.com>
9475
9476 * sem_res.adb: Minor reformatting.
9477 * sem_prag.adb: Minor reformatting.
9478
9479 2011-08-02 Javier Miranda <miranda@adacore.com>
9480
9481 * exp_atag.adb, exp_atags.ads
9482 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9483 by the tagged type Entity. Required to use this routine in the VM
9484 targets since we do not have available the Tag entity in the VM
9485 platforms.
9486 * exp_ch6.adb
9487 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9488 Ada.Tags has not been previously loaded.
9489 * exp_ch7.adb
9490 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9491 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9492 * sem_aux.adb
9493 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9494 view of enclosing scopes. Required to handle enclosing scopes that
9495 are synchronized types whose full view is a task type.
9496 * exp_disp.adb
9497 (Build_VM_TSDs): Minor code improvement to avoid generating and
9498 analyzing lists with empty nodes.
9499 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9500 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9501 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9502 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9503 (Make_Select_Specific_Data_Table): Add support for VM targets.
9504 (Make_VM_TSD): Generate code to initialize the SSD structure of
9505 the TSD.
9506
9507 2011-08-02 Yannick Moy <moy@adacore.com>
9508
9509 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9510 cross-references section in ALI.
9511 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9512 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9513 Sub).
9514 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9515 subprogram or package entity of a node
9516 (Is_Local_Reference_Type): new function returns True for references
9517 selected in local cross-references.
9518 (Lt): function extracted from Lt in Output_References
9519 (Write_Entity_Name): function extracted from Output_References
9520 (Generate_Definition): generate reference with type 'D' for definition
9521 of objects (object declaration and parameter specification), with
9522 appropriate locations and units, for use in local cross-references.
9523 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9524 references of type 'I' for initialization in object definition.
9525 (Output_References): move part of function Lt and procedure
9526 Write_Entity_Name outside of the body. Ignore references of types 'D'
9527 and 'I' introduced for local cross-references.
9528 (Output_Local_References): new procedure to output the local
9529 cross-references sections.
9530 (Lref_Entity_Status): new array defining whether an entity is a local
9531 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9532 with 'I' type when initialization expression is present.
9533 * get_scos.adb, get_scos.ads: Correct comments and typos
9534
9535 2011-08-02 Javier Miranda <miranda@adacore.com>
9536
9537 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9538 the JVM target.
9539 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9540 the JVM target.
9541 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9542 TSD support.
9543
9544 2011-08-02 Vincent Celier <celier@adacore.com>
9545
9546 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9547 (No_Space_Img): New function
9548 (Find_Excluded_Sources): When reading from a file, record the file name
9549 and the line number for each excluded source.
9550 (Mark_Excluded_Sources): When reporting an error, if the excluded
9551 sources were read from a file, include file name and line number in
9552 the error message.
9553
9554 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9555
9556 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9557
9558 2011-08-02 Robert Dewar <dewar@adacore.com>
9559
9560 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9561
9562 2011-08-02 Javier Miranda <miranda@adacore.com>
9563
9564 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9565 generation of TSDs to the DOTNET compiler.
9566 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9567 generation of TSDs to the DOTNET compiler.
9568
9569 2011-08-02 Javier Miranda <miranda@adacore.com>
9570
9571 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9572 record of all the tagged types declared inside library level package
9573 declarations, library level package bodies or library level subprograms.
9574 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9575 associated with a given tagged type.
9576 (Build_VM_TSDs): New subprogram.
9577 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9578 compilation units that are subprograms.
9579 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9580 compilation units that are package bodies.
9581 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9582 units that are a package declaration or a package instantiation.
9583 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9584 reorganization to improve the error generated by the frontend when the
9585 function Ada.Tags.Secondary_Tag is not available.
9586 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9587 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9588
9589 2011-08-02 Javier Miranda <miranda@adacore.com>
9590
9591 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9592
9593 2011-08-02 Robert Dewar <dewar@adacore.com>
9594
9595 * s-imenne.ads: Minor reformatting.
9596
9597 2011-08-02 Robert Dewar <dewar@adacore.com>
9598
9599 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9600 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9601 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9602
9603 2011-08-02 Robert Dewar <dewar@adacore.com>
9604
9605 * einfo.ads (Materialize_Entity): Document this is only for renamings
9606 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9607 required debug information in the case where we transform the object
9608 declaration into a renaming declaration.
9609 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9610 object
9611 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9612 Materialize_Entity.
9613
9614 2011-08-02 Robert Dewar <dewar@adacore.com>
9615
9616 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9617 Suppress_Init_Procs.
9618 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9619 Suppress_Initialization/Initialization_Suppressed.
9620 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9621 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9622 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9623 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9624
9625 2011-08-02 Robert Dewar <dewar@adacore.com>
9626
9627 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9628 Minor reformatting.
9629
9630 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9631
9632 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9633 only have inheritable classwide pre/postconditions.
9634
9635 2011-08-02 Javier Miranda <miranda@adacore.com>
9636
9637 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9638 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9639 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9640 checks if the external tag of a type is the same as the external tag
9641 of some other declaration.
9642
9643 2011-08-02 Thomas Quinot <quinot@adacore.com>
9644
9645 * s-taskin.ads: Minor reformatting.
9646
9647 2011-08-02 Emmanuel Briot <briot@adacore.com>
9648
9649 * g-comlin.adb (Display_Help): swap the order in which it prints the
9650 short help and the general usage.
9651
9652 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9653
9654 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9655 the aspect declarations and attach them to the generic copy for
9656 subsequent analysis.
9657 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9658 declarations of the generic tree to the new subprogram declarations.
9659 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9660 conditions that apply to a subprogram instance.
9661
9662 2011-08-02 Robert Dewar <dewar@adacore.com>
9663
9664 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9665
9666 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9667
9668 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9669 private type with a tagged full view is not derived in the immediate
9670 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9671
9672 2011-08-02 Robert Dewar <dewar@adacore.com>
9673
9674 * exp_ch4.adb: Minor reformatting.
9675
9676 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9677
9678 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9679 Ada2012 iterator, the loop will be rewritten during expansion into a
9680 while loop with a cursor and an element declaration. Do not analyze the
9681 body in this case, because if the container is for indefinite types the
9682 actual subtype of the elements will only be determined when the cursor
9683 declaration is analyzed.
9684
9685 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9686
9687 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9688 size/alignment related attributes in CodePeer_Mode.
9689
9690 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9691
9692 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9693 Prepend_Element, since this can result in the operation getting the
9694 wrong slot in the full type's dispatch table if the full type has
9695 inherited operations. The incomplete type's operation will get added
9696 to the proper position in the full type's primitives
9697 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9698 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9699 dispatching operations, since there are cases where nonprimitive
9700 subprograms can get added to the list of incomplete dependents (such
9701 as subprograms in nested packages).
9702 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9703 private part when determining whether to add a primitive with a
9704 parameter of a tagged incomplete type to the Private_Dependents list.
9705 Such primitives can also occur in the visible part, and should not have
9706 been excluded from being private dependents.
9707 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9708 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9709 list of a Taft-amendment incomplete type is a primitive before issuing
9710 an error that the full type must appear in the same unit. There are
9711 cases where nonprimitives can be in the list (such as subprograms in
9712 nested packages).
9713 * sem_disp.adb (Derives_From): Use correct condition for checking that
9714 a formal's type is derived from the type of the corresponding formal in
9715 the parent subprogram (the condition was completely wrong). Add
9716 checking that was missing for controlling result types being derived
9717 from the result type of the parent operation.
9718
9719 2011-08-02 Yannick Moy <moy@adacore.com>
9720
9721 * errout.adb (First_Node): minor renaming
9722 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9723 first node.
9724
9725 2011-08-02 Yannick Moy <moy@adacore.com>
9726
9727 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9728 before accessing operands.
9729 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9730 decide whether an initialization expression respects SPARK rules, as
9731 the plain node is the expanded one. This allows for more valid warnings
9732 to be issued.
9733 * gnat_rm.texi: Minor update.
9734
9735 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9736
9737 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9738 previous change.
9739
9740 2011-08-02 Robert Dewar <dewar@adacore.com>
9741
9742 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9743
9744 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9745
9746 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9747 loop statements and the element renaming declaration with a block when
9748 the element type is controlled.
9749
9750 2011-08-02 Yannick Moy <moy@adacore.com>
9751
9752 * sinfo.ads: Minor formatting.
9753
9754 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9755
9756 * sem_aggr.adb (Add_Association): if the association has a box and no
9757 expression, use the Sloc of the aggregate itself for the new
9758 association.
9759 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9760 the Original_Node.
9761
9762 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9763
9764 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9765 When a container is provided via a function call, generate a renaming
9766 of the function result. This avoids the creation of a transient scope
9767 and the premature finalization of the container.
9768 * exp_ch7.adb (Is_Container_Cursor): Removed.
9769 (Wrap_Transient_Declaration): Remove the supression of the finalization
9770 of the list controller when the declaration denotes a container cursor,
9771 it is not needed.
9772
9773 2011-08-02 Yannick Moy <moy@adacore.com>
9774
9775 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9776 node is from source, instead of the original node being from source.
9777 * sem_aggr.adb
9778 (Resolve_Array_Aggregate): refine the check for a static expression, to
9779 recognize also static ranges
9780 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9781 Array_Type_Declaration): postpone the test for the type being a subtype
9782 mark after the type has been resolved, so that component-selection and
9783 expanded-name are discriminated.
9784 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9785 to distinguish the case of an iteration scheme, so that an error is
9786 issed on a non-static range in SPARK except in an iteration scheme.
9787 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9788 In_Iter_Schm = True.
9789 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9790 user-defined operators so that they are allowed in renaming
9791 * sem_ch8.adb
9792 (Find_Selected_Component): refine the check for prefixing of operators
9793 so that they are allowed in renaming. Move the checks for restrictions
9794 on selector name after analysis discriminated between
9795 component-selection and expanded-name.
9796 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9797 concatenation argument of string type if it is static.
9798 * sem_util.adb, sem_util.ads
9799 (Check_Later_Vs_Basic_Declarations): add a new function
9800 Is_Later_Declarative_Item to decice which declarations are allowed as
9801 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9802 mode, add that renamings are considered as later items.
9803 (Enclosing_Package): new function to return the enclosing package
9804 (Enter_Name): correct the rule for homonyms in SPARK
9805 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9806 from source (result of expansion) to avoid issuing wrong warnings.
9807
9808 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9809
9810 * errout.adb: On anything but an expression First_Node returns its
9811 argument.
9812
9813 2011-08-02 Pascal Obry <obry@adacore.com>
9814
9815 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9816
9817 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9818
9819 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9820 Set the associated loop as the related expression of internally
9821 generated cursors.
9822 * exp_ch7.adb (Is_Container_Cursor): New routine.
9823 (Wrap_Transient_Declaration): Supress the finalization of the list
9824 controller when the declaration denotes a container cursor.
9825
9826 2011-08-02 Yannick Moy <moy@adacore.com>
9827
9828 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9829 command line now.
9830 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9831 expression is a simple expression. This check cannot be performed in
9832 the semantics, so just drop it.
9833 (P_Index_Or_Discriminant_Constraint): move check that the index or
9834 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9835 semantics. Other cases were previously checked in the semantics.
9836 * par-ch4.adb (P_Name): move checks that a selector name is not
9837 character literal or an operator symbol to Find_Selected_Component in
9838 the semantics
9839 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9840 declarations are not placed after later declarations in a separate
9841 procedure in Sem_Util (possibly not the best choice?), to be used both
9842 during parsing, for Ada 83 mode, and during semantic analysis, for
9843 SPARK mode.
9844 * par-endh.adb (Check_End): move check that end label is not missing
9845 to Process_End_Label in the semantics
9846 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9847 the special case for SPARK restriction
9848 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9849 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9850 parameter Force to issue the error message even on internal node (used
9851 for generated end label). Call Check_Restriction to check when an error
9852 must be issued. In SPARK mode, issue an error message even if the
9853 restriction is not set.
9854 (Check_Restriction): new procedure with an additional out parameter to
9855 inform the caller that a message has been issued
9856 * sem_aggr.adb: Minor modification of message
9857 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9858 instead of issuing an error message directly
9859 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9860 declarations are not placed after later declarations, by calling
9861 Check_Later_Vs_Basic_Declarations
9862 (Analyze_Subtype_Declaration): move here the check that an index or
9863 discriminant constraint must be a subtype mark. Change the check that
9864 a subtype of String must start at one so that it works on subtype marks.
9865 * sem_ch4.adb (Analyze_Call): move here the check that a named
9866 association cannot follow a positional one in a call
9867 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9868 instead of issuing an error message directly
9869 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9870 selector name is not a character literal or an operator symbol. Move
9871 here the check that the prefix of an expanded name cannot be a
9872 subprogram or a loop statement.
9873 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9874 procedure called from parsing and semantics to check that basic
9875 declarations are not placed after later declarations
9876 (Process_End_Label): move here the check that end label is not missing
9877
9878 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9879
9880 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9881 representation clause in codepeer mode, since it confuses CodePeer and
9882 does not bring useful info.
9883
9884 2011-08-02 Ed Falis <falis@adacore.com>
9885
9886 * init.c: initialize fp hw on MILS.
9887
9888 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9889
9890 * errout.adb (First_Node): for bodies, return the node itself (small
9891 optimization). For other nodes, do not check source_unit if the node
9892 comes from Standard.
9893
9894 2011-08-02 Robert Dewar <dewar@adacore.com>
9895
9896 * exp_ch3.adb: Minor comment additions.
9897 * sem_ch13.adb: Minor reformatting.
9898
9899 2011-08-02 Pascal Obry <obry@adacore.com>
9900
9901 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9902
9903 2011-08-02 Robert Dewar <dewar@adacore.com>
9904
9905 * sem_attr.adb: Minor reformatting.
9906
9907 2011-08-02 Robert Dewar <dewar@adacore.com>
9908
9909 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9910 (Has_Default_Component_Value): Removed
9911 * einfo.ads Comment updates
9912 (Has_Default_Aspect): Replaces Has_Default_Value
9913 (Has_Default_Component_Value): Removed
9914 * exp_ch13.adb
9915 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9916 * exp_ch3.adb
9917 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9918 (Get_Simple_Init_Val): Handle Default_Value aspect
9919 (Needs_Simple_Initialization): Handle Default_Value aspect
9920 * exp_ch3.ads: Needs_Simple_Initialization
9921 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9922 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9923 * sem_ch13.adb
9924 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9925 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9926 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9927
9928 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9929
9930 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9931 package containing iteration primitives.
9932 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9933
9934 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9935
9936 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9937 "of", pre-analyze expression in case it is a function call with
9938 finalization actions that must be placed ahead of the loop.
9939 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9940 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9941
9942 2011-08-02 Geert Bosch <bosch@adacore.com>
9943
9944 * cstand.adb (Create_Float_Types): Only consider C's long double for
9945 Long_Long_Float, in addition to double.
9946
9947 2011-08-02 Robert Dewar <dewar@adacore.com>
9948
9949 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9950 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9951 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9952 Minor reformatting.
9953
9954 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9955
9956 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9957 indexed component.
9958
9959 2011-08-02 Javier Miranda <miranda@adacore.com>
9960
9961 * einfo.ads, einfo.adb
9962 (Original_Access_Type): Move this attribute to Node26 since there was
9963 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9964 which causes conflicts and breaks the generation of the .NET compiler.
9965 (Interface_Name): Add missing documentation on JGNAT only uses of
9966 this attribute.
9967
9968 2011-08-02 Geert Bosch <bosch@adacore.com>
9969
9970 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9971 (Find_Back_End_Float_Type): Likewise
9972 (Create_Back_End_Float_Types): Likewise
9973 (Create_Float_Types): Likewise
9974 (Register_Float_Type): Likewise
9975 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9976 Nlist and split out type selection in new local Find_Base_Type function.
9977 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9978 Nlist
9979 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9980
9981 2011-08-02 Robert Dewar <dewar@adacore.com>
9982
9983 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9984 alpha order).
9985 * opt.ads: Minor comment change.
9986 * sem_ch12.adb: Minor code reorganization.
9987
9988 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9989
9990 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9991 subtype's list of rep items to the list on the full subtype in the case
9992 where the lists are the same.
9993
9994 2011-08-02 Geert Bosch <bosch@adacore.com>
9995
9996 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9997 using the one from System.Strings, which also deallocates all strings.
9998
9999 2011-08-02 Geert Bosch <bosch@adacore.com>
10000
10001 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10002 function.
10003 * gcc-interface/Make-lang.in: Update dependencies.
10004
10005 2011-08-02 Olivier Hainque <hainque@adacore.com>
10006
10007 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10008 end_locus.
10009
10010 2011-08-02 Javier Miranda <miranda@adacore.com>
10011
10012 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10013 associated with anonymous access to subprograms.
10014
10015 2011-08-02 Geert Bosch <bosch@adacore.com>
10016
10017 * opt.ads
10018 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10019 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10020 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10021 (Add_Symbol_Definition): Move to switch-c.adb
10022 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10023 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10024 (Add_Symbol_Definition): Move to switch-c.adb.
10025 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10026 * sem_warn.adb
10027 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10028 Move to warnsw.adb.
10029 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10030 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10031 Move to warnsw.adb.
10032 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10033 (Add_Symbol_Definition): Moved from Prepcomp.
10034 * switch-c.ads: Update copyright notice. Use String_List instead of
10035 Argument_List, removing dependency on System.OS_Lib.
10036
10037 2011-08-02 Yannick Moy <moy@adacore.com>
10038
10039 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10040 mode on initialization expression which does not respect SPARK
10041 restrictions.
10042 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10043 if the tree referenced by its argument represents an initialization
10044 expression in SPARK, suitable for initializing an object in an object
10045 declaration.
10046
10047 2011-08-02 Javier Miranda <miranda@adacore.com>
10048
10049 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10050 internally generated access to subprogram with its associated protected
10051 subprogram type.
10052 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10053
10054 2011-08-02 Geert Bosch <bosch@adacore.com>
10055
10056 * cstand.adb (Register_Float_Type): Print information about type to
10057 register, if the Debug_Flag_Dot_B is set.
10058 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10059 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10060 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10061 with a requested precision of more than Max_Digits digits and no more
10062 than Max_Base_Digits digits, if a range specification is present and the
10063 Predefined_Float_Types list has a suitable type to derive from.
10064 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10065 case of type completion with pragma Import
10066 * sem_prag.adb
10067 (Process_Import_Predefined_Type): Processing to complete a type
10068 with pragma Import. Currently supports floating point types only.
10069 (Set_Convention_From_Pragma): Do nothing without underlying type.
10070 (Process_Convention): Guard against absence of underlying type,
10071 which may happen when importing incomplete types.
10072 (Process_Import_Or_Interface): Handle case of importing predefined
10073 types. Tweak error message.
10074
10075 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10076
10077 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10078 functions to previous change. Reorganize code slightly.
10079
10080 2011-08-02 Geert Bosch <bosch@adacore.com>
10081
10082 * back_end.ads (Register_Type_Proc): New call back procedure type for
10083 allowing the back end to provide information about available types.
10084 (Register_Back_End_Types): New procedure to register back end types.
10085 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10086 available types.
10087 * cstand.adb (Back_End_Float_Types): New list for floating point types
10088 supported by the back end.
10089 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10090 (Copy_Float_Type): New procedure to make new copies of predefined types.
10091 (Register_Float_Type): New call back procedure to populate the BEFT list
10092 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10093 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10094 (Create_Float_Types): New procedure to create entities for floating
10095 point types predefined in Standard, and put these and any remaining
10096 BEFTs on the Predefined_Float_Types list.
10097 * stand.ads (Predefined_Float_Types): New list for predefined floating
10098 point types that do not have declarations in package Standard.
10099
10100 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10101
10102 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10103 entity node for the unit containing the parameter.
10104 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10105 (Add_Inlined_Subprogram): Likewise.
10106 * gcc-interface/Make-lang.in: Update dependencies.
10107
10108 2011-08-02 Thomas Quinot <quinot@adacore.com>
10109
10110 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10111 suitable value.
10112
10113 2011-08-02 Geert Bosch <bosch@adacore.com>
10114
10115 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10116
10117 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10118
10119 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10120 computed value of Base_Type.
10121
10122 2011-08-02 Yannick Moy <moy@adacore.com>
10123
10124 * restrict.adb (Check_Restriction): issue an error for any use of
10125 class-wide, even if the No_Dispatch restriction is not set.
10126 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10127 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10128 when completing a private extension, the type named in the private part
10129 is not the same as that named in the visible part.
10130 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10131 of an inherited primitive operations of a tagged type or type extension
10132 that returns the tagged type.
10133 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10134 function which returns True for an implicit operation inherited by the
10135 derived type declaration for the argument type.
10136 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10137 order.
10138
10139 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10140
10141 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10142 Process_Bounds, to perform analysis with expansion of a range or an
10143 expression that is the iteration scheme for a loop.
10144 (Analyze_Iterator_Specification): If domain of iteration is given by a
10145 function call with a controlled result, as is the case if call returns
10146 a predefined container, ensure that finalization actions are properly
10147 generated.
10148 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10149
10150 2011-08-02 Javier Miranda <miranda@adacore.com>
10151
10152 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10153 * gcc-interface/Make-lang.in: Update dependencies.
10154
10155 2011-08-02 Javier Miranda <miranda@adacore.com>
10156
10157 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10158 determine if the analysis is performed using N or Original_Node (N).
10159 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10160 functionality of routine Is_Variable avoids code duplication.
10161 * checks.adb (Determine_Range): Handle temporaries generated by
10162 Remove_Side_Effects.
10163
10164 2011-08-02 Javier Miranda <miranda@adacore.com>
10165
10166 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10167 expansion of the condition. Required since the previous analysis was
10168 done with expansion disabled (see Resolve_Quantified_Expression) and
10169 hence checks were not inserted and record comparisons have not been
10170 expanded.
10171
10172 2011-08-02 Ed Falis <falis@adacore.com>
10173
10174 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10175 Update header.
10176
10177 2011-08-02 Bob Duff <duff@adacore.com>
10178
10179 * opt.ads: Minor comment fix.
10180
10181 2011-08-02 Bob Duff <duff@adacore.com>
10182
10183 * sem_ch12.adb (Analyze_Package_Instantiation,
10184 Analyze_Subprogram_Instantiation): Turn off style checking while
10185 analyzing an instance. Whatever style checks that apply to the generic
10186 unit should apply, so it makes no sense to apply them in an instance.
10187 This was causing trouble when compiling an instance of a runtime
10188 unit that violates the -gnatyO switch.
10189 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10190 one of the two case statements, causing spurious errors.
10191
10192 2011-08-02 Robert Dewar <dewar@adacore.com>
10193
10194 * uname.adb: Minor reformatting.
10195 * gnatcmd.adb: Minor reformatting.
10196 * exp_attr.adb: Minor reformatting.
10197
10198 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10199
10200 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10201 No_Dispatching_Calls, do not look for the Assign primitive, because
10202 predefined primitives are not created in this case.
10203
10204 2011-08-02 Bob Duff <duff@adacore.com>
10205
10206 * stylesw.ads: Minor comment fixes.
10207
10208 2011-08-02 Robert Dewar <dewar@adacore.com>
10209
10210 * freeze.adb (Add_To_Result): New procedure.
10211
10212 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10213
10214 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10215 time, if the specific run-time routines for handling streams of strings
10216 are not available, use the default mechanism.
10217
10218 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10219
10220 * s-regpat.ads: Fix typo.
10221
10222 2011-08-02 Vincent Celier <celier@adacore.com>
10223
10224 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10225 not null, call it to create the in memory config project file without
10226 parsing an existing default config project file.
10227
10228 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10229
10230 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10231
10232 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10233
10234 * sem_elim.adb: an abstract subprogram does not need an eliminate
10235 pragma for its descendant to be eliminable.
10236
10237 2011-08-02 Ed Falis <falis@adacore.com>
10238
10239 * init.c: revert to handling before previous checkin for VxWorks
10240 * s-intman-vxworks.adb: delete unnecessary declarations related to
10241 using Ada interrupt facilities for handling signals.
10242 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10243 * s-intman-vxworks.ads: Import __gnat_install_handler as
10244 Initialize_Interrupts.
10245 * s-taprop-vxworks.adb: Delete Signal_Mask.
10246 (Abort_Handler): change construction of mask to unblock exception
10247 signals.
10248
10249 2011-08-02 Jerome Guitton <guitton@adacore.com>
10250
10251 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10252 Debug_Raise_Exception before propagation starts.
10253
10254 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10255
10256 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10257 to Restriction_Check_Required.
10258 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10259 * sem_res.adb (Resolve_Call): Likewise.
10260 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10261
10262 2011-08-02 Bob Duff <duff@adacore.com>
10263
10264 * stylesw.ads: Update comment.
10265 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10266 * errout.ads: Remove obsolete comment.
10267
10268 2011-08-02 Javier Miranda <miranda@adacore.com>
10269
10270 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10271 (Set_Is_Safe_To_Reevaluate): new procedure.
10272 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10273 assignment is allowed on safe-to-reevaluate variables.
10274 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10275 temporary created to remove side effects in expressions that use
10276 the secondary stack as safe-to-reevaluate.
10277 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10278 variables that are not true constants.
10279
10280 2011-08-02 Robert Dewar <dewar@adacore.com>
10281
10282 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10283 sem_res.adb, sem_ch6.adb: Minor reformatting.
10284
10285 2011-08-02 Jerome Guitton <guitton@adacore.com>
10286
10287 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10288
10289 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10290
10291 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10292 not set Overridden_Operation if subprogram is an initialization
10293 procedure.
10294
10295 2011-08-02 Yannick Moy <moy@adacore.com>
10296
10297 * par-ch6.adb: Correct obsolete name in comments
10298 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10299 which takes two message arguments (existing function takes one), with
10300 second message used for continuation.
10301 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10302 block statements that originate from a source block statement, not
10303 generated block statements
10304 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10305 symmetry with procedure case
10306 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10307 function to issue an error in formal mode if a package specification
10308 contains more than one tagged type or type extension.
10309 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10310 parameters matching formals of tagged types are objects (or ancestor
10311 type conversions of objects), not general expressions. Issue an error
10312 on view conversions that are not involving ancestor conversion of an
10313 extended type.
10314 (Resolve_Type_Conversion): in formal mode, issue an error on the
10315 operand of an ancestor type conversion which is not an object
10316 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10317 procedure so that it works also for actuals of function calls
10318 (Is_Actual_Tagged_Parameter): new function which determines if its
10319 argument is an actual parameter of a formal of tagged type in a
10320 subprogram call
10321 (Is_SPARK_Object_Reference): new function which determines if the tree
10322 referenced by its argument represents an object in SPARK
10323
10324 2011-08-02 Robert Dewar <dewar@adacore.com>
10325
10326 * sem_ch3.adb: Minor reformatting
10327 Minor comment addition
10328 Minor error msg text change
10329
10330 2011-08-02 Javier Miranda <miranda@adacore.com>
10331
10332 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10333 function. Used to be more precise when we generate a variable plus one
10334 assignment to remove side effects in the evaluation of the Bound
10335 expressions.
10336 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10337 of the bound expression to force its re-analysis and thus expand the
10338 associated transient scope (if required). Code cleanup replacing the
10339 previous code that declared the constant entity by an invocation to
10340 routine Force_Evaluation which centralizes this work in the frontend.
10341
10342 2011-08-02 Robert Dewar <dewar@adacore.com>
10343
10344 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10345 (Base_Type): Now uses improved Is_Base_Type function
10346 * einfo.ads (Base_Type): Inline this function
10347
10348 2011-08-02 Robert Dewar <dewar@adacore.com>
10349
10350 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10351 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10352
10353 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10354
10355 * gcc-interface/Make-lang.in: Update dependencies.
10356 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10357 targets.
10358
10359 2011-08-02 Yannick Moy <moy@adacore.com>
10360
10361 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10362 non-simple expression used in delta constraint
10363 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10364 index constraint which is not a subtype mark
10365 * par.adb: With and use Restrict
10366 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10367 mode on component type which is not a subtype mark and default
10368 expression on component
10369 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10370 of string which does not have a lower index bound equal to 1
10371 (Array_Type_Declaration): issue an error in formal mode on index or
10372 component type which is not a subtype mark, and on aliased keyword on
10373 component
10374 (Derived_Type_Declaration): issue an error in formal mode on interface,
10375 limited or abstract type
10376 (Record_Type_Declaration): issue an error in formal mode on interface
10377 (Record_Type_Definition): issue an error in formal mode on tagged types
10378 and type extensions not declared in the specification of a library unit
10379 package; on null non-tagged record; on variant part
10380
10381 2011-08-02 Vincent Celier <celier@adacore.com>
10382
10383 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10384 not declared for qualified library project when Library_Name is not
10385 declared, but Library_Dir is.
10386
10387 2011-08-02 Robert Dewar <dewar@adacore.com>
10388
10389 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10390 pragmas (affects aspects [Component_]Default_Value
10391 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10392 component type for the resolution
10393
10394 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10395
10396 * einfo.adb (Base_Type): Tune implementation for speed.
10397
10398 2011-08-02 Robert Dewar <dewar@adacore.com>
10399
10400 * freeze.adb: Minor reformatting.
10401
10402 2011-08-02 Thomas Quinot <quinot@adacore.com>
10403
10404 * scos.ads: Update comments.
10405
10406 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10407
10408 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10409 base type, because the parent may be a subtype of a private type whose
10410 convention is established in a private part.
10411
10412 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10413
10414 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10415 statement in a block when the expansion of the return expression has
10416 created a finalization chain.
10417 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10418 with the parent node.
10419 Add N_Extended_Return_Statement to handle the case where a transient
10420 object declaration appears in the Return_Object_Declarations list of
10421 an extended return statement.
10422
10423 2011-08-02 Matthew Gingell <gingell@adacore.com>
10424
10425 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10426 unused parameter 'name'.
10427
10428 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10429
10430 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10431 inherited operation, check whether its alias, which is the source
10432 operastion that it renames, has been marked eliminated.
10433
10434 2011-08-02 Javier Miranda <miranda@adacore.com>
10435
10436 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10437 in-mode parameter whose type is an access type since it can be used to
10438 modify its designated object. Enforce code that handles as safe an
10439 access type that is not access-to-constant but it is the result of a
10440 previous removal of side-effects.
10441 (Remove_Side_Effects): Minor code reorganization of cases which require
10442 no action. Done to incorporate documentation on new cases uncovered
10443 working in this ticket: no action needed if this routine was invoked
10444 too early and the nodes are not yet decorated.
10445 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10446 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10447 were issued with actuals that are implicitly provided by
10448 Force_Evaluation.
10449
10450 2011-08-02 Robert Dewar <dewar@adacore.com>
10451
10452 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10453
10454 2011-08-02 Yannick Moy <moy@adacore.com>
10455
10456 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10457 to issue an error in formal mode on attribute not supported in this mode
10458 (Analyze_Attribute): issue errors on standard attributes not supported
10459 in formal mode.
10460 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10461 comment, and issue error in formal mode on modulus which is not a power
10462 of 2.
10463 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10464 range.
10465 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10466 subtype mark.
10467 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10468 operator on modular type (except 'not').
10469
10470 2011-08-02 Robert Dewar <dewar@adacore.com>
10471
10472 * gnat_rm.texi: Minor reformatting.
10473
10474 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10475
10476 * s-osinte-linux.ads: Minor comment update and reformatting.
10477 * i-cexten.ads: Make this unit pure, as for its parent.
10478 Will allow its usage in more contexts if needed.
10479
10480 2011-08-02 Robert Dewar <dewar@adacore.com>
10481
10482 * s-utf_32.ads: Minor comment fix.
10483
10484 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10485
10486 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10487 operation of a tagged synchronized type, handle the case where the
10488 controlling argument is overloaded.
10489
10490 2011-08-02 Yannick Moy <moy@adacore.com>
10491
10492 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10493 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10494 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10495 SPARK mode and formal verification mode on processing SPARK restriction
10496 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10497 requiring consistency checking.
10498
10499 2011-08-02 Robert Dewar <dewar@adacore.com>
10500
10501 * sem_res.adb: Minor reformatting.
10502
10503 2011-08-02 Robert Dewar <dewar@adacore.com>
10504
10505 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10506 a-cforse.ads: Remove unneeded with of Ada.Containers
10507 Remove commented out pragma Inline's
10508 Move specifications of new subprograms to the actual specs
10509
10510 2011-08-02 Yannick Moy <moy@adacore.com>
10511
10512 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10513 a-cforse.ads: Update comments.
10514
10515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10516
10517 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10518
10519 2011-08-02 Robert Dewar <dewar@adacore.com>
10520
10521 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10522 a-cforse.ads, a-cofove.ads: Minor reformatting.
10523
10524 2011-08-02 Claire Dross <dross@adacore.com>
10525
10526 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10527 a-cofove.ads: Add comments.
10528
10529 2011-08-02 Yannick Moy <moy@adacore.com>
10530
10531 * gnat_rm.texi: Document formal containers.
10532
10533 2011-08-02 Emmanuel Briot <briot@adacore.com>
10534
10535 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10536 are empty sections.
10537
10538 2011-08-02 Robert Dewar <dewar@adacore.com>
10539
10540 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10541 reformatting.
10542
10543 2011-08-02 Robert Dewar <dewar@adacore.com>
10544
10545 * aspects.adb: New aspects Default_Value and Default_Component_Value
10546 New format of Aspect_Names table checks for omitted entries
10547 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10548 handling of boolean aspects for derived types.
10549 New aspects Default_Value and Default_Component_Value
10550 New format of Aspect_Names table checks for omitted entries
10551 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10552 (Has_Default_Value): New flag
10553 (Has_Default_Component_Value): New flag
10554 (Has_Default_Value): New flag
10555 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10556 table.
10557 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10558 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10559 Default_Value and Default_Component_Value
10560 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10561 New aspects Default_Value and Default_Component_Value
10562 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10563 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10564
10565 2011-08-02 Vincent Celier <celier@adacore.com>
10566
10567 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10568 inherit library kind.
10569
10570 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10571
10572 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10573 Minor reformatting.
10574
10575 2011-08-02 Robert Dewar <dewar@adacore.com>
10576
10577 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10578
10579 2011-08-02 Yannick Moy <moy@adacore.com>
10580
10581 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10582
10583 2011-08-02 Robert Dewar <dewar@adacore.com>
10584
10585 * impunit.adb: Add comment.
10586
10587 2011-08-02 Yannick Moy <moy@adacore.com>
10588
10589 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10590 qualification of aggregates in formal mode
10591 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10592 another aggregate
10593 (Resolve_Aggregate): complete the test that an aggregate is adequately
10594 qualified in formal mode
10595
10596 2011-08-02 Pascal Obry <obry@adacore.com>
10597
10598 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10599 * mlib-prj.adb: Supress warning when compiling binder generated file.
10600 (Build_Library): Supress all warnings when compiling the binder
10601 generated file.
10602
10603 2011-08-02 Yannick Moy <moy@adacore.com>
10604
10605 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10606 from here...
10607 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10608 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10609 Add with/use clauses to make Check_Formal_Restriction visible
10610
10611 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10612
10613 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10614 in-parameters when type of the generic formal is private in the generic
10615 spec and non-private in the body.
10616
10617 2011-08-02 Claire Dross <dross@adacore.com>
10618
10619 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10620 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10621 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10622 * impunit.adb, Makefile.rtl: Take new files into account.
10623
10624 2011-08-02 Robert Dewar <dewar@adacore.com>
10625
10626 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10627 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10628
10629 2011-08-02 Yannick Moy <moy@adacore.com>
10630
10631 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10632 formal mode
10633 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10634 matching static array bounds, taking into account the special case of
10635 string literals
10636 * sem_ch3.adb: Typo in comment.
10637
10638 2011-08-02 Yannick Moy <moy@adacore.com>
10639
10640 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10641 which issues an error in formal mode if its argument node is originally
10642 from source
10643 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10644 has a discriminant specification so that it does not include the case
10645 of derived types
10646 (Derived_Type_Declaration): move here the test that a derived type has a
10647 discriminant specification
10648 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10649 first element of a component association before accessing its choices
10650 (presence of component association is not enough)
10651 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10652 declaration is a library item before accessing the next element in a
10653 list, as library items are not member of lists
10654 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10655 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10656 Check_Formal_Restriction whenever possible.
10657
10658 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10659
10660 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10661 reference when needed.
10662
10663 2011-08-02 Bob Duff <duff@adacore.com>
10664
10665 * gnat_ugn.texi: Fix typo.
10666
10667 2011-08-02 Vincent Celier <celier@adacore.com>
10668
10669 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10670 archive file name. Do not use the full path name of archives for Open
10671 VMS.
10672
10673 2011-08-02 Robert Dewar <dewar@adacore.com>
10674
10675 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10676 Analyze_Aspect_Specifications
10677 * sem_ch13.adb
10678 (Analyze_Aspect_Specifications): New handling for boolean aspects
10679 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10680 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10681 sequence for Analyze_Aspect_Specifications
10682 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10683 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10684
10685 2011-08-02 Robert Dewar <dewar@adacore.com>
10686
10687 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10688 aspects, since these no longer exist.
10689
10690 2011-08-02 Robert Dewar <dewar@adacore.com>
10691
10692 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10693 semicolon, do not try to see if there are aspects following it.
10694 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10695 aspect spec.
10696
10697 2011-08-02 Robert Dewar <dewar@adacore.com>
10698
10699 * sem_ch8.adb, aspects.ads: Minor reformatting.
10700
10701 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10702
10703 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10704 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10705 extracted from...
10706 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10707
10708 2011-08-02 Yannick Moy <moy@adacore.com>
10709
10710 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10711 mode on subprogram declaration outside of package specification, unless
10712 it is followed by a pragma Import
10713 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10714 Access_Type_Declaration): issue error in formal mode on access type
10715 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10716 incomplete type
10717 (Analyze_Object_Declaration): issue error in formal mode on object
10718 declaration which does not respect SPARK restrictions
10719 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10720 declaration which does not respect SPARK restrictions
10721 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10722 error in formal mode on digits or delta constraint
10723 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10724 decimal fixed point type
10725 (Derived_Type_Declaration): issue error in formal mode on derived type
10726 other than type extensions of tagged record types
10727 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10728 with check on access definition
10729 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10730 mode on protected definition.
10731 (Analyze_Task_Definition): issue error in formal mode on task definition
10732
10733 2011-08-02 Robert Dewar <dewar@adacore.com>
10734
10735 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10736
10737 2011-08-02 Javier Miranda <miranda@adacore.com>
10738
10739 * sem_ch6.adb (Can_Override_Operator): New function.
10740 (Verify_Overriding_Indicator): Add missing code to check overriding
10741 indicator in operators. Fixes regression.
10742 (Check_Overriding_Indicator): Minor reformating after replacing the
10743 code that evaluates if the subprogram can override an operator by
10744 invocations to the above new function.
10745 * einfo.adb
10746 (Write_Field26_Name): Add missing code to ensure that, following
10747 the documentation in einfo.ads, this field is not shown as attribute
10748 "Static_Initialization" on non-dispatching functions.
10749
10750 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10751
10752 * sem_res.adb (Resolve_Call): A call to
10753 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10754 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10755 i.e., when the second parameter is of type Time_Span.
10756
10757 2011-08-02 Vincent Celier <celier@adacore.com>
10758
10759 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10760 with an archive instead of -L<library dir> -l<library name>.
10761
10762 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10763
10764 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10765 mark the base types In_Use in addition to making the operations
10766 use_visible.
10767
10768 2011-08-02 Ed Falis <falis@adacore.com>
10769
10770 * init.c: add and setup __gnat_signal_mask for the exception signals
10771 * s-inmaop-vxworks.adb: new file.
10772 * s-intman-vxworks.adb: remove unnecessary initializations and
10773 simplify remaining
10774 * s-intman-vxworks.ads: remove unnecessary variable
10775 * s-taprop-vxworks.adb: simplify signal initialization
10776
10777 2011-08-02 Robert Dewar <dewar@adacore.com>
10778
10779 * sem_ch8.adb: Minor code reorganization, comment updates.
10780
10781 2011-08-02 Robert Dewar <dewar@adacore.com>
10782
10783 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10784 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10785 here from Sem_Res.
10786 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10787 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10788
10789 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10790
10791 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10792 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10793 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10794 use_type_clauses, to handle more efficiently use_type and use_all_type
10795 constructs.
10796 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10797 Ada2012 Use_All_Type clause.
10798 (Use_Class_Wide_Operations): new procedure.
10799
10800 2011-08-02 Robert Dewar <dewar@adacore.com>
10801
10802 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10803 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10804 expression to expression function.
10805
10806 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10807
10808 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10809 if types are compatible.
10810
10811 2011-08-02 Yannick Moy <moy@adacore.com>
10812
10813 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10814 returns True if its argument array types have same dimension and same
10815 static bounds at each index.
10816 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10817 OUT or IN OUT paramaters which are not view conversions in SPARK.
10818 (Resolve_Arithmetic_Op): issue an error in formal mode on
10819 multiplication or division with operands of fixed point types which are
10820 not qualified or explicitly converted.
10821 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10822 Boolean or array type (except String) operands.
10823 (Resolve_Equality_Op): issue an error in formal mode on equality
10824 operators for array types other than String with non-matching static
10825 bounds.
10826 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10827 for array types with non-matching static bounds. Factorize the code in
10828 Matching_Static_Array_Bounds.
10829 (Resolve_Qualified_Expression): issue an error in formal mode on
10830 qualified expressions for array types with non-matching static bounds.
10831 (Resolve_Type_Conversion): issue an error in formal mode on type
10832 conversion for array types with non-matching static bounds
10833
10834 2011-08-02 Robert Dewar <dewar@adacore.com>
10835
10836 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10837
10838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10839
10840 * par-ch9.adb: save location of entry for proper error message.
10841
10842 2011-08-02 Javier Miranda <miranda@adacore.com>
10843
10844 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10845 (Use_Full_View) which permits this routine to climb through the
10846 ancestors using the full-view of private parents.
10847 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10848 Use_Full_View to true in calls to Is_Ancestor.
10849 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10850 true in call to Is_Ancestor.
10851 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10852 Use_Full_View to true in call to Is_Ancestor.
10853 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10854 call to Is_Ancestor.
10855 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10856 Use_Full_View to true in calls to Is_Ancestor.
10857 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10858 Make_Select_Specific_Data_Table, Register_Primitive,
10859 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10860 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10861 to true in call to Is_Ancestor.
10862 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10863 Use_Full_View to true in calls to Is_Ancestor.
10864 * exp_cg.adb
10865 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10866 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10867
10868 2011-08-02 Robert Dewar <dewar@adacore.com>
10869
10870 * gnat_rm.texi: Minor reformatting.
10871 * sem_prag.adb: Minor reformatting.
10872
10873 2011-08-02 Tristan Gingold <gingold@adacore.com>
10874
10875 * vms_data.ads: Add VMS qualifier for -gnateP.
10876
10877 2011-08-02 Robert Dewar <dewar@adacore.com>
10878
10879 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10880 * par-ch7.adb (P_Package): Proper placement of aspects for package
10881 decl/instantiation.
10882 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10883 (End_Statements): Add Is_Sloc parameterr
10884 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10885 (Check_End): Ad Is_Sloc parameter
10886 (End_Statements): Add Is_Sloc parameterr
10887
10888 2011-08-02 Vincent Celier <celier@adacore.com>
10889
10890 * ug_words: Add VMS qualifier equivalent to -gnateP:
10891 /SYMBOL_PREPROCESSING.
10892
10893 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10894
10895 * gnat-style.texi: For hexadecimal numeric literals the typical
10896 grouping of digits is 4 to represent 2 bytes.
10897 A procedure spec which is split into several lines is indented two
10898 characters.
10899
10900 2011-08-02 Yannick Moy <moy@adacore.com>
10901
10902 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10903 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10904 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10905 properly qualified
10906 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10907 choice in array aggregate
10908 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10909 mark as ancestor
10910 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10911 positional and named aggregate for record, or others in record
10912 aggregate, or multiple choice in record aggregate
10913 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10914 array operands to logical operations AND, OR and XOR do not have the
10915 same static lower and higher bounds
10916 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10917
10918 2011-08-01 Robert Dewar <dewar@adacore.com>
10919
10920 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10921 Replaces Last_Source_Node_In_Sequence.
10922 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10923 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10924 parens and blank in string (this was inconsistently implemented).
10925 * errout.ads
10926 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10927 blank in string (this was inconsistently implemented).
10928 * gnat1drv.adb
10929 (Set_Global_Switches): Set formal mode switches appropriately
10930 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10931 * par-prag.adb
10932 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10933 call Set_Error_Msg_Lang to set "spark" as language name.
10934 * par.adb: Remove unnecessary call to set formal language for errout
10935 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10936 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10937 name.
10938 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10939 calls to it, moved after resolution so that types are known
10940 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10941 result of concatenation is not of type String
10942 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10943 concatenation is not properly restricted
10944 * gnat_rm.texi: Add doc on pragma Spark_95.
10945 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10946 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10947 * gcc-interface/Make-lang.in: Update dependencies.
10948
10949 2011-08-01 Javier Miranda <miranda@adacore.com>
10950
10951 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10952 condition that detects if the overridden operation must replace an
10953 existing entity.
10954
10955 2011-08-01 Javier Miranda <miranda@adacore.com>
10956
10957 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10958 code declarations inserted by Insert_Actions in each alternative of the
10959 N_Case_Expression node.
10960
10961 2011-08-01 Robert Dewar <dewar@adacore.com>
10962
10963 * sem_ch6.adb: Minor code reorganization.
10964 * sem_util.adb: Minor reformatting.
10965
10966 2011-08-01 Pascal Obry <obry@adacore.com>
10967
10968 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10969 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10970
10971 2011-08-01 Yannick Moy <moy@adacore.com>
10972
10973 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10974 literal or operator symbol which is prefixed
10975 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10976 mode on access attributes.
10977 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10978 that concatenation operands are properly restricted in formal mode
10979 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10980 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10981 result of the concatenation has a type different from String.
10982 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10983 Analyze_Quantified_Expression, Analyze_Slice,
10984 Analyze_Null): issue an error in formal mode on unsupported constructs
10985 * sem_ch5.adb
10986 (Analyze_Block_Statement): only issue error on source block statement
10987 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10988 function which returns the last node in a list of nodes for which
10989 Comes_From_Source returns True, if any
10990 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10991 Last_Source_Node_In_Sequence
10992 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10993 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10994 mode on unsupported constructs
10995 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10996 rest of the actions may be needed later on since the error is marked as
10997 not serious.
10998 * sinfo.ads: Typos in comments.
10999
11000 2011-08-01 Pascal Obry <obry@adacore.com>
11001
11002 * projects.texi: Minor editing.
11003
11004 2011-08-01 Yannick Moy <moy@adacore.com>
11005
11006 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11007 insertion character ~~
11008 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11009 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11010 with insertion character ~~
11011 (Set_Msg_Text): treat insertion character ~~
11012 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11013 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11014 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11015 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11016 errors related to the formal language restriction not serious
11017 (insertion character |).
11018 * par.adb (Par): set formal language for error messages if needed
11019 * sem_ch6.adb (Check_Missing_Return): take into account possible
11020 generated statements at the end of the function
11021 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11022 enumeration value to define a new pragma SPARK_95
11023 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11024 SPARK_Version): new type and variables to store the SPARK version
11025 (none by default).
11026 (SPARK_Mode): return True when SPARK_Version is set
11027 * par-prag.adb: Correct indentation
11028 (Prag): take Pragma_SPARK_95 into account
11029 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11030 into account.
11031
11032 2011-08-01 Robert Dewar <dewar@adacore.com>
11033
11034 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11035 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11036 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11037
11038 2011-08-01 Pascal Obry <obry@adacore.com>
11039
11040 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11041 Target_Name to Get_Path call.
11042 (Parse_Single_Project): Likewise.
11043 (Post_Parse_Context_Clause): Likewise.
11044 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11045 Call Initialise_Project_Path with the proper Target_Name.
11046 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11047 search path.
11048 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11049 with the proper Target_Name.
11050 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11051 Part.Parse routine.
11052 (Parse_Project_And_Apply_Config): Likewise.
11053 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11054 This is fine as this part of the code is supporting only native
11055 compilation.
11056 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11057 is fine as this part of the code is supporting only native compilation.
11058
11059 2011-08-01 Yannick Moy <moy@adacore.com>
11060
11061 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11062 of homonym, unless the homonym is one of the cases allowed in SPARK
11063 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11064 package declaration occurring after a body.
11065
11066 2011-08-01 Robert Dewar <dewar@adacore.com>
11067
11068 * checks.adb, exp_ch4.adb: Minor reformatting.
11069
11070 2011-08-01 Javier Miranda <miranda@adacore.com>
11071
11072 * einfo.ads (Access_Disp_Table): Fix documentation.
11073 (Dispatch_Table_Wrappers): Fix documentation.
11074
11075 2011-08-01 Pascal Obry <obry@adacore.com>
11076
11077 * prj-env.adb, prj-env.ads: Minor reformatting.
11078
11079 2011-08-01 Yannick Moy <moy@adacore.com>
11080
11081 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11082 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11083 procedures out of these packages.
11084 * errout.ads, errout.adb
11085 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11086 procedures in of this package
11087 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11088 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11089 on misplaced later vs initial declarations, like in Ada 83
11090 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11091 formal mode on attribute of private type whose full type declaration
11092 is not visible
11093 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11094 package declaration inside a package specification
11095 (Analyze_Full_Type_Declaration): issue error in formal mode on
11096 controlled type or discriminant type
11097 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11098 user-defined operator means that it should come from the source
11099 (New_Overloaded_Entity): issue error in formal mode on overloaded
11100 entity.
11101 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11102
11103 2011-08-01 Thomas Quinot <quinot@adacore.com>
11104
11105 * atree.adb: Minor reformatting.
11106 * checks.adb: Minor reformatting.
11107
11108 2011-08-01 Vincent Celier <celier@adacore.com>
11109
11110 * s-parame-vms-ia64.ads: Fix typo in comment
11111 Minor reformatting
11112 * s-parame-vms-restrict.ads: Removed, unused.
11113
11114 2011-08-01 Javier Miranda <miranda@adacore.com>
11115
11116 * exp_ch3.adb
11117 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11118 * sem_ch3.adb
11119 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11120 * sem_ch3.ads, sem_ch3.adb
11121 (Is_Constant_Bound): New extended version of the subprogram that was
11122 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11123 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11124 * sem_aux.ads (Constant_Value): Fix typo in comment.
11125 * checks.adb (Generate_Index_Checks): New implementation which, for
11126 array objects with constant bounds, generates the runtime check
11127 referencing the bounds of the array type. For other cases this routine
11128 provides its previous behavior obtaining such values from the array
11129 object.
11130 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11131 parent type.
11132 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11133 we cannot have semantic interpretations of the new node.
11134
11135 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11136
11137 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11138 expressions.
11139
11140 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11141
11142 * sem_ch8.adb: Minor code editing.
11143 * s-vxwext.adb: Remove trailing space.
11144 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11145 consistency with other files.
11146
11147 2011-08-01 Thomas Quinot <quinot@adacore.com>
11148
11149 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11150
11151 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11152
11153 * par-ch10.adb: reject parameterized expressions as compilation unit.
11154 * sem_ch4.adb: handle properly conditional expression with overloaded
11155 then_clause and no else_clause.
11156
11157 2011-08-01 Tristan Gingold <gingold@adacore.com>
11158
11159 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11160 like done by System.Aux_DEC.
11161 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11162
11163 2011-08-01 Yannick Moy <moy@adacore.com>
11164
11165 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11166 missing label at end of declaration (subprogram or package)
11167 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11168 of positional and named parameter association
11169 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11170 Error_Msg_SP which adds a prefix to the error message giving the name
11171 of the formal language analyzed
11172 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11173 access result type in subprogram, unconstrained array as result type,.
11174 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11175 procedure
11176 * sem_ch8.adb: Code clean up.
11177
11178 2011-08-01 Javier Miranda <miranda@adacore.com>
11179
11180 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11181 * einfo.ads (Access_Disp_Table): Fix documentation.
11182 (Dispatch_Table_Wrappers): Fix documentation.
11183 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11184 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11185 to enforce the documentation of this attribute.
11186 (Set_Is_Interface): Cleanup the assertion.
11187 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11188 the Underlying_Type entity before reading attribute Access_Disp_Table.
11189 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11190 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11191 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11192 the Underlying_Type entity before reading attribute Access_Disp_Table.
11193 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11194 Locate the Underlying_Type entity before reading attribute
11195 Access_Disp_Table.
11196
11197 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11198
11199 * s-poosiz.ads: Additional overriding indicators.
11200
11201 2011-08-01 Yannick Moy <moy@adacore.com>
11202
11203 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11204 formal mode.
11205 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11206 parameter specification does not include a subtype mark.
11207 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11208 formal mode on abstract subprogram.
11209 (Analyze_Subprogram_Specification): issue error in formal mode on
11210 user-defined operator.
11211 (Process_Formals): issue error in formal mode on access parameter and
11212 default expression.
11213 * sem_ch9.adb (Analyze_Abort_Statement,
11214 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11215 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11216 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11217 Analyze_Requeue, Analyze_Selective_Accept,
11218 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11219 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11220 issue error in formal mode on user-defined raise statement.
11221
11222 2011-08-01 Thomas Quinot <quinot@adacore.com>
11223
11224 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11225 declaration being hidden when overriding an implicit inherited
11226 subprogram.
11227 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11228 (-gnats), do not complain about a source file that contains only a
11229 pragma No_Body.
11230
11231 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11232
11233 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11234 variable if already set.
11235
11236 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11237
11238 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11239 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11240 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11241 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11242 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11243 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11244 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11245 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11246 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11247 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11248 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11249 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11250 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11251 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11252 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11253 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11254 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11255 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11256 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11257 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11258 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11259 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11260 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11261 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11262 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11263 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11264 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11265 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11266 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11267 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11268 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11269 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11270 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11271 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11272 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11273 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11274 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11275 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11276 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11277 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11278 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11279 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11280 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11281 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11282 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11283 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11284 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11285 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11286 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11287 Use GNAT instead of GNARL.
11288
11289 2011-08-01 Bob Duff <duff@adacore.com>
11290
11291 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11292 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11293 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11294 reformatting.
11295
11296 2011-08-01 Yannick Moy <moy@adacore.com>
11297
11298 * debug.adb (d.D) reverve flag for the SPARK mode
11299 (d.E) reverve flag for SPARK generation mode
11300 (d.F) reverve flag for Why generation mode
11301 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11302 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11303 functions which return True when the corresponding modes are set
11304 (Formal_Language): return "spark" or "alfa" when in formal verification
11305 mode.
11306 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11307 Error_Msg to prefix the error message with a tag giving the formal
11308 language
11309 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11310 message with a tag giving the formal language
11311 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11312 block statement
11313 (Analyze_Case_Statement): issue error in formal mode on case statement
11314 with a single "others" case alternative
11315 (Analyze_Exit_Statement): issue errors in formal mode on exit
11316 statements which do not respect SPARK restrictions
11317 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11318 (Check_Unreachable_Code): always issue an error (not a warning) in
11319 formal mode on unreachable code (concerns both code after an infinite
11320 loop and after an unconditional jump, both not allowed in SPARK)
11321 * sem_ch6.adb (Analyze_Return_Statement): add call to
11322 Set_Return_Present for a procedure containing a return statement
11323 (already done for functions in Analyze_Function_Return)
11324 (Analyze_Function_Return): issue error in formal mode on extended
11325 return or if return is not last statement in function
11326 (Check_Missing_Return): issue error in formal mode if function does
11327 not end with return or if procedure contains a return
11328 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11329 function to detect if there is an inner scope of its parameter S which
11330 is a loop.
11331
11332 2011-08-01 Thomas Quinot <quinot@adacore.com>
11333
11334 * sem_ch6.ads: Minor reformatting.
11335
11336 2011-08-01 Javier Miranda <miranda@adacore.com>
11337
11338 * sem_util.adb (Abstract_Interface_List): Complete condition when
11339 processing private type declarations to avoid reading unavailable
11340 attribute.
11341 (Is_Synchronized_Tagged_Type): Complete condition when processing
11342 private extension declaration nodes to avoid reading unavailable
11343 attribute.
11344
11345 2011-08-01 Thomas Quinot <quinot@adacore.com>
11346
11347 * sem_ch3.adb: Minor reformatting.
11348
11349 2011-08-01 Thomas Quinot <quinot@adacore.com>
11350
11351 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11352 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11353 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11354 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11355 for VMS, instead parametrize the common implementation with
11356 System.Parameters declarations.
11357
11358 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11359
11360 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11361
11362 2011-08-01 Tristan Gingold <gingold@adacore.com>
11363
11364 * seh_init.c: Fix SEH handler installation on win64.
11365
11366 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11367
11368 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11369 double analysis of an anonymous access to subprogram, because it can
11370 lead to improper sharing of profiles and a back-end crash.
11371
11372 2011-08-01 Robert Dewar <dewar@adacore.com>
11373
11374 * make.adb, sem_ch4.adb: Minor reformatting.
11375 * gcc-interface/Make-lang.in: Update dependencies.
11376 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11377
11378 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11379
11380 * gnat_rm.texi: Fix definition of Long_Integer.
11381
11382 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11383
11384 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11385 to prevent storage exhaustion.
11386 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11387 finalized is a function body, insert the cleanup code before the final
11388 return statement, to prevent spurious warnings.
11389 * s-pooglo.ads: add overriding indicator.
11390
11391 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11392
11393 * sem_ch4.adb (Operator_Check): improve error message when both a
11394 with_clause and a use_clause are needed to make operator usage legal.
11395 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11396 determine whether a compilation unit is visible within an other,
11397 either through a with_clause in the current unit, or a with_clause in
11398 its library unit or one one of its parents.
11399
11400 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11401
11402 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11403 over an arbitrary expression of an array or container type.
11404 * lib-xref.adb: clarify comment.
11405
11406 2011-08-01 Bob Duff <duff@adacore.com>
11407
11408 * einfo.ads: Minor reformatting.
11409 * debug.adb: Minor comment improvement.
11410
11411 2011-08-01 Javier Miranda <miranda@adacore.com>
11412
11413 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11414 consider hidden subprograms as valid candidates.
11415
11416 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11417
11418 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11419
11420 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11421
11422 * gnat_ugn.texi: Fix typo.
11423
11424 2011-08-01 Robert Dewar <dewar@adacore.com>
11425
11426 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11427 lib-xref.adb: Minor reformatting
11428
11429 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11430
11431 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11432 when to generate a call to Move_Final_List.
11433 (Has_Controlled_Parts): Remove this function.
11434
11435 2011-08-01 Geert Bosch <bosch@adacore.com>
11436
11437 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11438 "," in choice list.
11439
11440 2011-08-01 Thomas Quinot <quinot@adacore.com>
11441
11442 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11443 explicit raise of a predefined exception as Comes_From_Source if the
11444 original N_Raise_Statement comes from source.
11445
11446 2011-08-01 Robert Dewar <dewar@adacore.com>
11447
11448 * sinfo.ads: Add comment.
11449 * sem_ch6.adb: Minor reformatting.
11450
11451 2011-08-01 Robert Dewar <dewar@adacore.com>
11452
11453 * freeze.adb (Freeze_Entity): Refine check for bad component size
11454 clause to avoid rejecting confirming clause when atomic/aliased present.
11455
11456 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11457
11458 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11459 better determine whether an entity reference is a write.
11460 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11461 subcomponent.
11462 * lib-xref.adb (Output_References): Do no suppress a read reference at
11463 the same location as an immediately preceeding modify-reference, to
11464 handle properly in-out actuals.
11465
11466 2011-08-01 Tristan Gingold <gingold@adacore.com>
11467
11468 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11469
11470 2011-08-01 Quentin Ochem <ochem@adacore.com>
11471
11472 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11473 heap to compute the result.
11474
11475 2011-08-01 Robert Dewar <dewar@adacore.com>
11476
11477 * atree.ads: Minor reformatting.
11478
11479 2011-08-01 Emmanuel Briot <briot@adacore.com>
11480
11481 * g-expect.adb (Get_Command_Output): Fix memory leak.
11482
11483 2011-08-01 Geert Bosch <bosch@adacore.com>
11484
11485 * cstand.adb (P_Float_Type): New procedure to print the definition of
11486 predefined fpt types.
11487 (P_Mixed_Name): New procedure to print a name using mixed case
11488 (Print_Standard): Use P_Float_Type for printing floating point types
11489 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11490 precision IEEE float.
11491
11492 2011-08-01 Thomas Quinot <quinot@adacore.com>
11493
11494 * sem_ch3.adb: Minor reformatting.
11495
11496 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11497
11498 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11499 the completion of a generic function, insert the new body rather than
11500 rewriting the original.
11501
11502 2011-08-01 Yannick Moy <moy@adacore.com>
11503
11504 * sinfo.ads, errout.ads: Typos in comments.
11505
11506 2011-08-01 Robert Dewar <dewar@adacore.com>
11507
11508 * par-endh.adb: Minor reformatting.
11509
11510 2011-08-01 Robert Dewar <dewar@adacore.com>
11511
11512 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11513 (Pre_Post_Aspects): New subtype.
11514 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11515 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11516 * par-ch7.adb (P_Package): Remove Decl parameter
11517 (P_Package): Handle new syntax for aspects (before IS)
11518 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11519 new aspect syntax
11520 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11521 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11522 (P_Package): Remove Decl parameter
11523 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11524 aspects
11525 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11526 specs
11527 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11528 * sinfo.ads: Document new syntax for aspects in packages etc.
11529 * sprint.adb: Handle new syntax of aspects before IS in package
11530
11531 2011-08-01 Thomas Quinot <quinot@adacore.com>
11532
11533 * atree.ads: Minor reformatting.
11534 * sem_prag.adb: Minor reformatting.
11535
11536 2011-08-01 Robert Dewar <dewar@adacore.com>
11537
11538 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11539 case expr alternative.
11540
11541 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11542
11543 * sem_ch12.adb: Fix typo.
11544
11545 2011-08-01 Geert Bosch <bosch@adacore.com>
11546
11547 * sem_prag.adb (Check_No_Link_Name): New procedure.
11548 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11549 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11550 instead of Standard_Long_Long_Float_Size global. Preparation for
11551 eventual removal of per type constants.
11552 * exp_util.ads (Get_Stream_Size): New function returning the stream
11553 size value of subtype E.
11554 * exp_util.adb (Get_Stream_Size): Implement new function.
11555 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11556 function.
11557 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11558 * einfo.adb:
11559 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11560
11561 2011-08-01 Geert Bosch <bosch@adacore.com>
11562
11563 * cstand.adb: Fix comments.
11564 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11565 count of arguments.
11566
11567 2011-08-01 Robert Dewar <dewar@adacore.com>
11568
11569 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11570
11571 2011-08-01 Geert Bosch <bosch@adacore.com>
11572
11573 * atree.ads: Fix comment.
11574
11575 2011-08-01 Robert Dewar <dewar@adacore.com>
11576
11577 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11578 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11579 * par.adb: Add with for Namet.Sp.
11580 * par-tchk.adb: Minor reformatting.
11581
11582 2011-08-01 Vincent Celier <celier@adacore.com>
11583
11584 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11585 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11586 of the init procedure of a SAL.
11587 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11588 New procedure.
11589
11590 2011-08-01 Thomas Quinot <quinot@adacore.com>
11591
11592 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11593 reformatting.
11594
11595 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11596
11597 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11598
11599 2011-08-01 Thomas Quinot <quinot@adacore.com>
11600
11601 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11602 conformant with its spec (return True only for types that have
11603 an overriding Initialize primitive operation that prevents them from
11604 having preelaborable initialization).
11605 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11606 initialization for controlled types in Ada 2005 or later mode.
11607
11608 2011-08-01 Robert Dewar <dewar@adacore.com>
11609
11610 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11611 Postcondition.
11612 (Same_Aspect): New function.
11613 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11614 Type_Invariant, Precondition, Postcondition.
11615 * snames.ads-tmpl: Add Name_Type_Invariant.
11616
11617 2011-08-01 Robert Dewar <dewar@adacore.com>
11618
11619 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11620 here.
11621 (Freeze_All_Ent): Fix error in handling inherited aspects.
11622 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11623 already analyzed, but don't skip entire processing of a declaration,
11624 that's wrong in some cases of declarations being rewritten.
11625 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11626 Don't delay for integer, string literals
11627 Treat predicates in usual manner for delay, remove special case code,
11628 not needed.
11629 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11630 (Build_Predicate_Function): Update saved expression in aspect
11631 (Build_Invariant_Procedure): Update saved expression in aspect
11632 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11633 of replacement of discriminant references if the reference is simple.
11634
11635 2011-08-01 Robert Dewar <dewar@adacore.com>
11636
11637 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11638 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11639 Static_Predicate and Dynamic_Predicate.
11640 (Build_Predicate_Function): Add processing for Static_Predicate
11641 and Dynamic_Predicate.
11642 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11643 (From_Static_Predicate): New flag
11644 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11645
11646 2011-08-01 Robert Dewar <dewar@adacore.com>
11647
11648 * usage.adb: Documentation cleanup for Ada version modes in usage.
11649 * expander.adb: Minor reformatting.
11650
11651 2011-08-01 Robert Dewar <dewar@adacore.com>
11652
11653 * atree.ads: Minor comment fix.
11654 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11655 a-witeio.ads, sem_prag.adb: Minor reformatting.
11656
11657 2011-08-01 Doug Rupp <rupp@adacore.com>
11658
11659 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11660 pointers. Use descrip.h header file for convenience. Add some
11661 comments.
11662
11663 2011-08-01 Robert Dewar <dewar@adacore.com>
11664
11665 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11666 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11667 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11668 New procedure.
11669 (Check_Aspect_At_End_Of_Declarations): New procedure
11670 (Analye_Aspect_Specification): Minor changes for above procedures
11671 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11672 specification node as well.
11673
11674 2011-08-01 Pascal Obry <obry@adacore.com>
11675
11676 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11677 Windows files. Use GetFilesAttributes() in this case to check for file
11678 existence instead of returning with an error code.
11679
11680 2011-08-01 Vincent Celier <celier@adacore.com>
11681
11682 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11683 High is above Source length.
11684
11685 2011-08-01 Robert Dewar <dewar@adacore.com>
11686
11687 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11688
11689 2011-08-01 Robert Dewar <dewar@adacore.com>
11690
11691 * aspects.ads (Boolean_Aspects): New subtype.
11692 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11693 for derived types in cases where the parent type and derived type have
11694 aspects.
11695 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11696 with aspects when parent type also has aspects.
11697 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11698 boolean expression at this point).
11699 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11700 accordance with final decision on the Ada 2012 feature.
11701 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11702
11703 2011-08-01 Matthew Heaney <heaney@adacore.com>
11704
11705 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11706
11707 2011-08-01 Pascal Obry <obry@adacore.com>
11708
11709 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11710 Fix Replace_Slice when High is above current string size.
11711 (Replace_Slice): Fix DL computation when High is above current
11712 string length.
11713
11714 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11715
11716 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11717
11718 2011-08-01 Matthew Heaney <heaney@adacore.com>
11719
11720 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11721 of node.
11722
11723 2011-08-01 Pascal Obry <obry@adacore.com>
11724
11725 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11726 reformatting.
11727
11728 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11729
11730 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11731 access to protected subprograms in generic bodies.
11732 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11733 protected type, indicate that the convention of the subprogram is
11734 Convention_Protected, because it may be used in subsequent declarations
11735 within the protected declaration.
11736
11737 2011-08-01 Vincent Celier <celier@adacore.com>
11738
11739 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11740 and "final" procedures when the name of the library is "ada", to avoid
11741 duplicate symbols "adainit" and "adafinal" in executables.
11742
11743 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11744
11745 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11746 quantified expression that appears within a postcondition and uses the
11747 Ada2012 'Result attribute.
11748
11749 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11750
11751 * init.c (__gnat_error_handler): Cast reason to int.
11752 (__gnat_install_handler): Explain sa_sigaction use.
11753
11754 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11755
11756 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11757 subprogram has copy-in copy-out parameters, try to promote the mode of
11758 the return type if it is passed in registers.
11759
11760 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11761
11762 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11763 left operand as addressable.
11764
11765 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11766
11767 * gcc-interface/gigi.h (build_function_stub): Remove.
11768 (build_return_expr): Likewise.
11769 (convert_vms_descriptor): Declare.
11770 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11771 (build_function_stub): Move to...
11772 * gcc-interface/utils2.c (build_return_expr): Move to...
11773 * gcc-interface/trans.c (build_function_stub): ...here.
11774 (build_return_expr): ...here.
11775 (Subprogram_Body_to_gnu): Add local variable for language_function.
11776 Disconnect the parameter attributes cache, if any, once done with it.
11777 Call end_subprog_body only after setting the end_locus.
11778 Build the stub associated with the function, if any, at the very end.
11779 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11780 variables and streamline control flow.
11781
11782 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11783
11784 PR ada/49819
11785 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11786 g-trasym-dwarf.adb.
11787
11788 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11789
11790 PR bootstrap/49794
11791 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11792 Assign to act.sa_sigaction.
11793 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11794 current->return_address to char * before arithmetic.
11795
11796 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11797
11798 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11799 Correct argument types.
11800 Extract code from reason.
11801 (__gnat_install_handler): Assign to act.sa_sigaction.
11802
11803 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11804
11805 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11806 (GNAT1_OBJS): ...here.
11807
11808 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11809
11810 PR ada/48711
11811 * g-socthi-mingw.adb (Fill): Fix formatting.
11812
11813 * gcc-interface/gigi.h: Move around comment.
11814
11815 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11816
11817 PR ada/46350
11818 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11819
11820 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11821
11822 PR ada/48711
11823 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11824
11825 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11826
11827 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11828 range comparison if Pmode is SImode.
11829
11830 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11831 Eric Botcazou <ebotcazou@adacore.com>
11832
11833 * adadecode.c: Wrap up in extern "C" block.
11834 * adadecode.h: Likewise.
11835 * adaint.c: Likewise. Remove 'const' keyword.
11836 * adaint.h: Likewise.
11837 * argv.c: Likewise.
11838 * atree.h: Likewise.
11839 * cio.c: Likewise.
11840 * cstreams.c: Likewise.
11841 * env.c: Likewise.
11842 * exit.c: Likewise.
11843 * fe.h: Likewise.
11844 * final.c: Likewise.
11845 * init.c: Likewise.
11846 * initialize.c: Likewise.
11847 * link.c: Likewise.
11848 * namet.h: Likewise.
11849 * nlists.h: Likewise.
11850 * raise.c: Likewise.
11851 * raise.h: Likewise.
11852 * repinfo.h: Likewise.
11853 * seh_init.c: Likewise.
11854 * targext.c: Likewise.
11855 * tracebak.c: Likewise.
11856 * uintp.h: Likewise.
11857 * urealp.h: Likewise.
11858 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11859 * xsinfo.adb: Likewise.
11860 * xsnamest.adb: Likewise.
11861 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11862 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11863 * gcc-interface/misc.c: Likewise.
11864 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11865 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11866 ada/targext.o here...
11867 (GNAT_ADA_OBJS): ...and not here.
11868 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11869 (GNATBIND_OBJS): Reorder.
11870
11871 2011-07-07 Richard Henderson <rth@redhat.com>
11872
11873 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11874 dwarf2out_frame_init.
11875
11876 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11877
11878 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11879
11880 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11881
11882 PR target/39150
11883 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11884
11885 2011-07-06 Richard Guenther <rguenther@suse.de>
11886
11887 * gcc-interface/misc.c (gnat_init): Merge calls to
11888 build_common_tree_nodes and build_common_tree_nodes_2.
11889 Re-initialize boolean_false_node.
11890
11891 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11892 Olivier Hainque <hainque@adacore.com>
11893 Nicolas Setton <setton@adacore.com>
11894
11895 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11896 the type according to the ARTIFICIAL_P parameter.
11897 (create_type_decl): Likewise.
11898 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11899
11900 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11901
11902 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11903 (gnatbind): Likewise.
11904
11905 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11906
11907 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11908
11909 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11910
11911 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11912 local variable throughout. Remove useless call to Base_Type.
11913 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11914 Take it also into account for the volatileness of the field. Set the
11915 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11916
11917 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11918
11919 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11920 on a dereference built for a by-ref object if it has an address clause.
11921
11922 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11923
11924 * einfo.ads (Address_Taken): Document use for the second argument of
11925 Asm_Input and Asm_Output attributes.
11926 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11927 argument is an entity name, then set Address_Taken on it.
11928 <Attribute_Asm_Output>: Likewise.
11929 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11930 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11931 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11932 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11933
11934 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11935
11936 PR middle-end/46500
11937 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11938
11939 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11940
11941 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11942 (ada/utils.o): Update dependencies.
11943 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11944 ../../../libcpp/libcpp.a.
11945 * gcc-interface/utils.c: Include common/common-target.h.
11946 (process_attributes): Use targetm_common.have_named_sections.
11947
11948 2011-06-07 Richard Guenther <rguenther@suse.de>
11949
11950 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11951 set_sizetype.
11952
11953 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11954
11955 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11956 TREE_THIS_NOTRAP flag.
11957
11958 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11959
11960 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11961 Fix thinko.
11962
11963 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11964
11965 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11966 constants whose full view has discriminants specially.
11967
11968 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11969
11970 * gcc-interface/utils.c: Include diagnostic.h.
11971 (gnat_write_global_declarations): Output debug information for all
11972 global type declarations before finalizing the compilation unit.
11973 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11974
11975 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11976
11977 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11978
11979 2011-05-25 Kai Tietz <ktietz@redhat.com>
11980
11981 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11982 initialization instead of const/none-const pointer assignment.
11983
11984 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11985
11986 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11987 $(EXTRA_GNAT1_OBJS).
11988 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11989 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11990 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11991 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11992 libcommon-target.a instead of prefix.o.
11993
11994 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11995
11996 PR ada/49097
11997 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11998
11999 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12000
12001 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12002 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12003 instead of version.o.
12004
12005 2011-05-18 Kai Tietz <ktietz@redhat.com>
12006
12007 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12008 boolean_false_node instead of integer_zero_node.
12009 (convert_with_check): Likewise.
12010 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12011
12012 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12013
12014 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12015 type of the parameter is an unconstrained array, convert the actual to
12016 the type of the formal in the In Out and Out cases as well.
12017
12018 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12019
12020 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12021 call build_function_type_array or build_varargs_function_type_array
12022 instead.
12023 (create_subprog_type): Don't call build_function_type; call
12024 build_function_type_vec instead.
12025
12026 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12027
12028 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12029 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12030 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12031
12032 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12033
12034 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12035
12036 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12037 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12038
12039 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12040
12041 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12042
12043 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12044
12045 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12046 instead of accessing TYPE_ARG_TYPES directly.
12047 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12048
12049 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12050
12051 PR ada/48844
12052 * gcc-interface/gigi.h (get_variant_part): Declare.
12053 * gcc-interface/decl.c (get_variant_part): Make global.
12054 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12055 types have the same constant size, are record types and T1 has a
12056 variant part while T2 doesn't.
12057
12058 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12059
12060 * gcc-interface/utils.c (begin_subprog_body): Do not call
12061 get_pending_sizes.
12062 (end_subprog_body): Likewise.
12063
12064 2011-05-04 Richard Guenther <rguenther@suse.de>
12065
12066 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12067 int_const_binop.
12068 (pos_to_constructor): Likewise.
12069
12070 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12071 Eric Botcazou <ebotcazou@adacore.com>
12072
12073 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12074 of build_function_type. Adjust calls to...
12075 (build_raise_check): ...this. Do not take a void_tree parameter.
12076 Call build_function_type_list instead of build_function_type.
12077 Fix head comment and swap couple of conditional blocks.
12078
12079 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12080
12081 * gnatvsn.ads (Library_Version): Bump to 4.7.
12082 (Current_Year): Bump to 2011.
12083
12084 2011-04-29 Michael Matz <matz@suse.de>
12085
12086 * gcc-interface/misc.c (gnat_handle_option): Set
12087 warn_maybe_uninitialized.
12088
12089 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12090
12091 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12092 the Watson/McCabe paper.
12093
12094 2011-04-23 Jim Meyering <meyering@redhat.com>
12095
12096 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12097
12098 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12099
12100 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12101 onto the new type.
12102
12103 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12104
12105 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12106 parameter.
12107 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12108 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12109 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12110 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12111 <all>: Do not set flags on the reused DECL node coming from an alias.
12112 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12113 don't need debug info here...
12114 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12115 (gigi): Adjust calls to create_subprog_decl.
12116 (build_raise_check): Likewise.
12117 (establish_gnat_vms_condition_handler): Likewise.
12118 (Compilation_Unit_to_gnu): Likewise.
12119 (gnat_to_gnu): Likewise.
12120
12121 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12122
12123 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12124 (NO_REORDER_ADAFLAGS): New variable.
12125 (EXTRA_GNATTOOLS): Always define.
12126 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12127 Clean up and adjust list of files compiled with special options.
12128 * gcc-interface/Make-lang.in: Likewise.
12129 (ada/decl.o): Cosmetical change.
12130 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12131
12132 2011-04-20 Jim Meyering <meyering@redhat.com>
12133
12134 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12135
12136 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12137
12138 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12139 $(CFLAGS) on the link line.
12140
12141 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12142
12143 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12144 padded type built for the return type if it is unconstrained.
12145
12146 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12147
12148 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12149
12150 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12151
12152 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12153 before calling TREE_CHAIN.
12154 * gcc-interface/misc.c (gnat_init_ts): New function.
12155 (LANG_HOOKS_INIT_TS): Define.
12156
12157 2011-04-12 Martin Jambor <mjambor@suse.cz>
12158
12159 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12160 instead of cgraph_node.
12161
12162 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12163
12164 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12165 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12166 mechanism.
12167
12168 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12169
12170 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12171 of aggregate types that contain a placeholder.
12172
12173 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12174
12175 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12176 TYPE_ARG_TYPES.
12177 (handle_type_generic_attribute): Likewise.
12178
12179 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12180
12181 PR ada/47163
12182 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12183
12184 2011-04-04 Kai Tietz <ktietz@redhat.com>
12185
12186 PR ada/47163
12187 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12188 to flag value.
12189
12190 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12191
12192 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12193 type case, do not strip a padding type around the array type.
12194
12195 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12196
12197 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12198 types.
12199
12200 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12201
12202 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12203 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12204 code for -feliminate-unused-debug-types.
12205 (gnat_post_options): Likewise.
12206
12207 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12208
12209 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12210 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12211 distinct copy.
12212
12213 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12214
12215 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12216 DECL_ARTIFICIAL flag on enumeration types.
12217
12218 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12219
12220 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12221 fat pointer types artificial unconditionally.
12222 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12223 isn't artificial.
12224
12225 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12226
12227 * gcc-interface/gigi.h (get_dummy_type): Declare.
12228 (build_dummy_unc_pointer_types): Likewise.
12229 (finish_fat_pointer_type): Likewise.
12230 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12231 fat pointer type has been built, complete it in place.
12232 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12233 and thin pointers. Remove useless variable.
12234 (finish_fat_pointer_type): Make global and move to...
12235 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12236 (get_dummy_type): New function.
12237 (build_dummy_unc_pointer_types): Likewise.
12238 (gnat_pushdecl): Propage the name to the anonymous variants only.
12239 (update_pointer_to): Only adjust the pointer types in the unconstrained
12240 array case.
12241
12242 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12243
12244 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12245 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12246 if this is a Taft amendment type and the full declaration is available.
12247 * gcc-interface/trans.c (process_type): Likewise.
12248 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12249 (process_freeze_entity): Likewise.
12250 * gcc-interface/utils.c (dummy_global): New static variable.
12251 (gnat_write_global_declarations): If there are types declared as used
12252 at the global level, insert them in the global hash table.
12253
12254 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12255
12256 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12257 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12258 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12259 copy.
12260 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12261 flag of the type accordingly.
12262 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12263
12264 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12265
12266 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12267 finalizing types when updating the pointers to the designated type.
12268 <all>: Finalize the deferred types even if we didn't defer processing
12269 of incomplete types in this invocation.
12270
12271 2011-04-01 Olivier Hainque <hainque@adacore.com>
12272 Nicolas Setton <setton@adacore.com>
12273 Eric Botcazou <ebotcazou@adacore.com>
12274
12275 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12276 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12277
12278 2011-03-28 Kai Tietz <ktietz@redhat.com>
12279
12280 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12281 Windows targets.
12282 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12283 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12284
12285 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12286
12287 2011-03-28 Tristan Gingold <gingold@adacore.com>
12288
12289 PR ada/44431
12290 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12291 Use ada output of gnatbind.
12292 (ada/b_gnatb.adb): Ditto.
12293 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12294 (ada.mostlyclean, ada.stage1)
12295 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12296 (ada.stagefeedback): Adjust.
12297 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12298 Use ada output of gnatbind.
12299 (b_gnatm.adb): Ditto.
12300 (b_gnatl.o, b_gnatm.o): New rules.
12301
12302 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12303
12304 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12305 for the padded type built to support a specified size or alignment.
12306
12307 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12308
12309 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12310 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12311 unconditionally to the end of the unit when the designated type is
12312 limited_with'ed.
12313 <all>: Rename local variable. Attempt to un-defer types only and do it
12314 for limited_with'ed types as well.
12315 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12316 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12317 consistently and remove redundant call to finalize_from_with_types.
12318
12319 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12320
12321 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12322 subprograms without a previous spec declared in the same unit.
12323 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12324 subprograms at the end of the unit instead of at the beginning.
12325 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12326 isn't public for the special handling of non-inline functions nested
12327 inside inline external functions.
12328
12329 2011-03-25 Jeff Law <law@redhat.com>
12330
12331 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12332
12333 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12334
12335 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12336 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12337 to compute Set_Size_Depends_On_Discriminant.
12338 (Layout_Type): Call it on array types in back-end layout mode.
12339 * sem_util.adb (Requires_Transient_Scope): Return true for array
12340 types only if the size depends on the value of discriminants.
12341 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12342 type if the RHS is a call to a function that returns an unconstrained
12343 type with default discriminant.
12344
12345 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12346
12347 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12348 non-conversion to the nominal result type at the end.
12349
12350 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12351
12352 * gcc-interface/trans.c (create_temporary): New function taken from...
12353 (create_init_temporary): ...here. Call it.
12354 (call_to_gnu): Create the temporary for the return value early, if any.
12355 Create it for a function with copy-in/copy-out parameters if there is
12356 no target; in other cases of copy-in/copy-out, use another temporary.
12357 Push the new binding level lazily. Add and rename local variables.
12358
12359 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12360
12361 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12362 error message.
12363 (set_rm_size): Likewise.
12364
12365 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12366
12367 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12368 for the padded type built in order to support a specified alignment.
12369 Fix incorrect formatting.
12370
12371 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12372
12373 PR bootstrap/48216
12374 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12375
12376 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12377
12378 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12379 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12380 to the end of the list. Adjust recursive call. Rename local variable.
12381 If REORDER is true, reorder components of the record type.
12382 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12383 components_to_record and adjust the parameter list.
12384
12385 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12386
12387 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12388 disabled, use the variable for bounds of loop iteration scheme.
12389
12390 2011-03-21 Kai Tietz <ktietz@redhat.com>
12391
12392 PR target/12171
12393 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12394
12395 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12396
12397 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12398 out whether the expression is read-only. Short-circuit placeholder
12399 case and rename a couple of local variables.
12400
12401 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12402
12403 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12404 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12405 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12406 (convert): Deal with conversions from a smaller form type specially.
12407
12408 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12409
12410 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12411 its argument, except for the special -I- switch.
12412
12413 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12414
12415 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12416 "Ada Issues".
12417
12418 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12419
12420 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12421
12422 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12423
12424 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12425 GNAT_FORMAL.
12426 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12427 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12428 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12429 Do not generate the check directly, instead instantiate the template
12430 check present in the descriptor.
12431 (make_descriptor_field): Move around.
12432 (build_vms_descriptor32): Build a template check in the POINTER field.
12433 (build_vms_descriptor): Remove useless suffixes.
12434 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12435
12436 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12437
12438 PR bootstrap/47467
12439 * targext.c: Include target files if IN_RTS is defined.
12440
12441 2011-01-26 Richard Guenther <rguenther@suse.de>
12442
12443 PR bootstrap/47467
12444 * targext.c: Include config.h.
12445 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12446 dependency.
12447
12448 2011-01-04 Pascal Obry <obry@adacore.com>
12449 Eric Botcazou <ebotcazou@adacore.com>
12450
12451 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12452
12453 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12454
12455 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12456 end-of-case on the end label and its associated gotos, if any.
12457
12458 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12459
12460 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12461 expressions of the parameter cache within the statement group of
12462 the CICO mechanism.
12463
12464 2011-01-04 Olivier Hainque <hainque@adacore.com>
12465 Eric Botcazou <ebotcazou@adacore.com>
12466
12467 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12468 (set_end_locus_from_node): New function.
12469 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12470 make and the function end_locus.
12471 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12472 for the elaboration subprogram.
12473 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12474 set the end_locus of the expression as well.
12475
12476 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12477
12478 PR ada/47131
12479 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12480 variables that are referenced in exception handlers volatile.
12481
12482
12483 \f
12484 Copyright (C) 2011 Free Software Foundation, Inc.
12485
12486 Copying and distribution of this file, with or without modification,
12487 are permitted in any medium without royalty provided the copyright
12488 notice and this notice are preserved.
12489
12490 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12491 - fix bugs in the description of Source_Trace;
12492 - get rid of UNIT_NAME;
12493
12494 2011-08-02 Javier Miranda <miranda@adacore.com>
12495
12496 * exp_ch9.adb
12497 (Build_Dispatching_Requeue): Adding support for VM targets
12498 since we cannot directly reference the Tag entity.
12499 * exp_sel.adb (Build_K): Adding support for VM targets.
12500 (Build_S_Assignment): Adding support for VM targets.
12501 * exp_disp.adb
12502 (Default_Prim_Op_Position): In VM targets do not restrict availability
12503 of predefined interface primitives to compiling in Ada 2005 mode.
12504 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12505 restricted to compiling in Ada 2005 mode.
12506 (Make_VM_TSD): Generate code that declares and initializes the OSD
12507 record. Needed to support dispatching calls through synchronized
12508 interfaces.
12509 * exp_ch3.adb
12510 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12511 primitives associated with synchronized interfaces.
12512 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12513 primitives associated with synchronized interfaces.
12514
12515 2011-08-02 Yannick Moy <moy@adacore.com>
12516
12517 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12518 statements hidden in SPARK if preceded by the HIDE directive
12519 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12520 exception handlers as hidden in SPARK if preceded by the HIDE directive
12521 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12522 if starting with the HIDE directive
12523 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12524 starting with the HIDE directive; mark the declarations in a private
12525 part as hidden in SPARK if the private part starts with the HIDE
12526 directive
12527 * restrict.adb, restrict.ads
12528 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12529 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12530 argument node belongs to a part which is hidden in SPARK
12531 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12532 parts in SPARK; protect the possibly costly call to
12533 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12534 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12535 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12536 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12537 Tok_SPARK_Hide.
12538 (Scan): recognize special comment starting with '#' and followed by
12539 SPARK keyword "hide" as a HIDE directive.
12540
12541 2011-08-02 Yannick Moy <moy@adacore.com>
12542
12543 * types.ads, erroutc.ads: Minor reformatting.
12544
12545 2011-08-02 Vincent Celier <celier@adacore.com>
12546
12547 * link.c: Add response file support for cross platforms.
12548
12549 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12550
12551 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12552 in an association, set parent field of copy before partial analysis.
12553 * sem_res.adb (Resolve_Slice): create reference to itype only when
12554 expansion is enabled.
12555
12556 2011-08-02 Yannick Moy <moy@adacore.com>
12557
12558 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12559 for new flag denoting which subprogram bodies are in ALFA
12560 * restrict.adb, sem_ch7.adb: Update comment
12561 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12562 sem_ch9.adb, sem_res.adb: Add calls to
12563 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12564 * sem_ch6.adb (Analyze_Function_Return): add calls to
12565 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12566 middle of the body, and extended return.
12567 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12568 False when missing return.
12569 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12570 to True for subprograms whose spec is in ALFA. Remove later on the flag
12571 on the entity used for a subprogram body when there exists a separate
12572 declaration.
12573 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12574 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12575 False, otherwise do nothing.
12576
12577 2011-08-02 Robert Dewar <dewar@adacore.com>
12578
12579 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12580
12581 2011-08-02 Yannick Moy <moy@adacore.com>
12582
12583 * sem_ch4.ads: minor formatting.
12584
12585 2011-08-02 Yannick Moy <moy@adacore.com>
12586
12587 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12588 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12589 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12590 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12591 opt.ads: cleanup of SPARK mode
12592
12593 2011-08-02 Yannick Moy <moy@adacore.com>
12594
12595 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12596 types.
12597 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12598 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12599 * sem_ch3.adb
12600 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12601 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12602 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12603 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12604 types.
12605 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12606 non-static range.
12607 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12608 functions whose return type is not in ALFA.
12609 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12610 specifications.
12611 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12612 parameter's type is not in ALFA.
12613 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12614 types are in ALFA.
12615
12616 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12617
12618 * sem_ch6 (Analyze_Expression_Function): treat the function as
12619 Inline_Always, and introduce a subprogram declaration for it when it is
12620 not a completion.
12621 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12622 expression functions, so that the back-end can determine whether they
12623 can in fact be inlined.
12624 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12625 a function body comes from an expression function.
12626
12627 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12628
12629 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12630 null exclusions to test Can_Never_Be_Null on the anonymous access types
12631 of the formals rather than testing the formals themselves. Exclude this
12632 check in cases where the Old_Formal is marked as a controlling formal,
12633 to avoid issuing spurious errors for bodies completing dispatching
12634 operations (due to the flag not getting set on controlling access
12635 formals in body specs).
12636 (Find_Corresponding_Spec): When checking full and subtype conformance of
12637 subprogram bodies in instances, pass Designated and E in that order, for
12638 consistency with the expected order of the formals (New_Id followed by
12639 Old_Id).
12640
12641 2011-08-02 Robert Dewar <dewar@adacore.com>
12642
12643 * sem_ch8.adb: Minor reformatting.
12644
12645 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12646
12647 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12648 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12649 primitive operations of class-wide actuals.
12650
12651 2011-08-02 Javier Miranda <miranda@adacore.com>
12652
12653 * exp_atag.ads, exp_atag.adb
12654 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12655 since its value is implicitly passed in argument Typ.
12656 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12657 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12658 Build_Common_Dispatching_Select_Statements.
12659
12660 2011-08-02 Robert Dewar <dewar@adacore.com>
12661
12662 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12663 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12664 Minor reformatting.
12665
12666 2011-08-02 Robert Dewar <dewar@adacore.com>
12667
12668 * sem_res.adb: Minor reformatting.
12669 * sem_prag.adb: Minor reformatting.
12670
12671 2011-08-02 Javier Miranda <miranda@adacore.com>
12672
12673 * exp_atag.adb, exp_atags.ads
12674 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12675 by the tagged type Entity. Required to use this routine in the VM
12676 targets since we do not have available the Tag entity in the VM
12677 platforms.
12678 * exp_ch6.adb
12679 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12680 Ada.Tags has not been previously loaded.
12681 * exp_ch7.adb
12682 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12683 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12684 * sem_aux.adb
12685 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12686 view of enclosing scopes. Required to handle enclosing scopes that
12687 are synchronized types whose full view is a task type.
12688 * exp_disp.adb
12689 (Build_VM_TSDs): Minor code improvement to avoid generating and
12690 analyzing lists with empty nodes.
12691 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12692 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12693 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12694 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12695 (Make_Select_Specific_Data_Table): Add support for VM targets.
12696 (Make_VM_TSD): Generate code to initialize the SSD structure of
12697 the TSD.
12698
12699 2011-08-02 Yannick Moy <moy@adacore.com>
12700
12701 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12702 cross-references section in ALI.
12703 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12704 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12705 Sub).
12706 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12707 subprogram or package entity of a node
12708 (Is_Local_Reference_Type): new function returns True for references
12709 selected in local cross-references.
12710 (Lt): function extracted from Lt in Output_References
12711 (Write_Entity_Name): function extracted from Output_References
12712 (Generate_Definition): generate reference with type 'D' for definition
12713 of objects (object declaration and parameter specification), with
12714 appropriate locations and units, for use in local cross-references.
12715 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12716 references of type 'I' for initialization in object definition.
12717 (Output_References): move part of function Lt and procedure
12718 Write_Entity_Name outside of the body. Ignore references of types 'D'
12719 and 'I' introduced for local cross-references.
12720 (Output_Local_References): new procedure to output the local
12721 cross-references sections.
12722 (Lref_Entity_Status): new array defining whether an entity is a local
12723 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12724 with 'I' type when initialization expression is present.
12725 * get_scos.adb, get_scos.ads: Correct comments and typos
12726
12727 2011-08-02 Javier Miranda <miranda@adacore.com>
12728
12729 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12730 the JVM target.
12731 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12732 the JVM target.
12733 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12734 TSD support.
12735
12736 2011-08-02 Vincent Celier <celier@adacore.com>
12737
12738 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12739 (No_Space_Img): New function
12740 (Find_Excluded_Sources): When reading from a file, record the file name
12741 and the line number for each excluded source.
12742 (Mark_Excluded_Sources): When reporting an error, if the excluded
12743 sources were read from a file, include file name and line number in
12744 the error message.
12745
12746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12747
12748 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12749
12750 2011-08-02 Robert Dewar <dewar@adacore.com>
12751
12752 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12753
12754 2011-08-02 Javier Miranda <miranda@adacore.com>
12755
12756 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12757 generation of TSDs to the DOTNET compiler.
12758 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12759 generation of TSDs to the DOTNET compiler.
12760
12761 2011-08-02 Javier Miranda <miranda@adacore.com>
12762
12763 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12764 record of all the tagged types declared inside library level package
12765 declarations, library level package bodies or library level subprograms.
12766 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12767 associated with a given tagged type.
12768 (Build_VM_TSDs): New subprogram.
12769 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12770 compilation units that are subprograms.
12771 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12772 compilation units that are package bodies.
12773 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12774 units that are a package declaration or a package instantiation.
12775 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12776 reorganization to improve the error generated by the frontend when the
12777 function Ada.Tags.Secondary_Tag is not available.
12778 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12779 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12780
12781 2011-08-02 Javier Miranda <miranda@adacore.com>
12782
12783 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12784
12785 2011-08-02 Robert Dewar <dewar@adacore.com>
12786
12787 * s-imenne.ads: Minor reformatting.
12788
12789 2011-08-02 Robert Dewar <dewar@adacore.com>
12790
12791 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12792 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12793 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12794
12795 2011-08-02 Robert Dewar <dewar@adacore.com>
12796
12797 * einfo.ads (Materialize_Entity): Document this is only for renamings
12798 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12799 required debug information in the case where we transform the object
12800 declaration into a renaming declaration.
12801 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12802 object
12803 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12804 Materialize_Entity.
12805
12806 2011-08-02 Robert Dewar <dewar@adacore.com>
12807
12808 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12809 Suppress_Init_Procs.
12810 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12811 Suppress_Initialization/Initialization_Suppressed.
12812 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12813 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12814 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12815 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12816
12817 2011-08-02 Robert Dewar <dewar@adacore.com>
12818
12819 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12820 Minor reformatting.
12821
12822 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12823
12824 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12825 only have inheritable classwide pre/postconditions.
12826
12827 2011-08-02 Javier Miranda <miranda@adacore.com>
12828
12829 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12830 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12831 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12832 checks if the external tag of a type is the same as the external tag
12833 of some other declaration.
12834
12835 2011-08-02 Thomas Quinot <quinot@adacore.com>
12836
12837 * s-taskin.ads: Minor reformatting.
12838
12839 2011-08-02 Emmanuel Briot <briot@adacore.com>
12840
12841 * g-comlin.adb (Display_Help): swap the order in which it prints the
12842 short help and the general usage.
12843
12844 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12845
12846 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12847 the aspect declarations and attach them to the generic copy for
12848 subsequent analysis.
12849 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12850 declarations of the generic tree to the new subprogram declarations.
12851 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12852 conditions that apply to a subprogram instance.
12853
12854 2011-08-02 Robert Dewar <dewar@adacore.com>
12855
12856 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12857
12858 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12859
12860 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12861 private type with a tagged full view is not derived in the immediate
12862 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12863
12864 2011-08-02 Robert Dewar <dewar@adacore.com>
12865
12866 * exp_ch4.adb: Minor reformatting.
12867
12868 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12869
12870 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12871 Ada2012 iterator, the loop will be rewritten during expansion into a
12872 while loop with a cursor and an element declaration. Do not analyze the
12873 body in this case, because if the container is for indefinite types the
12874 actual subtype of the elements will only be determined when the cursor
12875 declaration is analyzed.
12876
12877 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12878
12879 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12880 size/alignment related attributes in CodePeer_Mode.
12881
12882 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12883
12884 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12885 Prepend_Element, since this can result in the operation getting the
12886 wrong slot in the full type's dispatch table if the full type has
12887 inherited operations. The incomplete type's operation will get added
12888 to the proper position in the full type's primitives
12889 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12890 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12891 dispatching operations, since there are cases where nonprimitive
12892 subprograms can get added to the list of incomplete dependents (such
12893 as subprograms in nested packages).
12894 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12895 private part when determining whether to add a primitive with a
12896 parameter of a tagged incomplete type to the Private_Dependents list.
12897 Such primitives can also occur in the visible part, and should not have
12898 been excluded from being private dependents.
12899 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12900 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12901 list of a Taft-amendment incomplete type is a primitive before issuing
12902 an error that the full type must appear in the same unit. There are
12903 cases where nonprimitives can be in the list (such as subprograms in
12904 nested packages).
12905 * sem_disp.adb (Derives_From): Use correct condition for checking that
12906 a formal's type is derived from the type of the corresponding formal in
12907 the parent subprogram (the condition was completely wrong). Add
12908 checking that was missing for controlling result types being derived
12909 from the result type of the parent operation.
12910
12911 2011-08-02 Yannick Moy <moy@adacore.com>
12912
12913 * errout.adb (First_Node): minor renaming
12914 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12915 first node.
12916
12917 2011-08-02 Yannick Moy <moy@adacore.com>
12918
12919 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12920 before accessing operands.
12921 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12922 decide whether an initialization expression respects SPARK rules, as
12923 the plain node is the expanded one. This allows for more valid warnings
12924 to be issued.
12925 * gnat_rm.texi: Minor update.
12926
12927 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12928
12929 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12930 previous change.
12931
12932 2011-08-02 Robert Dewar <dewar@adacore.com>
12933
12934 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12935
12936 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12937
12938 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12939 loop statements and the element renaming declaration with a block when
12940 the element type is controlled.
12941
12942 2011-08-02 Yannick Moy <moy@adacore.com>
12943
12944 * sinfo.ads: Minor formatting.
12945
12946 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12947
12948 * sem_aggr.adb (Add_Association): if the association has a box and no
12949 expression, use the Sloc of the aggregate itself for the new
12950 association.
12951 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12952 the Original_Node.
12953
12954 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12955
12956 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12957 When a container is provided via a function call, generate a renaming
12958 of the function result. This avoids the creation of a transient scope
12959 and the premature finalization of the container.
12960 * exp_ch7.adb (Is_Container_Cursor): Removed.
12961 (Wrap_Transient_Declaration): Remove the supression of the finalization
12962 of the list controller when the declaration denotes a container cursor,
12963 it is not needed.
12964
12965 2011-08-02 Yannick Moy <moy@adacore.com>
12966
12967 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12968 node is from source, instead of the original node being from source.
12969 * sem_aggr.adb
12970 (Resolve_Array_Aggregate): refine the check for a static expression, to
12971 recognize also static ranges
12972 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12973 Array_Type_Declaration): postpone the test for the type being a subtype
12974 mark after the type has been resolved, so that component-selection and
12975 expanded-name are discriminated.
12976 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12977 to distinguish the case of an iteration scheme, so that an error is
12978 issed on a non-static range in SPARK except in an iteration scheme.
12979 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12980 In_Iter_Schm = True.
12981 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12982 user-defined operators so that they are allowed in renaming
12983 * sem_ch8.adb
12984 (Find_Selected_Component): refine the check for prefixing of operators
12985 so that they are allowed in renaming. Move the checks for restrictions
12986 on selector name after analysis discriminated between
12987 component-selection and expanded-name.
12988 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12989 concatenation argument of string type if it is static.
12990 * sem_util.adb, sem_util.ads
12991 (Check_Later_Vs_Basic_Declarations): add a new function
12992 Is_Later_Declarative_Item to decice which declarations are allowed as
12993 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12994 mode, add that renamings are considered as later items.
12995 (Enclosing_Package): new function to return the enclosing package
12996 (Enter_Name): correct the rule for homonyms in SPARK
12997 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12998 from source (result of expansion) to avoid issuing wrong warnings.
12999
13000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13001
13002 * errout.adb: On anything but an expression First_Node returns its
13003 argument.
13004
13005 2011-08-02 Pascal Obry <obry@adacore.com>
13006
13007 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13008
13009 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13010
13011 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13012 Set the associated loop as the related expression of internally
13013 generated cursors.
13014 * exp_ch7.adb (Is_Container_Cursor): New routine.
13015 (Wrap_Transient_Declaration): Supress the finalization of the list
13016 controller when the declaration denotes a container cursor.
13017
13018 2011-08-02 Yannick Moy <moy@adacore.com>
13019
13020 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13021 command line now.
13022 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13023 expression is a simple expression. This check cannot be performed in
13024 the semantics, so just drop it.
13025 (P_Index_Or_Discriminant_Constraint): move check that the index or
13026 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13027 semantics. Other cases were previously checked in the semantics.
13028 * par-ch4.adb (P_Name): move checks that a selector name is not
13029 character literal or an operator symbol to Find_Selected_Component in
13030 the semantics
13031 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13032 declarations are not placed after later declarations in a separate
13033 procedure in Sem_Util (possibly not the best choice?), to be used both
13034 during parsing, for Ada 83 mode, and during semantic analysis, for
13035 SPARK mode.
13036 * par-endh.adb (Check_End): move check that end label is not missing
13037 to Process_End_Label in the semantics
13038 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13039 the special case for SPARK restriction
13040 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13041 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13042 parameter Force to issue the error message even on internal node (used
13043 for generated end label). Call Check_Restriction to check when an error
13044 must be issued. In SPARK mode, issue an error message even if the
13045 restriction is not set.
13046 (Check_Restriction): new procedure with an additional out parameter to
13047 inform the caller that a message has been issued
13048 * sem_aggr.adb: Minor modification of message
13049 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13050 instead of issuing an error message directly
13051 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13052 declarations are not placed after later declarations, by calling
13053 Check_Later_Vs_Basic_Declarations
13054 (Analyze_Subtype_Declaration): move here the check that an index or
13055 discriminant constraint must be a subtype mark. Change the check that
13056 a subtype of String must start at one so that it works on subtype marks.
13057 * sem_ch4.adb (Analyze_Call): move here the check that a named
13058 association cannot follow a positional one in a call
13059 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13060 instead of issuing an error message directly
13061 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13062 selector name is not a character literal or an operator symbol. Move
13063 here the check that the prefix of an expanded name cannot be a
13064 subprogram or a loop statement.
13065 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13066 procedure called from parsing and semantics to check that basic
13067 declarations are not placed after later declarations
13068 (Process_End_Label): move here the check that end label is not missing
13069
13070 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13071
13072 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13073 representation clause in codepeer mode, since it confuses CodePeer and
13074 does not bring useful info.
13075
13076 2011-08-02 Ed Falis <falis@adacore.com>
13077
13078 * init.c: initialize fp hw on MILS.
13079
13080 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13081
13082 * errout.adb (First_Node): for bodies, return the node itself (small
13083 optimization). For other nodes, do not check source_unit if the node
13084 comes from Standard.
13085
13086 2011-08-02 Robert Dewar <dewar@adacore.com>
13087
13088 * exp_ch3.adb: Minor comment additions.
13089 * sem_ch13.adb: Minor reformatting.
13090
13091 2011-08-02 Pascal Obry <obry@adacore.com>
13092
13093 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13094
13095 2011-08-02 Robert Dewar <dewar@adacore.com>
13096
13097 * sem_attr.adb: Minor reformatting.
13098
13099 2011-08-02 Robert Dewar <dewar@adacore.com>
13100
13101 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13102 (Has_Default_Component_Value): Removed
13103 * einfo.ads Comment updates
13104 (Has_Default_Aspect): Replaces Has_Default_Value
13105 (Has_Default_Component_Value): Removed
13106 * exp_ch13.adb
13107 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13108 * exp_ch3.adb
13109 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13110 (Get_Simple_Init_Val): Handle Default_Value aspect
13111 (Needs_Simple_Initialization): Handle Default_Value aspect
13112 * exp_ch3.ads: Needs_Simple_Initialization
13113 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13114 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13115 * sem_ch13.adb
13116 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13117 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13118 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13119
13120 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13121
13122 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13123 package containing iteration primitives.
13124 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13125
13126 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13127
13128 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13129 "of", pre-analyze expression in case it is a function call with
13130 finalization actions that must be placed ahead of the loop.
13131 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13132 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13133
13134 2011-08-02 Geert Bosch <bosch@adacore.com>
13135
13136 * cstand.adb (Create_Float_Types): Only consider C's long double for
13137 Long_Long_Float, in addition to double.
13138
13139 2011-08-02 Robert Dewar <dewar@adacore.com>
13140
13141 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13142 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13143 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13144 Minor reformatting.
13145
13146 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13147
13148 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13149 indexed component.
13150
13151 2011-08-02 Javier Miranda <miranda@adacore.com>
13152
13153 * einfo.ads, einfo.adb
13154 (Original_Access_Type): Move this attribute to Node26 since there was
13155 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13156 which causes conflicts and breaks the generation of the .NET compiler.
13157 (Interface_Name): Add missing documentation on JGNAT only uses of
13158 this attribute.
13159
13160 2011-08-02 Geert Bosch <bosch@adacore.com>
13161
13162 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13163 (Find_Back_End_Float_Type): Likewise
13164 (Create_Back_End_Float_Types): Likewise
13165 (Create_Float_Types): Likewise
13166 (Register_Float_Type): Likewise
13167 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13168 Nlist and split out type selection in new local Find_Base_Type function.
13169 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13170 Nlist
13171 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13172
13173 2011-08-02 Robert Dewar <dewar@adacore.com>
13174
13175 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13176 alpha order).
13177 * opt.ads: Minor comment change.
13178 * sem_ch12.adb: Minor code reorganization.
13179
13180 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13181
13182 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13183 subtype's list of rep items to the list on the full subtype in the case
13184 where the lists are the same.
13185
13186 2011-08-02 Geert Bosch <bosch@adacore.com>
13187
13188 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13189 using the one from System.Strings, which also deallocates all strings.
13190
13191 2011-08-02 Geert Bosch <bosch@adacore.com>
13192
13193 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13194 function.
13195 * gcc-interface/Make-lang.in: Update dependencies.
13196
13197 2011-08-02 Olivier Hainque <hainque@adacore.com>
13198
13199 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13200 end_locus.
13201
13202 2011-08-02 Javier Miranda <miranda@adacore.com>
13203
13204 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13205 associated with anonymous access to subprograms.
13206
13207 2011-08-02 Geert Bosch <bosch@adacore.com>
13208
13209 * opt.ads
13210 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13211 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13212 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13213 (Add_Symbol_Definition): Move to switch-c.adb
13214 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13215 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13216 (Add_Symbol_Definition): Move to switch-c.adb.
13217 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13218 * sem_warn.adb
13219 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13220 Move to warnsw.adb.
13221 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13222 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13223 Move to warnsw.adb.
13224 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13225 (Add_Symbol_Definition): Moved from Prepcomp.
13226 * switch-c.ads: Update copyright notice. Use String_List instead of
13227 Argument_List, removing dependency on System.OS_Lib.
13228
13229 2011-08-02 Yannick Moy <moy@adacore.com>
13230
13231 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13232 mode on initialization expression which does not respect SPARK
13233 restrictions.
13234 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13235 if the tree referenced by its argument represents an initialization
13236 expression in SPARK, suitable for initializing an object in an object
13237 declaration.
13238
13239 2011-08-02 Javier Miranda <miranda@adacore.com>
13240
13241 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13242 internally generated access to subprogram with its associated protected
13243 subprogram type.
13244 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13245
13246 2011-08-02 Geert Bosch <bosch@adacore.com>
13247
13248 * cstand.adb (Register_Float_Type): Print information about type to
13249 register, if the Debug_Flag_Dot_B is set.
13250 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13251 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13252 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13253 with a requested precision of more than Max_Digits digits and no more
13254 than Max_Base_Digits digits, if a range specification is present and the
13255 Predefined_Float_Types list has a suitable type to derive from.
13256 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13257 case of type completion with pragma Import
13258 * sem_prag.adb
13259 (Process_Import_Predefined_Type): Processing to complete a type
13260 with pragma Import. Currently supports floating point types only.
13261 (Set_Convention_From_Pragma): Do nothing without underlying type.
13262 (Process_Convention): Guard against absence of underlying type,
13263 which may happen when importing incomplete types.
13264 (Process_Import_Or_Interface): Handle case of importing predefined
13265 types. Tweak error message.
13266
13267 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13268
13269 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13270 functions to previous change. Reorganize code slightly.
13271
13272 2011-08-02 Geert Bosch <bosch@adacore.com>
13273
13274 * back_end.ads (Register_Type_Proc): New call back procedure type for
13275 allowing the back end to provide information about available types.
13276 (Register_Back_End_Types): New procedure to register back end types.
13277 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13278 available types.
13279 * cstand.adb (Back_End_Float_Types): New list for floating point types
13280 supported by the back end.
13281 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13282 (Copy_Float_Type): New procedure to make new copies of predefined types.
13283 (Register_Float_Type): New call back procedure to populate the BEFT list
13284 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13285 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13286 (Create_Float_Types): New procedure to create entities for floating
13287 point types predefined in Standard, and put these and any remaining
13288 BEFTs on the Predefined_Float_Types list.
13289 * stand.ads (Predefined_Float_Types): New list for predefined floating
13290 point types that do not have declarations in package Standard.
13291
13292 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13293
13294 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13295 entity node for the unit containing the parameter.
13296 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13297 (Add_Inlined_Subprogram): Likewise.
13298 * gcc-interface/Make-lang.in: Update dependencies.
13299
13300 2011-08-02 Thomas Quinot <quinot@adacore.com>
13301
13302 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13303 suitable value.
13304
13305 2011-08-02 Geert Bosch <bosch@adacore.com>
13306
13307 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13308
13309 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13310
13311 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13312 computed value of Base_Type.
13313
13314 2011-08-02 Yannick Moy <moy@adacore.com>
13315
13316 * restrict.adb (Check_Restriction): issue an error for any use of
13317 class-wide, even if the No_Dispatch restriction is not set.
13318 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13319 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13320 when completing a private extension, the type named in the private part
13321 is not the same as that named in the visible part.
13322 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13323 of an inherited primitive operations of a tagged type or type extension
13324 that returns the tagged type.
13325 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13326 function which returns True for an implicit operation inherited by the
13327 derived type declaration for the argument type.
13328 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13329 order.
13330
13331 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13332
13333 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13334 Process_Bounds, to perform analysis with expansion of a range or an
13335 expression that is the iteration scheme for a loop.
13336 (Analyze_Iterator_Specification): If domain of iteration is given by a
13337 function call with a controlled result, as is the case if call returns
13338 a predefined container, ensure that finalization actions are properly
13339 generated.
13340 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13341
13342 2011-08-02 Javier Miranda <miranda@adacore.com>
13343
13344 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13345 * gcc-interface/Make-lang.in: Update dependencies.
13346
13347 2011-08-02 Javier Miranda <miranda@adacore.com>
13348
13349 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13350 determine if the analysis is performed using N or Original_Node (N).
13351 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13352 functionality of routine Is_Variable avoids code duplication.
13353 * checks.adb (Determine_Range): Handle temporaries generated by
13354 Remove_Side_Effects.
13355
13356 2011-08-02 Javier Miranda <miranda@adacore.com>
13357
13358 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13359 expansion of the condition. Required since the previous analysis was
13360 done with expansion disabled (see Resolve_Quantified_Expression) and
13361 hence checks were not inserted and record comparisons have not been
13362 expanded.
13363
13364 2011-08-02 Ed Falis <falis@adacore.com>
13365
13366 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13367 Update header.
13368
13369 2011-08-02 Bob Duff <duff@adacore.com>
13370
13371 * opt.ads: Minor comment fix.
13372
13373 2011-08-02 Bob Duff <duff@adacore.com>
13374
13375 * sem_ch12.adb (Analyze_Package_Instantiation,
13376 Analyze_Subprogram_Instantiation): Turn off style checking while
13377 analyzing an instance. Whatever style checks that apply to the generic
13378 unit should apply, so it makes no sense to apply them in an instance.
13379 This was causing trouble when compiling an instance of a runtime
13380 unit that violates the -gnatyO switch.
13381 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13382 one of the two case statements, causing spurious errors.
13383
13384 2011-08-02 Robert Dewar <dewar@adacore.com>
13385
13386 * uname.adb: Minor reformatting.
13387 * gnatcmd.adb: Minor reformatting.
13388 * exp_attr.adb: Minor reformatting.
13389
13390 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13391
13392 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13393 No_Dispatching_Calls, do not look for the Assign primitive, because
13394 predefined primitives are not created in this case.
13395
13396 2011-08-02 Bob Duff <duff@adacore.com>
13397
13398 * stylesw.ads: Minor comment fixes.
13399
13400 2011-08-02 Robert Dewar <dewar@adacore.com>
13401
13402 * freeze.adb (Add_To_Result): New procedure.
13403
13404 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13405
13406 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13407 time, if the specific run-time routines for handling streams of strings
13408 are not available, use the default mechanism.
13409
13410 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13411
13412 * s-regpat.ads: Fix typo.
13413
13414 2011-08-02 Vincent Celier <celier@adacore.com>
13415
13416 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13417 not null, call it to create the in memory config project file without
13418 parsing an existing default config project file.
13419
13420 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13421
13422 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13423
13424 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13425
13426 * sem_elim.adb: an abstract subprogram does not need an eliminate
13427 pragma for its descendant to be eliminable.
13428
13429 2011-08-02 Ed Falis <falis@adacore.com>
13430
13431 * init.c: revert to handling before previous checkin for VxWorks
13432 * s-intman-vxworks.adb: delete unnecessary declarations related to
13433 using Ada interrupt facilities for handling signals.
13434 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13435 * s-intman-vxworks.ads: Import __gnat_install_handler as
13436 Initialize_Interrupts.
13437 * s-taprop-vxworks.adb: Delete Signal_Mask.
13438 (Abort_Handler): change construction of mask to unblock exception
13439 signals.
13440
13441 2011-08-02 Jerome Guitton <guitton@adacore.com>
13442
13443 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13444 Debug_Raise_Exception before propagation starts.
13445
13446 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13447
13448 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13449 to Restriction_Check_Required.
13450 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13451 * sem_res.adb (Resolve_Call): Likewise.
13452 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13453
13454 2011-08-02 Bob Duff <duff@adacore.com>
13455
13456 * stylesw.ads: Update comment.
13457 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13458 * errout.ads: Remove obsolete comment.
13459
13460 2011-08-02 Javier Miranda <miranda@adacore.com>
13461
13462 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13463 (Set_Is_Safe_To_Reevaluate): new procedure.
13464 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13465 assignment is allowed on safe-to-reevaluate variables.
13466 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13467 temporary created to remove side effects in expressions that use
13468 the secondary stack as safe-to-reevaluate.
13469 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13470 variables that are not true constants.
13471
13472 2011-08-02 Robert Dewar <dewar@adacore.com>
13473
13474 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13475 sem_res.adb, sem_ch6.adb: Minor reformatting.
13476
13477 2011-08-02 Jerome Guitton <guitton@adacore.com>
13478
13479 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13480
13481 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13482
13483 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13484 not set Overridden_Operation if subprogram is an initialization
13485 procedure.
13486
13487 2011-08-02 Yannick Moy <moy@adacore.com>
13488
13489 * par-ch6.adb: Correct obsolete name in comments
13490 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13491 which takes two message arguments (existing function takes one), with
13492 second message used for continuation.
13493 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13494 block statements that originate from a source block statement, not
13495 generated block statements
13496 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13497 symmetry with procedure case
13498 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13499 function to issue an error in formal mode if a package specification
13500 contains more than one tagged type or type extension.
13501 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13502 parameters matching formals of tagged types are objects (or ancestor
13503 type conversions of objects), not general expressions. Issue an error
13504 on view conversions that are not involving ancestor conversion of an
13505 extended type.
13506 (Resolve_Type_Conversion): in formal mode, issue an error on the
13507 operand of an ancestor type conversion which is not an object
13508 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13509 procedure so that it works also for actuals of function calls
13510 (Is_Actual_Tagged_Parameter): new function which determines if its
13511 argument is an actual parameter of a formal of tagged type in a
13512 subprogram call
13513 (Is_SPARK_Object_Reference): new function which determines if the tree
13514 referenced by its argument represents an object in SPARK
13515
13516 2011-08-02 Robert Dewar <dewar@adacore.com>
13517
13518 * sem_ch3.adb: Minor reformatting
13519 Minor comment addition
13520 Minor error msg text change
13521
13522 2011-08-02 Javier Miranda <miranda@adacore.com>
13523
13524 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13525 function. Used to be more precise when we generate a variable plus one
13526 assignment to remove side effects in the evaluation of the Bound
13527 expressions.
13528 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13529 of the bound expression to force its re-analysis and thus expand the
13530 associated transient scope (if required). Code cleanup replacing the
13531 previous code that declared the constant entity by an invocation to
13532 routine Force_Evaluation which centralizes this work in the frontend.
13533
13534 2011-08-02 Robert Dewar <dewar@adacore.com>
13535
13536 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13537 (Base_Type): Now uses improved Is_Base_Type function
13538 * einfo.ads (Base_Type): Inline this function
13539
13540 2011-08-02 Robert Dewar <dewar@adacore.com>
13541
13542 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13543 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13544
13545 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13546
13547 * gcc-interface/Make-lang.in: Update dependencies.
13548 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13549 targets.
13550
13551 2011-08-02 Yannick Moy <moy@adacore.com>
13552
13553 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13554 non-simple expression used in delta constraint
13555 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13556 index constraint which is not a subtype mark
13557 * par.adb: With and use Restrict
13558 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13559 mode on component type which is not a subtype mark and default
13560 expression on component
13561 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13562 of string which does not have a lower index bound equal to 1
13563 (Array_Type_Declaration): issue an error in formal mode on index or
13564 component type which is not a subtype mark, and on aliased keyword on
13565 component
13566 (Derived_Type_Declaration): issue an error in formal mode on interface,
13567 limited or abstract type
13568 (Record_Type_Declaration): issue an error in formal mode on interface
13569 (Record_Type_Definition): issue an error in formal mode on tagged types
13570 and type extensions not declared in the specification of a library unit
13571 package; on null non-tagged record; on variant part
13572
13573 2011-08-02 Vincent Celier <celier@adacore.com>
13574
13575 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13576 not declared for qualified library project when Library_Name is not
13577 declared, but Library_Dir is.
13578
13579 2011-08-02 Robert Dewar <dewar@adacore.com>
13580
13581 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13582 pragmas (affects aspects [Component_]Default_Value
13583 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13584 component type for the resolution
13585
13586 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13587
13588 * einfo.adb (Base_Type): Tune implementation for speed.
13589
13590 2011-08-02 Robert Dewar <dewar@adacore.com>
13591
13592 * freeze.adb: Minor reformatting.
13593
13594 2011-08-02 Thomas Quinot <quinot@adacore.com>
13595
13596 * scos.ads: Update comments.
13597
13598 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13599
13600 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13601 base type, because the parent may be a subtype of a private type whose
13602 convention is established in a private part.
13603
13604 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13605
13606 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13607 statement in a block when the expansion of the return expression has
13608 created a finalization chain.
13609 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13610 with the parent node.
13611 Add N_Extended_Return_Statement to handle the case where a transient
13612 object declaration appears in the Return_Object_Declarations list of
13613 an extended return statement.
13614
13615 2011-08-02 Matthew Gingell <gingell@adacore.com>
13616
13617 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13618 unused parameter 'name'.
13619
13620 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13621
13622 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13623 inherited operation, check whether its alias, which is the source
13624 operastion that it renames, has been marked eliminated.
13625
13626 2011-08-02 Javier Miranda <miranda@adacore.com>
13627
13628 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13629 in-mode parameter whose type is an access type since it can be used to
13630 modify its designated object. Enforce code that handles as safe an
13631 access type that is not access-to-constant but it is the result of a
13632 previous removal of side-effects.
13633 (Remove_Side_Effects): Minor code reorganization of cases which require
13634 no action. Done to incorporate documentation on new cases uncovered
13635 working in this ticket: no action needed if this routine was invoked
13636 too early and the nodes are not yet decorated.
13637 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13638 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13639 were issued with actuals that are implicitly provided by
13640 Force_Evaluation.
13641
13642 2011-08-02 Robert Dewar <dewar@adacore.com>
13643
13644 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13645
13646 2011-08-02 Yannick Moy <moy@adacore.com>
13647
13648 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13649 to issue an error in formal mode on attribute not supported in this mode
13650 (Analyze_Attribute): issue errors on standard attributes not supported
13651 in formal mode.
13652 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13653 comment, and issue error in formal mode on modulus which is not a power
13654 of 2.
13655 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13656 range.
13657 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13658 subtype mark.
13659 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13660 operator on modular type (except 'not').
13661
13662 2011-08-02 Robert Dewar <dewar@adacore.com>
13663
13664 * gnat_rm.texi: Minor reformatting.
13665
13666 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13667
13668 * s-osinte-linux.ads: Minor comment update and reformatting.
13669 * i-cexten.ads: Make this unit pure, as for its parent.
13670 Will allow its usage in more contexts if needed.
13671
13672 2011-08-02 Robert Dewar <dewar@adacore.com>
13673
13674 * s-utf_32.ads: Minor comment fix.
13675
13676 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13677
13678 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13679 operation of a tagged synchronized type, handle the case where the
13680 controlling argument is overloaded.
13681
13682 2011-08-02 Yannick Moy <moy@adacore.com>
13683
13684 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13685 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13686 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13687 SPARK mode and formal verification mode on processing SPARK restriction
13688 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13689 requiring consistency checking.
13690
13691 2011-08-02 Robert Dewar <dewar@adacore.com>
13692
13693 * sem_res.adb: Minor reformatting.
13694
13695 2011-08-02 Robert Dewar <dewar@adacore.com>
13696
13697 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13698 a-cforse.ads: Remove unneeded with of Ada.Containers
13699 Remove commented out pragma Inline's
13700 Move specifications of new subprograms to the actual specs
13701
13702 2011-08-02 Yannick Moy <moy@adacore.com>
13703
13704 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13705 a-cforse.ads: Update comments.
13706
13707 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13708
13709 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13710
13711 2011-08-02 Robert Dewar <dewar@adacore.com>
13712
13713 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13714 a-cforse.ads, a-cofove.ads: Minor reformatting.
13715
13716 2011-08-02 Claire Dross <dross@adacore.com>
13717
13718 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13719 a-cofove.ads: Add comments.
13720
13721 2011-08-02 Yannick Moy <moy@adacore.com>
13722
13723 * gnat_rm.texi: Document formal containers.
13724
13725 2011-08-02 Emmanuel Briot <briot@adacore.com>
13726
13727 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13728 are empty sections.
13729
13730 2011-08-02 Robert Dewar <dewar@adacore.com>
13731
13732 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13733 reformatting.
13734
13735 2011-08-02 Robert Dewar <dewar@adacore.com>
13736
13737 * aspects.adb: New aspects Default_Value and Default_Component_Value
13738 New format of Aspect_Names table checks for omitted entries
13739 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13740 handling of boolean aspects for derived types.
13741 New aspects Default_Value and Default_Component_Value
13742 New format of Aspect_Names table checks for omitted entries
13743 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13744 (Has_Default_Value): New flag
13745 (Has_Default_Component_Value): New flag
13746 (Has_Default_Value): New flag
13747 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13748 table.
13749 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13750 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13751 Default_Value and Default_Component_Value
13752 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13753 New aspects Default_Value and Default_Component_Value
13754 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13755 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13756
13757 2011-08-02 Vincent Celier <celier@adacore.com>
13758
13759 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13760 inherit library kind.
13761
13762 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13763
13764 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13765 Minor reformatting.
13766
13767 2011-08-02 Robert Dewar <dewar@adacore.com>
13768
13769 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13770
13771 2011-08-02 Yannick Moy <moy@adacore.com>
13772
13773 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13774
13775 2011-08-02 Robert Dewar <dewar@adacore.com>
13776
13777 * impunit.adb: Add comment.
13778
13779 2011-08-02 Yannick Moy <moy@adacore.com>
13780
13781 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13782 qualification of aggregates in formal mode
13783 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13784 another aggregate
13785 (Resolve_Aggregate): complete the test that an aggregate is adequately
13786 qualified in formal mode
13787
13788 2011-08-02 Pascal Obry <obry@adacore.com>
13789
13790 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13791 * mlib-prj.adb: Supress warning when compiling binder generated file.
13792 (Build_Library): Supress all warnings when compiling the binder
13793 generated file.
13794
13795 2011-08-02 Yannick Moy <moy@adacore.com>
13796
13797 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13798 from here...
13799 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13800 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13801 Add with/use clauses to make Check_Formal_Restriction visible
13802
13803 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13804
13805 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13806 in-parameters when type of the generic formal is private in the generic
13807 spec and non-private in the body.
13808
13809 2011-08-02 Claire Dross <dross@adacore.com>
13810
13811 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13812 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13813 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13814 * impunit.adb, Makefile.rtl: Take new files into account.
13815
13816 2011-08-02 Robert Dewar <dewar@adacore.com>
13817
13818 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13819 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13820
13821 2011-08-02 Yannick Moy <moy@adacore.com>
13822
13823 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13824 formal mode
13825 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13826 matching static array bounds, taking into account the special case of
13827 string literals
13828 * sem_ch3.adb: Typo in comment.
13829
13830 2011-08-02 Yannick Moy <moy@adacore.com>
13831
13832 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13833 which issues an error in formal mode if its argument node is originally
13834 from source
13835 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13836 has a discriminant specification so that it does not include the case
13837 of derived types
13838 (Derived_Type_Declaration): move here the test that a derived type has a
13839 discriminant specification
13840 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13841 first element of a component association before accessing its choices
13842 (presence of component association is not enough)
13843 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13844 declaration is a library item before accessing the next element in a
13845 list, as library items are not member of lists
13846 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13847 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13848 Check_Formal_Restriction whenever possible.
13849
13850 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13851
13852 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13853 reference when needed.
13854
13855 2011-08-02 Bob Duff <duff@adacore.com>
13856
13857 * gnat_ugn.texi: Fix typo.
13858
13859 2011-08-02 Vincent Celier <celier@adacore.com>
13860
13861 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13862 archive file name. Do not use the full path name of archives for Open
13863 VMS.
13864
13865 2011-08-02 Robert Dewar <dewar@adacore.com>
13866
13867 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13868 Analyze_Aspect_Specifications
13869 * sem_ch13.adb
13870 (Analyze_Aspect_Specifications): New handling for boolean aspects
13871 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13872 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13873 sequence for Analyze_Aspect_Specifications
13874 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13875 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13876
13877 2011-08-02 Robert Dewar <dewar@adacore.com>
13878
13879 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13880 aspects, since these no longer exist.
13881
13882 2011-08-02 Robert Dewar <dewar@adacore.com>
13883
13884 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13885 semicolon, do not try to see if there are aspects following it.
13886 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13887 aspect spec.
13888
13889 2011-08-02 Robert Dewar <dewar@adacore.com>
13890
13891 * sem_ch8.adb, aspects.ads: Minor reformatting.
13892
13893 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13894
13895 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13896 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13897 extracted from...
13898 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13899
13900 2011-08-02 Yannick Moy <moy@adacore.com>
13901
13902 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13903 mode on subprogram declaration outside of package specification, unless
13904 it is followed by a pragma Import
13905 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13906 Access_Type_Declaration): issue error in formal mode on access type
13907 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13908 incomplete type
13909 (Analyze_Object_Declaration): issue error in formal mode on object
13910 declaration which does not respect SPARK restrictions
13911 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13912 declaration which does not respect SPARK restrictions
13913 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13914 error in formal mode on digits or delta constraint
13915 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13916 decimal fixed point type
13917 (Derived_Type_Declaration): issue error in formal mode on derived type
13918 other than type extensions of tagged record types
13919 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13920 with check on access definition
13921 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13922 mode on protected definition.
13923 (Analyze_Task_Definition): issue error in formal mode on task definition
13924
13925 2011-08-02 Robert Dewar <dewar@adacore.com>
13926
13927 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13928
13929 2011-08-02 Javier Miranda <miranda@adacore.com>
13930
13931 * sem_ch6.adb (Can_Override_Operator): New function.
13932 (Verify_Overriding_Indicator): Add missing code to check overriding
13933 indicator in operators. Fixes regression.
13934 (Check_Overriding_Indicator): Minor reformating after replacing the
13935 code that evaluates if the subprogram can override an operator by
13936 invocations to the above new function.
13937 * einfo.adb
13938 (Write_Field26_Name): Add missing code to ensure that, following
13939 the documentation in einfo.ads, this field is not shown as attribute
13940 "Static_Initialization" on non-dispatching functions.
13941
13942 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13943
13944 * sem_res.adb (Resolve_Call): A call to
13945 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13946 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13947 i.e., when the second parameter is of type Time_Span.
13948
13949 2011-08-02 Vincent Celier <celier@adacore.com>
13950
13951 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13952 with an archive instead of -L<library dir> -l<library name>.
13953
13954 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13955
13956 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13957 mark the base types In_Use in addition to making the operations
13958 use_visible.
13959
13960 2011-08-02 Ed Falis <falis@adacore.com>
13961
13962 * init.c: add and setup __gnat_signal_mask for the exception signals
13963 * s-inmaop-vxworks.adb: new file.
13964 * s-intman-vxworks.adb: remove unnecessary initializations and
13965 simplify remaining
13966 * s-intman-vxworks.ads: remove unnecessary variable
13967 * s-taprop-vxworks.adb: simplify signal initialization
13968
13969 2011-08-02 Robert Dewar <dewar@adacore.com>
13970
13971 * sem_ch8.adb: Minor code reorganization, comment updates.
13972
13973 2011-08-02 Robert Dewar <dewar@adacore.com>
13974
13975 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13976 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13977 here from Sem_Res.
13978 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13979 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13980
13981 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13982
13983 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13984 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13985 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13986 use_type_clauses, to handle more efficiently use_type and use_all_type
13987 constructs.
13988 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13989 Ada2012 Use_All_Type clause.
13990 (Use_Class_Wide_Operations): new procedure.
13991
13992 2011-08-02 Robert Dewar <dewar@adacore.com>
13993
13994 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13995 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13996 expression to expression function.
13997
13998 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13999
14000 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14001 if types are compatible.
14002
14003 2011-08-02 Yannick Moy <moy@adacore.com>
14004
14005 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14006 returns True if its argument array types have same dimension and same
14007 static bounds at each index.
14008 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14009 OUT or IN OUT paramaters which are not view conversions in SPARK.
14010 (Resolve_Arithmetic_Op): issue an error in formal mode on
14011 multiplication or division with operands of fixed point types which are
14012 not qualified or explicitly converted.
14013 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14014 Boolean or array type (except String) operands.
14015 (Resolve_Equality_Op): issue an error in formal mode on equality
14016 operators for array types other than String with non-matching static
14017 bounds.
14018 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14019 for array types with non-matching static bounds. Factorize the code in
14020 Matching_Static_Array_Bounds.
14021 (Resolve_Qualified_Expression): issue an error in formal mode on
14022 qualified expressions for array types with non-matching static bounds.
14023 (Resolve_Type_Conversion): issue an error in formal mode on type
14024 conversion for array types with non-matching static bounds
14025
14026 2011-08-02 Robert Dewar <dewar@adacore.com>
14027
14028 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14029
14030 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14031
14032 * par-ch9.adb: save location of entry for proper error message.
14033
14034 2011-08-02 Javier Miranda <miranda@adacore.com>
14035
14036 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14037 (Use_Full_View) which permits this routine to climb through the
14038 ancestors using the full-view of private parents.
14039 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14040 Use_Full_View to true in calls to Is_Ancestor.
14041 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14042 true in call to Is_Ancestor.
14043 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14044 Use_Full_View to true in call to Is_Ancestor.
14045 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14046 call to Is_Ancestor.
14047 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14048 Use_Full_View to true in calls to Is_Ancestor.
14049 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14050 Make_Select_Specific_Data_Table, Register_Primitive,
14051 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14052 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14053 to true in call to Is_Ancestor.
14054 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14055 Use_Full_View to true in calls to Is_Ancestor.
14056 * exp_cg.adb
14057 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14058 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14059
14060 2011-08-02 Robert Dewar <dewar@adacore.com>
14061
14062 * gnat_rm.texi: Minor reformatting.
14063 * sem_prag.adb: Minor reformatting.
14064
14065 2011-08-02 Tristan Gingold <gingold@adacore.com>
14066
14067 * vms_data.ads: Add VMS qualifier for -gnateP.
14068
14069 2011-08-02 Robert Dewar <dewar@adacore.com>
14070
14071 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14072 * par-ch7.adb (P_Package): Proper placement of aspects for package
14073 decl/instantiation.
14074 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14075 (End_Statements): Add Is_Sloc parameterr
14076 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14077 (Check_End): Ad Is_Sloc parameter
14078 (End_Statements): Add Is_Sloc parameterr
14079
14080 2011-08-02 Vincent Celier <celier@adacore.com>
14081
14082 * ug_words: Add VMS qualifier equivalent to -gnateP:
14083 /SYMBOL_PREPROCESSING.
14084
14085 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14086
14087 * gnat-style.texi: For hexadecimal numeric literals the typical
14088 grouping of digits is 4 to represent 2 bytes.
14089 A procedure spec which is split into several lines is indented two
14090 characters.
14091
14092 2011-08-02 Yannick Moy <moy@adacore.com>
14093
14094 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14095 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14096 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14097 properly qualified
14098 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14099 choice in array aggregate
14100 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14101 mark as ancestor
14102 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14103 positional and named aggregate for record, or others in record
14104 aggregate, or multiple choice in record aggregate
14105 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14106 array operands to logical operations AND, OR and XOR do not have the
14107 same static lower and higher bounds
14108 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14109
14110 2011-08-01 Robert Dewar <dewar@adacore.com>
14111
14112 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14113 Replaces Last_Source_Node_In_Sequence.
14114 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14115 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14116 parens and blank in string (this was inconsistently implemented).
14117 * errout.ads
14118 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14119 blank in string (this was inconsistently implemented).
14120 * gnat1drv.adb
14121 (Set_Global_Switches): Set formal mode switches appropriately
14122 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14123 * par-prag.adb
14124 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14125 call Set_Error_Msg_Lang to set "spark" as language name.
14126 * par.adb: Remove unnecessary call to set formal language for errout
14127 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14128 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14129 name.
14130 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14131 calls to it, moved after resolution so that types are known
14132 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14133 result of concatenation is not of type String
14134 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14135 concatenation is not properly restricted
14136 * gnat_rm.texi: Add doc on pragma Spark_95.
14137 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14138 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14139 * gcc-interface/Make-lang.in: Update dependencies.
14140
14141 2011-08-01 Javier Miranda <miranda@adacore.com>
14142
14143 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14144 condition that detects if the overridden operation must replace an
14145 existing entity.
14146
14147 2011-08-01 Javier Miranda <miranda@adacore.com>
14148
14149 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14150 code declarations inserted by Insert_Actions in each alternative of the
14151 N_Case_Expression node.
14152
14153 2011-08-01 Robert Dewar <dewar@adacore.com>
14154
14155 * sem_ch6.adb: Minor code reorganization.
14156 * sem_util.adb: Minor reformatting.
14157
14158 2011-08-01 Pascal Obry <obry@adacore.com>
14159
14160 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14161 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14162
14163 2011-08-01 Yannick Moy <moy@adacore.com>
14164
14165 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14166 literal or operator symbol which is prefixed
14167 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14168 mode on access attributes.
14169 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14170 that concatenation operands are properly restricted in formal mode
14171 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14172 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14173 result of the concatenation has a type different from String.
14174 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14175 Analyze_Quantified_Expression, Analyze_Slice,
14176 Analyze_Null): issue an error in formal mode on unsupported constructs
14177 * sem_ch5.adb
14178 (Analyze_Block_Statement): only issue error on source block statement
14179 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14180 function which returns the last node in a list of nodes for which
14181 Comes_From_Source returns True, if any
14182 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14183 Last_Source_Node_In_Sequence
14184 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14185 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14186 mode on unsupported constructs
14187 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14188 rest of the actions may be needed later on since the error is marked as
14189 not serious.
14190 * sinfo.ads: Typos in comments.
14191
14192 2011-08-01 Pascal Obry <obry@adacore.com>
14193
14194 * projects.texi: Minor editing.
14195
14196 2011-08-01 Yannick Moy <moy@adacore.com>
14197
14198 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14199 insertion character ~~
14200 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14201 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14202 with insertion character ~~
14203 (Set_Msg_Text): treat insertion character ~~
14204 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14205 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14206 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14207 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14208 errors related to the formal language restriction not serious
14209 (insertion character |).
14210 * par.adb (Par): set formal language for error messages if needed
14211 * sem_ch6.adb (Check_Missing_Return): take into account possible
14212 generated statements at the end of the function
14213 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14214 enumeration value to define a new pragma SPARK_95
14215 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14216 SPARK_Version): new type and variables to store the SPARK version
14217 (none by default).
14218 (SPARK_Mode): return True when SPARK_Version is set
14219 * par-prag.adb: Correct indentation
14220 (Prag): take Pragma_SPARK_95 into account
14221 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14222 into account.
14223
14224 2011-08-01 Robert Dewar <dewar@adacore.com>
14225
14226 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14227 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14228 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14229
14230 2011-08-01 Pascal Obry <obry@adacore.com>
14231
14232 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14233 Target_Name to Get_Path call.
14234 (Parse_Single_Project): Likewise.
14235 (Post_Parse_Context_Clause): Likewise.
14236 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14237 Call Initialise_Project_Path with the proper Target_Name.
14238 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14239 search path.
14240 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14241 with the proper Target_Name.
14242 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14243 Part.Parse routine.
14244 (Parse_Project_And_Apply_Config): Likewise.
14245 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14246 This is fine as this part of the code is supporting only native
14247 compilation.
14248 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14249 is fine as this part of the code is supporting only native compilation.
14250
14251 2011-08-01 Yannick Moy <moy@adacore.com>
14252
14253 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14254 of homonym, unless the homonym is one of the cases allowed in SPARK
14255 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14256 package declaration occurring after a body.
14257
14258 2011-08-01 Robert Dewar <dewar@adacore.com>
14259
14260 * checks.adb, exp_ch4.adb: Minor reformatting.
14261
14262 2011-08-01 Javier Miranda <miranda@adacore.com>
14263
14264 * einfo.ads (Access_Disp_Table): Fix documentation.
14265 (Dispatch_Table_Wrappers): Fix documentation.
14266
14267 2011-08-01 Pascal Obry <obry@adacore.com>
14268
14269 * prj-env.adb, prj-env.ads: Minor reformatting.
14270
14271 2011-08-01 Yannick Moy <moy@adacore.com>
14272
14273 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14274 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14275 procedures out of these packages.
14276 * errout.ads, errout.adb
14277 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14278 procedures in of this package
14279 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14280 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14281 on misplaced later vs initial declarations, like in Ada 83
14282 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14283 formal mode on attribute of private type whose full type declaration
14284 is not visible
14285 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14286 package declaration inside a package specification
14287 (Analyze_Full_Type_Declaration): issue error in formal mode on
14288 controlled type or discriminant type
14289 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14290 user-defined operator means that it should come from the source
14291 (New_Overloaded_Entity): issue error in formal mode on overloaded
14292 entity.
14293 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14294
14295 2011-08-01 Thomas Quinot <quinot@adacore.com>
14296
14297 * atree.adb: Minor reformatting.
14298 * checks.adb: Minor reformatting.
14299
14300 2011-08-01 Vincent Celier <celier@adacore.com>
14301
14302 * s-parame-vms-ia64.ads: Fix typo in comment
14303 Minor reformatting
14304 * s-parame-vms-restrict.ads: Removed, unused.
14305
14306 2011-08-01 Javier Miranda <miranda@adacore.com>
14307
14308 * exp_ch3.adb
14309 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14310 * sem_ch3.adb
14311 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14312 * sem_ch3.ads, sem_ch3.adb
14313 (Is_Constant_Bound): New extended version of the subprogram that was
14314 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14315 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14316 * sem_aux.ads (Constant_Value): Fix typo in comment.
14317 * checks.adb (Generate_Index_Checks): New implementation which, for
14318 array objects with constant bounds, generates the runtime check
14319 referencing the bounds of the array type. For other cases this routine
14320 provides its previous behavior obtaining such values from the array
14321 object.
14322 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14323 parent type.
14324 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14325 we cannot have semantic interpretations of the new node.
14326
14327 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14328
14329 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14330 expressions.
14331
14332 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14333
14334 * sem_ch8.adb: Minor code editing.
14335 * s-vxwext.adb: Remove trailing space.
14336 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14337 consistency with other files.
14338
14339 2011-08-01 Thomas Quinot <quinot@adacore.com>
14340
14341 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14342
14343 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14344
14345 * par-ch10.adb: reject parameterized expressions as compilation unit.
14346 * sem_ch4.adb: handle properly conditional expression with overloaded
14347 then_clause and no else_clause.
14348
14349 2011-08-01 Tristan Gingold <gingold@adacore.com>
14350
14351 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14352 like done by System.Aux_DEC.
14353 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14354
14355 2011-08-01 Yannick Moy <moy@adacore.com>
14356
14357 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14358 missing label at end of declaration (subprogram or package)
14359 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14360 of positional and named parameter association
14361 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14362 Error_Msg_SP which adds a prefix to the error message giving the name
14363 of the formal language analyzed
14364 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14365 access result type in subprogram, unconstrained array as result type,.
14366 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14367 procedure
14368 * sem_ch8.adb: Code clean up.
14369
14370 2011-08-01 Javier Miranda <miranda@adacore.com>
14371
14372 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14373 * einfo.ads (Access_Disp_Table): Fix documentation.
14374 (Dispatch_Table_Wrappers): Fix documentation.
14375 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14376 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14377 to enforce the documentation of this attribute.
14378 (Set_Is_Interface): Cleanup the assertion.
14379 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14380 the Underlying_Type entity before reading attribute Access_Disp_Table.
14381 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14382 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14383 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14384 the Underlying_Type entity before reading attribute Access_Disp_Table.
14385 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14386 Locate the Underlying_Type entity before reading attribute
14387 Access_Disp_Table.
14388
14389 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14390
14391 * s-poosiz.ads: Additional overriding indicators.
14392
14393 2011-08-01 Yannick Moy <moy@adacore.com>
14394
14395 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14396 formal mode.
14397 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14398 parameter specification does not include a subtype mark.
14399 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14400 formal mode on abstract subprogram.
14401 (Analyze_Subprogram_Specification): issue error in formal mode on
14402 user-defined operator.
14403 (Process_Formals): issue error in formal mode on access parameter and
14404 default expression.
14405 * sem_ch9.adb (Analyze_Abort_Statement,
14406 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14407 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14408 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14409 Analyze_Requeue, Analyze_Selective_Accept,
14410 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14411 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14412 issue error in formal mode on user-defined raise statement.
14413
14414 2011-08-01 Thomas Quinot <quinot@adacore.com>
14415
14416 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14417 declaration being hidden when overriding an implicit inherited
14418 subprogram.
14419 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14420 (-gnats), do not complain about a source file that contains only a
14421 pragma No_Body.
14422
14423 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14424
14425 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14426 variable if already set.
14427
14428 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14429
14430 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14431 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14432 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14433 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14434 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14435 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14436 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14437 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14438 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14439 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14440 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14441 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14442 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14443 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14444 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14445 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14446 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14447 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14448 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14449 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14450 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14451 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14452 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14453 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14454 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14455 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14456 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14457 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14458 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14459 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14460 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14461 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14462 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14463 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14464 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14465 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14466 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14467 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14468 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14469 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14470 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14471 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14472 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14473 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14474 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14475 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14476 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14477 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14478 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14479 Use GNAT instead of GNARL.
14480
14481 2011-08-01 Bob Duff <duff@adacore.com>
14482
14483 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14484 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14485 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14486 reformatting.
14487
14488 2011-08-01 Yannick Moy <moy@adacore.com>
14489
14490 * debug.adb (d.D) reverve flag for the SPARK mode
14491 (d.E) reverve flag for SPARK generation mode
14492 (d.F) reverve flag for Why generation mode
14493 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14494 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14495 functions which return True when the corresponding modes are set
14496 (Formal_Language): return "spark" or "alfa" when in formal verification
14497 mode.
14498 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14499 Error_Msg to prefix the error message with a tag giving the formal
14500 language
14501 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14502 message with a tag giving the formal language
14503 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14504 block statement
14505 (Analyze_Case_Statement): issue error in formal mode on case statement
14506 with a single "others" case alternative
14507 (Analyze_Exit_Statement): issue errors in formal mode on exit
14508 statements which do not respect SPARK restrictions
14509 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14510 (Check_Unreachable_Code): always issue an error (not a warning) in
14511 formal mode on unreachable code (concerns both code after an infinite
14512 loop and after an unconditional jump, both not allowed in SPARK)
14513 * sem_ch6.adb (Analyze_Return_Statement): add call to
14514 Set_Return_Present for a procedure containing a return statement
14515 (already done for functions in Analyze_Function_Return)
14516 (Analyze_Function_Return): issue error in formal mode on extended
14517 return or if return is not last statement in function
14518 (Check_Missing_Return): issue error in formal mode if function does
14519 not end with return or if procedure contains a return
14520 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14521 function to detect if there is an inner scope of its parameter S which
14522 is a loop.
14523
14524 2011-08-01 Thomas Quinot <quinot@adacore.com>
14525
14526 * sem_ch6.ads: Minor reformatting.
14527
14528 2011-08-01 Javier Miranda <miranda@adacore.com>
14529
14530 * sem_util.adb (Abstract_Interface_List): Complete condition when
14531 processing private type declarations to avoid reading unavailable
14532 attribute.
14533 (Is_Synchronized_Tagged_Type): Complete condition when processing
14534 private extension declaration nodes to avoid reading unavailable
14535 attribute.
14536
14537 2011-08-01 Thomas Quinot <quinot@adacore.com>
14538
14539 * sem_ch3.adb: Minor reformatting.
14540
14541 2011-08-01 Thomas Quinot <quinot@adacore.com>
14542
14543 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14544 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14545 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14546 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14547 for VMS, instead parametrize the common implementation with
14548 System.Parameters declarations.
14549
14550 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14551
14552 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14553
14554 2011-08-01 Tristan Gingold <gingold@adacore.com>
14555
14556 * seh_init.c: Fix SEH handler installation on win64.
14557
14558 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14559
14560 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14561 double analysis of an anonymous access to subprogram, because it can
14562 lead to improper sharing of profiles and a back-end crash.
14563
14564 2011-08-01 Robert Dewar <dewar@adacore.com>
14565
14566 * make.adb, sem_ch4.adb: Minor reformatting.
14567 * gcc-interface/Make-lang.in: Update dependencies.
14568 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14569
14570 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14571
14572 * gnat_rm.texi: Fix definition of Long_Integer.
14573
14574 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14575
14576 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14577 to prevent storage exhaustion.
14578 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14579 finalized is a function body, insert the cleanup code before the final
14580 return statement, to prevent spurious warnings.
14581 * s-pooglo.ads: add overriding indicator.
14582
14583 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14584
14585 * sem_ch4.adb (Operator_Check): improve error message when both a
14586 with_clause and a use_clause are needed to make operator usage legal.
14587 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14588 determine whether a compilation unit is visible within an other,
14589 either through a with_clause in the current unit, or a with_clause in
14590 its library unit or one one of its parents.
14591
14592 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14593
14594 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14595 over an arbitrary expression of an array or container type.
14596 * lib-xref.adb: clarify comment.
14597
14598 2011-08-01 Bob Duff <duff@adacore.com>
14599
14600 * einfo.ads: Minor reformatting.
14601 * debug.adb: Minor comment improvement.
14602
14603 2011-08-01 Javier Miranda <miranda@adacore.com>
14604
14605 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14606 consider hidden subprograms as valid candidates.
14607
14608 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14609
14610 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14611
14612 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14613
14614 * gnat_ugn.texi: Fix typo.
14615
14616 2011-08-01 Robert Dewar <dewar@adacore.com>
14617
14618 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14619 lib-xref.adb: Minor reformatting
14620
14621 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14622
14623 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14624 when to generate a call to Move_Final_List.
14625 (Has_Controlled_Parts): Remove this function.
14626
14627 2011-08-01 Geert Bosch <bosch@adacore.com>
14628
14629 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14630 "," in choice list.
14631
14632 2011-08-01 Thomas Quinot <quinot@adacore.com>
14633
14634 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14635 explicit raise of a predefined exception as Comes_From_Source if the
14636 original N_Raise_Statement comes from source.
14637
14638 2011-08-01 Robert Dewar <dewar@adacore.com>
14639
14640 * sinfo.ads: Add comment.
14641 * sem_ch6.adb: Minor reformatting.
14642
14643 2011-08-01 Robert Dewar <dewar@adacore.com>
14644
14645 * freeze.adb (Freeze_Entity): Refine check for bad component size
14646 clause to avoid rejecting confirming clause when atomic/aliased present.
14647
14648 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14649
14650 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14651 better determine whether an entity reference is a write.
14652 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14653 subcomponent.
14654 * lib-xref.adb (Output_References): Do no suppress a read reference at
14655 the same location as an immediately preceeding modify-reference, to
14656 handle properly in-out actuals.
14657
14658 2011-08-01 Tristan Gingold <gingold@adacore.com>
14659
14660 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14661
14662 2011-08-01 Quentin Ochem <ochem@adacore.com>
14663
14664 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14665 heap to compute the result.
14666
14667 2011-08-01 Robert Dewar <dewar@adacore.com>
14668
14669 * atree.ads: Minor reformatting.
14670
14671 2011-08-01 Emmanuel Briot <briot@adacore.com>
14672
14673 * g-expect.adb (Get_Command_Output): Fix memory leak.
14674
14675 2011-08-01 Geert Bosch <bosch@adacore.com>
14676
14677 * cstand.adb (P_Float_Type): New procedure to print the definition of
14678 predefined fpt types.
14679 (P_Mixed_Name): New procedure to print a name using mixed case
14680 (Print_Standard): Use P_Float_Type for printing floating point types
14681 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14682 precision IEEE float.
14683
14684 2011-08-01 Thomas Quinot <quinot@adacore.com>
14685
14686 * sem_ch3.adb: Minor reformatting.
14687
14688 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14689
14690 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14691 the completion of a generic function, insert the new body rather than
14692 rewriting the original.
14693
14694 2011-08-01 Yannick Moy <moy@adacore.com>
14695
14696 * sinfo.ads, errout.ads: Typos in comments.
14697
14698 2011-08-01 Robert Dewar <dewar@adacore.com>
14699
14700 * par-endh.adb: Minor reformatting.
14701
14702 2011-08-01 Robert Dewar <dewar@adacore.com>
14703
14704 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14705 (Pre_Post_Aspects): New subtype.
14706 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14707 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14708 * par-ch7.adb (P_Package): Remove Decl parameter
14709 (P_Package): Handle new syntax for aspects (before IS)
14710 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14711 new aspect syntax
14712 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14713 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14714 (P_Package): Remove Decl parameter
14715 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14716 aspects
14717 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14718 specs
14719 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14720 * sinfo.ads: Document new syntax for aspects in packages etc.
14721 * sprint.adb: Handle new syntax of aspects before IS in package
14722
14723 2011-08-01 Thomas Quinot <quinot@adacore.com>
14724
14725 * atree.ads: Minor reformatting.
14726 * sem_prag.adb: Minor reformatting.
14727
14728 2011-08-01 Robert Dewar <dewar@adacore.com>
14729
14730 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14731 case expr alternative.
14732
14733 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14734
14735 * sem_ch12.adb: Fix typo.
14736
14737 2011-08-01 Geert Bosch <bosch@adacore.com>
14738
14739 * sem_prag.adb (Check_No_Link_Name): New procedure.
14740 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14741 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14742 instead of Standard_Long_Long_Float_Size global. Preparation for
14743 eventual removal of per type constants.
14744 * exp_util.ads (Get_Stream_Size): New function returning the stream
14745 size value of subtype E.
14746 * exp_util.adb (Get_Stream_Size): Implement new function.
14747 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14748 function.
14749 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14750 * einfo.adb:
14751 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14752
14753 2011-08-01 Geert Bosch <bosch@adacore.com>
14754
14755 * cstand.adb: Fix comments.
14756 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14757 count of arguments.
14758
14759 2011-08-01 Robert Dewar <dewar@adacore.com>
14760
14761 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14762
14763 2011-08-01 Geert Bosch <bosch@adacore.com>
14764
14765 * atree.ads: Fix comment.
14766
14767 2011-08-01 Robert Dewar <dewar@adacore.com>
14768
14769 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14770 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14771 * par.adb: Add with for Namet.Sp.
14772 * par-tchk.adb: Minor reformatting.
14773
14774 2011-08-01 Vincent Celier <celier@adacore.com>
14775
14776 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14777 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14778 of the init procedure of a SAL.
14779 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14780 New procedure.
14781
14782 2011-08-01 Thomas Quinot <quinot@adacore.com>
14783
14784 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14785 reformatting.
14786
14787 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14788
14789 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14790
14791 2011-08-01 Thomas Quinot <quinot@adacore.com>
14792
14793 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14794 conformant with its spec (return True only for types that have
14795 an overriding Initialize primitive operation that prevents them from
14796 having preelaborable initialization).
14797 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14798 initialization for controlled types in Ada 2005 or later mode.
14799
14800 2011-08-01 Robert Dewar <dewar@adacore.com>
14801
14802 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14803 Postcondition.
14804 (Same_Aspect): New function.
14805 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14806 Type_Invariant, Precondition, Postcondition.
14807 * snames.ads-tmpl: Add Name_Type_Invariant.
14808
14809 2011-08-01 Robert Dewar <dewar@adacore.com>
14810
14811 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14812 here.
14813 (Freeze_All_Ent): Fix error in handling inherited aspects.
14814 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14815 already analyzed, but don't skip entire processing of a declaration,
14816 that's wrong in some cases of declarations being rewritten.
14817 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14818 Don't delay for integer, string literals
14819 Treat predicates in usual manner for delay, remove special case code,
14820 not needed.
14821 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14822 (Build_Predicate_Function): Update saved expression in aspect
14823 (Build_Invariant_Procedure): Update saved expression in aspect
14824 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14825 of replacement of discriminant references if the reference is simple.
14826
14827 2011-08-01 Robert Dewar <dewar@adacore.com>
14828
14829 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14830 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14831 Static_Predicate and Dynamic_Predicate.
14832 (Build_Predicate_Function): Add processing for Static_Predicate
14833 and Dynamic_Predicate.
14834 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14835 (From_Static_Predicate): New flag
14836 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14837
14838 2011-08-01 Robert Dewar <dewar@adacore.com>
14839
14840 * usage.adb: Documentation cleanup for Ada version modes in usage.
14841 * expander.adb: Minor reformatting.
14842
14843 2011-08-01 Robert Dewar <dewar@adacore.com>
14844
14845 * atree.ads: Minor comment fix.
14846 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14847 a-witeio.ads, sem_prag.adb: Minor reformatting.
14848
14849 2011-08-01 Doug Rupp <rupp@adacore.com>
14850
14851 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14852 pointers. Use descrip.h header file for convenience. Add some
14853 comments.
14854
14855 2011-08-01 Robert Dewar <dewar@adacore.com>
14856
14857 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14858 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14859 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14860 New procedure.
14861 (Check_Aspect_At_End_Of_Declarations): New procedure
14862 (Analye_Aspect_Specification): Minor changes for above procedures
14863 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14864 specification node as well.
14865
14866 2011-08-01 Pascal Obry <obry@adacore.com>
14867
14868 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14869 Windows files. Use GetFilesAttributes() in this case to check for file
14870 existence instead of returning with an error code.
14871
14872 2011-08-01 Vincent Celier <celier@adacore.com>
14873
14874 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14875 High is above Source length.
14876
14877 2011-08-01 Robert Dewar <dewar@adacore.com>
14878
14879 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14880
14881 2011-08-01 Robert Dewar <dewar@adacore.com>
14882
14883 * aspects.ads (Boolean_Aspects): New subtype.
14884 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14885 for derived types in cases where the parent type and derived type have
14886 aspects.
14887 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14888 with aspects when parent type also has aspects.
14889 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14890 boolean expression at this point).
14891 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14892 accordance with final decision on the Ada 2012 feature.
14893 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14894
14895 2011-08-01 Matthew Heaney <heaney@adacore.com>
14896
14897 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14898
14899 2011-08-01 Pascal Obry <obry@adacore.com>
14900
14901 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14902 Fix Replace_Slice when High is above current string size.
14903 (Replace_Slice): Fix DL computation when High is above current
14904 string length.
14905
14906 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14907
14908 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14909
14910 2011-08-01 Matthew Heaney <heaney@adacore.com>
14911
14912 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14913 of node.
14914
14915 2011-08-01 Pascal Obry <obry@adacore.com>
14916
14917 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14918 reformatting.
14919
14920 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14921
14922 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14923 access to protected subprograms in generic bodies.
14924 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14925 protected type, indicate that the convention of the subprogram is
14926 Convention_Protected, because it may be used in subsequent declarations
14927 within the protected declaration.
14928
14929 2011-08-01 Vincent Celier <celier@adacore.com>
14930
14931 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14932 and "final" procedures when the name of the library is "ada", to avoid
14933 duplicate symbols "adainit" and "adafinal" in executables.
14934
14935 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14936
14937 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14938 quantified expression that appears within a postcondition and uses the
14939 Ada2012 'Result attribute.
14940
14941 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14942
14943 * init.c (__gnat_error_handler): Cast reason to int.
14944 (__gnat_install_handler): Explain sa_sigaction use.
14945
14946 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14947
14948 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14949 subprogram has copy-in copy-out parameters, try to promote the mode of
14950 the return type if it is passed in registers.
14951
14952 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14953
14954 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14955 left operand as addressable.
14956
14957 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14958
14959 * gcc-interface/gigi.h (build_function_stub): Remove.
14960 (build_return_expr): Likewise.
14961 (convert_vms_descriptor): Declare.
14962 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14963 (build_function_stub): Move to...
14964 * gcc-interface/utils2.c (build_return_expr): Move to...
14965 * gcc-interface/trans.c (build_function_stub): ...here.
14966 (build_return_expr): ...here.
14967 (Subprogram_Body_to_gnu): Add local variable for language_function.
14968 Disconnect the parameter attributes cache, if any, once done with it.
14969 Call end_subprog_body only after setting the end_locus.
14970 Build the stub associated with the function, if any, at the very end.
14971 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14972 variables and streamline control flow.
14973
14974 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14975
14976 PR ada/49819
14977 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14978 g-trasym-dwarf.adb.
14979
14980 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14981
14982 PR bootstrap/49794
14983 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14984 Assign to act.sa_sigaction.
14985 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14986 current->return_address to char * before arithmetic.
14987
14988 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14989
14990 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14991 Correct argument types.
14992 Extract code from reason.
14993 (__gnat_install_handler): Assign to act.sa_sigaction.
14994
14995 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14996
14997 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14998 (GNAT1_OBJS): ...here.
14999
15000 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15001
15002 PR ada/48711
15003 * g-socthi-mingw.adb (Fill): Fix formatting.
15004
15005 * gcc-interface/gigi.h: Move around comment.
15006
15007 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15008
15009 PR ada/46350
15010 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15011
15012 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15013
15014 PR ada/48711
15015 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15016
15017 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15018
15019 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15020 range comparison if Pmode is SImode.
15021
15022 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15023 Eric Botcazou <ebotcazou@adacore.com>
15024
15025 * adadecode.c: Wrap up in extern "C" block.
15026 * adadecode.h: Likewise.
15027 * adaint.c: Likewise. Remove 'const' keyword.
15028 * adaint.h: Likewise.
15029 * argv.c: Likewise.
15030 * atree.h: Likewise.
15031 * cio.c: Likewise.
15032 * cstreams.c: Likewise.
15033 * env.c: Likewise.
15034 * exit.c: Likewise.
15035 * fe.h: Likewise.
15036 * final.c: Likewise.
15037 * init.c: Likewise.
15038 * initialize.c: Likewise.
15039 * link.c: Likewise.
15040 * namet.h: Likewise.
15041 * nlists.h: Likewise.
15042 * raise.c: Likewise.
15043 * raise.h: Likewise.
15044 * repinfo.h: Likewise.
15045 * seh_init.c: Likewise.
15046 * targext.c: Likewise.
15047 * tracebak.c: Likewise.
15048 * uintp.h: Likewise.
15049 * urealp.h: Likewise.
15050 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15051 * xsinfo.adb: Likewise.
15052 * xsnamest.adb: Likewise.
15053 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15054 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15055 * gcc-interface/misc.c: Likewise.
15056 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15057 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15058 ada/targext.o here...
15059 (GNAT_ADA_OBJS): ...and not here.
15060 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15061 (GNATBIND_OBJS): Reorder.
15062
15063 2011-07-07 Richard Henderson <rth@redhat.com>
15064
15065 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15066 dwarf2out_frame_init.
15067
15068 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15069
15070 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15071
15072 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15073
15074 PR target/39150
15075 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15076
15077 2011-07-06 Richard Guenther <rguenther@suse.de>
15078
15079 * gcc-interface/misc.c (gnat_init): Merge calls to
15080 build_common_tree_nodes and build_common_tree_nodes_2.
15081 Re-initialize boolean_false_node.
15082
15083 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15084 Olivier Hainque <hainque@adacore.com>
15085 Nicolas Setton <setton@adacore.com>
15086
15087 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15088 the type according to the ARTIFICIAL_P parameter.
15089 (create_type_decl): Likewise.
15090 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15091
15092 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15093
15094 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15095 (gnatbind): Likewise.
15096
15097 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15098
15099 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15100
15101 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15102
15103 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15104 local variable throughout. Remove useless call to Base_Type.
15105 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15106 Take it also into account for the volatileness of the field. Set the
15107 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15108
15109 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15110
15111 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15112 on a dereference built for a by-ref object if it has an address clause.
15113
15114 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15115
15116 * einfo.ads (Address_Taken): Document use for the second argument of
15117 Asm_Input and Asm_Output attributes.
15118 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15119 argument is an entity name, then set Address_Taken on it.
15120 <Attribute_Asm_Output>: Likewise.
15121 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15122 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15123 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15124 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15125
15126 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15127
15128 PR middle-end/46500
15129 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15130
15131 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15132
15133 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15134 (ada/utils.o): Update dependencies.
15135 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15136 ../../../libcpp/libcpp.a.
15137 * gcc-interface/utils.c: Include common/common-target.h.
15138 (process_attributes): Use targetm_common.have_named_sections.
15139
15140 2011-06-07 Richard Guenther <rguenther@suse.de>
15141
15142 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15143 set_sizetype.
15144
15145 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15146
15147 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15148 TREE_THIS_NOTRAP flag.
15149
15150 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15151
15152 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15153 Fix thinko.
15154
15155 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15156
15157 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15158 constants whose full view has discriminants specially.
15159
15160 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15161
15162 * gcc-interface/utils.c: Include diagnostic.h.
15163 (gnat_write_global_declarations): Output debug information for all
15164 global type declarations before finalizing the compilation unit.
15165 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15166
15167 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15168
15169 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15170
15171 2011-05-25 Kai Tietz <ktietz@redhat.com>
15172
15173 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15174 initialization instead of const/none-const pointer assignment.
15175
15176 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15177
15178 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15179 $(EXTRA_GNAT1_OBJS).
15180 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15181 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15182 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15183 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15184 libcommon-target.a instead of prefix.o.
15185
15186 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15187
15188 PR ada/49097
15189 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15190
15191 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15192
15193 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15194 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15195 instead of version.o.
15196
15197 2011-05-18 Kai Tietz <ktietz@redhat.com>
15198
15199 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15200 boolean_false_node instead of integer_zero_node.
15201 (convert_with_check): Likewise.
15202 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15203
15204 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15205
15206 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15207 type of the parameter is an unconstrained array, convert the actual to
15208 the type of the formal in the In Out and Out cases as well.
15209
15210 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15211
15212 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15213 call build_function_type_array or build_varargs_function_type_array
15214 instead.
15215 (create_subprog_type): Don't call build_function_type; call
15216 build_function_type_vec instead.
15217
15218 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15219
15220 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15221 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15222 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15223
15224 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15225
15226 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15227
15228 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15229 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15230
15231 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15232
15233 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15234
15235 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15236
15237 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15238 instead of accessing TYPE_ARG_TYPES directly.
15239 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15240
15241 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15242
15243 PR ada/48844
15244 * gcc-interface/gigi.h (get_variant_part): Declare.
15245 * gcc-interface/decl.c (get_variant_part): Make global.
15246 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15247 types have the same constant size, are record types and T1 has a
15248 variant part while T2 doesn't.
15249
15250 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15251
15252 * gcc-interface/utils.c (begin_subprog_body): Do not call
15253 get_pending_sizes.
15254 (end_subprog_body): Likewise.
15255
15256 2011-05-04 Richard Guenther <rguenther@suse.de>
15257
15258 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15259 int_const_binop.
15260 (pos_to_constructor): Likewise.
15261
15262 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15263 Eric Botcazou <ebotcazou@adacore.com>
15264
15265 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15266 of build_function_type. Adjust calls to...
15267 (build_raise_check): ...this. Do not take a void_tree parameter.
15268 Call build_function_type_list instead of build_function_type.
15269 Fix head comment and swap couple of conditional blocks.
15270
15271 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15272
15273 * gnatvsn.ads (Library_Version): Bump to 4.7.
15274 (Current_Year): Bump to 2011.
15275
15276 2011-04-29 Michael Matz <matz@suse.de>
15277
15278 * gcc-interface/misc.c (gnat_handle_option): Set
15279 warn_maybe_uninitialized.
15280
15281 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15282
15283 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15284 the Watson/McCabe paper.
15285
15286 2011-04-23 Jim Meyering <meyering@redhat.com>
15287
15288 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15289
15290 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15291
15292 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15293 onto the new type.
15294
15295 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15296
15297 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15298 parameter.
15299 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15300 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15301 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15302 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15303 <all>: Do not set flags on the reused DECL node coming from an alias.
15304 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15305 don't need debug info here...
15306 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15307 (gigi): Adjust calls to create_subprog_decl.
15308 (build_raise_check): Likewise.
15309 (establish_gnat_vms_condition_handler): Likewise.
15310 (Compilation_Unit_to_gnu): Likewise.
15311 (gnat_to_gnu): Likewise.
15312
15313 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15314
15315 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15316 (NO_REORDER_ADAFLAGS): New variable.
15317 (EXTRA_GNATTOOLS): Always define.
15318 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15319 Clean up and adjust list of files compiled with special options.
15320 * gcc-interface/Make-lang.in: Likewise.
15321 (ada/decl.o): Cosmetical change.
15322 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15323
15324 2011-04-20 Jim Meyering <meyering@redhat.com>
15325
15326 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15327
15328 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15329
15330 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15331 $(CFLAGS) on the link line.
15332
15333 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15334
15335 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15336 padded type built for the return type if it is unconstrained.
15337
15338 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15339
15340 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15341
15342 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15343
15344 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15345 before calling TREE_CHAIN.
15346 * gcc-interface/misc.c (gnat_init_ts): New function.
15347 (LANG_HOOKS_INIT_TS): Define.
15348
15349 2011-04-12 Martin Jambor <mjambor@suse.cz>
15350
15351 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15352 instead of cgraph_node.
15353
15354 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15355
15356 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15357 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15358 mechanism.
15359
15360 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15361
15362 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15363 of aggregate types that contain a placeholder.
15364
15365 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15366
15367 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15368 TYPE_ARG_TYPES.
15369 (handle_type_generic_attribute): Likewise.
15370
15371 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15372
15373 PR ada/47163
15374 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15375
15376 2011-04-04 Kai Tietz <ktietz@redhat.com>
15377
15378 PR ada/47163
15379 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15380 to flag value.
15381
15382 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15383
15384 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15385 type case, do not strip a padding type around the array type.
15386
15387 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15388
15389 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15390 types.
15391
15392 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15393
15394 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15395 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15396 code for -feliminate-unused-debug-types.
15397 (gnat_post_options): Likewise.
15398
15399 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15400
15401 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15402 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15403 distinct copy.
15404
15405 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15406
15407 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15408 DECL_ARTIFICIAL flag on enumeration types.
15409
15410 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15411
15412 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15413 fat pointer types artificial unconditionally.
15414 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15415 isn't artificial.
15416
15417 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15418
15419 * gcc-interface/gigi.h (get_dummy_type): Declare.
15420 (build_dummy_unc_pointer_types): Likewise.
15421 (finish_fat_pointer_type): Likewise.
15422 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15423 fat pointer type has been built, complete it in place.
15424 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15425 and thin pointers. Remove useless variable.
15426 (finish_fat_pointer_type): Make global and move to...
15427 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15428 (get_dummy_type): New function.
15429 (build_dummy_unc_pointer_types): Likewise.
15430 (gnat_pushdecl): Propage the name to the anonymous variants only.
15431 (update_pointer_to): Only adjust the pointer types in the unconstrained
15432 array case.
15433
15434 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15435
15436 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15437 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15438 if this is a Taft amendment type and the full declaration is available.
15439 * gcc-interface/trans.c (process_type): Likewise.
15440 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15441 (process_freeze_entity): Likewise.
15442 * gcc-interface/utils.c (dummy_global): New static variable.
15443 (gnat_write_global_declarations): If there are types declared as used
15444 at the global level, insert them in the global hash table.
15445
15446 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15447
15448 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15449 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15450 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15451 copy.
15452 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15453 flag of the type accordingly.
15454 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15455
15456 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15457
15458 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15459 finalizing types when updating the pointers to the designated type.
15460 <all>: Finalize the deferred types even if we didn't defer processing
15461 of incomplete types in this invocation.
15462
15463 2011-04-01 Olivier Hainque <hainque@adacore.com>
15464 Nicolas Setton <setton@adacore.com>
15465 Eric Botcazou <ebotcazou@adacore.com>
15466
15467 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15468 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15469
15470 2011-03-28 Kai Tietz <ktietz@redhat.com>
15471
15472 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15473 Windows targets.
15474 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15475 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15476
15477 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15478
15479 2011-03-28 Tristan Gingold <gingold@adacore.com>
15480
15481 PR ada/44431
15482 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15483 Use ada output of gnatbind.
15484 (ada/b_gnatb.adb): Ditto.
15485 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15486 (ada.mostlyclean, ada.stage1)
15487 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15488 (ada.stagefeedback): Adjust.
15489 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15490 Use ada output of gnatbind.
15491 (b_gnatm.adb): Ditto.
15492 (b_gnatl.o, b_gnatm.o): New rules.
15493
15494 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15495
15496 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15497 for the padded type built to support a specified size or alignment.
15498
15499 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15500
15501 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15502 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15503 unconditionally to the end of the unit when the designated type is
15504 limited_with'ed.
15505 <all>: Rename local variable. Attempt to un-defer types only and do it
15506 for limited_with'ed types as well.
15507 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15508 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15509 consistently and remove redundant call to finalize_from_with_types.
15510
15511 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15512
15513 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15514 subprograms without a previous spec declared in the same unit.
15515 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15516 subprograms at the end of the unit instead of at the beginning.
15517 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15518 isn't public for the special handling of non-inline functions nested
15519 inside inline external functions.
15520
15521 2011-03-25 Jeff Law <law@redhat.com>
15522
15523 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15524
15525 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15526
15527 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15528 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15529 to compute Set_Size_Depends_On_Discriminant.
15530 (Layout_Type): Call it on array types in back-end layout mode.
15531 * sem_util.adb (Requires_Transient_Scope): Return true for array
15532 types only if the size depends on the value of discriminants.
15533 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15534 type if the RHS is a call to a function that returns an unconstrained
15535 type with default discriminant.
15536
15537 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15538
15539 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15540 non-conversion to the nominal result type at the end.
15541
15542 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15543
15544 * gcc-interface/trans.c (create_temporary): New function taken from...
15545 (create_init_temporary): ...here. Call it.
15546 (call_to_gnu): Create the temporary for the return value early, if any.
15547 Create it for a function with copy-in/copy-out parameters if there is
15548 no target; in other cases of copy-in/copy-out, use another temporary.
15549 Push the new binding level lazily. Add and rename local variables.
15550
15551 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15552
15553 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15554 error message.
15555 (set_rm_size): Likewise.
15556
15557 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15558
15559 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15560 for the padded type built in order to support a specified alignment.
15561 Fix incorrect formatting.
15562
15563 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15564
15565 PR bootstrap/48216
15566 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15567
15568 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15569
15570 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15571 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15572 to the end of the list. Adjust recursive call. Rename local variable.
15573 If REORDER is true, reorder components of the record type.
15574 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15575 components_to_record and adjust the parameter list.
15576
15577 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15578
15579 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15580 disabled, use the variable for bounds of loop iteration scheme.
15581
15582 2011-03-21 Kai Tietz <ktietz@redhat.com>
15583
15584 PR target/12171
15585 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15586
15587 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15588
15589 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15590 out whether the expression is read-only. Short-circuit placeholder
15591 case and rename a couple of local variables.
15592
15593 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15594
15595 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15596 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15597 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15598 (convert): Deal with conversions from a smaller form type specially.
15599
15600 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15601
15602 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15603 its argument, except for the special -I- switch.
15604
15605 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15606
15607 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15608 "Ada Issues".
15609
15610 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15611
15612 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15613
15614 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15615
15616 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15617 GNAT_FORMAL.
15618 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15619 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15620 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15621 Do not generate the check directly, instead instantiate the template
15622 check present in the descriptor.
15623 (make_descriptor_field): Move around.
15624 (build_vms_descriptor32): Build a template check in the POINTER field.
15625 (build_vms_descriptor): Remove useless suffixes.
15626 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15627
15628 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15629
15630 PR bootstrap/47467
15631 * targext.c: Include target files if IN_RTS is defined.
15632
15633 2011-01-26 Richard Guenther <rguenther@suse.de>
15634
15635 PR bootstrap/47467
15636 * targext.c: Include config.h.
15637 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15638 dependency.
15639
15640 2011-01-04 Pascal Obry <obry@adacore.com>
15641 Eric Botcazou <ebotcazou@adacore.com>
15642
15643 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15644
15645 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15646
15647 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15648 end-of-case on the end label and its associated gotos, if any.
15649
15650 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15651
15652 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15653 expressions of the parameter cache within the statement group of
15654 the CICO mechanism.
15655
15656 2011-01-04 Olivier Hainque <hainque@adacore.com>
15657 Eric Botcazou <ebotcazou@adacore.com>
15658
15659 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15660 (set_end_locus_from_node): New function.
15661 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15662 make and the function end_locus.
15663 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15664 for the elaboration subprogram.
15665 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15666 set the end_locus of the expression as well.
15667
15668 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15669
15670 PR ada/47131
15671 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15672 variables that are referenced in exception handlers volatile.
15673
15674
15675 \f
15676 Copyright (C) 2011 Free Software Foundation, Inc.
15677
15678 Copying and distribution of this file, with or without modification,
15679 are permitted in any medium without royalty provided the copyright
15680 notice and this notice are preserved.