1 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
5 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
6 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
8 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
10 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
11 (unchecked_conversion_nop): Use it.
12 (gnat_to_gnu): Likewise.
14 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
16 * back_end.adb (Call_Back_End): Pass the maximum logical line number
17 instead of the maximum physical line number to gigi.
18 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
20 2011-10-16 Tom Tromey <tromey@redhat.com>
21 Dodji Seketeli <dodji@redhat.com>
23 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the
24 new public ordinary map interface.
26 2011-10-16 Tristan Gingold <gingold@adacore.com>
28 * link.c (_AIX): Add support for GNU ld.
30 2011-10-16 Fedor Rybin <frybin@adacore.com>
32 * gnat_ugn.texi: Fixing gnattest example names in the doc.
33 Adding explanation to additional tests usage.
35 2011-10-16 Robert Dewar <dewar@adacore.com>
37 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
39 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
41 * a-convec.adb: Fix minor inconsistencies.
43 2011-10-16 Matthew Heaney <heaney@adacore.com>
45 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
46 Implementation): Specify pragma Implementation_Defined.
48 2011-10-15 Nicolas Roche <roche@adacore.com>
50 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
51 either rtp-smp or ravenscar-cert-rtp runtimes.
53 2011-10-15 Bob Duff <duff@adacore.com>
55 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
56 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
58 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
59 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
61 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
62 pool only if RE_Root_Storage_Pool_Ptr is available.
63 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
64 pool actual unless RE_Root_Storage_Pool_Ptr is available.
65 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
66 formal only if RE_Root_Storage_Pool_Ptr is available.
68 2011-10-15 Matthew Heaney <heaney@adacore.com>
70 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
71 type): Specify Priority aspect for protected type.
73 2011-10-14 Ed Schonberg <schonberg@adacore.com>
75 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
76 is a generic actual, it is a subtype of a type that was frozen
77 by the instantiation, and even if not marked frozen it does not
78 affect the construction of the dispatch table.
80 2011-10-14 Robert Dewar <dewar@adacore.com>
82 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
84 * s-rident.ads: Add missing Compiler_Unit pragma.
86 2011-10-14 Gary Dismukes <dismukes@adacore.com>
88 * sem_res.adb: Minor reformatting.
90 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
92 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
93 Code and comment reformatting. Use BIP_Task_Master
94 when creating a _master.
95 (BIP_Formal_Suffix): Code reformatting. Correct the case for
97 (Make_Build_In_Place_Call_In_Object_Declaration): Use
98 BIP_Task_Master when creating a reference to the enclosing
99 function's _master formal.
100 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
102 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
103 (Needs_BIP_Finalization_Master): Alphabetized.
104 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
107 2011-10-14 Ed Schonberg <schonberg@adacore.com>
109 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
110 reject an aliased keyword on the object declaration of an extended
111 return statement. In older versions of the language indicate
112 that this is illegal in the standard.
114 2011-10-14 Pascal Obry <obry@adacore.com>
116 * sem_util.adb, sem_ch4.adb: Minor reformatting.
118 2011-10-14 Ed Schonberg <schonberg@adacore.com>
120 * sem_ch13.adb: Recognize properly procedure calls that are
121 transformed into code statements.
123 2011-10-14 Vincent Celier <celier@adacore.com>
125 * projects.texi: Minor fix in project example.
127 2011-10-14 Ed Schonberg <schonberg@adacore.com>
129 * sem_util.adb: Return objects are aliased if their type is
130 immutably limited as per AI05-0053.
132 2011-10-14 Gary Dismukes <dismukes@adacore.com>
134 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
135 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
136 Short_Circuit_And_Or expansion code (moved to sem_res).
137 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
138 "and" and "or" operators as short-circuit "and then" and "or
139 else", when pragma Short_Circuit_And_Or is active.
141 2011-10-13 Robert Dewar <dewar@adacore.com>
143 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
144 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
146 2011-10-13 Arnaud Charlet <charlet@adacore.com>
148 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
150 2011-10-13 Jerome Guitton <guitton@adacore.com>
152 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
154 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
156 * a-convec.ads (Cursor): Minor reformatting.
157 * a-convec.adb (Next): Fix minor inconsistencies.
158 (Previous): Likewise.
160 2011-10-13 Ed Schonberg <schonberg@adacore.com>
162 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
163 New predicate to determine whether some operations on an array
164 type are available when the full view of its component may differ
165 from the view of the point of the array declaration.
166 * sem_ch4.adb (Find_Equality_Types): Use
167 Available_Full_View_Of_Component.
168 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
170 2011-10-13 Ed Schonberg <schonberg@adacore.com>
172 * sem_ch9.adb: Analyze aspects while discriminants of protected
175 2011-10-13 Geert Bosch <bosch@adacore.com>
177 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
178 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
179 longer depend on an external library.
180 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
181 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
183 * gcc-interface/Make-lang.in: Update dependencies.
185 2011-10-13 Cyrille Comar <comar@adacore.com>
187 * gnat_ugn.texi: Minor editing.
189 2011-10-13 Vincent Celier <celier@adacore.com>
191 * projects.texi: Add documentation on packages and attributes
192 that are inherited from a project being extended into the
195 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
197 * exp_ch3.adb (Build_Master): Rewritten.
198 (Expand_N_Full_Type_Declaration): Reformat the declarative
199 region. Update the call to Build_Master_Renaming.
200 (Expand_Previous_Access_Type): Rewritten.
201 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
202 Add local constant Result_Subt and update related usage.
203 (Expand_N_Extended_Return_Statement): Add local constant
204 Result_Subt and update related usage.
205 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
206 new context detection mechanism.
207 (Build_Class_Wide_Master):
208 Use Insert_Action to add the renaming into the tree.
209 (Build_Master_Entity): Rewritten to use the new context detection
211 (Build_Master_Renaming): Add formal parameter Ins_Nod
212 and related usage. Use Insert_Action to add the renaming into the
214 (Find_Enclosing_Context): New subsidiary routine. Rather
215 than relying on enclosing scopes, this routine looks at the
216 tree structure to figure out the proper context for a _master
217 or a _chain. This approach eliminates the issues with transient
218 scopes which have not been converted into blocks.
219 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
220 to better reflect the new usage. Update the related comment.
221 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
222 the comment on usage.
223 * sem_ch3.adb (Access_Definition): Update the calls to
224 Build_Master_Entity and Build_Master_Renaming.
225 * sem_ch6.adb (Create_Extra_Formals): Add local variable
226 Full_Subt. Code reformatting.
227 * sem_util.adb (Is_Iterator): Alphabetized.
228 (Is_LHS): Alphabetized.
229 (Is_Limited_Class_Wide_Type): New routine.
230 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
232 2011-10-13 Geert Bosch <bosch@adacore.com>
234 * a-ngrear.adb (Solve): Make generic and move to
235 System.Generic_Array_Operations.
236 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
237 New generic solvers to compute a vector resp. matrix Y such
238 that A * Y = X, approximately.
239 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
240 Implement using Forward_Eliminate and Back_Substitute
241 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
243 * a-ngcoar.ads ("abs"): Fix return type to be real.
245 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
248 * s-linux-alpha.ads: Do not "with" Interfaces.C.
249 * s-linux-sparc.ads: Likewise.
251 2011-10-13 Geert Bosch <bosch@adacore.com>
253 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
255 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
257 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
260 2011-10-13 Geert Bosch <bosch@adacore.com>
262 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
263 move to System.Generic_Array_Operations.
265 2011-10-13 Geert Bosch <bosch@adacore.com>
267 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
268 * s-gearop.ads (L2_Norm): Change profile to be suitable for
270 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
273 2011-10-13 Robert Dewar <dewar@adacore.com>
275 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
276 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
277 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
278 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
279 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
280 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
282 2011-10-13 Geert Bosch <bosch@adacore.com>
284 * s-gearop.adb: Minor comment additions.
286 2011-10-13 Fedor Rybin <frybin@adacore.com>
288 * gnat_ugn.texi: Add gnattest section.
290 2011-10-13 Ed Schonberg <schonberg@adacore.com>
292 * freeze.adb: Do not create body of renaming if declaration has
295 2011-10-13 Olivier Hainque <hainque@adacore.com>
297 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
298 further, to the ppc+kernel case only.
300 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
302 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
303 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
304 Do not create a pool formal on .NET/JVM.
305 (Expand_N_Extended_Return_Statement): Alphabetize local
306 variables. Do not create a renaming of the build-in-place pool
307 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
308 Add the user-defined pool only on non-VM targets.
309 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
310 local variables. Do not add a pool actual on .NET/JVM.
311 * sem_ch6.adb: Add with and use clause for Targparm.
312 (Create_Extra_Formals): Add build-in-place pool formal only on
314 * rtsfind.ads: Alphabetize entries.
316 2011-10-13 Sergey Rybin <rybin@adacore.com>
318 * gnat_ugn.texi: Minor correction.
320 2011-10-13 Ed Schonberg <schonberg@adacore.com>
322 * sem_ch8.adb: Minor error message improvement.
324 2011-10-13 Robert Dewar <dewar@adacore.com>
326 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
328 2011-10-13 Gary Dismukes <dismukes@adacore.com>
330 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
331 of a for loop for an enumeration type with an enumeration rep
332 clause, which involves moving the original loop parameter into
333 a nested block, the loop parameter's entity must be removed from
334 the entity list of the loop scope.
336 2011-10-13 Bob Duff <duff@adacore.com>
338 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
339 that gets passed in the same cases where BIP_Alloc_Form is passed
340 (caller-unknown-size results). BIP_Storage_Pool is used when
341 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
342 to the user-defined storage pool is passed at the call site,
343 and this pool is used in callee to allocate the result.
344 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
345 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
346 the additional BIP_Storage_Pool actual.
347 (Expand_N_Extended_Return_Statement): Allocate the function
348 result using the user-defined storage pool, if BIP_Alloc_Form =
350 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
351 * exp_ch4.adb: Don't overwrite storage pool set by
352 Expand_N_Extended_Return_Statement.
353 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
354 for use in build-in-place function calls within allocators
355 where the access type has a user-defined storage pool.
357 2011-10-13 Sergey Rybin <rybin@adacore.com>
359 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
362 2011-10-13 Nicolas Roche <roche@adacore.com>
364 * gnatlink.adb: Ensure that -mrtp is passed when
365 runtime name ends with 'rtp'.
367 2011-10-13 Ed Schonberg <schonberg@adacore.com>
369 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
370 unchecked union type can be limited.
372 2011-10-13 Olivier Hainque <hainque@adacore.com>
374 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
375 the use of the signal trampoline for PPC in the sjlj case as well.
376 Add legitimate casts, preventing compile time warnings on the
377 (sighandler *) profile.
379 2011-10-13 Yannick Moy <moy@adacore.com>
381 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
382 analysis in Alfa mode.
384 2011-10-13 Ed Schonberg <schonberg@adacore.com>
386 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
387 expressions are legal limited return values if each one of their
388 dependent expressions are legal.
390 2011-10-13 Ed Schonberg <schonberg@adacore.com>
392 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
393 if the prefix of the call is a qualified expression, rewrite as
395 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
396 code statement is legal if it is a rewriting of a procedure call.
398 2011-10-13 Ed Schonberg <schonberg@adacore.com>
400 * exp_aggr.adb (Flatten): If a component association has a box,
401 assume that aggregate is not static.
402 (Safe_Aggregate): If a component association in a non-limited
403 aggregate has a box, assume that it cannot be expanded in place.
405 2011-10-13 Vincent Celier <celier@adacore.com>
407 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
408 Process_Project_Tree_Phase_1 with Packages_To_Check.
409 (Process_Project_And_Apply_Config): Ditto
410 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
411 Remove default for argument Packages_To_Check.
412 * prj-proc.adb (Recursive_Process): New argument
415 (Process_Project_Tree_Phase_1): Ditto.
416 (Recursive_Project.Process_Aggregated_Projects): Call
417 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
419 * prj-proc.ads (Process): New argument Packages_To_Check
420 (Process_Project_Tree_Phase_1): Ditto
422 2011-10-13 Arnaud Charlet <charlet@adacore.com>
424 * gcc-interface/Makefile.in: Fix typo.
426 2011-10-13 Ed Schonberg <schonberg@adacore.com>
428 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
429 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
430 Use sloc of defining identifier of farmal type declaration,
431 as sloc of generated internal entity, to prevent misplaced
434 2011-10-13 Ed Schonberg <schonberg@adacore.com>
436 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
437 is fully defined before checking that it is a numeric type.
439 2011-10-13 Ed Schonberg <schonberg@adacore.com>
441 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
442 association for component X has a box, then X is covered in the
443 aggregate even if there is not default value for X in the type
444 declaration, and X has to be default-initialized.
446 2011-10-13 Ed Schonberg <schonberg@adacore.com>
448 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
449 'Value): Mark literals as referenced only if reference is in
452 2011-10-13 Matthew Heaney <heaney@adacore.com>
454 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
456 2011-10-13 Olivier Hainque <hainque@adacore.com>
458 * sigtramp.h: New file. Prototype and spec of the signal
459 trampoline to be called by an established handler to provide
460 dwarf call frame info before the real signal processing code.
461 * sigtramp-ppcvxw.c: New file. Implementation of the signal
462 trampoline for ppc-vxworks.
463 * init.c (vxworks section): Use it for ppc.
465 2011-10-13 Thomas Quinot <quinot@adacore.com>
467 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
468 (Check_Future_Identifier): New subprogram,
469 factors duplicated code from Par.Ch2.P_Identifier and
470 Par.Ch3.P_Defining_Identifier.
472 2011-10-13 Thomas Quinot <quinot@adacore.com>
474 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
475 if we fail to initialize CV attributes or CV.
477 2011-10-13 Thomas Quinot <quinot@adacore.com>
479 * s-tasren.adb (Timed_Selective_Wait, case
480 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
481 we know abortion is already deferred.
483 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
485 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
486 (Build_Master_Renaming (function)): Removed.
487 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
488 (Expand_Full_Type_Declaration): Alphabetize
489 variables. Reformatting of code and comments. Rewrite the
490 section on processing of anonymous access-to-task types in
492 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
493 (Build_Master_Renaming): Moved to exp_ch9.
494 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
495 (Build_Master_Entity): Add formal parameter
496 Use_Current. Reformatting of code and comments.
497 (Build_Master_Renaming): Moved from exp_ch3.
498 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
499 exp_ch3. Update comment on usage.
500 (Build_Master_Entity):
501 Add formal parameter Use_Current. Update comment on usage.
502 (Build_Master_Renaming): Moved from exp_ch3.
503 * sem_ch3.adb (Access_Definition): Remove redundant code to
504 create a _master and a renaming.
506 2011-10-13 Ed Schonberg <schonberg@adacore.com>
508 * lib-xref.adb: Do no emit reference to overridden operation,
509 if it is internally generated.
511 2011-10-13 Vincent Celier <celier@adacore.com>
513 * bindgen.adb: Remove any processing related to g-trasym
514 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
515 * mlib-prj.adb: Remove any processing related to g-trasym.
517 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
519 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
520 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
521 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
522 (ADA_FLAGS_TO_PASS): Likewise.
523 (COMMON_FLAGS_TO_PASS): New.
524 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
525 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
526 (gnatlib): Use COMMON_FLAGS_TO_PASS.
527 (ada.install-common): Likewise.
528 (install-gnatlib): Likewise.
529 (install-gnatlib-obj): Likewise.
530 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
531 (gnat-cross): Delete.
532 (gnatboot): Likewise.
533 (gnatboot2): Likewise.
534 (gnatboot3): Likewise.
535 (gnatstage1): Likewise.
536 (gnatstage2): Likewise.
537 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
538 (MOST_ADAFLAGS): Likewise.
539 (LOOSE_CFLAGS): Likewise.
540 (gnat-cross): Likewise.
541 (GNATLIBFLAGS): Add -W -Wall.
542 (GNATLIBCFLAGS_FOR_C): Likewise.
543 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
544 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
546 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
548 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
549 (push_range_check_info): Likewise.
550 (gnat_to_gnu) <N_Code_Statement>: Likewise.
551 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
552 (gnat_invariant_expr): Likewise.
553 * gcc-interface/utils.c (compute_related_constant): Likewise.
554 (max_size): Fix handling of SAVE_EXPR.
555 (remove_conversions): Fix formatting.
557 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
559 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
560 (DECL_INDUCTION_VAR): New macro.
561 (SET_DECL_INDUCTION_VAR): Likewise.
562 * gcc-interface/gigi.h (convert_to_index_type): Declare.
563 (gnat_invariant_expr): Likewise.
564 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
565 parameter, set DECL_LOOP_PARM_P on it.
566 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
567 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
568 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
569 (struct range_check_info_d): New type.
570 (struct loop_info_d): Likewise.
571 (gnu_loop_stack): New stack.
572 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
573 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
574 is set, do not test DECL_RENAMED_OBJECT.
575 (push_range_check_info): New function.
576 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
577 the label. Reference the label and the iteration variable from it.
578 Build the special induction variable in the unsigned version of the
579 size type, if it is larger than the base type. And attach it to the
580 iteration variable if the latter isn't by-ref. In the iteration scheme
581 case, initialize the invariant conditions in front of the loop if
582 deemed profitable. Use gnu_loop_stack.
583 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
584 <N_Raise_Constraint_Error>: Always process the reason. In the range
585 check and related cases, and if loop unswitching is enabled, compute
586 invariant conditions and push this information onto the stack.
587 Do not translate again the condition if it has been already translated.
588 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
589 DECL_LOOP_PARM_P isn't set.
590 (convert_to_index_type): New function.
591 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
592 to convert the index from the base index type to sizetype.
593 (gnat_invariant_expr): New function.
595 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
597 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
598 two parallel arrays to hold standard builtin declarations, and
599 replace it with a function based interface that can support
600 creating builtins on the fly in the future.
601 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
602 (gnat_to_gnu): Ditto.
604 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
607 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
608 * gcc-interface/utils.c (global_context): New variable.
609 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
610 that are either public external or at top level. Use "No" macro.
611 (end_subprog_body): Call decl_function_context.
612 (rest_of_subprog_body_compilation): Likewise.
614 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
616 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
617 (rest_of_subprog_body_compilation): Likewise.
618 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
619 test for useless conversions by means of gnat_useless_type_conversion.
620 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
621 (language_function): Add named_ret_val and other_ret_val.
622 (f_named_ret_val): New macro.
623 (f_other_ret_val): Likewise.
624 (gigi): Call rest_of_subprog_body_compilation.
625 (struct nrv_data): New structure.
626 (is_nrv_p): New predicate.
627 (prune_nrv_r): New helper function.
628 (prune_nrv_in_block): New function.
629 (finalize_nrv_r): New helper function.
630 (finalize_nrv): New function.
631 (return_value_ok_for_nrv_p): New predicate.
632 (build_return_expr): If optimization is enabled, record candidates for
633 the Named Return Value optimization.
634 (build_function_stub): Call rest_of_subprog_body_compilation.
635 (Subprogram_Body_to_gnu): If optimization is enabled and there are
636 candidates, finalize the Named Return Value optimization.
637 Call rest_of_subprog_body_compilation.
638 (call_to_gnu): At the end, if a return value is needed, simplify the
639 result before wrapping it up in a COMPOUND_EXPR.
640 * gcc-interface/utils.c (end_subprog_body): Split into...
641 (rest_of_subprog_body_compilation): ...this. New function.
642 (gnat_useless_type_conversion): Likewise.
644 2011-10-06 Thomas Quinot <quinot@adacore.com>
646 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
647 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
648 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
649 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
650 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
651 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
652 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
653 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
655 2011-10-06 Ed Schonberg <schonberg@adacore.com>
657 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
660 2011-10-06 Matthew Heaney <heaney@adacore.com>
662 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
663 (Dequeue_Only_High_Priority): Protected procedure now implemented.
665 2011-10-06 Vincent Celier <celier@adacore.com>
667 * g-trasym.adb: Replace old implementation with the default
668 implementation that returns list of addresses as "0x...".
669 * g-trasym.ads: Update the list of platforms with the full
670 capability. Indicate that there is a default implementation
672 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
673 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
674 is now a default implementation for all platforms without the full
677 2011-10-06 Robert Dewar <dewar@adacore.com>
679 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
680 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
681 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
682 reorganization (use conditional expressions).
684 2011-10-06 Robert Dewar <dewar@adacore.com>
686 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
687 floating divide by zero.
689 2011-10-06 Ed Schonberg <schonberg@adacore.com>
691 * sem_ch6.adb: Limited interfaces that are not immutably limited
692 are OK in return statements.
694 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
696 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
697 change to powerpc section.
699 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
701 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
704 2011-09-27 Ed Schonberg <schonberg@adacore.com>
706 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
707 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
708 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
710 * a-coorma.ads: Minor reformmating.
711 * einfo.ads: Improve the comment describing the
712 Directly_Designated_Type function.
713 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
715 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
718 2011-09-27 Robert Dewar <dewar@adacore.com>
720 * a-comutr.ads: Minor reformatting.
722 2011-09-27 Ed Schonberg <schonberg@adacore.com>
724 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
725 iterators to multiway trees.
727 2011-09-27 Yannick Moy <moy@adacore.com>
729 * debug.adb (d.D): New option for strict Alfa mode.
730 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
731 permissions as strictly as possible.
732 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
733 Alfa mode, now, interpret ranges of base types like GNAT does; in
734 strict mode, simply change the range of the implicit base Itype.
735 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
737 2011-09-27 Robert Dewar <dewar@adacore.com>
739 * exp_ch9.adb: Minor comment fixes.
741 2011-09-27 Ed Schonberg <schonberg@adacore.com>
743 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
746 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
748 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
749 instead of Directly_Designated_Type in the indirect array case.
751 2011-09-27 Robert Dewar <dewar@adacore.com>
753 * exp_util.adb, exp_aggr.adb: Minor reformatting.
755 2011-09-27 Ed Schonberg <schonberg@adacore.com>
757 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
758 on subtype declarations.
759 * exp_aggr.adb: Minor comment update.
761 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
763 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
764 test in the N_Explicit_Dereference case. Fold double logical
765 negation in the special loop case and conditionalize it on
766 Variable_Ref being true.
768 2011-09-27 Ed Schonberg <schonberg@adacore.com>
770 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
771 single protected object and the selector is a discriminant or an
772 entry family, this is a non-overloaded candidate interpretation,
773 and possible primitive operations of the type must not be
776 2011-09-27 Arnaud Charlet <charlet@adacore.com>
778 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
780 2011-09-27 Pascal Obry <obry@adacore.com>
782 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
783 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
784 Add dummy definitions for pthread_rwlock_t
785 and pthread_rwlockattr_t on all POSIX platforms.
786 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
788 (Finalize_Lock): Likewise.
789 (Write_Lock): Likewise.
792 2011-09-27 Tristan Gingold <gingold@adacore.com>
794 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
797 2011-09-27 Pascal Obry <obry@adacore.com>
799 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
800 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
801 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
802 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
803 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
804 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
805 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
806 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
807 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
808 s-taprop-posix.adb: Revert previous changes.
809 (Lock): Now a record containing the two possible lock
810 (mutex and read/write) defined in OS_Interface.
811 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
813 (Initialize_Protection): Likewise.
815 (Lock_Read_Only): Likewise.
818 2011-09-27 Pascal Obry <obry@adacore.com>
820 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
821 OS_Interface.pthread_rwlock_t.
823 2011-09-27 Robert Dewar <dewar@adacore.com>
825 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
826 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
827 sem_ch5.adb, sem_util.adb: Minor reformatting.
829 2011-09-27 Pascal Obry <obry@adacore.com>
831 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
832 (Finalize_Lock)[RW_Lock]: Likewise.
833 (Write_Lock)[RW_Lock]: Likewise.
834 (Unlock)[RW_Lock]: Likewise.
835 (Read_Lock): Define L as RW_Lock (instead of Lock).
836 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
837 routine for r/w lock.
838 (Finalize_Lock)[RW_Lock]: Likewise.
839 (Write_Lock)[RW_Lock]: Likewise.
840 (Unlock)[RW_Lock]: Likewise.
841 (Read_Lock): Define L as RW_Lock (instead of Lock).
843 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
844 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
845 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
846 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
847 routine for standard lock.
848 (Finalize_Lock)[RW_Lock]: Likewise.
849 (Write_Lock)[RW_Lock]: Likewise.
850 (Unlock)[RW_Lock]: Likewise.
851 (Read_Lock): Define L as RW_Lock (instead of Lock).
852 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
853 in the record definition.
854 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
855 lock for 'R' locking policy.
856 (Initialize_Protection): Likewise.
858 (Lock_Read_Only): Likewise.
860 * s-taspri-posix.ads (RW_Lock): New type defined as
861 OS_Interface.pthread_rwlock_t.
863 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
864 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
865 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
866 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
868 2011-09-27 Pascal Obry <obry@adacore.com>
870 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
872 2011-09-27 Pascal Obry <obry@adacore.com>
874 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
875 s-osinte-hpux.ads, s-osinte-irix.ads,
876 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
878 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
879 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
880 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
881 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
882 pthread_rwlock_destroy, pthread_rwlock_rdlock,
883 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
885 2011-09-27 Pascal Obry <obry@adacore.com>
887 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
888 (RE_Id): Add RE_Lock_Read_Only.
889 (RE_Unit_Table): Likewise.
890 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
891 to lift restriction on first character. Handle now the
892 Name_Concurrent_Readers_Locking where policy character is set to
894 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
896 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
897 read only lock for function in protected object.
898 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
899 this routine is now used.
901 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
903 * s-atocou-x86.adb (Decrement): Use %;.
904 (Increment): Likewise.
906 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
908 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
909 dereference of the pointer to the storage area. Remove useless type
910 conversions and factor out common code.
912 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
914 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
915 variable and use it throughout.
916 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
917 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
918 first step. Also convert to the unpadded type as a last step.
920 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
922 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
923 DECL_CHAIN in comment.
924 * gcc-interface/trans.c (gigi): Likewise.
925 (Attribute_to_gnu): Likewise.
926 (build_function_stub): Likewise.
927 (gnat_to_gnu): Likewise.
928 * gcc-interface/utils.c (create_subprog_decl): Likewise.
929 (convert_vms_descriptor64): Likewise.
930 (convert_vms_descriptor32): Likewise.
932 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
934 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
935 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
936 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
937 the type of the record is TYPE_READONLY.
939 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
940 Robert Dewar <dewar@adacore.com>
942 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
943 OUT formal parameter which is of an null-exclusion access subtype.
945 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
947 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
948 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
949 (gnat_to_gnu_param): Likewise.
950 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
951 maybe_unconstrained_array instead of doing the work manually.
952 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
953 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
954 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
955 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
956 (gnat_stabilize_reference): Likewise.
958 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
960 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
961 (SET_TYPE_NULL_BOUNDS): Likewise.
962 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
963 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
964 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
966 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
967 check that the initializer is a valid constant expression for use in
968 initializing a static variable. Add missing guard.
969 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
970 (convert_to_fat_pointer): In the null fat pointer case, build a valid
971 pointer for the bounds.
972 * gcc-interface/utils2.c (compare_fat_pointers): New function.
973 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
975 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
977 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
978 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
979 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
980 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
981 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
982 to the indirect case.
983 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
984 the TREE_THIS_NOTRAP flag.
986 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
988 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
989 iteration scheme, always generate the do-while form if optimization
990 is enabled. Use more straightforward test at the end.
992 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
994 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
995 XNEW instead of xmalloc. Do not build useless pointer type.
996 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
997 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
998 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1000 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1002 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1003 the alignment if this doesn't prevent BLKmode access to the object.
1005 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1007 * gcc-interface/Makefile.in (darwin): Do not issue the
1008 '-flat_namespace' linker flag during Ada build.
1009 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1010 default shared library options.
1012 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1014 * gcc-interface/decl.c (annotate_value): Look up expression for
1015 insertion in the cache at the end.
1017 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1019 * gcc-interface/Make-lang.in: Update dependencies.
1021 2011-09-19 Steve Baird <baird@adacore.com>
1023 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1024 configuration pragma names so that Is_Configuration_Pragma_Name
1025 will return True for Name_Annotate. Make corresponding change in
1026 Pragma_Id enumeration type. This is needed to allow an Annotate
1027 pragma to occur in a configuration pragma file (typically,
1029 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1030 * gnat_rm.texi: Note that pragma Annotate may be used as a
1031 configuration pragma.
1033 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1035 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1036 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1038 2011-09-19 Yannick Moy <moy@adacore.com>
1040 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1041 for expansion of set membership.
1042 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1043 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1044 visible for use in Alfa expansion.
1045 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1046 variable in Alfa mode.
1048 2011-09-19 Thomas Quinot <quinot@adacore.com>
1050 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1052 2011-09-19 Thomas Quinot <quinot@adacore.com>
1054 * exp_ch9.adb: Minor reformatting.
1056 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1058 * freeze.adb (Build_Renamed_Body): Generic subprograms
1059 instantiations cannot be poperly inlined by the compiler, do
1060 not set the Body_To_Inline attribute in such cases.
1061 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1062 inlining-related flags from the generic subprogram declaration.
1064 2011-09-19 Thomas Quinot <quinot@adacore.com>
1066 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1067 (Build_Stub_Type): Remove, instead copy components from
1068 System.Partition_Interface.RACW_Stub_Type.
1069 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1070 (Copy_Component_List): New subprogram.
1072 2011-09-19 Yannick Moy <moy@adacore.com>
1074 * lib-xref.adb (Generate_Reference): Ignore references to
1075 constants in Standard.
1077 2011-09-19 Robert Dewar <dewar@adacore.com>
1079 * err_vars.ads, errout.ads: Minor reformatting.
1081 2011-09-19 Robert Dewar <dewar@adacore.com>
1083 * aspects.ads (Impl_Defined_Aspects): New array
1084 * lib-writ.adb (No_Dependences): New name for No_Dependence
1085 * restrict.adb (No_Dependences): New name for No_Dependence
1086 (Check_Restriction_No_Specification_Of_Aspect): New
1088 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1089 (Restricted_Profile_Result): New variable
1090 (No_Specification_Of_Aspects): New variable
1091 (No_Specification_Of_Aspect_Warning): New variable
1092 * restrict.ads (No_Dependences): New name for No_Dependence
1093 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1094 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1095 * s-rident.ads: Add restriction
1096 No_Implementation_Aspect_Specifications, this is also added to
1097 the No_Implementation_Extensions profile.
1098 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1099 No_Implementation_Defined_Aspects
1100 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1101 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1102 No_Implementation_Aspects
1103 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1104 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1106 2011-09-19 Yannick Moy <moy@adacore.com>
1108 * lib-xref.adb (Generate_Reference): Take into account multiple
1109 renamings for Alfa refs.
1111 2011-09-19 Thomas Quinot <quinot@adacore.com>
1113 * g-socthi-mingw.adb: Minor reformatting.
1115 2011-09-19 Yannick Moy <moy@adacore.com>
1117 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1118 expansion to False in mode Alfa
1120 2011-09-19 Pascal Obry <obry@adacore.com>
1122 * mingw32.h: Remove obsolete code needed for old versions
1125 2011-09-19 Robert Dewar <dewar@adacore.com>
1127 * errout.ads: Minor reformatting.
1129 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1131 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1132 function is transformed into a declaration and a body, insert
1133 body at the end of the declarative part, to prevent premature
1134 freeze actions, and preserve original specification in the
1135 subprogram declaration.
1137 2011-09-19 Vincent Celier <celier@adacore.com>
1139 * projects.texi: Minor editing.
1141 2011-09-19 Robert Dewar <dewar@adacore.com>
1143 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1144 exp_aggr.adb: Minor reformatting.
1146 2011-09-19 Yannick Moy <moy@adacore.com>
1148 * lib-xref.adb (Generate_Reference): Change entity referenced
1149 to underlying object if any, or else reference to the HEAP.
1151 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1153 * gcc-interface/Make-lang.in: Update dependencies.
1155 2011-09-15 Robert Dewar <dewar@adacore.com>
1157 * tree_io.ads: Minor reformatting.
1158 * a-intnam.ads: Fix bad header.
1160 2011-09-15 Thomas Quinot <quinot@adacore.com>
1162 * a-exexpr-gcc.adb: Minor reformatting.
1164 2011-09-15 Yannick Moy <moy@adacore.com>
1166 * sem_ch6.adb: Propagate information that an expression function comes
1167 from source (otherwise references to this entity are not stored).
1169 2011-09-15 Robert Dewar <dewar@adacore.com>
1171 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1172 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1173 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1175 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1177 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1178 if the expression function is not a completion, create a
1179 new specification for the generated declaration, and keep the
1180 original specification in the generated body. Shorter code also
1181 ensures that proper warnings are generated for unused formals
1184 2011-09-15 Sergey Rybin <rybin@adacore.com>
1186 * tree_io.ads: Update ASIS_Version_Number because of the changes
1187 in the tree structures for expression functions.
1189 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1191 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1192 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1193 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1194 (CLOCK_REALTIME): Fix wrong value on some OSes.
1195 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1197 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1199 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1200 to unconstrained array case, deal with each branch of a COND_EXPR.
1201 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1202 a COND_EXPR in the initializer, if present.
1204 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1206 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1207 of an addressable type.
1208 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1209 Deal with those cases for which creating a temporary is mandatory.
1211 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1213 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1214 this is a real formal parameter before testing whether it is by ref.
1216 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1218 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1219 (build_call_1_expr): Likewise.
1220 (build_call_2_expr): Likewise.
1221 (build_call_n_expr): New prototype.
1222 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1223 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1224 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1225 (Exception_Handler_to_gnu_zcx): Likewise.
1226 (gnat_to_gnu): Likewise.
1227 (build_binary_op_trapv): Likewise.
1228 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1229 (build_call_1_expr): Likewise.
1230 (build_call_2_expr): Likewise.
1231 (build_call_n_expr): New function.
1232 (build_call_raise): Use build_call_n_expr.
1233 (build_call_raise_range): Likewise.
1234 (build_call_raise_column): Likewise.
1235 (build_call_alloc_dealloc_proc): Likewise.
1236 (maybe_wrap_malloc): Likewise.
1237 (maybe_wrap_free): Likewise.
1239 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1241 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1243 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1244 the result type is null if ENABLE_CHECKING. Set operation_type at the
1245 end unconditionally if not set in the previous cases.
1246 Use build2 and void_type_node for MODIFY_EXPR.
1247 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1249 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1251 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1252 precision when converting to or from an integral type whose precision
1253 is not equal to its size.
1255 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1257 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1259 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1261 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1263 * system-darwin-ppc64.ads: New file.
1265 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1267 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1270 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1272 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1273 size switches to the link phase for shared libs.
1275 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1277 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1278 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1280 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1282 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1283 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1284 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1286 (TOOLS_FLAGS_TO_PASS): New.
1287 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1289 2011-09-06 Robert Dewar <dewar@adacore.com>
1291 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1292 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1294 2011-09-06 Robert Dewar <dewar@adacore.com>
1296 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1297 * s-rident.ads: New restriction No_Implementation_Units
1298 (this restriction is also part of the profile
1299 No_Implementation_Extensions)
1300 * sem_ch10.adb (Analyze_With_Clause): Add check for
1301 No_Implementation_Units restriction.
1303 2011-09-06 Jerome Guitton <guitton@adacore.com>
1305 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1308 2011-09-06 Thomas Quinot <quinot@adacore.com>
1310 * s-solita.adb: Minor reformatting.
1312 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1314 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1315 is a rewriting of an expression function does not freeze previous
1318 2011-09-06 Robert Dewar <dewar@adacore.com>
1320 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1322 2011-09-06 Tristan Gingold <gingold@adacore.com>
1324 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1325 powerpc-wrs-vxworksae.
1327 2011-09-06 Thomas Quinot <quinot@adacore.com>
1329 * s-os_lib.ads (Spawn): Minor documentation clarification,
1330 Success is True for a zero exit status.
1332 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1334 * sem_ch5.adb: Add message for common iterator error.
1336 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1338 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1339 selected component discriminated by a current instance, replace
1340 the constraint with a reference to the target object, regardless
1341 of whether the context is an init_proc.
1343 2011-09-06 Robert Dewar <dewar@adacore.com>
1345 * exp_attr.adb: Descriptor_Size is never static.
1347 2011-09-06 Robert Dewar <dewar@adacore.com>
1349 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1351 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1353 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1356 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1358 * sem_res.adb (Resolve): An expression that is the body of an
1359 expression function does not freeze.
1361 2011-09-06 Matthew Heaney <heaney@adacore.com>
1363 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1364 a-cuprqu.adb: Changed copyright notice to indicate current
1367 2011-09-06 Vincent Celier <celier@adacore.com>
1369 * prj.adb: Minor spelling error fix in comment
1370 * sem_res.adb: Minor reformatting
1372 2011-09-06 Pascal Obry <obry@adacore.com>
1374 * sysdep.c (winflush_nt): Removed as not needed anymore.
1375 (winflush_95): Likewise.
1376 (winflush_init): Likewise.
1377 (winflush_function): Likewise.
1378 (getc_immediate_common): Remove call to winflush_function.
1380 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1382 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1383 processing for Descriptor_Size.
1384 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1385 to account for its broader usage.
1386 * sem_attr.adb (Analyze_Attribute): Change the error detection
1387 circuitry for Descriptor_Size as the attribute is now applicable
1390 2011-09-06 Robert Dewar <dewar@adacore.com>
1392 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1394 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1396 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1397 in a parameter association must not set the Referenced flag on
1399 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1401 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1403 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1405 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1407 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1408 gnatlink-re): Speed up by using -j0.
1410 2011-09-06 Yannick Moy <moy@adacore.com>
1412 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1413 Set_Corresponding_Aspect when creating pragma from aspect.
1414 (Add_Predicates): Use new field Corresponding_Aspect.
1415 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1416 name when present, for the purpose of issuing error messages;
1417 remove local procedure Error_Pragma_Arg_Alternate_Name.
1418 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1420 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1423 2011-09-06 Robert Dewar <dewar@adacore.com>
1425 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1427 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1429 * exp_ch6.adb (Build_Heap_Allocator): Add new
1430 local variable Desig_Typ. Code and comment reformatting. Add
1431 machinery to ensure that the allocation uses a fat pointer when
1432 the type of the return object is a constrained array and the
1433 function return type is an unconstrained array.
1435 2011-09-06 Vincent Celier <celier@adacore.com>
1437 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1438 parameters in subprograms.
1440 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1442 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1444 2011-09-06 Thomas Quinot <quinot@adacore.com>
1446 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1447 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1449 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1450 is null, destroy task specific data, to make API consistent with
1451 other platforms, and thus compatible with the shared version
1453 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1454 Document the above assumption.
1456 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1458 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1459 variable for type of return value when return type is
1460 unconstrained and context is an assignment.
1462 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1464 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1465 class-wide operation if expansion is not enabled.
1467 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1469 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1472 2011-09-06 Yannick Moy <moy@adacore.com>
1474 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1475 Aspect_Invariant): Do not issue error at this point on illegal
1476 pragma placement, as this is checked later on when analyzing
1477 the corresponding pragma.
1478 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1479 similar to Error_Pragma_Arg, except the source name of the
1480 aspect/pragma to use in warnings may be equal to parameter
1481 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1482 message to distinguish source name of pragma/aspect, and whether
1483 the illegality resides in the type being public, or being private
1484 without a public declaration
1486 2011-09-06 Thomas Quinot <quinot@adacore.com>
1488 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1489 size check (fd_set is implemented differently on that platform).
1491 2011-09-06 Thomas Quinot <quinot@adacore.com>
1493 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1494 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1495 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1496 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1497 (ATCB_Allocation): New subpackage of
1498 System.Tasking.Primitive_Operations, shared across all targets
1499 with full tasking runtime.
1500 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1502 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1503 taking care of establishing a local temporary ATCB if the one
1504 being deallocated is Self, to avoid a reference to the freed
1505 ATCB in Abort_Undefer.
1507 2011-09-06 Thomas Quinot <quinot@adacore.com>
1509 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1510 terminated, mark it for deallocation upon termination.
1511 (Terminate_Task): Call Free_Task again if the task is marked
1512 for automatic deallocation upon termination.
1514 2011-09-06 Robert Dewar <dewar@adacore.com>
1516 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1517 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1518 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1519 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1520 a-intnam-solaris.ads, a-intnam-tru64.ads,
1521 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1522 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1523 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1524 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1525 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1526 Add new profile No_Implementation_Extensions
1527 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1528 profile No_Implementation_Extensions
1529 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1530 Check violation of restriction No_Implementation_Identifiers
1531 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1532 Add entry for Name_No_Implementation_Extensions
1534 2011-09-06 Robert Dewar <dewar@adacore.com>
1536 * impunit.ads: Minor reformatting.
1538 2011-09-06 Robert Dewar <dewar@adacore.com>
1540 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1542 2011-09-06 Pascal Obry <obry@adacore.com>
1544 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1547 2011-09-06 Robert Dewar <dewar@adacore.com>
1549 * g-socket.adb: Minor reformatting
1551 2011-09-06 Javier Miranda <miranda@adacore.com>
1553 * ali.adb (Scan_ALI): Add missing support to load references of
1554 entities imported from other languages.
1555 * ali.ads (Xref_Record): Adding new fields to store the language and
1556 name of an imported entity.
1557 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1560 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1562 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1563 is allowed on a full type declaration if it is the completion of
1564 a private declarations.
1565 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1566 aspect is allowed on a full type declaration in the private part
1569 2011-09-06 Robert Dewar <dewar@adacore.com>
1571 * sem_ch8.ads: Minor reformatting
1573 2011-09-06 Thomas Quinot <quinot@adacore.com>
1575 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1576 Guard against socket values that are not in [0;FD_SETSIZE[
1578 2011-09-06 Robert Dewar <dewar@adacore.com>
1580 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1583 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1585 * s-linux-alpha.ads: Minor reformatting
1586 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1587 Use sizeof instead of corresponding C defines in s-oscons template.
1589 2011-09-06 Vadim Godunko <godunko@adacore.com>
1591 * a-convec.ads, a-iteint.ads: Minor reformatting.
1593 2011-09-06 Vincent Celier <celier@adacore.com>
1595 * projects.texi: Add menus and @node lines.
1597 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1599 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1600 where the return type is an unconstrained array and the context
1601 is an assignment. Optimize the case when the target of the
1602 assignment is a selected component.
1604 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1606 * s-solita.adb: Update comments.
1608 2011-09-06 Pascal Obry <obry@adacore.com>
1610 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1611 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1612 * s-oscons-tmplt.c: Add support for generating pthread related
1613 types size on GNU/Linux as done for Darwin.
1614 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1616 2011-09-06 Robert Dewar <dewar@adacore.com>
1618 * exp_ch6.adb: Fix minor typo.
1620 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1622 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1623 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1624 (Double_Size_Of): Alphabetized. Update the comment on usage.
1625 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1626 (Nearest_Multiple_Rounded_Up): New routine.
1627 (Size_Of): Update comment on usage. The generated expression now
1628 accounts for alignment gaps by rounding the size of the type to the
1629 nearest multiple rounded up of the type's alignment.
1631 2011-09-06 Robert Dewar <dewar@adacore.com>
1633 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1635 2011-09-06 Steve Baird <baird@adacore.com>
1637 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1638 derived subprograms in checking for presence of an
1639 Extra_Accessibility_Of_Result formal parameter.
1640 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1641 checking for presence of an Extra_Accessibility_Of_Result formal
1643 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1644 case where the Parameter_Associatiations attribute is already set,
1645 but set to an empty list.
1646 (Needs_Result_Accessibility_Level):
1647 Unconditionally return False. This is a temporary
1648 change, disabling the Extra_Accessibility_Of_Result
1650 (Expand_Simple_Function_Return): Check for
1651 Extra_Accessibility_Of_Result parameter's presence instead of
1652 testing Ada_Version when generating a runtime accessibility
1653 check which makes use of the parameter.
1655 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1657 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1658 expression in a given case alternative must be attached to the
1659 statement list of the ccrresponding case statement alternative
1660 They cannot be propagated ahead of the case statement, because
1661 the validity of the expression that generated the action may
1662 hold only for that alternative.
1664 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1666 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1667 (Alignment_Of): Remove the code for strict alignment targets.
1668 (Double_Alignment_Of): Removed.
1669 (Double_Size_Of): New routine.
1670 (Make_Finalize_Address_Stmts): Change the
1671 calculation of the dope's size. Update relevant comments.
1672 (Size_Of): New routine.
1674 2011-09-06 Steve Baird <baird@adacore.com>
1676 * einfo.ads (Extra_Accessibility): Update associated comment to use
1677 the term "present" correctly ("present" just means that it is not
1678 an error to query the value of the attribute - it does not imply
1679 that the value must be non-null).
1680 (Extra_Constrained): Ditto.
1681 (Is_Visible_Formal): Ditto.
1682 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1683 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1684 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1685 * exp_ch6.adb (Expand_Call): The callee may require an
1686 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1687 < Ada_2012. This can occur if the callee is exported from a Gnat
1688 runtimes unit. Also improve a comment.
1690 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1692 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1693 (Alignment_Of): Rename formal parameter Some_Typ
1694 to Typ, update related comment. Use the allocator alignment on
1695 strict alignment targets such as SPARC.
1696 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1699 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1701 * sem_ch9.adb (Check_Interfaces): Test
1702 Is_Limited_Type rather than Is_Limited_Record when checking that
1703 the partial view of a synchronized full view must be limited.
1705 2011-09-06 Emmanuel Briot <briot@adacore.com>
1707 * g-comlin.adb (Free): Fix memory leak.
1709 2011-09-06 Robert Dewar <dewar@adacore.com>
1711 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1713 2011-09-06 Steve Baird <baird@adacore.com>
1715 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1716 (Ada2012) cases described in AI05-0234 where the accessibility
1717 level of a function result is "determined by the point of
1718 call", an implicit parameter representing that accessibility
1719 level is passed in. Extra_Accessibilty_Of_Result yields this
1720 additional formal parameter. Extra_Accessibility_Of_Result
1721 is analogous to the existing Extra_Accessibility
1722 function used in the implementation of access parameters.
1723 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1724 Extra_Accessibility_Of_Result attribute.
1725 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1726 (Set_Extra_Accessibility_Of_Result): New procedure.
1727 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1728 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1729 an accessibility level literal to Natural; introduce a nested
1730 function, Make_Level_Literal, to do this.
1731 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1732 determines whether a given function (or access-to-function
1733 type) needs to have an implicitly-declared accessibility-level
1734 parameter added to its profile.
1735 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1736 previously declared in the body of Exp_Ch6.
1737 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1739 (Has_Unconstrained_Access_Discriminants): New Function; a
1740 predicate on subtype entities which returns True if the given
1741 subtype is unconstrained and has one or more access discriminants.
1742 (Expand_Call): When expanding a call to a function which takes an
1743 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1744 actual parameter value. In the case of a function call which is
1745 used to initialize an allocator, this may not be possible because
1746 the Etype of the allocator may not have been set yet. In this
1747 case, we defer passing in the parameter and handle it later in
1748 Expand_Allocator_Expression.
1749 (Expand_Simple_Function_Return): When returning from a function which
1750 returns an unconstrained subtype having at least one access
1751 discriminant, generate the accessibility check needed to ensure that
1752 the function result will not outlive any objects designated by its
1754 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1756 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1757 is used to initialize an allocator, we may need to pass in "the
1758 accessibility level determined by the point of call" (AI05-0234)
1759 to the function. Expand_Call, where such actual parameters are
1760 usually generated, is too early in this case because the Etype of
1761 the allocator (which is used in determining the level to be passed
1762 in) may not have been set yet when Expand_Call executes. Instead,
1763 we generate code to pass in the appropriate actual parameter
1764 in Expand_Allocator_Expression.
1765 * sem_ch6.adb (Create_Extra_Formals): Create
1766 the new Extra_Accessibility_Of_Result formal if
1767 Needs_Result_Accessibility_Level returns True. This includes the
1768 introduction of a nested procedure, Check_Against_Result_Level.
1770 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1772 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
1775 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1777 * s-finmas.adb (Set_Finalize_Address): Explain the reason
1778 for the synchronization. Move the test for null from
1779 s-stposu.Allocate_Any_Controlled to this routine since the check
1780 needs to be protected too.
1781 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
1782 synchronization code.
1783 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
1784 explaining the context in which this routine is used.
1785 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
1786 to s-finmas.Set_Finalize_Address.
1788 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1790 * einfo.ads: Document that itypes have no parent field.
1792 2011-09-05 Robert Dewar <dewar@adacore.com>
1794 * rtsfind.adb (Check_CRT): Check for overloaded entity
1795 * rtsfind.ads: Document that entities to be found by rtsfind
1796 cannot be overloaded
1797 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
1798 (Lock_Entries_With_Status): New name for Lock_Entries with two
1799 arguments (changed to meet rtsfind no overloading rule).
1801 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1803 * s-finmas.adb (Set_Finalize_Address (Address,
1804 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1805 (Set_Finalize_Address (in out Finalization_Master,
1806 Finalize_Address_Ptr): Add synchronization code.
1807 * s-finmas.ads (Set_Finalize_Address (Address,
1808 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1809 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
1810 Set_Finalize_Address for the heterogeneous case.
1812 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1814 * sem_ch3.adb: Undo previous change, not suitable after all.
1816 2011-09-05 Robert Dewar <dewar@adacore.com>
1818 * einfo.ads: Minor comment clarification.
1820 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1822 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
1823 no longer needs to search through the entities of the return
1824 statement scope to find the _chain.
1825 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
1826 (Analyze_Block_Statement): Add local variable
1827 Is_BIP_Return_Statement. Add machinery to install all entities
1828 produced by the expansion of the return object declaration.
1829 (Install_Return_Entities): New routine.
1830 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
1832 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1834 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
1835 of subunit is incomplete.
1836 (Analyze_Proper_Body): If parent spec is not available, do not
1839 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1841 * sem_disp.adb (Find_Controlling_Arg): Add checks for
1842 interface type conversions, that are expanded into dereferences.
1844 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1846 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1847 Examine the parameter and return profile of a subprogram and swap
1848 any incomplete types coming from a limited context with their
1849 corresponding non-limited views.
1850 (Exchange_Limited_Views): New routine.
1852 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1854 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
1855 of internal entity to the subtype declaration, so that when
1856 entities are subsequently exchanged in a package body, the tree
1857 remains properly formatted for ASIS.
1859 2011-09-05 Johannes Kanig <kanig@adacore.com>
1861 * g-comlin.adb (Set_Usage): Additional optional argument to set help
1863 (Display_Help): display the user given help message, if available.
1865 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1867 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
1868 is legal if the original node is an identifier that is a
1869 parameterless function call.
1871 2011-09-05 Pascal Obry <obry@adacore.com>
1873 * prj-nmsc.adb: Minor reformatting.
1874 Add support for standalone aggregate library.
1875 (Check_Stand_Alone_Library): Handle standalone aggregate library.
1876 * projects.texi: Fix documentation for aggregate library projects.
1878 2011-09-05 Robert Dewar <dewar@adacore.com>
1880 * sem_ch6.adb: Minor reformatting.
1882 2011-09-05 Matthew Gingell <gingell@adacore.com>
1884 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
1885 stack guard page on PPC Linux. This patch ensures the 64K guard page at
1886 the bottom of the stack is not overwritten.
1888 2011-09-05 Thomas Quinot <quinot@adacore.com>
1890 * exp_intr.adb, s-tasini.adb: Minor reformatting.
1892 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1894 * sem_ch3.adb (Access_Definition): If an access type declaration
1895 appears in a child unit, the scope of whatever anonymous type
1896 may be generated is the child unit itself.
1898 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1900 * sem_ch6.adb (Analyze_Expression_Function): Do not set
1901 Comes_From_Source on rewritten body.
1902 (Analyze_Subprogram_Body_Helper): Check that the original node for
1903 the body comes from source, when determining whether expansion
1904 of a protected operation is needed.
1906 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1908 * exp_aggr.adb (Replace_Type): If the target of the assignment is
1909 a selected component and the right-hand side is a self-referential
1910 access, the proper prefix of the rewritten attribute is a copy
1911 of the left-hand side, not of its prefix.
1913 2011-09-05 Robert Dewar <dewar@adacore.com>
1915 * sem_ch5.adb: Minor reformatting.
1916 * sem_ch3.adb: Minor code clean up.
1918 2011-09-05 Jose Ruiz <ruiz@adacore.com>
1920 * exp_ch9.adb (Make_Initialize_Protection): The fact that
1921 restriction No_Dynamic_Attachment is in effect or not should
1922 not influence the default priority associated to a protected
1923 object. With this change, when the restriction is in effect (as
1924 is the case for the Ravenscar profile) the default priority of
1925 a protected object with an interrupt handler is in the range of
1926 interrupt priorities (Default_Interrupt_Priority) as required
1929 2011-09-05 Arnaud Charlet <charlet@adacore.com>
1931 * a-iteint.ads: Fix header.
1933 2011-09-05 Vincent Celier <celier@adacore.com>
1935 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
1936 with a directory separator to avoid output such as:
1937 "/path/to/objauto.cgpr" has been deleted.
1939 2011-09-05 Robert Dewar <dewar@adacore.com>
1941 * sem_ch3.adb: Minor reformatting.
1943 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1945 * sem_ch5.adb: Better error message.
1947 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1949 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
1950 (Expand_Array_Aggregate): Detect a special case of an aggregate
1951 which contains tasks in the context of an unexpanded return
1952 statement of a build-in-place function.
1953 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
1954 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
1955 which contains tasks and expand it now that the original simple
1956 return statement has been rewritten.
1957 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
1958 reformatting. Do not create a chain for an extended return
1959 statement if one is already available.
1960 (Has_Activation_Chain): New routine.
1962 2011-09-05 Marc Sango <sango@adacore.com>
1964 * sem_ch3.adb (Analyze_Object_Declaration): Remove
1965 the wrong test and add the correct test to detect the violation
1966 of illegal use of unconstrained string type in SPARK mode.
1968 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1970 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
1971 message on an iterator over an array.
1973 2011-09-05 Robert Dewar <dewar@adacore.com>
1975 * lib-xref-alfa.adb: Minor reformatting.
1977 2011-09-05 Robert Dewar <dewar@adacore.com>
1979 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
1980 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
1982 2011-09-05 Gary Dismukes <dismukes@adacore.com>
1984 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
1986 2011-09-05 Johannes Kanig <kanig@adacore.com>
1988 * lib-xref-alfa.adb: Update comments.
1990 2011-09-05 Thomas Quinot <quinot@adacore.com>
1992 * sem_res.adb: Minor reformatting
1994 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1996 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
1997 present, create them now. Needed in case the return type was
1998 a limited view in the function declaration.
1999 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2000 tasks, build the activation chain for it. Pass a reference to
2001 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2002 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2003 with build_in_place calls.
2004 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2005 incomplete, inatialize its Corresponding_Record_Type component.
2006 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2009 2011-09-05 Johannes Kanig <kanig@adacore.com>
2011 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2014 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2016 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2017 appears within a package specification and the token after "IS"
2018 is not a parenthesis, assume that this is an unparenthesized
2019 expression function, even if the token appears in a line by
2021 * par.adb: Clarify use of Labl field of scope stack in error
2024 2011-09-05 Bob Duff <duff@adacore.com>
2026 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2027 conversions instead of normal type conversions in all cases where a
2028 type conversion would be illegal. In particular, use unchecked
2029 conversions when the operand types are private.
2031 2011-09-05 Johannes Kanig <kanig@adacore.com>
2033 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2034 objects of task type or protected type.
2036 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2038 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2039 function comes from source, indicate that so does its rewriting,
2040 so it is compatible with any subsequent expansion of the
2041 subprogram body (e.g. when it is a protected operation).
2042 * sem_ch4.adb: minor reformatting
2044 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2046 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2047 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2048 may lead to wrong ancestor package in the case of instantiated subunit
2049 bodies. If a subunit is instantiated, follow the chain of instantiations
2050 rather than the stub structure.
2052 2011-09-02 Robert Dewar <dewar@adacore.com>
2054 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2055 * gcc-interface/Make-lang.in: Update dependencies.
2057 2011-09-02 Marc Sango <sango@adacore.com>
2059 * sem_ch3.adb (Analyze_Object_Declaration): Change
2060 comment and add additional check to differentiate constant of
2061 type string from others unconstrained type.
2063 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2065 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2066 present in incomplete type declarations to refine the error
2067 message the full declaration is in the same unit.
2068 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2069 an incomplete type, set the Premature_Use for additional message.
2070 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2071 and Premature_Use is set, place additional information at the
2072 point of premature use.
2074 2011-09-02 Bob Duff <duff@adacore.com>
2076 * sem_ch6.adb: (Check_Post_State): Suppress warning
2077 "postcondition refers only to pre-state" when the expression has not
2078 yet been analyzed, because it causes false alarms. This can happen when
2079 the postcondition contains a quantified expression, because those are
2080 analyzed later. This is a temporary/partial fix.
2081 (Process_Post_Conditions): Minor: change wording of warning.
2083 2011-09-02 Marc Sango <sango@adacore.com>
2085 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2086 illegal use of unconstrained string type in SPARK mode.
2087 * sem_res.adb (Analyze_Operator_Symbol): Set the
2088 right place where the string operand of concatenation should be
2089 violate in SPARK mode.
2091 2011-09-02 Robert Dewar <dewar@adacore.com>
2093 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2094 exp_ch3.adb: Minor reformatting.
2096 2011-09-02 Vincent Celier <celier@adacore.com>
2098 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2099 as the compiler driver so Is_Compilable returns True for sources.
2100 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2103 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2105 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2106 condition, a reference to a controlling formal must be interpreted
2107 as having the class-wide type (or an access to such) so that the
2108 inherited condition can be properly applied to any overriding
2109 operation (see ARM12 6.6.1 (7)).
2111 2011-09-02 Tristan Gingold <gingold@adacore.com>
2113 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2116 2011-09-02 Javier Miranda <miranda@adacore.com>
2118 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2119 initializing expression of a class-wide interface object declaration
2120 if its type is limited.
2122 2011-09-02 Johannes Kanig <kanig@adacore.com>
2124 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2125 literals, take into account the type name; the type is *not*
2126 the scope for an enumeration literal.
2128 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2130 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2131 to reject an overriding indicator on a user-defined Adjust
2132 subprogram for a limited controlled type.
2134 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2136 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2137 for an actual that is a function call returning an unconstrained
2138 limited controlled type.
2140 2011-09-02 Tristan Gingold <gingold@adacore.com>
2142 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2144 2011-09-02 Johannes Kanig <kanig@adacore.com>
2146 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2147 from "HEAP" to __HEAP Change comment that refers to that variable
2148 * put_alfa.adb: Change comment that refers to that variable
2150 2011-09-02 Robert Dewar <dewar@adacore.com>
2152 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2154 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2156 * exp_util.adb (Extract_Renamed_Object): Renamed to
2157 Find_Renamed_Object. This routine has been reimplemented and now uses
2158 tree traversal to locate a renamed object.
2159 (Is_Aliased): Replace call to Extract_Renamed_Object with
2160 Find_Renamed_Object.
2162 2011-09-02 Tristan Gingold <gingold@adacore.com>
2164 * init.c: (__gnat_is_vms_v7): New function.
2166 2011-09-02 Olivier Hainque <hainque@adacore.com>
2168 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2169 that have a misaligned backchain, necessarily bogus.
2171 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2173 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2174 TSS routine Finalize_Address when compiling in Alfa mode.
2175 (Expand_Freeze_Record_Type): Do not create TSS routine
2176 Finalize_Address when compiling in Alfa mode.
2177 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2178 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2180 (Expand_N_Allocator): Do not produce a call to
2181 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2182 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2183 produce a call to primitive Set_Finalize_Address in Alfa mode because
2184 Finalize_Address is not built.
2185 * exp_ch7.adb (Build_Finalization_Master): Do not create
2186 finalization masters in Afa mode since they are not needed.
2187 (Build_Finalizer): Do not create scope and library-level
2188 finalizers in Alfa mode since they are not needed.
2189 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2190 "new" and "free" when applied to controlled objects in Alfa mode since
2193 2011-09-02 Vincent Celier <celier@adacore.com>
2195 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2196 only library names with the syntax of Ada identifiers, to avoid errors
2197 when compiling the binder generated files.
2198 * projects.texi: Document restriction on SAL library names
2200 2011-09-02 Thomas Quinot <quinot@adacore.com>
2202 * a-chtgbo.adb: Minor comment fix.
2204 2011-09-02 Robert Dewar <dewar@adacore.com>
2206 * lib-xref.adb: Minor reformatting
2208 2011-09-02 Vincent Celier <celier@adacore.com>
2210 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2211 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2212 --version and --help in usage.
2213 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2215 2011-09-02 Bob Duff <duff@adacore.com>
2217 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2218 compilers don't understand it.
2220 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2222 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2223 underlying subtype rather than its base type on the call to
2224 Build_Record_Or_Elementary_Input_Function, so that any
2225 constraints on a discriminated subtype will be available for
2226 doing the check required by AI05-0192.
2227 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2228 If the prefix subtype of the 'Input attribute is a constrained
2229 discriminated subtype, then check each constrained discriminant value
2230 against the corresponding value read from the stream.
2232 2011-09-02 Yannick Moy <moy@adacore.com>
2234 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2235 warnings on suspicious contracts, and enable them with -gnatwa.
2237 2011-09-02 Robert Dewar <dewar@adacore.com>
2239 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2242 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2244 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2245 which ensure that restriction No_Dynamic_Attachment has not been
2247 (Make_Initialize_Protection): Protected types with attach or
2248 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2249 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2250 which ensures that restriction No_Dynamic_Attachment has not been
2252 * sem_attr.adb: (Eval_Attribute): Transform
2253 VAX_Float_Type'First and 'Last into references to
2254 the temporaries which store the corresponding bounds. The
2255 transformation is needed since the back end cannot evaluate
2256 'First and 'Last on VAX.
2257 (Is_VAX_Float): New routine.
2259 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2261 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2262 generic unit is not intrinsic and has an explicit convention,
2263 the instance inherits it.
2265 2011-09-02 Robert Dewar <dewar@adacore.com>
2267 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2268 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2270 2011-09-02 Thomas Quinot <quinot@adacore.com>
2272 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2273 Guard against a prefix that is an N_Has_Entity but has no
2276 2011-09-02 Yannick Moy <moy@adacore.com>
2278 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2281 2011-09-02 Yannick Moy <moy@adacore.com>
2283 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2284 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2286 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2287 procedure looking for suspicious postconditions.
2288 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2289 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2290 options -gnatw.t and -gnatw.T.
2292 2011-09-02 Pascal Obry <obry@adacore.com>
2294 * prj.adb: Minor code refactoring. Move check for null project in
2296 * projects.texi: Fix minor typos.
2298 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2300 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2301 of iteration is an expression, its value must be captured in a
2302 renaming declaration, so that modification of the elements is
2303 propagated to the original container.
2305 2011-09-02 Pascal Obry <obry@adacore.com>
2307 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2308 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2309 prj-tree.adb: Minor reformatting and style fixes.
2311 2011-09-02 Robert Dewar <dewar@adacore.com>
2313 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2314 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2315 No_Implicit_Aliasing
2316 (Analyze_Attribute, case Address): ditto
2317 (Analyze_Attribute, case Unrestricted_Access): ditto
2318 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2319 No_Implicit_Aliasing restriction.
2320 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2322 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2324 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2325 is an unchecked conversion, apply test to its expression.
2327 2011-09-02 Javier Miranda <miranda@adacore.com>
2329 * sem_ch3.adb (Check_Abstract_Overriding): When
2330 traversing the chain of aliased subprograms avoid reporting a
2331 redundant error on the current entity.
2333 2011-09-02 Sergey Rybin <rybin@adacore.com>
2335 * gnat_ugn.texi: Minor clean up.
2337 2011-09-02 Bob Duff <duff@adacore.com>
2339 * s-htable.adb (Set_If_Not_Present): Use renaming
2340 instead of ":=", because the type Key is limited in the generic (even
2341 if not in the instances).
2343 2011-09-02 Robert Dewar <dewar@adacore.com>
2345 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2346 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2349 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2351 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2352 inherited component with the enclosing derived type. Code reformatting.
2354 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2356 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2357 return done when overflow checks are enabled, since comparisons against
2358 Lor and Hir should not be done when OK1 is False.
2360 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2362 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2363 Add new formal Master_Exp. When present, add that expression to the
2364 call as an extra actual.
2365 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2366 Fmaster_Actual and in the case of a BIP call initializing a return
2367 object of an enclosing BIP function set it to a
2368 new reference to the implicit finalization master
2369 formal of the enclosing function. Fmaster_Actual is
2370 then passed to the new formal Master_Exp on the call to
2371 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2372 initializations of Enclosing_Func to its declaration.
2374 2011-09-02 Thomas Quinot <quinot@adacore.com>
2376 * csets.ads: Minor reformatting
2378 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2380 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2381 the full view of a private type coming from an instantiation.
2382 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2383 loop to iterate over the declarations rather than use the
2384 First_Entity / Next_Entity scheme.
2386 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2388 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2389 X'range (N) into X'First (N) .. X'Last (N), do not share the
2390 dimension indicator N, if present. Even though it is a static
2391 constant, its source location may be modified when printing
2392 expanded code under -gnatDL, and node sharing will lead to chaos
2393 in Sprint on large files, by generating a sloc value that does
2394 not correspond to any source file.
2396 2011-09-02 Bob Duff <duff@adacore.com>
2398 * einfo.adb: (Has_Xref_Entry): Do not call
2399 Implementation_Base_Type. Lib.Xref has been
2400 rewritten to avoid the need for it, and it was costly.
2401 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2402 functions in support of efficient xref.
2403 * lib-xref-alfa.adb: Misc changes related to Key component of
2405 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2406 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2407 no longer does. This is the one place where it is needed.
2409 2011-09-02 Johannes Kanig <kanig@adacore.com>
2411 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2412 similar interface as the other Getopt function.
2414 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2416 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2417 a call to Set_Finalize_Address if there is no allocator available.
2418 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2419 a case of allocator expansion where the allocator is not expanded but
2420 needs a custom allocate routine. Code reformatting.
2421 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2422 Ren_Obj. Code reformatting.
2423 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2424 through the use of 'reference.
2425 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2426 as part of build-in-place expansion. They are intentionally marked as
2427 coming from source, but their parents are not.
2429 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2431 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2432 is the generated subprogram declaration for a child unit body
2433 that acts as spec, use the original body in the with_clause,
2434 to prevent binding errors.
2436 2011-09-02 Vincent Celier <celier@adacore.com>
2438 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2439 qualifier /MULTI_UNIT_INDEX=
2441 2011-09-02 Johannes Kanig <kanig@adacore.com>
2443 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2444 instead of calling the callback function
2446 2011-09-02 Robert Dewar <dewar@adacore.com>
2448 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2449 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2451 2011-09-02 Vincent Celier <celier@adacore.com>
2453 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2454 explicitly declared in an extending project, do not warn if a source
2455 for an inherited naming exception is not found.
2457 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2459 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2460 expansion is inactive.
2462 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2464 * sem_util.adb (Note_Possible_Modification): If the entity
2465 being modified is the renaming generated for an Ada2012 iterator
2466 element, the enclosing container or array is modified as well.
2468 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2470 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2471 Initialize): Define and initialize the
2472 mutex attributes and condition variable attributes locally.
2474 2011-09-02 Vincent Celier <celier@adacore.com>
2476 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2477 exception replaced in an extending project.
2478 (Check_Object): No error when the other source is locally removed.
2480 2011-09-02 Yannick Moy <moy@adacore.com>
2482 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2485 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2487 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2489 * gcc-interface/Make-lang.in: Update dependencies.
2491 2011-09-01 Robert Dewar <dewar@adacore.com>
2493 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2495 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2497 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2498 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2499 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2500 specific for systems where their glibc version does not define the
2501 routines to handle dynamically allocated CPU sets.
2503 2011-09-01 Vincent Celier <celier@adacore.com>
2505 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2506 prj-env.adb: Implement inheritance of naming exceptions in extending
2509 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2511 * gnatls.adb: Display simple message instead of content of
2514 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2516 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2517 access discriminant and anonymous access component scopes.
2518 (Inherit_Component): Reuse the itype of an access discriminant
2519 or anonymous access component by copying it in order to set the proper
2520 scope. This is done only when the parent and the derived type
2521 are in different scopes.
2522 (Set_Anonymous_Etype): New routine.
2524 2011-09-01 Robert Dewar <dewar@adacore.com>
2526 * a-convec.adb: Minor reformatting throughout.
2528 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2530 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2531 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2532 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2533 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2534 CPU_SET_S respectively because we are now using dynamically allocated
2535 CPU sets which are more portable across different glibc versions.
2536 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2537 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2538 masks dynamically according to the number of processors in the target
2540 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2541 respectively, so we need to pass the size of the masks as
2543 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2544 created cpu_set_t masks
2545 with the number of processors available in the target platform,
2546 instead of static bit arrays. It enhances portability because
2547 it uses the information from the target platform.
2548 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2549 are using a restricted run-time library, use the flag
2550 Configurable_Run_Time_Mode instead of Restricted_Profile.
2552 2011-09-01 Vincent Celier <celier@adacore.com>
2554 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2555 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2557 2011-09-01 Nicolas Roche <roche@adacore.com>
2559 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2560 on VxWorks in kernel mode.
2562 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2564 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2565 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2566 directly the bit array.
2567 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2568 the linux macros with the same name.
2569 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2570 wrappers around the CPU_ZERO and CPU_SET linux macros.
2572 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2574 * exp_ch7.adb (Find_Insertion_List): Removed.
2575 (Process_Transient_Objects): Insert the declarations of the hook
2576 access type and the hook object before the associated transient object.
2578 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2580 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2581 package System.Aux_Dec when using restricted run-time libraries which
2582 do not have this package.
2584 2011-09-01 Tristan Gingold <gingold@adacore.com>
2586 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2588 2011-09-01 Bob Duff <duff@adacore.com>
2590 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2591 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2593 2011-09-01 Thomas Quinot <quinot@adacore.com>
2595 * exp_ch5.adb: Minor reformatting
2596 * gnat_ugn.texi: Fix minor typos.
2597 * gcc-interface/Make-lang.in: Update dependencies.
2599 2011-09-01 Robert Dewar <dewar@adacore.com>
2601 * inline.adb, sem_aggr.adb: Minor reformatting.
2603 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2605 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2607 2011-09-01 Robert Dewar <dewar@adacore.com>
2609 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2611 2011-09-01 Bob Duff <duff@adacore.com>
2613 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2614 body" the same as "in inlined body", because visibility shouldn't
2617 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2619 * inline.adb (Add_Inlined_Body): Refine previous change.
2621 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2623 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2624 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2625 Test for case where call
2626 initializes an object of a return statement before testing for
2627 a constrained call, to ensure that all such cases get handled
2628 by simply passing on the caller's parameters. Also, in that
2629 case call Needs_BIP_Alloc_Form to determine whether to pass on
2630 the BIP_Alloc_Form parameter of the enclosing function rather
2631 than testing Is_Constrained. Add similar tests for the return
2632 of a BIP call to later processing to ensure consistent handling.
2633 (Needs_BIP_Alloc_Form): New utility function.
2634 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2635 a BIP_Alloc_Form formal with call to new utility function
2636 Needs_BIP_Alloc_Form.
2638 2011-09-01 Pascal Obry <obry@adacore.com>
2640 * prj-part.adb: Minor reformatting.
2642 2011-09-01 Vincent Celier <celier@adacore.com>
2644 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2645 half character in the unit name.
2647 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2649 * exp_ch4.adb: Minor code and comment reformatting.
2651 2011-09-01 Thomas Quinot <quinot@adacore.com>
2653 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2654 for Is_Limited_Type and Is_Tagged_Type in condition checking
2655 for by-reference type.
2656 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2657 subprograms may have a completion because of a previous
2658 Inline_Always clause, but the enclosing package must be marked
2659 inlined for the subprogram body to become visible to the backend.
2661 2011-09-01 Thomas Quinot <quinot@adacore.com>
2663 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2665 2011-09-01 Pascal Obry <obry@adacore.com>
2667 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2669 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2671 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2672 the formals of a subprogram stub that acts as a spec.
2674 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2676 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2677 type, declare a renaming for it, not an object declaration.
2679 2011-09-01 Yannick Moy <moy@adacore.com>
2681 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2682 Ignore_Errors to ignore failures to read ALI files when True.
2684 2011-09-01 Javier Miranda <miranda@adacore.com>
2686 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2687 constructor calls associated with non-tagged record types.
2689 2011-09-01 Robert Dewar <dewar@adacore.com>
2691 * g-socthi-vms.adb: Minor reformatting.
2693 2011-09-01 Nicolas Roche <roche@adacore.com>
2695 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2696 in order to avoid impact of imcompatible changes.
2697 * cstreams.c: Likewise
2699 * aux-io.c: Likewise
2701 2011-09-01 Yannick Moy <moy@adacore.com>
2703 * lib-writ.adb (Write_With_Lines): Always output complete information
2704 on "with" line in Alfa mode, as this is required by formal verification
2707 2011-09-01 Tristan Gingold <gingold@adacore.com>
2709 * g-socthi-vms.adb: Add comments.
2711 2011-09-01 Pascal Obry <obry@adacore.com>
2713 * prj.ads: Minor reformatting.
2715 2011-09-01 Vincent Celier <celier@adacore.com>
2717 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2718 exceptions in the config pragmas file.
2720 2011-09-01 Tristan Gingold <gingold@adacore.com>
2722 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2724 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2726 * exp_ch7.adb (Find_Insertion_List): New routine.
2727 (Process_Transient_Objects): Add code to handle the abnormal
2728 finalization of a controlled transient associated with a subprogram
2729 call. Since transients are cleaned up right after the associated
2730 context, an exception raised during a subprogram call may bypass the
2733 2011-09-01 Robert Dewar <dewar@adacore.com>
2735 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2738 2011-09-01 Robert Dewar <dewar@adacore.com>
2740 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2742 2011-09-01 Robert Dewar <dewar@adacore.com>
2744 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2746 2011-09-01 Thomas Quinot <quinot@adacore.com>
2748 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2749 GNATRTL_NONTASKING_OBJS.
2751 2011-09-01 Robert Dewar <dewar@adacore.com>
2753 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2754 possibility of this flag being set for formals in Ada 2012 mode.
2755 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2757 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2759 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2761 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2764 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2766 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2767 insertion node in a tree of nested Expression_With_Actions nodes.
2768 (Process_Transient_Object): In the case where a complex if statement
2769 has been converted into nested Expression_With_Actions nodes, the
2770 "hook" object and the associated access type must be inserted before
2771 the top most Expression_With_Actions.
2773 2011-09-01 Robert Dewar <dewar@adacore.com>
2775 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
2776 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
2778 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2780 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
2782 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2784 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
2786 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
2787 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
2788 in a similar way as we do for the Priority or Dispatching_Domain aspect.
2789 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
2790 Dispatching_Domains_Frozen): Move this local data to package
2791 System.Tasking because with the CPU aspect we need to have access
2792 to this data when creating the task in System.Tasking.Stages.Create_Task
2793 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
2794 Move these variables from the body of
2795 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
2796 we need to have access to this data when creating the task in
2797 System.Tasking.Stages.Create_Task.
2798 * s-taskin.adb (Initialize): Signal the allocation of the environment
2799 task to a CPU, if any, so that we know whether the CPU can be
2800 transferred to a different dispatching domain.
2801 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
2802 is being allocated belongs to the dispatching domain where the task
2803 lives. Signal the allocation of the task to a CPU, if any, so that we
2804 know whether the CPU can be transferred to a different dispatching
2807 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2809 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
2810 attributes Same_Storage and Overlaps_Storage.
2812 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2814 * exp_strm.adb: Remove with and use clause for Opt.
2815 (Build_Array_Input_Function): Remove the version-dependent generation
2816 of the return statement. The Ada 2005 tree is now the default.
2818 2011-09-01 Yannick Moy <moy@adacore.com>
2820 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
2821 it is never empty when compiling in Alfa mode.
2823 2011-09-01 Robert Dewar <dewar@adacore.com>
2825 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
2826 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
2827 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
2828 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
2830 2011-09-01 Matthew Heaney <heaney@adacore.com>
2832 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
2833 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
2834 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
2835 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
2836 unbounded queue container.
2837 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
2838 bounded queue container.
2839 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
2840 unbounded priority queue container.
2841 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
2842 bounded priority queue container.
2844 2011-08-31 Pascal Obry <obry@adacore.com>
2846 * a-direct.adb: Do not try to create an UNC path on Windows.
2847 (Create_Path): Skip leading computer name in UNC path if any.
2849 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2851 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
2852 version-dependent generation of the return statement. The Ada 2005 tree
2855 2011-08-31 Thomas Quinot <quinot@adacore.com>
2857 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
2858 types Stream_Element_Offset and Storage_Offset have a different native
2859 type depending on whether the platform is 32 or 64 bits. When
2860 exchanging them, always convert to 64 bits.
2862 2011-08-31 Yannick Moy <moy@adacore.com>
2864 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
2865 --force-alfa to gnat2why.
2867 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2869 * sem_ch12.adb (Save_References): If the node has aspects, save
2870 references within the corresponding expressions in a separate step,
2871 because the aspects are not directly in the tree for the declaration
2872 to which they belong.
2874 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2876 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
2877 in CodePeer mode, since representation clauses are partially ignored.
2878 * gcc-interface/Make-lang.in: Update dependencies.
2880 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2882 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2883 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
2884 to any dispatching domain.
2886 2011-08-31 Thomas Quinot <quinot@adacore.com>
2888 * exp_ch4.adb: Minor reformatting.
2890 2011-08-31 Bob Duff <duff@adacore.com>
2892 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
2893 on nodes for which it is not defined.
2894 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
2897 2011-08-31 Bob Duff <duff@adacore.com>
2899 * sem_ch3.adb (Process_Full_View): Disable legality check if
2900 In_Instance, to avoid spurious errors.
2901 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
2902 if In_Instance, to avoid spurious errors.
2904 2011-08-31 Pascal Obry <obry@adacore.com>
2906 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
2907 directory speparators.
2908 (Compose): Use Dir_Seps to handle both forms.
2909 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
2911 (Extension): Use Dir_Seps to handle both forms.
2913 2011-08-31 Pascal Obry <obry@adacore.com>
2915 * prj-conf.adb: Minor reformatting.
2917 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2919 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
2920 dispatching domain aspect.
2921 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
2923 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
2924 Dispatching_Domain aspect in a similar way as we do for the Priority
2926 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
2927 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
2929 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
2930 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
2931 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
2932 Dispatching_Domain and add it to the task definition.
2933 (Sig_Flags): Add Pragma_Dispatching_Domain.
2934 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
2935 support to find the types Dispatching_Domain and
2936 Dispatching_Domain_Access.
2937 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
2938 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
2939 query the availability of a pragma Dispatching_Domain.
2940 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
2941 the expander to pass the Dispatching_Domain when creating a task.
2942 (Name_Dispatching_Domain): Add this new name for a pragma.
2943 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
2944 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
2945 task has been allocated at creation time.
2946 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
2947 Ravenscar is always null.
2948 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
2949 the task has been allocated at creation time.
2950 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
2951 a specific dispatching domain.
2952 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
2953 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
2954 and CPU are specified for the task, and the CPU value is not contained
2955 within the range of processors for the domain.
2957 2011-08-31 Vincent Celier <celier@adacore.com>
2959 * make.adb (Original_Gcc) : New constant String_Access.
2960 (Gnatmake): For VM targets, do not use VM version of the compiler if
2961 --GCC= has been specified.
2963 2011-08-31 Thomas Quinot <quinot@adacore.com>
2965 * sem_ch5.adb: Minor reformatting.
2967 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2969 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
2972 2011-08-31 Bob Duff <duff@adacore.com>
2974 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
2975 the access type is private; we don't care about privacy in expansion.
2977 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2979 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
2980 subcomponents tnat may be limited, because they originate in view
2981 conflicts. If the original aggregate is legal and the actuals are
2982 legal, the aggregate itself is legal.
2984 2011-08-31 Matthew Heaney <heaney@adacore.com>
2986 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
2989 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2991 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
2994 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2996 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
2997 Interrupt_Priority aspects, force the analysis of the aspect expression
2998 (when building the equivalent pragma). Otherwise, its analysis is done
2999 too late, after the task or protected object has been created.
3000 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3001 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3002 to the object declaration because they are needed in the type
3005 2011-08-31 Robert Dewar <dewar@adacore.com>
3007 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3008 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3011 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3013 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3014 if the corresponding type is malformed due to restriction violations.
3016 2011-08-31 Robert Dewar <dewar@adacore.com>
3018 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3020 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3022 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3023 would cause the generation of Set_Finalize_Address if the target is a
3024 VM and the designated type is not derived from [Limited_]Controlled.
3026 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3028 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3030 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3031 case of a compilation error.
3033 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3035 * init.c (__gnat_error_handler): Standardize the stack overflow or
3036 erroneous memory access message.
3037 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3038 or erroneous memory access message.
3040 2011-08-31 Robert Dewar <dewar@adacore.com>
3042 * sem_ch4.adb: Minor reformatting.
3043 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3045 2011-08-31 Thomas Quinot <quinot@adacore.com>
3047 * scos.ads: Minor documentation clarification.
3048 * put_scos.adb: Do not generate SCO unit header line for a unit that
3051 2011-08-31 Robert Dewar <dewar@adacore.com>
3053 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3055 2011-08-31 Tristan Gingold <gingold@adacore.com>
3057 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3058 hold variables between these following subprograms.
3059 (Build_Exception_Handler, Build_Object_Declarations,
3060 Build_Raise_Statement): Use the above type as parameter.
3061 Make the above adjustments.
3062 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3064 2011-08-31 Pascal Obry <obry@adacore.com>
3066 * projects.texi: Minor reformatting.
3068 2011-08-31 Tristan Gingold <gingold@adacore.com>
3070 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3071 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3073 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3075 * exp_ch5.adb: Minor code cleanup.
3076 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3077 prevent cascaded errors.
3078 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3079 variable of an iterator specification in current scope.
3080 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3081 postconditions on the stack, as they contain no return statements.
3083 2011-08-31 Yannick Moy <moy@adacore.com>
3085 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3086 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3087 call Qualify_Entity_Names.
3088 (Expand_Alfa): call Qualify_Entity_Names in more cases
3089 * lib-xref-alfa.adb: Take into account system package.
3090 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3091 CodePeer mode in which we are interested in finding bugs even if
3092 compiler cannot compile source.
3093 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3096 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3098 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3099 denoted by the subtype mark to ensure getting the concurrent type in
3100 the case where the subtype mark denotes a private subtype of a
3101 concurrent type (needed when using -gnatc).
3102 (Process_Subtype): For the processing specific to type kinds, case on
3103 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3104 subtype denotes a private subtype whose base type is nonprivate (needed
3105 for subtypes of private fulfilled by task types when compiling with
3108 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3110 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3111 late primitives that override interface operations when the full
3112 expander is not active, to avoid blowups in Register_Primitive when
3113 types don't have associated secondary dispatch tables.
3115 2011-08-31 Yannick Moy <moy@adacore.com>
3117 * alfa_test.adb: Code clean up.
3119 2011-08-31 Marc Sango <sango@adacore.com>
3121 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3122 by Comes_From_Source (Original_Node (N)) in order to treat also the
3123 nodes which have been rewritten.
3124 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3125 explicit dereference and slice violation in spark mode on the nodes
3126 coming only from the source code.
3128 2011-08-31 Robert Dewar <dewar@adacore.com>
3130 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3131 lib-xref-alfa.adb: Minor reformatting.
3133 2011-08-31 Matthew Heaney <heaney@adacore.com>
3135 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3137 2011-08-31 Javier Miranda <miranda@adacore.com>
3139 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3140 only for class-wide subprograms conflicting with entities of concurrent
3143 2011-08-31 Matthew Heaney <heaney@adacore.com>
3145 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3148 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3150 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3151 general description of the routine.
3153 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3155 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3156 doubly-linked lists.
3158 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3160 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3161 check is needed for a left-hand side that is a dereference, and the
3162 base type is private without discriminants (whereas the full type does
3163 have discriminants), an extra retrieval of the underlying type may be
3164 needed in the case where the subtype is a record subtype whose base
3165 type is private. Update comments.
3167 2011-08-31 Javier Miranda <miranda@adacore.com>
3169 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3170 found check if there is a class-wide subprogram covering the primitive.
3172 2011-08-31 Yannick Moy <moy@adacore.com>
3174 * sem_res.adb: Further cases where full expansion test is needed,
3175 rather than expansion test.
3177 2011-08-31 Pascal Obry <obry@adacore.com>
3179 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3181 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3183 * exp_ch5.adb: Handle iterators over derived container types.
3185 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3187 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3188 (Has_Anonymous_Master): New routine.
3189 (Set_Has_Anonymous_Master): New routine.
3190 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3191 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3192 (Current_Anonymous_Master): New routine.
3193 (Current_Unit_First_Declaration): Removed.
3194 (Current_Unit_Scope): Removed.
3195 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3196 their objects on a per-unit heterogeneous finalization master.
3198 2011-08-31 Matthew Heaney <heaney@adacore.com>
3200 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3203 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3205 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3208 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3210 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3211 where the actual is an unexpanded call to 'Input.
3213 2011-08-31 Yannick Moy <moy@adacore.com>
3215 * sem_ch4.adb: Code clean up.
3217 2011-08-31 Yannick Moy <moy@adacore.com>
3219 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3221 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3223 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3224 and TSS primitive Finalize_Address if finalization is suppressed.
3225 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3226 primitive Finalize_Address if finalization is suppressed.
3228 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3230 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3231 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3232 sure that the underlying task has already been created before trying
3233 to change its affinity.
3234 (Set_CPU): Use the term processor instead of CPU, as we do in
3237 2011-08-31 Vincent Celier <celier@adacore.com>
3239 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3240 * prj-nmsc.adb (Process_Compiler): Process attribute
3241 Source_File_Switches.
3242 * prj.ads (Language_Config): New name list component
3243 Name_Source_File_Switches.
3244 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3246 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3248 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3249 discriminated component of an actual, expand at once to prevent
3250 ouf-of-order references with generated subtypes.
3252 2011-08-31 Yannick Moy <moy@adacore.com>
3254 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3255 reference to operator in Alfa xrefs.
3257 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3259 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3260 where the parent instance was frozen before the current instance due to
3261 the presence of a source body. Update calls to Insert_After_Last_Decl.
3262 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3263 Update the comment which illustrates the purpose of the routine.
3264 Package instances are now frozen by source bodies which appear after
3265 the instance. This ensures that entities coming from within the
3266 instance are available for use in the said bodies.
3267 (Install_Body): Add code to handle the case where the parent instance
3268 was frozen before the current instance due to the presence of a source
3269 body. Update calls to Insert_After_Last_Decl.
3271 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3273 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3275 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3277 2011-08-31 Yannick Moy <moy@adacore.com>
3279 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3281 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3282 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3283 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3284 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3285 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3286 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3287 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3288 ALFA in Alfa (we dropped acronym).
3289 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3290 operations in a case where it returned previously No_Elist.
3292 2011-08-31 Robert Dewar <dewar@adacore.com>
3294 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3295 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3296 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3297 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3298 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3299 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3302 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3304 * sem_ch12 (Check_Private_View): Revert previous change.
3305 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3306 conversion is in a generic instance.
3308 2011-08-31 Matthew Heaney <heaney@adacore.com>
3310 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3311 * a-chtgbo.adb (Free): Allow 0 as index value.
3313 2011-08-31 Matthew Heaney <heaney@adacore.com>
3315 * a-cborma.adb (Insert): Add comment to explain why no element
3318 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3320 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3321 spec discriminant is already a concurrent type, in which case just use
3322 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3324 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3326 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3327 system-linux-mips.ads, system-linux-mipsel.ads,
3328 system-linux-mips64el.ads, system-linux-ppc64.ads,
3329 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3331 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3333 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3334 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3335 (build_unary_op): Likewise.
3337 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3339 * raise-gcc.c: Do not include coretypes.h and tm.h.
3340 (setup_to_install): Remove test for compiler macro.
3341 * targext.c: Document use for the library.
3342 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3344 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3346 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3347 the expression to the nominal type if the latter is a record type with
3348 a variant part and the type of the former is a record type without one.
3350 2011-08-30 Yannick Moy <moy@adacore.com>
3352 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3353 expansion in Alfa mode.
3354 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3355 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3357 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3358 * sem_res.adb: Ditto.
3359 * gcc-interface/Make-lang.in: Update dependencies.
3361 2011-08-30 Thomas Quinot <quinot@adacore.com>
3363 * g-socket.ads: Minor documentation adjustment.
3365 2011-08-30 Robert Dewar <dewar@adacore.com>
3367 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3369 2011-08-30 Yannick Moy <moy@adacore.com>
3371 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3372 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3373 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3374 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3375 Revert change which introduced files for "light"
3376 expansion, to be replaced by a single file for Alfa expansion.
3378 2011-08-30 Robert Dewar <dewar@adacore.com>
3380 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3381 Minor code reorg/reformatting.
3383 2011-08-30 Yannick Moy <moy@adacore.com>
3385 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3386 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3387 used for testing full expansion, that is active expansion not in the
3388 reduced mode for Alfa
3389 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3390 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3391 of the verbose (Expander_Active and not ALFA_Mode)
3393 2011-08-30 Tristan Gingold <gingold@adacore.com>
3395 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3396 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3397 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3398 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3400 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3402 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3403 access conversions to check that the conversion is a rewritten node,
3404 rather than just having Comes_From_Source set to False, which wasn't
3407 2011-08-30 Robert Dewar <dewar@adacore.com>
3409 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3410 g-socket.ads: Minor reformatting.
3412 2011-08-30 Thomas Quinot <quinot@adacore.com>
3414 * sem_util.adb: Minor reformatting.
3416 2011-08-30 Tristan Gingold <gingold@adacore.com>
3418 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3419 to be compliant with the ABI.
3421 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3423 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3424 of a designated type when the related access type is an actual in an
3425 instance. This ensures that the full view of designated type is
3426 available when inside the body of the instance.
3428 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3430 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3431 in a position to be modified, a slice is treated like an indexed
3434 2011-08-30 Thomas Quinot <quinot@adacore.com>
3436 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3437 field tv_sec in struct timeval.
3439 2011-08-30 Yannick Moy <moy@adacore.com>
3441 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3442 blocks of code doing full expansion, previously only guarded by
3443 Expander_Active, by anding the test that ALFA_Mode is not set
3445 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3447 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3448 add the function to the list of private dependents, for subsequent
3449 legality check on Taft amendment types.
3450 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3451 Private_Dependents, as for other incomplete types.
3452 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3453 Taft-amendment type is used as the return type of a function.
3455 2011-08-30 Javier Miranda <miranda@adacore.com>
3457 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3458 which emits an error by a call to a new routine which report the error.
3459 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3460 entity does not cover an existing interface.
3461 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3463 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3464 protected procedures or entries whose mode is not conformant.
3465 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3466 an error by a call to a new routine which report the error.
3468 2011-08-30 Robert Dewar <dewar@adacore.com>
3470 * gnat_rm.texi: Minor change.
3471 * exp_attr_light.adb: Minor reformatting.
3473 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3475 * sem_ch3.adb: Patch inheritance of aspects in
3476 Complete_Private_Subtype, to avoid infinite loop.
3478 2011-08-30 Javier Miranda <miranda@adacore.com>
3480 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3481 been reported and a subprogram covering an interface primitive is not
3482 found then skip generating the internal entity. Done to avoid crashing
3484 (Check_Abstract_Overriding): Change text of error of wrong formal of
3485 protected subprogram or entry. Done for consistency to emit exactly the
3486 same error reported by Check_Synchronized_Overriding. In addition, the
3487 error is restricted to protected types (bug found working on AI05-0090)
3489 2011-08-30 Yannick Moy <moy@adacore.com>
3491 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3492 expansion in Alfa mode.
3493 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3494 * exp_light.adb, exp_light.ads: New package defining light expansion.
3495 * expander.adb (Expand): Call light expansion in Alfa mode
3496 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3498 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3500 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3501 * gnat1drv.adb (Adjust_Global_Switches): Comment
3503 2011-08-30 Yannick Moy <moy@adacore.com>
3505 * lib-xref-alfa.adb: Minor refactoring.
3507 2011-08-30 Yannick Moy <moy@adacore.com>
3509 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3511 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3512 expansion in Alfa mode.
3513 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3516 2011-08-30 Robert Dewar <dewar@adacore.com>
3518 * debug_a.adb: Update comment.
3520 2011-08-30 Robert Dewar <dewar@adacore.com>
3522 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3523 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3524 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3525 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3527 2011-08-30 Robert Dewar <dewar@adacore.com>
3529 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3532 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3534 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3535 Build_Finalization_Master by supplying an insertion node and enclosing
3536 scope. In its old version, the call did not generate a finalization
3538 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3539 recognize anonymous access-to-controlled components. Rewrite the
3540 machinery which creates finalization masters to service anonymous
3541 access-to-controlled components of a record type. In its current state,
3542 only one heterogeneous master is necessary to handle multiple anonymous
3544 (Freeze_Type): Comment reformatting.
3545 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3547 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3548 associates TSS primitive Finalize_Address with either the master itself
3549 or with the internal hash table depending on the mode of operation of
3552 2011-08-30 Javier Miranda <miranda@adacore.com>
3554 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3555 interface type then do not generate code to compare this component.
3556 Required since they have no components and their equality operator is
3559 2011-08-30 Steve Baird <baird@adacore.com>
3561 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3562 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3563 returns the (static) accessibility level of the object. Otherwise, the
3564 same as Type_Access_Level.
3565 (Dynamic_Accessibility_Level): New function; given an expression which
3566 could occur as the rhs of an assignment to a saooaaat (i.e., an
3567 expression of an access-to-object type), return the new value for the
3568 saooaaat's associated Extra_Accessibility object.
3569 (Effective_Extra_Accessibility): New function; same as
3570 Einfo.Extra_Accessibility except that object renames are looked through.
3572 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3573 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3575 (Effective_Extra_Accessibility): New function; see sem_util.ads
3577 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3578 (Extra_Accessibility): Update comments.
3579 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3580 except RM_Size field (which is only for types) is unaffected.
3582 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3583 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3585 (Init_Size): Add assertion that we are not trashing the
3586 Extra_Accessibility attribute of an object.
3587 (Init_Size_Align): Add assertion that we are not trashing the
3588 Extra_Accessibility attribute of an object.
3589 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3590 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3591 differently for the type of a (non-library-level) saooaaat depending
3592 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3593 is queried in this set of changes - everything else (in particular,
3594 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3595 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3596 The special treatment of library-level saooaaats is an optimization,
3597 not required for correctnesss. This is based on the observation that the
3598 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3599 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3601 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3602 false for the type of a saooaaat, declare and initialize its
3603 accessibility level object and set the Extra_Accessibility attribute
3604 of the saooaaat to refer to this object.
3605 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3606 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3607 calls to Effective_Extra_Accessibility in order to support
3608 renames of saooaaats.
3609 (Expand_N_Type_Conversion): Add new local function,
3610 Has_Extra_Accessibility, and call it when determining whether an
3611 accessibility check is needed.
3612 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3613 evaluate to True (without raising an exception).
3615 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3616 saooaaat, update its associated Extra_Accessibility object (if
3617 it has one). This includes an accessibility check.
3618 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3619 a saooaaat, update its Extra_Accessibility object too (if it
3621 (Expand_Call): Replace a couple of calls to Type_Access_Level
3622 with calls to Dynamic_Access_Level to handle cases where
3623 passing a literal (any literal) is incorrect.
3624 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3625 checks associated with "Saooaat := Some_Object'Access;"; this must
3626 be rejected if Some_Object is declared in a more nested scope
3628 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3629 assignment to a saooaaat even if Is_Local_Anonymous_Access
3630 returns False for its type (indicating a 2012-style saooaaat).
3632 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3633 (which is only appropriate for objects, not types) with a call
3634 of Init_Object_Size_Align in order to avoid trashing the
3635 Extra_Accessibility attribute of a rename (the two attributes
3638 (Valid_Conversion) Replace six calls to Type_Access_Level with
3639 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3640 Ada2012 non-library-level saooaaat, the former returns library level
3641 while the latter returns the (static) accessibility level of the
3642 saooaaat. A type conversion to the anonymous type of a saooaaat
3643 can only occur as part of an assignment to the saooaaat, so we
3644 know that such a conversion must be in a lhs context, so Deepest
3645 yields the result that we need. If such a conversion could occur,
3646 say, as the operand of an equality operator, then this might not
3647 be right. Also add a test so that static accessibilty checks are
3648 performed for converting to a saooaaat's type even if
3649 Is_Local_Anonymous_Access yields False for the type.
3651 2011-08-30 Javier Miranda <miranda@adacore.com>
3653 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3654 controls generation of a warning associated with late declaration of
3655 dispatching functions. Required to avoid generating spurious
3658 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3660 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3661 return object has an anonymous access type and the function's type is
3662 a named access type.
3663 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3664 conversions on implicit conversions, since such conversions can occur
3665 for anonymous access cases due to expansion. Issue error for attempt
3666 to rename an anonymous expression as an object of a named access type.
3667 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3668 to indicate whether this function should report errors on invalid
3670 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3671 the expression is of an anonymous access type and the expected type is
3672 a named general access type, rewrite the expression as a type
3673 conversion, unless this is an expression of a membership test.
3674 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3675 calling of Error_Msg_N on new formal Report_Errs.
3676 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3677 calling of Error_Msg_NE on new formal Report_Errs.
3678 (Valid_Conversion): Move declaration of this function to the package
3679 spec, to allow calls from membership test processing. For Ada 2012,
3680 enforce legality restrictions on implicit conversions of anonymous
3681 access values to general access types, disallowing such conversions in
3682 cases where the expression has a dynamic accessibility level (access
3683 parameters, stand-alone anonymous access objects, or a component of a
3684 dereference of one of the first two cases).
3685 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3686 in the context of a named general access expected type.
3687 * exp_ch4.adb Add with and use of Exp_Ch2.
3688 (Expand_N_In): Add processing for membership tests applied to
3689 expressions of an anonymous access type. First, Valid_Conversion is
3690 called to check whether the test is statically False, and then the
3691 conversion is expanded to test that the expression's accessibility
3692 level is no deeper than that of the tested type. In the case of
3693 anonymous access-to-tagged types, a tagged membership test is applied
3695 (Tagged_Membership): Extend to handle access type cases, applying the
3696 test to the designated types.
3697 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3698 accessibility level, and the actual is a 'Access applied to a current
3699 instance, pass the accessibility level of the type of the current
3700 instance rather than applying Object_Access_Level to the prefix. Add a
3701 ??? comment, since this level isn't quite right either (will eventually
3702 need to pass an implicit level parameter to init procs).
3704 2011-08-30 Bob Duff <duff@adacore.com>
3706 * s-taskin.ads: Minor comment fix.
3708 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3710 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3711 component and the selector is a dispatching operation, check if it is
3712 a prefixed call before rewriting as a parameterless function call.
3714 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3716 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3717 tsystem.h into $(RTSDIR) instead of rts.
3719 2011-08-29 Robert Dewar <dewar@adacore.com>
3721 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3723 * gcc-interface/Make-lang.in: Update dependencies.
3725 2011-08-29 Yannick Moy <moy@adacore.com>
3727 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3728 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3729 table to hold dereferences.
3730 (Add_ALFA_Xrefs): Take into account dereferences as special
3731 reads/writes to the variable "HEAP".
3732 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3733 (Generate_Dereference): New procedure to store a read/write dereferencew
3735 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3736 the special "HEAP" var.
3737 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3739 * sem_util.adb (Note_Possible_Modification): Store write dereference
3742 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3744 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3745 ensures that the level of the subpool access type is not deeper than
3746 that of the pool object.
3747 * sem_util.adb (Object_Access_Level): Expand to handle defining
3749 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3750 subpool handle name of a rewritten allocator.
3752 2011-08-29 Robert Dewar <dewar@adacore.com>
3754 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3756 2011-08-29 Thomas Quinot <quinot@adacore.com>
3758 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3759 values, we generate multiple triples of parameters in the TypeCode.
3760 Bump Choice_Index for each such triple so that a subsequent default
3761 choice is associated with the correct index in the typecode.
3763 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3765 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3767 (First, Last): Handle properly an iterator over a null container.
3769 2011-08-29 Bob Duff <duff@adacore.com>
3771 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
3772 processing if we run across a node with no Scope. This can happen if
3773 we're with-ing an library-level instance, and that instance got errors
3774 that caused "instantiation abandoned".
3775 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
3776 an exception instead of using Assert, so it won't go into an infinite
3777 loop, even when assertions are turned off.
3779 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3781 * a-coorse.adb: Proper handling of empty ordered sets.
3783 2011-08-29 Johannes Kanig <kanig@adacore.com>
3785 * debug.adb: Add comments.
3787 2011-08-29 Thomas Quinot <quinot@adacore.com>
3789 * a-except.adb, a-except-2005.adb: Minor comment rewording and
3792 2011-08-29 Yannick Moy <moy@adacore.com>
3794 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
3795 declaration for Itypes in Alfa mode.
3797 2011-08-29 Robert Dewar <dewar@adacore.com>
3799 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
3800 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3801 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
3804 2011-08-29 Tristan Gingold <gingold@adacore.com>
3806 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
3808 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
3809 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
3812 2011-08-29 Robert Dewar <dewar@adacore.com>
3814 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
3816 2011-08-29 Javier Miranda <miranda@adacore.com>
3818 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
3819 renamings of formal subprograms when the actual for a formal type is
3822 2011-08-29 Matthew Heaney <heaney@adacore.com>
3824 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
3827 2011-08-29 Matthew Heaney <heaney@adacore.com>
3829 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
3830 components of record type.
3831 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
3834 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3836 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
3837 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
3840 2011-08-29 Robert Dewar <dewar@adacore.com>
3842 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
3845 2011-08-29 Matthew Heaney <heaney@adacore.com>
3847 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
3848 components of record type.
3850 2011-08-29 Bob Duff <duff@adacore.com>
3852 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
3853 by the termination handler.
3855 2011-08-29 Yannick Moy <moy@adacore.com>
3857 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
3858 created in Alfa mode, instead of inserting artificial declarations of
3859 non-Itypes in the tree.
3860 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
3861 know if an Itype has a corresponding declaration, as defined in
3864 2011-08-29 Yannick Moy <moy@adacore.com>
3866 * gnat1drv.adb: Minor rewrite.
3868 2011-08-29 Bob Duff <duff@adacore.com>
3870 * s-tasuti.adb (Make_Passive): Work around race condition in
3871 Make_Independent, which can cause Wait_Count to be zero. So instead of
3872 asserting that Wait_Count > 0, and then decrementing it, decrement it
3873 only if Wait_Count > 0.
3874 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
3875 should be nonnegative, so declare them Natural instead of Integer.
3877 2011-08-29 Robert Dewar <dewar@adacore.com>
3879 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
3880 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
3881 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
3882 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
3883 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
3885 2011-08-29 Tristan Gingold <gingold@adacore.com>
3887 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
3889 2011-08-29 Vadim Godunko <godunko@adacore.com>
3891 * s-parint.ads: Minor comment clarification.
3893 2011-08-29 Vincent Celier <celier@adacore.com>
3895 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
3896 may be used as identifiers.
3898 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3900 * a-coinho.ads: Minor reformating.
3902 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3904 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
3905 container of a derived type.
3907 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3909 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3910 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
3912 2011-08-29 Pascal Obry <obry@adacore.com>
3914 * exp_disp.adb: Minor comment fix.
3915 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
3916 to avoid warnings when compiling with -Wall.
3917 (Make_Disp_Conditional_Select_Body): Likewise.
3918 (Make_Disp_Timed_Select_Body): Likewise.
3920 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3922 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
3923 an entity name, generate reference for it.
3925 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3927 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
3929 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
3930 the class-wide type.
3931 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
3933 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3935 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
3936 subtype for an object whose type is an unconstrained union.
3938 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3940 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
3941 is allowed in a component definition, by AI95-406.
3943 2011-08-29 Matthew Heaney <heaney@adacore.com>
3945 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
3947 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3949 * a-except-2005.adb: Alphabetize all routines.
3950 (Triggered_By_Abort): New routine.
3951 * a-except-2005.ads (Triggered_By_Abort): New routine.
3952 * a-except.adb Alphabetize all routines.
3953 (Triggered_By_Abort): New routine.
3954 * a-except.ads (Triggered_By_Abort): New routine.
3955 * exp_ch7.adb: Update all comments involving the detection of aborts in
3957 (Build_Object_Declarations): Do not generate code to detect the
3958 presence of an abort at the start of finalization code, use a runtime
3960 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
3962 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
3963 allocate a task on a subpool.
3964 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
3965 The flag disables all actions related to the maintenance of
3966 Finalize_Address_Table when subpools are not in use.
3967 (Allocate_Any_Controlled): Signal the machinery that subpools are in
3969 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
3970 performs costly task locking when subpools are not in use.
3972 2011-08-29 Yannick Moy <moy@adacore.com>
3974 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
3975 types and dispatching calls in Alfa mode.
3976 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
3977 correspondance between body and spec scopes, to reuse utility functions
3978 (Traverse_Declarations_Or_Statements): Protect access to body for stub
3979 by testing the presence of the library unit for the body
3980 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
3981 mode the expansion of accept statements is skipped
3982 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
3983 the unique entity corresponding to the one returned by
3984 Unique_Defining_Entity applied to the enclosing declaration of the
3987 2011-08-29 Bob Duff <duff@adacore.com>
3989 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
3990 gdb when x is not a node (it can be a node list, name_id, etc). pp is
3991 an alias for pn. ppp is an alias for pt.
3993 2011-08-29 Javier Miranda <miranda@adacore.com>
3995 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
3996 aggregate to take a consistent decision on the need to convert into
3997 assignments aggregates that initialize constant objects.
3999 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4001 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4002 Build_Allocate_Deallocate_Proc in order to handle allocation of
4003 non-controlled objects on subpools.
4004 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4005 to be end-user visible.
4006 * s-finmas.adb: Add with and use clause for System.HTable.
4007 Add an instantiation of Simple_HTable which provides a mapping between
4008 the address of a controlled object and the corresponding
4009 Finalize_Address used to clean up the object. The table is used when a
4010 master is operating in heterogeneous mode.
4011 (Attach): Explain why the input node is not verified on being already
4013 (Delete_Finalize_Address): New routine.
4014 (Detach): Add pragma Assert which ensures that a node is already
4016 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4017 since nodes are no longer removed on traversal. Explain why node
4018 detachment is undesirable in this case.
4019 (Get_Finalize_Address): New routine.
4020 (Hash): New routine.
4021 (Is_Empty_List): Removed.
4022 (pm): Renamed to Print_Master. Add output for discriminant
4024 Comment reformatting.
4025 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4026 * s-finmas.ads: Various comments additions / improvements.
4027 Type Finalization_Master has a discriminant which determines the mode of
4029 (Delete_Finalize_Address): New routine.
4030 (Get_Finalize_Address): New routine.
4031 (pm): Renamed to Print_Master.
4032 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4033 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4034 use clause for System.IO.
4035 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4036 Finalize_Address depending on the mode of allocation and the mode of
4038 (Deallocate_Any_Controlled): Remove the relation pair object -
4039 Finalize_Address regardless of the master mode. Add comment explaining
4041 (Detach): Ensure that fields Prev and Next are null after detachment.
4042 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4043 scheme to check whether the list of subpools is empty. There is no
4044 longer need to store the next subpool or advance the current pointer.
4045 (Is_Empty_List): New routine.
4046 (Print_Pool): New routine.
4047 (Print_Subpool): New routine.
4048 * s-stposu.ads: Various comments additions / improvements.
4049 Field Master of type Root_Subpool is now a heterogeneous collection.
4050 (Print_Pool): New routine.
4051 (Print_Subpool): New routine.
4053 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4055 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4056 forms, using aspects of container types.
4057 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4058 Has_Implicit_Dereference flags, that may be set on the partial view.
4059 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4060 container type with an indexing aspect.
4061 (Analyze_Quantified_Expression): Analyze construct with expansion
4062 disabled, because it will be rewritten as a loop during expansion.
4063 (Try_Container_Indexing): The prefix itself may be a container type
4064 with an indexing aspect, as with a vector of vectors.
4065 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4066 the original doamin of iteration, for name capture.
4067 (Analyze_Iterator_Specification): If the domain is an expression that
4068 needs finalization, create a separate declaration for it.
4069 For an iterator with "of" retrieve default iterator info from aspect of
4070 container type. For "in" iterator, retrieve type of Iterate function.
4071 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4072 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4073 analysis, to prevent spurious errors about late attributes.
4074 * sprint.adb: Handle quantified expression with either loop or iterator
4076 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4079 2011-08-29 Vincent Celier <celier@adacore.com>
4081 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4082 Binder or Linker of the main project file.
4084 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4086 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4089 2011-08-29 Yannick Moy <moy@adacore.com>
4091 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4093 2011-08-29 Yannick Moy <moy@adacore.com>
4095 * exp_ch11.adb: Minor expansion of comment.
4097 2011-08-29 Yannick Moy <moy@adacore.com>
4099 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4101 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4103 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4104 interpretation, set the type before resolving the operands, because
4105 legality checks on an exponention operand need to know the type of the
4108 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4110 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4111 cleanups on a master if the instance is within a generic unit.
4112 Complement to the corresponding fix to inline.adb for K520-030.
4114 2011-08-29 Tristan Gingold <gingold@adacore.com>
4116 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4118 * exp_intr.adb: Minor comment fix.
4120 2011-08-29 Bob Duff <duff@adacore.com>
4122 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4123 Delay_Required was used as an uninitialized variable.
4125 2011-08-29 Robert Dewar <dewar@adacore.com>
4127 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4128 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4129 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4131 2011-08-29 Thomas Quinot <quinot@adacore.com>
4133 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4134 Remove unused variables.
4136 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4138 * sem_res.adb: Remove Build_Explicit_Dereference.
4139 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4140 from sem_res.adb, used in analysis of additional constructs.
4141 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4142 expansion of iterators.
4143 (Is_Object_Reference): Recognize variables rewritten as explicit
4144 dereferences in Ada2012.
4145 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4146 Reversible_Iterator names, for expansion of Ada2012 iterators.
4147 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4148 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4149 linked list container.
4150 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4151 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4153 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4155 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4158 2011-08-29 Vincent Celier <celier@adacore.com>
4160 * make.adb (Gnatmake): Get the maximum number of simultaneous
4161 compilation processes after the Builder switches has been scanned, as
4162 there may include -jnn.
4164 2011-08-29 Matthew Heaney <heaney@adacore.com>
4166 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4168 2011-08-29 Tristan Gingold <gingold@adacore.com>
4170 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4171 GNAT_DRIVER_COMMAND_LINE to 255.
4173 2011-08-29 Pascal Obry <obry@adacore.com>
4175 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4176 reformatting and style fix (class attribute casing).
4178 2011-08-29 Yannick Moy <moy@adacore.com>
4180 * exp_ch11.adb: Yet another case where expansion should be common
4181 between CodePeer and Alfa.
4183 2011-08-29 Yannick Moy <moy@adacore.com>
4185 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4187 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4189 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4190 incomplete type and its completion match.
4192 2011-08-29 Yannick Moy <moy@adacore.com>
4194 * exp_ch13.adb: Adjust previous change.
4196 2011-08-29 Robert Dewar <dewar@adacore.com>
4198 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4199 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4202 2011-08-29 Emmanuel Briot <briot@adacore.com>
4204 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4205 initialize aggregated projects.
4207 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4209 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4210 depth of candidates to resolve a potentially spurious ambiguity between
4211 two visible subprograms.
4213 2011-08-29 Yannick Moy <moy@adacore.com>
4215 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4217 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4218 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4221 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4223 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4226 2011-08-29 Thomas Quinot <quinot@adacore.com>
4228 * sem_res.adb: Minor reformatting.
4230 2011-08-29 Johannes Kanig <kanig@adacore.com>
4232 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4234 * gnat1drv.adb (Adjust_Global_Switches): Set
4235 Use_Expressions_With_Actions to False in ALFA mode.
4236 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4239 2011-08-29 Yannick Moy <moy@adacore.com>
4241 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4242 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4243 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4244 tagged types and dispatching calls in Alfa mode.
4246 2011-08-29 Javier Miranda <miranda@adacore.com>
4248 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4249 we do not report an error on an Empty node.
4251 2011-08-29 Geert Bosch <bosch@adacore.com>
4253 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4254 a-nlrear.o and a-nurear.o.
4256 2011-08-29 Robert Dewar <dewar@adacore.com>
4258 * freeze.adb: Minor code reorganization.
4260 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4261 sem_ch6.adb: Minor reformatting
4263 2011-08-29 Tristan Gingold <gingold@adacore.com>
4265 * s-except.ads, s-except.adb: Provide dummy body.
4267 2011-08-29 Yannick Moy <moy@adacore.com>
4269 * sem_warn.adb (Within_Postcondition): Take into account the case of
4270 an Ensures component in a Test_Case.
4272 2011-08-29 Tristan Gingold <gingold@adacore.com>
4274 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4275 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4276 System_Exceptions_Debug
4277 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4278 * a-except.adb: With and use System.Exceptions_Debug instead of
4280 * a-except-2005.adb: Likewise.
4281 * s-assert.adb: Likewise.
4282 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4283 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4284 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4285 s-excdeb. Update dependencies.
4286 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4287 as these no longer need external libraries.
4289 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4291 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4292 exponentiation operator on universal values in a context that requires
4295 2011-08-29 Tristan Gingold <gingold@adacore.com>
4297 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4298 before calling notify_handled_exception.
4299 * a-exextr.adb: Fix comment.
4301 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4303 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4304 Finalize_Address of the access type's finalization master.
4305 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4306 access type's finalization master. Add a guard to prevent
4307 Associated_Storage_Pool from being set on .NET/JVM.
4308 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4309 attribute Finalize_Address of the access type's finalization master.
4310 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4311 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4312 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4314 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4315 use clause for System.IO
4316 (Detach): Relax the assertion, to be reinstated later.
4317 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4318 Relax the assertion on Finalize_Address, to be reinstated later.
4319 (Is_Empty_List): New routine.
4320 (pm): New debug routine.
4321 (Set_Finalize_Address): New routine.
4322 * s-finmas.ads (pm): New debug routine.
4323 (Set_Finalize_Address): New routine.
4324 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4326 2011-08-29 Tristan Gingold <gingold@adacore.com>
4328 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4329 Remove convention C.
4331 2011-08-29 Tristan Gingold <gingold@adacore.com>
4333 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4334 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4335 (Finalize_TCB): Remove its finalization.
4336 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4337 * s-soflin.adb (NT_Exc_Stack): Remove
4338 (Get_Exc_Stack_Addr_NT): Likewise.
4339 (Get_Exc_Stack_Addr_Soft): Likewise.
4340 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4341 (Get_Exc_Stack_Addr): Likewise.
4342 (Get_Exc_Stack_Addr_Soft): Likewise
4343 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4344 (Exc_Stack_Ptr_T): Likewise.
4345 (Private_Data): Remove Exc_Stack_Ptr component.
4347 2011-08-29 Tristan Gingold <gingold@adacore.com>
4349 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4351 2011-08-29 Tristan Gingold <gingold@adacore.com>
4353 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4355 2011-08-29 Geert Bosch <bosch@adacore.com>
4357 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4358 L2_Norm, Swap_Column): New generic subprograms
4359 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4360 L2_Norm, Swap_Column): Implement new subprograms in order to
4361 eliminate dependency on BLAS and LAPACK libraries in
4362 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4363 version. Forward_Eliminate/Back_Substitute can be used to put a
4364 matrix in row echelon or reduced row echelon form using partial
4366 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4367 Swap_Column): Instantiate from System.Generic_Array_Operations.
4368 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4369 (Sqrt): Local function for simple computation of square root without
4370 adding dependencies on Generic_Elementary_Functions.
4371 (Swap): New subprogram to exchange floating point numbers.
4372 (Inverse): Reimplement using Jordan-Gauss elimination.
4373 (Jacobi): New procedure implementing Jacobi's method for computation
4374 of eigensystems, based on Rutishauser's implementation.
4375 (L2_Norm): Implement directly using the inner product.
4376 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4377 decreasing eigenvalue as required by the Ada RM.
4378 (Swap_Column): New helper procedure for Sort_Eigensystem.
4379 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4380 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4383 2011-08-29 Thomas Quinot <quinot@adacore.com>
4385 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4388 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4390 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4391 than the current node.
4392 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4393 Finalization_Master. The list headers have two fields instead of three.
4394 This should fix alignment issue but subpool allocations are now
4395 unusable. Alphabetize subprograms.
4396 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4397 the size of the header when converting the beginning of the object to
4398 a FM_Node. Set the master's Finalize_Address attribute if not already
4400 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4401 header when converting the beginning of the object to a FM_Node.
4403 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4405 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4406 reraise when compiling for CodePeer.
4408 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4410 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4411 now needed by a-convec.adb. Fix warning.
4413 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4415 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4416 processing of TSS routine Finalize_Address when compiling in
4419 2011-08-29 Thomas Quinot <quinot@adacore.com>
4421 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4422 sem_warn.adb: Minor reformatting.
4424 2011-08-29 Emmanuel Briot <briot@adacore.com>
4426 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4427 languages from aggregated projects.
4429 2011-08-29 Yannick Moy <moy@adacore.com>
4431 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4432 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4433 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4434 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4435 for stubs are traversed too when parameter is set
4436 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4437 (Traverse_Declarations_Or_Statements): Do the special traversing for
4438 stubs when required.
4439 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4440 return subprogram or package body from stub.
4441 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4442 stubs without prior subprogram decl.
4444 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4446 * gnat_ugn.texi: Fix typo.
4448 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4450 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4451 which accounts for size vs alignment issues and calculates the size of
4453 (Deallocate_Any_Controlled): Ditto.
4454 (Nearest_Multiple_Rounded_Up): New routine.
4456 2011-08-29 Tristan Gingold <gingold@adacore.com>
4458 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4459 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4460 (Set_Exception_Msg): Ditto.
4461 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4463 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4464 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4465 (Raise_With_Msg): Remove Cleanup_Flag.
4466 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4467 Clean_Flag and Private_Data components.
4469 2011-08-29 Yannick Moy <moy@adacore.com>
4471 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4473 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4474 of an explicitly declared type, so that the base types of the original
4475 type and this generated type are the same, and a "type" (not a subtype
4477 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4478 small" in Alfa mode, like in CodePeer mode.
4479 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4480 clauses in Alfa mode.
4482 2011-08-29 Javier Miranda <miranda@adacore.com>
4484 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4485 function to the package spec.
4486 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4487 internally generated bodies of null procedures locate the internally
4488 generated spec enforcing mode conformance.
4489 (Is_Interface_Conformant): Ensure that the controlling formal of the
4492 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4494 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4495 reject the pragma if it appears to apply to a formal subprogram.
4497 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4499 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4500 inner expression, to prevent double evaluation.
4502 2011-08-29 Tristan Gingold <gingold@adacore.com>
4504 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4506 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4507 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4508 (Raise_Current_Excep): Adjust call.
4509 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4511 2011-08-29 Thomas Quinot <quinot@adacore.com>
4513 * exp_disp.adb: Minor reformatting.
4515 2011-08-29 Tristan Gingold <gingold@adacore.com>
4517 * a-exexpr.adb (Setup_Exception): Removed.
4518 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4519 * a-except.adb (Exception_Propagation): Removed.
4520 * a-except-2005.adb (Setup_Exception): Removed.
4521 (Reraise): Remove call to Setup_Exception.
4522 (Reraise_Occurrence): Ditto.
4523 (Reraise_Occurrence_Always): Ditto.
4524 (Reraise_Occurrence_No_Defer): Ditto.
4525 (Transfer_Occurrence): Ditto.
4526 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4527 (Set_Exception_Msg): Ditto.
4529 2011-08-29 Robert Dewar <dewar@adacore.com>
4531 * a-convec.adb, exp_disp.adb: Minor reformatting.
4533 2011-08-29 Tristan Gingold <gingold@adacore.com>
4535 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4537 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4539 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4540 Exception_Handlers to No_List instead of Empty_List in the case where
4541 there are no handlers.
4543 2011-08-29 Tristan Gingold <gingold@adacore.com>
4545 * gcc-interface/gigi.h (enum standard_datatypes): Add
4546 ADT_reraise_zcx_decl
4547 (reraise_zcx_decl): New macro.
4548 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4549 (gigi): Set reraise_zcx_decl.
4550 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4551 (gnat_to_gnu): Handle N_Raise_Statement.
4553 2011-08-29 Robert Dewar <dewar@adacore.com>
4555 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4556 a-undesu.adb: Minor reformatting.
4558 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4560 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4561 table, accept an unfrozen untagged component if it is an actual for a
4562 formal incomplete type.
4563 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4564 provide new iterator forms over vectors.
4565 Introduce type Iterator in package body to implement operations of
4566 Reversible_Iterator interface.
4567 * a-iteint.ads: Make package pure so it is usable with new container
4568 packages, that are categorized Remote_Types.
4570 2011-08-29 Robert Dewar <dewar@adacore.com>
4572 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4574 2011-08-29 Bob Duff <duff@adacore.com>
4576 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4577 of <>, because this is the routine that checks for dimensionality
4578 errors (for example, for a two-dimensional array, (others => <>) should
4579 be (others => (others => <>)).
4581 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4583 * impunit.adb: Add new run-time units.
4584 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4585 s-stposu.ads, s-stposu.adb: Code clean up.
4586 Handle protected class-wide or task class-wide types
4587 Handle C/C++/CIL/Java types.
4588 * s-spsufi.adb, s-spsufi.ads: New files.
4590 2011-08-29 Yannick Moy <moy@adacore.com>
4592 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4593 library-level subprogram.
4594 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4596 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4598 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4600 * gnat_rm.texi: Update doc for Test_Case pragma.
4602 2011-08-29 Tristan Gingold <gingold@adacore.com>
4604 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4606 (GCC_Exception_Access): New type.
4607 (Unwind_DeleteException): New imported procedure
4608 (Foreign_Exception): Import it.
4609 (GNAT_GCC_Exception): Simply have the occurrence inside.
4610 (To_GCC_Exception): New function.
4611 (To_GNAT_GCC_Exception): New function.
4612 (GNAT_GCC_Exception_Cleanup): New procedure..
4613 (Propagate_GCC_Exception): New procedure.
4614 (Reraise_GCC_Exception): New procedure.
4615 (Setup_Current_Excep): New procedure.
4616 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4617 (Unwind_RaiseException): Ditto.
4618 (Unwind_ForcedUnwind): Ditto.
4620 (Begin_Handler): Change type of parameter.
4621 (End_Handler): Ditto. Now delete the exception if still present.
4622 (Setup_Key): Removed.
4623 (Is_Setup_And_Not_Propagated): Removed.
4624 (Set_Setup_And_Not_Propagated): Ditto.
4625 (Clear_Setup_And_Not_Propagated): Ditto.
4626 (Save_Occurrence_And_Private): Ditto.
4627 (EID_For): Add 'not null' constraint on parameter.
4628 (Setup_Exception): Does nothing.
4629 (Propagate_Exception): Simplified.
4630 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4631 re-raise is not expanded anymore.
4632 * s-except.ads (Foreign_Exception): New exception - placeholder for
4634 * raise-gcc.c (__gnat_setup_current_excep): Declare
4635 (CXX_EXCEPTION_CLASS): Define (not yet used)
4636 (GNAT_EXCEPTION_CLASS): Define.
4637 (is_handled_by): Handle foreign exceptions.
4638 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4640 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4642 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4644 2011-08-29 Thomas Quinot <quinot@adacore.com>
4646 * a-synbar-posix.adb: Minor reformatting.
4648 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4650 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4651 a-exetim-default.ads (Interrupt_Clocks_Supported,
4652 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4653 definitions to be compliant with AI-0171. The target systems do not
4654 support separate account for the execution time of interrupt handlers.
4656 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4658 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4659 in the barrier to put first the easiest to evaluate (and the one which
4660 will be True more often). More efficient.
4662 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4664 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4666 2011-08-29 Bob Duff <duff@adacore.com>
4668 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4669 attributes that are now aspects, as specified by AI05-0229-1.
4670 * sem_ch13.adb (Analyze_Aspect_Specifications,
4671 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4672 pragmas or attribute references, as appropriate.
4674 2011-08-29 Robert Dewar <dewar@adacore.com>
4676 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4677 a-synbar-posix.ads: Minor reformatting.
4679 2011-08-29 Yannick Moy <moy@adacore.com>
4681 * snames.ads-tmpl: Add name Force.
4683 2011-08-29 Pascal Obry <obry@adacore.com>
4685 * prj-nmsc.adb: Minor reformatting.
4687 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4689 * a-exetim.ads (Interrupt_Clocks_Supported,
4690 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4691 definitions to be compliant with AI-0171.
4693 2011-08-29 Robert Dewar <dewar@adacore.com>
4695 * a-ngelfu.adb: Add comments.
4697 2011-08-29 Geert Bosch <bosch@adacore.com>
4699 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4700 the closest machine number to Pi / 2.0.
4702 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4704 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4705 package Ada.Synchronous_Barriers.
4706 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4707 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4708 default implementation using protected objects and another one
4709 a-synbar-posix using POSIX barriers as the underlying support.
4710 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4711 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4712 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4713 Clean up dependencies.
4714 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4716 2011-08-29 Robert Dewar <dewar@adacore.com>
4718 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4719 exp_dist.adb: Minor code reorganization.
4722 2011-08-29 Thomas Quinot <quinot@adacore.com>
4724 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4725 primitive operation must support external streaming if it is not a
4726 controlling access result.
4728 2011-08-29 Thomas Quinot <quinot@adacore.com>
4730 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4732 2011-08-29 Bob Duff <duff@adacore.com>
4734 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4735 restriction on allocators, as required by AI05-0013-1.
4736 * restrict.ads: Minor comment fix.
4738 2011-08-29 Tristan Gingold <gingold@adacore.com>
4740 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4741 (To_Jmpbuf_Address): Ditto
4742 (builtin_longjmp): Ditto
4744 2011-08-29 Thomas Quinot <quinot@adacore.com>
4746 * sem_res.adb: Minor reformatting.
4748 2011-08-29 Vincent Celier <celier@adacore.com>
4750 * make.adb (Gnatmake): Move special processing for VM targets after the
4751 call to Get_Target_Parameters.
4753 2011-08-29 Thomas Quinot <quinot@adacore.com>
4755 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4757 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4759 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4760 where an anonymous access discriminant of a limited designated type
4761 appears in a non-immutably limited discriminated type and issue an
4762 error message. Add local variable Desig_T and replace all occurrences
4765 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4767 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4768 implementation is compliant to RM D.15(15/2) after the modification
4769 imposed by AI05-0094-1 (binding interpretation).
4771 2011-08-29 Robert Dewar <dewar@adacore.com>
4773 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
4774 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
4776 2011-08-29 Thomas Quinot <quinot@adacore.com>
4778 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
4779 the scope name, do not report a missing label as a style violation (it
4780 will be diagnosed as an illegality).
4781 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
4782 variant records: Get_Enum_Lit_From_Pos already returns a usage
4783 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
4784 on Expr in Integer_Literal case so that it can be used by
4787 2011-08-29 Tristan Gingold <gingold@adacore.com>
4789 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
4791 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
4792 (Build_Abort_Block_Handler): New function to build an Abort_Signal
4794 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
4795 Build_Abort_Block_Handler to build the exception handler. Do not
4796 undefer aborts for the Abort_Signal exception handler if back-end
4797 exception mechanism.
4798 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
4799 back_end exceptions for all others and abort_signal.
4800 * s-except.ads (ZCX_By_Default): New constant.
4801 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
4802 (Raise_Exception_Always): Ditto.
4803 (Raise_From_Signal_Handler): Ditto.
4804 (Raise_With_Location_And_Msg): Ditto.
4805 (Raise_With_Msg): Ditto.
4807 (Reraise_Occurence): Ditto.
4808 (Reraise_Occurrence_Always): Ditto.
4809 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
4810 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
4812 2011-08-29 Thomas Quinot <quinot@adacore.com>
4814 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
4816 2011-08-29 Robert Dewar <dewar@adacore.com>
4818 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
4819 Minor code reorganization.
4821 2011-08-29 Bob Duff <duff@adacore.com>
4823 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
4824 2012, not just Ada 2005.
4826 2011-08-29 Vincent Celier <celier@adacore.com>
4828 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
4829 with a project file or with gprbuid, if -gnatep= is specified, the
4830 builder may need to be invoked with -x.
4832 2011-08-29 Tristan Gingold <gingold@adacore.com>
4834 * a-exexpr-gcc.adb: Minor comment fix.
4836 2011-08-29 Robert Dewar <dewar@adacore.com>
4838 * sem_ch8.adb: Minor reformatting.
4840 2011-08-29 Bob Duff <duff@adacore.com>
4842 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
4843 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
4844 treating "some" as unreserved in earlier Ada versions. This is now
4845 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
4846 rather than Name_Some, since Tok_Some is now recognized as reserved.
4847 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
4849 * scans.ads: Minor comment fixes.
4850 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
4851 for other language versions.
4852 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
4853 treating "some" as unreserved in earlier Ada versions. This is now
4854 handled in Snames.Is_Keyword_Name.
4855 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
4857 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
4858 unreserved in earlier Ada versions. This is now handled in
4859 Snames.Is_Keyword_Name.
4860 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
4861 words as for other language versions.
4862 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
4863 Ada 2012, not just Ada 2005.
4865 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4867 * sem_ch13.adb: Additional semantic checks for aspects involved in
4870 2011-08-29 Matthew Heaney <heaney@adacore.com>
4872 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
4873 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
4874 Container parameter.
4875 (Ancestor_Find): ditto.
4877 2011-08-29 Thomas Quinot <quinot@adacore.com>
4879 * par-endh.adb: Minor reformatting.
4881 2011-08-29 Tristan Gingold <gingold@adacore.com>
4883 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
4884 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
4885 (Adjust_N_CLeanups_For): Remove.
4886 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
4888 (Propgate_Exception): Adjust.
4889 * raise-gcc.c: Add a few static/const.
4890 (Adjust_N_Cleanups_For): Remove declaration.
4891 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
4893 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4895 * sem_ch8.adb: Use type of function return when rewriting as object
4898 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4900 * sem_type.adb: Minor reformatting.
4902 2011-08-29 Robert Dewar <dewar@adacore.com>
4904 * makeutl.adb: Minor reformatting.
4906 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4908 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
4909 function call of a limited type, the expansion of the renaming is
4910 complicated by the presence of various temporaries and subtypes that
4911 capture constraints of the renamed object.
4912 Rewrite node as an object declaration, whose expansion is simpler.
4913 Given that the object is limited there is no copy involved and no
4916 2011-08-29 Robert Dewar <dewar@adacore.com>
4918 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
4919 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
4921 2011-08-29 Tristan Gingold <gingold@adacore.com>
4923 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
4924 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
4925 system-linux-hppa.ads, system-linux-s390.ads,
4926 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
4927 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
4928 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
4929 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
4930 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
4931 system-solaris-sparc.ads, system-lynxos-x86.ads,
4932 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
4933 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
4934 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
4935 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
4936 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
4937 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
4938 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
4939 * opt.ads: Adjust comment.
4940 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
4941 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
4942 * system.ads: Move GCC_ZCX_Support to obsolete entries.
4944 2011-08-29 Emmanuel Briot <briot@adacore.com>
4946 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
4947 file name is specified on the gnatmake or gprbuild command line, and
4948 before we search for that file in the project.
4950 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4952 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
4953 used to determine whether a possible interpretation for an overloadable
4954 entity is declared within the current instantiation and should be
4955 included in the candidate set.
4957 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4959 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
4961 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4963 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
4964 access subtype is access_to_subprogram, when applying checks for
4967 2011-08-29 Matthew Heaney <heaney@adacore.com>
4969 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
4970 for sibling when common parent.
4972 2011-08-29 Thomas Quinot <quinot@adacore.com>
4974 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
4977 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4979 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
4980 for the return type when in ASIS mode.
4982 2011-08-29 Vincent Celier <celier@adacore.com>
4984 * make.adb (Gnatmake): Get the default search dirs, then the target
4985 parameters after getting the Builder switches, as the Builder switches
4986 may include --RTS= and that could change the default search dirs.
4988 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4990 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
4991 Make_Final_Call. Move the processing for class-wide types before the
4992 processing for derivations from [Limited_]Controlled.
4993 (Make_Final_Call): Move the processing for class-wide types before the
4994 processing for derivations from [Limited_]Controlled.
4995 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
4996 Add code to account for alignments larger than the list header. Add a
4997 comment illustrating the structure of the allocated object + padding +
4999 (Deallocate_Any_Controlled): Add code to account for alignments larger
5000 than the list header.
5002 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5004 * sinfo.ads, sinfo.adb: New node kind
5005 N_Formal_Incomplete_Type_Definition, related flags.
5006 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5007 Parse formal incomplete types.
5008 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5010 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5011 Formal incomplete types do not need completion.
5012 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5013 Validate_Incomplete_Type_Instance): New procedures to handle formal
5015 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5016 that corresponds to a formal incomplete type.
5017 * sprint.adb: Handle formal incomplete type declarations.
5018 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5021 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5023 * a-fihema.ads, a-fihema.adb: Unit removed.
5024 * a-undesu.ads, a-undesu.adb: New unit implementing
5025 Ada.Unchecked_Deallocate_Subpool.
5026 * einfo.adb: Remove Associated_Collection from the node usage.
5027 Add Finalization_Master to the node usage.
5028 (Associated_Collection): Removed.
5029 (Finalization_Master): New routine.
5030 (Set_Associated_Collection): Removed.
5031 (Set_Finalization_Master): New routine.
5032 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5033 Finalization_Master to the output.
5034 * einfo.ads: Remove attribute Associated_Collection and its uses in
5036 Add new attribute Finalization_Master along with its uses in entitites.
5037 (Associated_Collection): Removed along with its pragma import.
5038 (Finalization_Master): New routine along with a pragma import.
5039 (Set_Associated_Collection): Removed along with its pragma import.
5040 (Set_Finalization_Master): New routine along with a pragma import.
5041 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5042 Build_Finalization_Collection with Build_Finalization_Master.
5043 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5044 before the bodies of the predefined routines. Add comment explaining
5045 this. Replace call to Build_Finalization_Collection with
5046 Build_Finalization_Master.
5047 (Freeze_Type): Replace call to Build_Finalization_Collection with
5048 Build_Finalization_Master.
5049 (Make_Finalize_Address_Body): Comment reformatting.
5050 (Make_Predefined_Primitive_Specs): Code reformatting.
5051 (Stream_Operation_OK): Update comment mentioning finalization
5052 collections. Replace RE_Finalization_Collection with
5053 RE_Finalization_Master.
5054 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5055 Associated_Collection with Finalization_Master. Replace call to
5056 Build_Finalization_Collection with Build_Finalization_Master.
5057 (Expand_Allocator_Expression): Replace call to Associated_Collection
5058 with Finalization_Master. Replace call to Set_Associated_Collection with
5059 Set_Finalization_Master. Remove the generation of
5060 Set_Finalize_Address_Ptr.
5061 (Expand_N_Allocator): Replace call to Associated_Collection with
5062 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5063 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5064 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5065 comment on usage. Replace call to Needs_BIP_Collection with
5066 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5067 BIP_Finalization_Master. Update all comments which mention finalization
5068 collections. Replace Associated_Collection with
5069 Finalization_Master. Replace Build_Finalization_Collection with
5070 Build_Finalization_Master.
5071 (BIP_Formal_Suffix): Update BIP_Collection's case.
5072 (Build_Heap_Allocator): Update the related comment. Rename local
5073 variable Collect to Fin_Mas_Id and update its occurrences. Update
5074 comments which mention finalization collections. Replace
5075 Set_Associated_Collection with Set_Finalization_Master.
5076 (Expand_Call): Update the code which detects a special piece of library
5078 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5079 Add_Collection_Actual_To_Build_In_Place_Call with
5080 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5081 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5082 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5083 Add_Collection_Actual_To_Build_In_Place_Call with
5084 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5085 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5086 Add_Collection_Actual_To_Build_In_Place_Call with
5087 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5088 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5089 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5090 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5091 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5092 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5093 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5094 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5095 Replace the call to Associated_Collection with Finalization_Master.
5096 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5097 Update the way finalization master names are generated. Update the
5098 retrieval of the correct access type which will carry the pool and
5100 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5101 (Make_Finalize_Address_Body): Abstract types do not need
5102 Finalize_Address. Code reformatting.
5103 (Make_Finalize_Address_Stmts): Update comment on usage.
5104 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5105 (Process_Declarations): Update comments.
5106 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5107 Build_Finalization_Master. Update associated comment.
5108 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5109 * exp_ch13.adb: Update comments which mention finalization collections.
5110 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5111 with Finalization_Master.
5112 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5113 create calls to routines Allocate_Any_Controlled and
5114 Deallocate_Any_Controlled.
5115 (Find_Finalize_Address): New routine.
5116 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5118 (Requires_Cleanup_Actions): Update the comment on freeze node
5120 * exp_util.ads: Remove comment on generated code for
5121 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5122 is better to simply look in the body.
5123 * freeze.adb (Freeze_All): Update the comment of finalization
5124 collections. Replace the call to Associated_Collection with
5125 Finalization_Master. Replace the call to Build_Finalization_Collection
5126 with Build_Finalization_Master.
5127 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5128 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5130 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5131 Ada.Finalization. Add processing for children of System.Storage_Pools.
5132 * rtsfind.ads: Remove the naming of second level children of
5134 Remove Ada_Finalization_Heap_Management from the list of units.
5135 Remove subtype Ada_Finalization_Child.
5136 Remove the following subprogram entities:
5140 RE_Finalization_Collection
5141 RE_Finalization_Collection_Ptr
5142 RE_Set_Finalize_Address_Ptr
5144 Add the naming of second level children of System.Storage_Pools.
5145 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5147 Add subtype System_Storage_Pools_Child.
5148 Add the following subprogram entities to System.Finalization_Masters:
5150 RE_Finalization_Master
5151 RE_Finalization_Master_Ptr
5153 Add the following subprogram entities to System.Storage_Pools.Subpools:
5155 RE_Allocate_Any_Controlled
5156 RE_Deallocate_Any_Controlled
5157 RE_Root_Storage_Pool_With_Subpools
5161 Move the following subprogram entities from
5162 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5164 RE_Add_Offset_To_Address
5169 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5170 Set_Associated_Collection with Set_Finalization_Master.
5171 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5172 BIP_Finalization_Master is created.
5173 * s-finmas.adb: New unit System.Finalization_Masters.
5174 * s-finmas.ads: New unit System.Finalization_Masters.
5175 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5176 * s-stposu.ads, s-stposu.adb: New unit implementing
5177 System.Storage_Pools.Subpools.
5179 2011-08-29 Bob Duff <duff@adacore.com>
5181 * tbuild.adb: Add assertion.
5183 2011-08-29 Thomas Quinot <quinot@adacore.com>
5185 * s-pooglo.adb: Minor reformatting.
5187 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5189 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5190 an indexed component of a packed array whose element type is a record
5191 with a representation clause different from that of the right-hand
5192 side, generate a temporary to minimuze the number of bit-field
5193 operations generated.
5195 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5197 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5198 declarations, and thus are likely insertion points for actions.
5200 2011-08-29 Bob Duff <duff@adacore.com>
5202 * einfo.ads: Minor comment fix.
5204 2011-08-29 Robert Dewar <dewar@adacore.com>
5206 * frontend.adb, gnat1drv.adb: Minor reformatting.
5208 2011-08-29 Tristan Gingold <gingold@adacore.com>
5210 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5211 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5212 space in front of the header.
5214 2011-08-29 Johannes Kanig <kanig@adacore.com>
5216 * frontend.adb (Frontend): Exit after creating Standard package when
5217 -gnatd.H is present.
5218 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5221 2011-08-29 Robert Dewar <dewar@adacore.com>
5223 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5224 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5225 snames.ads-tmpl: Minor reformatting.
5227 2011-08-29 Philippe Gil <gil@adacore.com>
5229 * prj.adb (Reset_Units_In_Table): New procedure.
5230 Reset units to avoid access to freed memory.
5232 2011-08-29 Thomas Quinot <quinot@adacore.com>
5234 * get_scos.adb: When reading a P statement SCO without a pragma name
5235 (from an older ALI file), ensure that the Pragma_Name component is set
5236 to Unknown_Pragma (not left uninitialized).
5238 2011-08-29 Vincent Celier <celier@adacore.com>
5240 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5241 modified to compute correctly the object path of a SAL project that is
5242 extending another library project.
5243 (Write_Path_File): New procedure.
5244 * makeutl.ads (Directories): New table moved from Buildgpr
5245 (Get_Directories): New procedure moved from Buildgpr
5246 (Write_Path_File): New procedure
5247 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5248 paths before binding SALs, instead of Set_Ada_Paths.
5249 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5251 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5252 (Current_Source_Path_File_Of): New function
5253 (Set_Current_Object_Path_File_Of): New procedure
5254 (Current_Source_Object_File_Of): New function
5255 (Set_Current_Object_Path_File_Of): New procedure
5256 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5257 (Current_Source_Path_File_Of): New function
5258 (Set_Current_Object_Path_File_Of): New procedure
5259 (Current_Source_Object_File_Of): New function
5260 (Set_Current_Object_Path_File_Of): New procedure
5262 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5264 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5265 packed entity, use a bit-field assignment only if there is no change of
5268 2011-08-29 Thomas Quinot <quinot@adacore.com>
5270 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5271 Is_RTU instead of using Chars comparisons.
5273 2011-08-29 Thomas Quinot <quinot@adacore.com>
5275 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5276 temporary object if the actual is constrained, and the discriminants
5277 read from the stream don't match.
5279 2011-08-29 Tristan Gingold <gingold@adacore.com>
5281 * sem_attr.adb, exp_attr.adb: Add handling of
5282 Attribute_System_Allocator_Alignment
5283 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5284 Attribute_System_Allocator_Alignment.
5285 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5286 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5287 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5288 get_target_system_allocator_alignment.
5290 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5292 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5295 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5297 * exp_ch3.adb (In_Runtime): Fix typo.
5299 2011-08-29 Bob Duff <duff@adacore.com>
5301 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5303 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5305 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5306 and a separate tag assignment is generated, ensure that the tag
5307 assignment is analyzed.
5309 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5311 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5312 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5313 of statement lists that may contain local declarations.
5314 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5315 duplicate the triggering statements needed for the expansion of this
5316 construct, when the trigger is a dispatching call to a synchronized
5319 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5321 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5322 * bindgen.adb: Add comments.
5323 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5326 2011-08-29 Robert Dewar <dewar@adacore.com>
5328 * exp_attr.adb: Minor reformatting.
5329 Minor code reorganization and commenting.
5330 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5333 2011-08-29 Thomas Quinot <quinot@adacore.com>
5335 * get_scos.adb: Ignore chaining indicators not currently supported
5338 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5340 * system.ads: Minor editing.
5342 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5344 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5346 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5347 Attribute_Elab_Subp_Body.
5348 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5349 * sem_util.adb: Update comments.
5351 2011-08-29 Thomas Quinot <quinot@adacore.com>
5353 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5354 pragma name for each SCO statement corresponding to a pragma.
5356 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5358 * opt.ads: Minor editing.
5360 2011-08-29 Yannick Moy <moy@adacore.com>
5362 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5363 that only made sense for CodePeer mode.
5365 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5367 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5368 which is no longer used.
5369 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5370 handling of the 64-bit division check.
5371 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5373 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5376 2011-08-29 Thomas Quinot <quinot@adacore.com>
5378 * get_scos.adb: Minor reformatting.
5380 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5382 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5383 statement list is wrapped in a block, the block is explicitly analyzed
5384 in order to properly redecorate the entities and create a servicing
5387 2011-08-29 Tristan Gingold <gingold@adacore.com>
5389 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5390 (Set_Zero_Cost_Handling): Remove.
5392 2011-08-29 Thomas Quinot <quinot@adacore.com>
5394 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5396 2011-08-29 Geert Bosch <bosch@adacore.com>
5398 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5399 instruction, as the latter may produce -0.0, which is not a valid VAX
5401 (Neg_G): Likewise for VAX F float.
5403 2011-08-29 Robert Dewar <dewar@adacore.com>
5405 * exp_util.adb: Minor reformatting.
5407 2011-08-29 Yannick Moy <moy@adacore.com>
5409 * sem_ch3.adb: Minor comment update.
5411 2011-08-29 Thomas Quinot <quinot@adacore.com>
5413 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5416 2011-08-29 Thomas Quinot <quinot@adacore.com>
5418 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5419 current statement sequence on a generic instantiation or a subprogram
5422 2011-08-29 Robert Dewar <dewar@adacore.com>
5424 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5427 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5429 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5430 Correct the check which involves the freeze node of a controlled or
5431 access-to-controlled type.
5433 2011-08-29 Geert Bosch <bosch@adacore.com>
5435 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5437 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5440 2011-08-29 Yannick Moy <moy@adacore.com>
5442 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5443 for every index type and component type that is not a subtype_mark.
5444 (Process_Subtype): Set Etype of subtype.
5446 2011-08-29 Robert Dewar <dewar@adacore.com>
5448 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5449 reorganization. Minor reformatting.
5451 2011-08-29 Steve Baird <baird@adacore.com>
5453 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5454 for CodePeer and ALFA modes.
5456 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5458 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5459 that comes from an enclosing scope if it is not the renaming of an
5460 actual, to handle properly a spurious ambiguity in an instance.
5462 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5464 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5465 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5466 use it instead of the Esize of the first parameter.
5467 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5469 <Size>: Likewise. Call it for composite types on the RM size.
5471 2011-08-29 Yannick Moy <moy@adacore.com>
5473 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5474 * sem_util.adb (Unique_Name): Correct behaviour for names of
5477 2011-08-29 Yannick Moy <moy@adacore.com>
5479 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5480 verification mode, analyze pragma expression for correctness, for
5481 pre/post on library-level subprogram, as it is not expanded later.
5483 2011-08-29 Yannick Moy <moy@adacore.com>
5485 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5486 in formal verification.
5488 2011-08-29 Thomas Quinot <quinot@adacore.com>
5490 * sem_util.adb: Minor reformatting.
5491 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5493 * par_sco.ads, par_sco.adb: Update comments.
5495 2011-08-29 Yannick Moy <moy@adacore.com>
5497 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5498 associated getter/setter.
5499 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5501 2011-08-29 Vincent Celier <celier@adacore.com>
5503 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5504 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5505 with declarations for Language_Kind and Dependency_Kind for Ada.
5506 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5507 (Process_Compiler): Take into account the new attributes Dependency_Kind
5509 (Check_Configuration): Check if language kind is unit based, not if the
5510 language name is Ada.
5511 (Process_Exceptions_Unit_Based): Ditto
5512 (Add_Language): Remove default additions of language and dependency kind
5513 * prj.ads: Minor comment change
5514 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5516 2011-08-29 Johannes Kanig <kanig@adacore.com>
5518 * debug.adb: Update comments.
5520 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5522 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5523 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5524 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5525 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5526 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5528 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5530 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5531 (GNATLIBCFLAGS_FOR_C): Replace
5532 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5533 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5534 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5535 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5537 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5539 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5541 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5543 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5545 2011-08-05 Nicolas Roche <roche@adacore.com>
5547 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5548 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5550 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5552 2011-08-05 Matthew Heaney <heaney@adacore.com>
5554 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5555 subprogram bodies declared out-of-order.
5557 2011-08-05 Yannick Moy <moy@adacore.com>
5559 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5560 entities directly in package Standard, otherwise skip the standard
5563 2011-08-05 Robert Dewar <dewar@adacore.com>
5565 * a-cbmutr.adb: Minor reformatting
5566 (Allocate_Node): refactor node allocation algorithm
5568 2011-08-05 Robert Dewar <dewar@adacore.com>
5570 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5571 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5573 (Analyze_Pragma, case Check_Policy): Ditto.
5574 * sem_prag.ads (Check_Disabled): New function
5575 * snames.ads-tmpl: Add Name_Disable.
5577 2011-08-05 Robert Dewar <dewar@adacore.com>
5579 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5580 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5582 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5584 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5585 that appears in a generic formal part and applies to a formal
5588 2011-08-05 Robert Dewar <dewar@adacore.com>
5590 * a-cbmutr.ads: Minor reformatting.
5592 2011-08-05 Matthew Heaney <heaney@adacore.com>
5594 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5595 to check count, check sign of value instead.
5596 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5597 (Copy_Subtree): allocate copy of source element
5598 (Equal_Subtree): compare elements, not access objects
5600 2011-08-05 Vincent Celier <celier@adacore.com>
5602 * gnat_ugn.texi: Fix VMS alternative.
5604 2011-08-05 Thomas Quinot <quinot@adacore.com>
5606 * sem_ch11.adb: Add comment.
5608 2011-08-05 Robert Dewar <dewar@adacore.com>
5610 * exp_util.adb: Minor comment fix.
5612 2011-08-05 Robert Dewar <dewar@adacore.com>
5614 * scng.adb (Error_Unterminated_String): Improve flag position when
5617 2011-08-05 Matthew Heaney <heaney@adacore.com>
5619 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5621 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5622 multiway tree containers.
5624 2011-08-05 Robert Dewar <dewar@adacore.com>
5626 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5627 * stylesw.adb: Implement -gnatyC to control comment spacing
5628 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5630 * usage.adb: Add line for -gnatyC.
5632 2011-08-05 Robert Dewar <dewar@adacore.com>
5634 * gnat_ugn.texi: Document -gnatyC.
5635 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5636 synonym for COMMENTS2).
5638 2011-08-05 Robert Dewar <dewar@adacore.com>
5640 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5641 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5642 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5643 a-comutr.ads, lib-xref.adb: Minor reformatting.
5645 2011-08-05 Robert Dewar <dewar@adacore.com>
5647 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5648 warning if there is an exception handler present.
5650 2011-08-05 Pascal Obry <obry@adacore.com>
5652 * a-iteint.ads: Fix copyright year.
5654 2011-08-05 Thomas Quinot <quinot@adacore.com>
5656 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5657 statement SCO for a USE clause or a representation clause.
5659 2011-08-05 Yannick Moy <moy@adacore.com>
5661 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5662 between body and spec for stub.
5663 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5664 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5665 pragma precondition or postcondition, for which the enclosing
5666 subprogram or package in the AST is not the desired one, return empty.
5668 2011-08-05 Thomas Quinot <quinot@adacore.com>
5670 * g-expect.adb: Minor reformatting.
5672 2011-08-05 Bob Duff <duff@adacore.com>
5674 * a-fihema.adb: Comment out OS_Lib.
5676 2011-08-05 Matthew Heaney <heaney@adacore.com>
5678 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5679 (unbounded multiway tree containers) and a-iteint.ads.
5680 * a-comutr.ads, a-comutr.adb:
5681 This is the new Ada 2012 unit for unbounded multiway tree containers
5682 * a-cimutr.ads, a-cimutr.adb
5683 This is the new Ada 2012 unit for indefinite multiway tree containers
5684 * a-iteint.ads: New file.
5686 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5688 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5690 2011-08-05 Bob Duff <duff@adacore.com>
5692 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5694 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5696 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5698 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5699 general indexing aspects of Ada2012. Called when analyzing indexed
5700 components when other interpretations fail.
5701 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5702 in an expression context where overloading is meaningful. This excludes
5703 the occurrence in an aspect specification (efficiency only).
5704 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5705 related to iterators can be set by an attribute specification, but
5707 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5708 Constant_Indexing and Variable_Indexing.
5709 (Check_Indexing_Functions): New procedure to perform legality checks.
5710 Additional semantic checks at end of declarations.
5712 2011-08-05 Sergey Rybin <rybin@adacore.com>
5714 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5715 order of calling Tree_Write/Tree_Read routines made for aspects.
5717 2011-08-05 Bob Duff <duff@adacore.com>
5719 * a-fihema.adb (Finalize): Fix race condition.
5721 2011-08-05 Yannick Moy <moy@adacore.com>
5723 * sem_ch12.adb (Analyze_Package_Instantiation,
5724 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5727 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5729 * sem_type.adb (Specific_Type): in an instance, the type-specific
5730 operand of an equality check that involves null may have a private
5731 type. Use full view to determine legality of construct.
5733 2011-08-05 Vincent Celier <celier@adacore.com>
5735 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5736 delete or close the file when the call to gnatmake was successful.
5738 2011-08-05 Yannick Moy <moy@adacore.com>
5740 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5741 Global_Discard_Names.
5743 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5745 * sinfo.ads: comments on use of entity field for aspect specifications.
5747 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5749 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5750 node is not itself an entity but a selected component, it is a
5751 rewritten parameterless call to an en enclosing synchronized operation,
5752 and this expansion will be performed again in the instance, so there is
5753 no global information to preserve.
5755 2011-08-05 Javier Miranda <miranda@adacore.com>
5757 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5758 for renamings of predefined primitives.
5759 (In_Predef_Prims_DT): New subprogram.
5761 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5763 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5764 possible interpretation of name is a reference type, add an
5765 interpretation that is the designated type of the reference
5766 discriminant of that type.
5767 * sem_res.adb (resolve): If the interpretation imposed by context is an
5768 implicit dereference, rewrite the node as the deference of the
5769 reference discriminant.
5770 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
5771 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
5772 parent type or base type.
5773 * sem_ch4.adb (Process_Indexed_Component,
5774 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
5775 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
5776 Check for implicit dereference.
5777 (List_Operand_Interps): Indicate when an implicit dereference is
5779 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
5781 2011-08-05 Thomas Quinot <quinot@adacore.com>
5783 * scos.ads: Update documentation of SCO table. Pragma statements can now
5784 be marked as disabled (using 'p' instead of 'P' as the statement kind).
5785 * par_sco.ads, par_sco.adb: Implement the above change.
5786 (Process_Decisions_Defer): Generate a P decision for the first parameter
5787 of a dyadic pragma Debug.
5788 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
5790 * put_scos.adb: Code simplification based on above change.
5792 2011-08-05 Robert Dewar <dewar@adacore.com>
5794 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
5795 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5796 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
5797 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
5799 2011-08-05 Bob Duff <duff@adacore.com>
5801 * a-stunau.ads, g-spipat.adb: Update comments.
5803 2011-08-05 Bob Duff <duff@adacore.com>
5805 * a-fihema.ads: Minor comment fix.
5806 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
5808 (Attach, Detach): Remove some unnecessary code.
5809 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
5811 2011-08-05 Bob Duff <duff@adacore.com>
5813 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
5814 allocation for Objects component. This simplifies the code somewhat. It
5815 is also a little more efficient in the not-so-unusual case where there
5816 are no controlled objects allocated.
5817 Make Finalization_Started flag atomic.
5818 (Finalize): Avoid unnecessary detachment of items from the list.
5819 (pcol): Minor cleanup.
5821 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5823 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
5824 package whose name is the same as that of the generic unit, or its
5827 2011-08-05 Bob Duff <duff@adacore.com>
5829 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
5830 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
5831 Minor comment fixes.
5833 2011-08-05 Arnaud Charlet <charlet@adacore.com>
5835 * make.adb (Linking_Phase): No longer need to set source search path
5836 before calling gnatlink in CodePeer mode.
5837 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
5838 gcc in CodePeer mode, since the binder generated file no longer has a
5840 * switch.ads, switch.adb (Is_Language_Switch): Removed.
5841 * switch-c.adb: Update comment.
5843 2011-08-05 Thomas Quinot <quinot@adacore.com>
5845 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
5847 2011-08-05 Nicolas Roche <roche@adacore.com>
5849 * gnat_ugn.texi: Fix minor syntax error issue.
5851 2011-08-05 Vincent Celier <celier@adacore.com>
5853 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5854 delete or close the file when the call to gnatmake returns a non
5855 successful return code.
5857 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5859 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
5860 check, indicate that the copy of the original node does not come from
5861 source, to prevent an infinite recursion of the expansion.
5863 2011-08-05 Johannes Kanig <kanig@adacore.com>
5865 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
5866 VC generation for subprogram bodies.
5868 2011-08-05 Yannick Moy <moy@adacore.com>
5871 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
5872 the base type with the smallest allowed base type.
5874 2011-08-05 Sergey Rybin <rybin@adacore.com>
5876 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
5879 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5881 * sem_ch12.ads: minor comment updates.
5883 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5885 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
5886 instantiation and a formal package the compiler generates a package
5887 renaming declaration so that the generic name within the declaration
5888 is interpreted as a renaming of the instance. At the end of a formal
5889 package declaration, this renaming must become invisible.
5891 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5893 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
5894 comparison and rely on concrete entities instead.
5896 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5898 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
5899 and discriminants, to indicate that the type has an access discriminant
5900 that supports implicit dereference.
5901 * snames.ads-tmpl: Add names of aspects and attributes related to
5902 Ada2012 iterators: constant_indexing, default_iterator,
5903 iterator_element, implicit_dereference, variable_indexing.
5904 * aspects.ads, aspects.adb: entries for iterator-related aspects.
5905 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
5906 iterator-related aspects.
5907 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
5909 2011-08-05 Sergey Rybin <rybin@adacore.com>
5911 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
5912 metrics in gnatmetric to cover new kinds of coupling mentrics.
5914 2011-08-05 Steve Baird <baird@adacore.com>
5916 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
5917 of calling the user-defined main subprogram.
5918 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
5919 is set) Call_Main_Subprogram ahead of, as opposed to
5921 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
5922 generation of a "with" of the user-defined main subprogram.
5923 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
5924 (which is now called from Gen_Main instead).
5926 2011-08-05 Emmanuel Briot <briot@adacore.com>
5928 * projects.texi: Added reference to the Makefile package.
5930 2011-08-05 Thomas Quinot <quinot@adacore.com>
5932 * exp_ch7.adb: Minor comment rewording.
5934 2011-08-05 Ed Falis <falis@adacore.com>
5936 * env.c: Fix comment.
5938 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5940 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
5941 character comparison and rely on concrete entities instead.
5943 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5945 * sem_ch3.adb: (Check_Private_Overriding): better error message,
5946 suggested by AI95-0068.
5948 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5950 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
5951 the two potential initialization calls. This accounts for any
5952 access-before-elaboration checks which may precede the initialization
5954 (Next_Suitable_Statement): New routine. Returns the next real statement
5955 after the input node while skipping generated checks.
5956 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
5957 with comment on usage.
5958 Do not generate Elaborate_All when the trigger is a finalization call
5959 coming from a type init proc.
5960 (Check_Elab_Call): Propagate the initialization procedure context to
5961 subsequent calls to Check_A_Call.
5962 (Check_Internal_Call_Continue): Propagate the initialization procedure
5963 context to subsequent calls to Check_Elab_Call.
5964 (Is_Finalization_Procedure): New routine. Returns True if the input
5965 entity denotes a [Deep_]Finalize routine.
5966 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
5967 along with comment on usage.
5969 2011-08-05 Vadim Godunko <godunko@adacore.com>
5971 * s-atocou.ads: Add list of supported platforms.
5973 2011-08-05 Yannick Moy <moy@adacore.com>
5975 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
5977 * opt.ads (Disable_ALI_File): new Boolean flag
5978 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
5980 2011-08-05 Ed Falis <falis@adacore.com>
5982 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
5983 environ is properly defined.
5985 2011-08-05 Vincent Celier <celier@adacore.com>
5987 * make.adb (Compilation_Phase): Exit immediately when all objects have
5988 been found up to date, to avoid multiple exit messages.
5989 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
5990 same project for languages with no compiler.
5991 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
5993 2011-08-05 Robert Dewar <dewar@adacore.com>
5995 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
5996 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
5997 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
5998 s-atocou-builtin.adb: Minor reformatting.
6000 2011-08-05 Yannick Moy <moy@adacore.com>
6002 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6003 if the node to wrap is a pragma check, this node and enclosed
6004 expression are not expanded, so do not apply any transformations here.
6005 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6006 introducing transient scopes.
6008 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6010 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6011 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6012 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6013 routine is available, so we use the default implementation of these
6015 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6016 support for copying attributes on VxWorks 6.
6018 2011-08-05 Yannick Moy <moy@adacore.com>
6020 * debug.adb: Remove use of -gnatd.D.
6021 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6022 * opt.ads: Simplify variables for ALFA mode, to keep one only
6023 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6026 2011-08-05 Vincent Celier <celier@adacore.com>
6028 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6029 Builder'Default_Switches.
6031 2011-08-05 Vincent Celier <celier@adacore.com>
6033 * makeusg.adb: Add lines for --create-map-file switches.
6035 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6037 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6038 profile is incomplete and the full view is available, replace it with
6040 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6041 incomplete, freezing the subprogram is delayed until the full view is
6043 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6044 fixed-point multiplication operator and the predefined operator is
6045 resolved in favor of the user-defined one.
6047 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6049 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6052 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6054 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6055 whether a type lacks user-defined Read or Write operations, or has a
6056 component that lacks them.
6057 * sem_attr.adb (Check_Stream_Attribute): if restriction
6058 No_Default_Stream_Attributes is active, verify that all subcomponent
6059 types of the target have user-defined stream operations, and report
6061 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6062 * exp_strm.adb: Build_Elementary_Input_Call,
6063 Build_Elementary_Write_Call): remove checks for restriction
6064 No_Default_Stream_Attributes, now checked in semantics.
6066 2011-08-04 Vincent Celier <celier@adacore.com>
6068 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6069 switches on the command line, look for all valid --RTS switches in the
6070 Builder switches and for each language use the first runtime name found
6071 to invoke gprconfig.
6072 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6073 command line and there is no auto-configuration.
6074 (Runtime_Name_Set_For): New function.
6076 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6078 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6079 elaborate initialization expression for variable Abort when processing
6080 a package body or a declaration.
6081 (Create_Finalizer): Propagate the package context when creating the
6082 exception-related variables.
6083 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6084 For_Package along with usage comment.
6086 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6088 * gcc-interface/Makefile.in: Clean up targets.
6089 Enable new package for atomic counters and copy-on-write implementation
6090 of unbounded strings on x86 platforms.
6091 * gcc-interface/Make-lang.in: Update dependencies.
6093 2011-08-04 Robert Dewar <dewar@adacore.com>
6095 * exp_ch7.adb: Minor reformatting.
6097 2011-08-04 Robert Dewar <dewar@adacore.com>
6099 * exp_strm.adb: Minor reformatting.
6101 2011-08-04 Vadim Godunko <godunko@adacore.com>
6103 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6104 operations are not supported.
6105 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6106 * s-atocou-x86.adb: New file.
6107 * Makefile.rtl: Add s-atocou.o file
6109 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6111 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6112 (Compilation_Phase): ... here.
6113 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6115 2011-08-04 Thomas Quinot <quinot@adacore.com>
6117 * Make-generated.in: Fix minor typo in comment.
6119 2011-08-04 Thomas Quinot <quinot@adacore.com>
6121 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6124 2011-08-04 Robert Dewar <dewar@adacore.com>
6126 * a-coinho.adb: Minor reformatting.
6128 2011-08-04 Robert Dewar <dewar@adacore.com>
6130 * a-coinho.ads: Minor reformatting.
6132 2011-08-04 Vadim Godunko <godunko@adacore.com>
6134 * s-atocou.ads, s-atocou.adb: New files.
6135 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6136 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6137 direct use of GCC's atomic builtins and replace them by use of new
6138 atomic counter package.
6140 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6142 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6144 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6146 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6147 with a call to Get_External_Tag.
6148 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6149 subprogram usage. Remove the guard against package declarations and
6150 bodies since Build_Cleanup_Statements is no longer invoked in that
6152 (Build_Components): Initialize Tagged_Type_Stmts when the context
6153 contains at least one library-level tagged type.
6154 (Build_Finalizer): New local variables Has_Tagged_Types and
6155 Tagged_Type_Stmts along with associated comments on usage. Update the
6156 logic to include tagged type processing.
6157 (Create_Finalizer): Insert all library-level tagged type unregistration
6158 code before the jump block circuitry.
6159 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6160 (Expand_N_Package_Declaration): Remove the call to
6161 Build_Cleanup_Statements.
6162 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6163 unregister the external tag of a tagged type.
6164 (Processing_Actions): Reimplemented to handle tagged types.
6165 (Process_Declarations): Detect the declaration of a library-level
6166 tagged type and carry out the appropriate actions.
6167 (Unregister_Tagged_Types): Removed. The machinery has been directly
6168 merged with Build_Finalizer.
6170 2011-08-04 Robert Dewar <dewar@adacore.com>
6172 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6173 gnatls.adb, exp_ch3.adb: Minor reformatting.
6175 2011-08-04 Marc Sango <sango@adacore.com>
6177 * sem_attr.adb (Analyze_Attribute): Replace the message
6178 "invisible attribute of}" of the spark restriction violation in
6179 attribute reference by the simple message "invisible attribute of type".
6180 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6181 two insertion characters: '&' and '}'.
6183 2011-08-04 Vadim Godunko <godunko@adacore.com>
6185 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6186 * a-coinho.ads, a-coinho.adb: New file.
6187 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6189 2011-08-04 Nicolas Roche <roche@adacore.com>
6191 * alfa_test.adb: Not all ali files are containing alfa information even
6192 if compiled with -gnatd.F. So suppress warning about missing ALFA
6195 2011-08-04 Yannick Moy <moy@adacore.com>
6197 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6199 * put_alfa.adb: Check that scope name is not empty.
6201 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6203 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6204 Needs_Elementary_Stream_Operation, to determine whether user-defined
6205 Read and Write attributes are available for the elementary components
6206 of the given type. If only the predefined attributes are available,
6207 then when restriction No_Default_Stream_Attributes is active the
6208 predefined stream attributes for the composite type cannot be created.
6210 2011-08-04 Robert Dewar <dewar@adacore.com>
6212 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6213 Put routines in alpha order
6215 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6217 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6218 * gcc-interface/Make-lang.in: Update dependencies.
6220 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6222 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6223 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6226 2011-08-04 Robert Dewar <dewar@adacore.com>
6228 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6229 lib-xref-alfa.adb: Minor reformatting.
6231 2011-08-04 Marc Sango <sango@adacore.com>
6233 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6234 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6235 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6238 2011-08-04 Tristan Gingold <gingold@adacore.com>
6240 * bindgen.adb (Gen_Adainit_C): Remove.
6241 (Gen_Adafinal_C): Ditto.
6242 (Gen_Elab_Externals_C): Ditto.
6243 (Gen_Elab_Calls_C): Ditto.
6244 (Gen_Elab_Order_C): Ditto.
6245 (Gen_Elab_Defs_C): Ditto.
6246 (Gen_Finalize_Library_C): Ditto.
6247 (Gen_Finalize_Library_Defs_C): Ditto.
6248 (Gen_Main_C): Ditto.
6249 (Gen_Output_File_C): Ditto.
6250 (Gen_Restrictions_C): Ditto.
6251 (Gen_Versions_C): Ditto.
6252 (Write_Info_Ada_C): Ditto.
6253 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6254 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6255 Always call Gen_Output_File_Ada.
6256 * gnatlink.adb (Begin_Info): Now a constant.
6258 (Ada_Bind_File): Remove
6259 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6260 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6261 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6262 * opt.ads (Ada_Bind_File): Remove.
6264 2011-08-04 Thomas Quinot <quinot@adacore.com>
6266 * projects.texi: Document target-specific directory in default project
6269 2011-08-04 Thomas Quinot <quinot@adacore.com>
6271 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6274 2011-08-04 Yannick Moy <moy@adacore.com>
6276 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6277 opt.ads, lib-xref.ads: Code clean up.
6279 2011-08-04 Yannick Moy <moy@adacore.com>
6281 * gnat_rm.texi: Update description of Test_Case
6282 * gnat_ugn.texi: Typo.
6284 2011-08-04 Ed Falis <falis@adacore.com>
6286 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6288 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6290 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6291 it is of type Root_Controlled. This action eliminates fields Prev and
6292 Next from type equality.
6294 2011-08-04 Yannick Moy <moy@adacore.com>
6296 * lib-xref-alfa.adb: Correct typo.
6298 2011-08-04 Matthew Heaney <heaney@adacore.com>
6300 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6303 2011-08-04 Yannick Moy <moy@adacore.com>
6305 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6306 (Analyze_Pragma): allow static string expression for name of Test_Case,
6307 instead of simply string literals.
6308 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6311 2011-08-04 Vincent Celier <celier@adacore.com>
6313 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6314 case suffixes to find truncated main sources.
6316 2011-08-04 Tristan Gingold <gingold@adacore.com>
6318 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6319 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6320 (Compute_Current_Task): Ditto.
6322 2011-08-04 Tristan Gingold <gingold@adacore.com>
6324 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6326 2011-08-04 Yannick Moy <moy@adacore.com>
6328 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6329 library-level constant.
6330 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6331 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6332 used as selector of parameter association, in ALFA mode.
6334 2011-08-04 Robert Dewar <dewar@adacore.com>
6336 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6337 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6340 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6342 * make.adb (Linking_Phase): Set source search path before calling
6343 gnatlink in CodePeer mode.
6345 2011-08-04 Javier Miranda <miranda@adacore.com>
6347 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6348 Remove code which takes care of building TSDs.
6349 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6350 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6351 the accessibility check in VM targets.
6352 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6353 (Building_Static_DT): Now returns false for VM targets.
6354 (Build_VM_TSDs): Removed.
6355 (Expand_Interface_Conversion): Generate missing runtime check for
6356 conversions to interface types whose target type is unknown at compile
6358 (Make_VM_TSD): Add missing code to disable the generation of calls to
6359 Check_TSD if the tagged type is not defined at library level, or not
6360 has a representation clause specifying its external tag, or -gnatdQ is
6362 * exp_disp.ads (Build_VM_TSDs): Removed.
6363 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6364 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6365 register primitives in the dispatch tables in VM targets.
6366 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6367 initialization of class-wide interface objects in VM targets.
6368 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6371 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6373 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6374 when dotnet-ld cannot be found.
6376 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6378 * bindgen.adb: Simplify significantly generation of binder body file in
6380 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6381 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6384 2011-08-04 Yannick Moy <moy@adacore.com>
6386 * sem_prag.adb, sem.ads: Code cleanup.
6388 2011-08-04 Tristan Gingold <gingold@adacore.com>
6390 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6391 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6392 results if possible.
6393 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6394 * gnat_ugn.texi: Update dynamic stack usage section.
6396 2011-08-04 Steve Baird <baird@adacore.com>
6398 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6399 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6400 contains only a call to the user-defined main subprogram.
6401 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6402 call the "wrapper" subprogram instead of directly
6403 calling the user-defined main subprogram.
6405 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6407 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6408 alternatives of a case statement for controlled objects. Rename local
6409 variable A to Dead_Alt.
6410 (Expand_N_If_Statement): Check the then and else statements of an if
6411 statement for controlled objects. Check the then statements of all
6412 elsif parts of an if statement for controlled objects.
6413 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6415 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6416 detects a loop associated with the expansion of an array object.
6417 Augment the processing of the loop statements to account for a possible
6418 wrap done by Process_Statements_For_Controlled_Objects.
6419 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6420 statements and abortable part of an asynchronous select for controlled
6422 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6423 conditional entry call for controlled objects.
6424 (Expand_N_Selective_Accept): Check the alternatives of a selective
6425 accept for controlled objects.
6426 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6427 alternatives of a timed entry call for controlled objects.
6428 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6429 exception handler for controlled objects.
6430 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6431 Add formal parameter Nested_Constructs along with its associated
6433 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6434 Requires_Cleanup_Actions.
6435 (Process_Statements_For_Controlled_Objects): New routine.
6436 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6437 routine. Inspect a node which contains a non-handled sequence of
6438 statements for controlled objects. If such an object is found, the
6439 statements are wrapped in a block.
6441 2011-08-04 Bob Duff <duff@adacore.com>
6443 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6444 need to compare with Class_Wide_Type (T2), in order to get at the
6445 original class-wide type node.
6446 * sem_type.ads (Covers): Improve the comment.
6447 * einfo.ads (Class_Wide_Type): Improve the comment.
6448 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6449 the type of the Deref.
6451 2011-08-04 Yannick Moy <moy@adacore.com>
6453 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6454 separate declarations.
6455 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6456 check identifier of pragma argument.
6457 (Chain_TC): check that no other test case associated to the same entity
6458 share the same name.
6459 (Check_Test_Case): disallow test case inside subprogram body
6460 (Analyze_Pragma): correct call to check identifier and not argument
6461 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6462 function gets name from test case pragma.
6464 2011-08-04 Yannick Moy <moy@adacore.com>
6466 * gnat_rm.texi: Document new pragma and aspect.
6467 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6468 (No_Duplicates_Allowed): new constant array defining whether duplicates
6469 aspects of each kind can appear on the same declaration.
6470 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6471 field, which points to a node holding the previous Spec_PPC_List.
6472 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6473 through the indirection with Contract.
6474 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6475 * par-prag.adb (Prag): do nothing on Test_Case pragma
6476 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6478 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6479 component Ensures of Test_Case.
6480 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6481 (Analyze_Generic_Subprogram_Declaration,
6482 Analyze_Subprogram_Instantiation,
6483 Analyze_Abstract_Subprogram_Declaration,
6484 Analyze_Subprogram_Body_Helper,
6485 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6486 insert contract in subprogram node at point of definition
6488 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6489 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6490 corresponding pragma
6491 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6492 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6493 similar to the analysis of pre/post
6494 (Derive_Subprogram): insert contract in subprogram node at point of
6496 * sem_prag.adb, sem_prag.ads
6497 (Check_Arg_Is_String_Literal, Check_Identifier):
6498 new checking procedures to be called in treatment of pragmas
6499 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6500 pragma is well-formed. This does not check currently that 'Result is
6501 used only in the Ensures component of a Test_Case.
6502 (Analyze_Pragma): add case for Test_Case
6503 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6504 components of a Test_Case.
6505 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6506 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6507 pragma, treated as spec expressions.
6508 (Sig_Flags): add value -1 for Test_Case.
6509 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6510 Get_Requires_From_Test_Case_Pragma): getters for both expression
6511 components of a Test_Case.
6512 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6513 indirection between an entry or [generic] subprogram entity and its
6514 pre/post + test-cases.
6515 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6516 get/set for fields of an N_Contract node.
6517 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6518 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6519 names and pragma for Test_Case.
6520 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6522 2011-08-04 Vincent Celier <celier@adacore.com>
6524 * gnat_ugn.texi: Improve documentation of gnatmake switch
6525 --source-info-file=.
6527 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6529 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6530 type). Initialize Atyp to the appropriate type which is later checked
6531 for completion. Rewrite the assertion associated with private type
6534 2011-08-04 Ed Falis <falis@adacore.com>
6536 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6537 initialize the number of CPUs.
6539 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6541 * sem_type.adb (Disambiguate): New subsidiary routine
6542 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6543 equality on an anonymous access type whose designated type is private
6544 does not lead to an ambiguity with the universal access equality
6545 operator in the body or child units of the defining package. The same
6546 is true for a multiplication operator on a private type completed with
6549 2011-08-04 Javier Miranda <miranda@adacore.com>
6551 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6552 (Normalize_Scalars_Config): Removed.
6554 (Register_Opt_Config_Switches): Remove registering config values of
6555 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6556 (Restore_Opt_Config_Switches): Remove code which restores the values of
6557 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6558 Init_Or_Norm_Scalars.
6559 (Save_Opt_Config_Switches): Remove code which saves values of
6560 Init_Or_Norm_Scalars and Normalize_Scalars.
6561 (Set_Opt_Config_Switches): Remove code which restores config values of
6562 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6563 Init_Or_Norm_Scalars.
6565 2011-08-04 Yannick Moy <moy@adacore.com>
6567 * frontend.adb (Frontend): remove previous patch to avoid full
6568 qualification in ALFA mode.
6569 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6570 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6571 unique name for an entity, which could be used to identify the entity
6572 across compilation units.
6574 2011-08-04 Thomas Quinot <quinot@adacore.com>
6577 (Initialize_Default_Project_Path): Add target specific directory
6578 ($prefix/$target/lib/gnat) in front of project path in all cases
6579 (making gnatmake's behaviour consistent with gprbuild).
6580 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6581 Pass target name from Sdefault to project subsystem.
6582 * gnatls.adb: Show new target specific default project directory.
6584 2011-08-04 Johannes Kanig <kanig@adacore.com>
6586 * cstand.adb: Add Information to Identifier in Standard
6587 (Identifer_For): Set Entity to the corresponding entity
6589 2011-08-04 Sergey Rybin <rybin@adacore.com>
6591 * gnat_ugn.texi: Update doc on gnatcheck.
6593 2011-08-04 Yannick Moy <moy@adacore.com>
6595 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6598 2011-08-04 Yannick Moy <moy@adacore.com>
6600 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6601 performing expansion.
6602 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6603 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6604 it is not called in ALFA mode.
6606 2011-08-04 Emmanuel Briot <briot@adacore.com>
6608 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6609 after all, so removed.
6611 2011-08-04 Sergey Rybin <rybin@adacore.com>
6613 * vms_data.ads: Add missing VMS qualifiers.
6615 2011-08-04 Emmanuel Briot <briot@adacore.com>
6617 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6618 the list of files on the command line after processing it through
6621 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6623 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6624 processing for .NET/JVM. These targets can now benefit from
6625 Raise_From_Controlled_Operation and they share the same processing with
6627 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6628 These targets need transient scopes in order to properly finalize short
6629 lived controlled objects.
6630 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6631 NET/JVM. These targets can now benefit from
6632 Raise_From_Controlled_Operation and they share the same processing with
6635 2011-08-04 Geert Bosch <bosch@adacore.com>
6637 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6639 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6641 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6642 Expand_Record_Aggregate, to determine whether aggregate must be
6643 expanded into assignments. This is the case if the ancestor part is
6644 private, regarless of the setting of the flag Has_Private_Ancestor.
6646 2011-08-04 Ed Falis <falis@adacore.com>
6648 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6650 2011-08-04 Bob Duff <duff@adacore.com>
6652 * sinfo.ads: Fix comment.
6654 2011-08-04 Steve Baird <baird@adacore.com>
6656 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6657 choose a package name in much the same way as is
6658 done for JGNAT when VM_Target /= No_VM, except that
6659 a slightly more distinctive prefix string is used.
6661 2011-08-04 Emmanuel Briot <briot@adacore.com>
6663 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6664 gnatmake command line.
6665 This behavior was never documented (and was supported only because of
6666 an early bug in the code). This case might lead to ambiguous cases
6667 (between unit names and truncated base names without suffixes).
6669 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6671 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6672 Remove the external tag of a tagged type from the internal hash table.
6673 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6674 expanded usage of the routine. Strenghten the check for Is_Master. Add
6675 processing for tagged types.
6676 (Build_Finalizer): Create all the necessary lists used in finalizer
6677 creation when the processed context is a package that may contain
6679 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6680 Requires_Cleanup_Actions.
6681 (Expand_N_Package_Body): Package bodies may need clean up code
6682 depending on whether they contain tagged types.
6683 (Expand_N_Package_Declaration): Package declarations may need clean up
6684 code depending on whether they contain tagged types.
6685 (Unregister_Tagged_Types): New routine. Search through a list of
6686 declarations or statements, looking for non-abstract Ada tagged types.
6687 For each such type, generate code to unregister the external tag.
6688 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6689 Requires_Cleanup_Actions.
6690 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6691 through a list of declarations or statements looking for non-abstract
6692 Ada tagged types or controlled objects.
6693 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6694 Requires_Cleanup_Actions.
6695 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6696 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6699 2011-08-04 Vincent Celier <celier@adacore.com>
6701 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6702 has Ada sources, not project Project, because if the root project
6703 Project has no sources of its own, all projects will be deemed without
6706 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6708 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6709 of the No_Param_Proc acc-to-subp type used for initialization of
6710 __gnat_finalize_library_objects so that it's declared at library level
6711 rather than nested inside of the adainit routine.
6713 2011-08-04 Javier Miranda <miranda@adacore.com>
6715 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6716 if the tagged type has a representation clause which specifies its
6719 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6721 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6722 Remove previous procedure with that name.
6723 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6725 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6726 subtype mark, the ancestor cannot have unknown discriminants.
6727 (Resolve_Record_Aggregate): if the type has invisible components
6728 because of a private ancestor, the aggregate is illegal.
6730 2011-08-04 Vincent Celier <celier@adacore.com>
6732 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6733 account switches -gnat2005, -gnat12 and -gnat2012.
6735 2011-08-04 Bob Duff <duff@adacore.com>
6737 * s-tasdeb.ads: Minor comment fix.
6739 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6741 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6743 * switch.ads, switch.adb (Is_Language_Switch): New function.
6745 2011-08-04 Vincent Celier <celier@adacore.com>
6747 * switch-c.adb: Minor comment addition.
6749 2011-08-04 Vincent Celier <celier@adacore.com>
6751 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6752 ending with '=' is followed by a space (missing file name).
6754 2011-08-04 Pascal Obry <obry@adacore.com>
6756 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6758 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6760 * sem_ch12.adb (Analyze_Associations): New routine
6761 Check_Overloaded_Formal_Subprogram to reject a formal package when
6762 there is a named association or a box initialisation for an overloaded
6763 formal subprogram of the corresponding generic.
6765 2011-08-04 Yannick Moy <moy@adacore.com>
6767 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6768 * get_alfa.adb, put_alfa.adb: Read and write new component of
6770 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
6772 2011-08-04 Pascal Obry <obry@adacore.com>
6774 * urealp.adb: Minor reformatting.
6776 2011-08-04 Tristan Gingold <gingold@adacore.com>
6778 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
6779 Handle the case when Cleanup_Protected_Object returns Empty.
6781 2011-08-04 Yannick Moy <moy@adacore.com>
6783 * frontend.adb (Frontend): only qualify names in non-ALFA mode
6785 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6787 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
6788 call, ignore functions.
6790 2011-08-04 Geert Bosch <bosch@adacore.com>
6792 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
6795 2011-08-04 Emmanuel Briot <briot@adacore.com>
6797 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
6798 as an index for Builder'Switches. This conforms to the documentation.
6799 * make.adb (Insert_Project_Sources): avoid duplicate code
6801 2011-08-04 Emmanuel Briot <briot@adacore.com>
6803 * makeutl.adb (Complete_Mains): if the user has passed a relative file
6804 name on the command line (for instance "../dummy"), never assume it can
6807 2011-08-04 Tristan Gingold <gingold@adacore.com>
6809 * bindgen.adb: Remove code the reference or create the
6810 Break_Start/__gnat_break_start procedure.
6811 * s-stalib.adb (Break_Start): Removed.
6813 2011-08-04 Emmanuel Briot <briot@adacore.com>
6815 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
6816 shared with gprbuild.
6818 2011-08-04 Yannick Moy <moy@adacore.com>
6820 * par-ch4.adb (P_Primary): preferentially issue an error message about
6821 a missing parenthesis arount a conditional or case expression in Ada
6822 2012 mode, if we detect that the alignment is not correct for a
6825 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6827 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
6828 tag-to-class-wide conversion as needing finalization actions.
6829 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
6830 a tag-to-class-wide conversion as needing finalization actions.
6831 (Is_Finalizable_Transient): The result of a tag-to-class-wide
6832 conversion does not need finalization actions.
6833 (Is_Tag_To_CW_Conversion): New routine.
6834 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
6835 whether an object is the result of a tag-to-class-wide conversion.
6837 2011-08-04 Yannick Moy <moy@adacore.com>
6839 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
6840 the left-hand-side and right-hand-side of a conjunct are inserted when
6841 translating a pre- or postcondition
6842 * sem_ch6.adb: Correct typo in comment
6844 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6846 * gnat_rm.texi: Ravenscar does not prohibit dependence on
6847 Unchecked_Conversion and Unchecked_Deallocation.
6849 2011-08-04 Thomas Quinot <quinot@adacore.com>
6851 * make.adb: Minor reformatting.
6853 2011-08-04 Emmanuel Briot <briot@adacore.com>
6855 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
6856 sources in the project and its imported projects, but not in the whole
6859 2011-08-04 Emmanuel Briot <briot@adacore.com>
6861 * make.adb: Remove debug trace.
6863 2011-08-04 Vincent Celier <celier@adacore.com>
6865 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
6866 path in canonical form, to be able to compare path names on platforms
6867 such as Windows or Darwin.
6869 2011-08-04 Thomas Quinot <quinot@adacore.com>
6871 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
6872 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
6873 * scos.ads: Update documentation accordingly.
6874 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
6877 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6879 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
6880 attribute only if prefix type is scalar.
6882 2011-08-04 Emmanuel Briot <briot@adacore.com>
6884 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
6885 in gnatmake for specifying mains on the command line that do not belong
6886 to the main project. These mains must currently all belong to the same
6888 (Ultimate_Extension_Of): removed, since duplicated
6889 Ultimate_Extending_Project.
6891 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6893 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
6895 (CodePeer_Mode_String): New.
6896 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
6898 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
6899 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
6900 mode, since no useful elaboration subprogram is needed by CodePeer.
6901 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
6902 In this mode, compile binder file with -gnatC and do stop after this
6905 2011-08-04 Vincent Celier <celier@adacore.com>
6907 * exp_ch7.adb: Minor comment fix.
6909 2011-08-04 Robert Dewar <dewar@adacore.com>
6911 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
6912 exp_ch4.adb, makeutl.adb: Minor reformatting.
6914 2011-08-04 Emmanuel Briot <briot@adacore.com>
6916 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
6917 Create several new subprograms to move code out of Make. This makes the
6918 code more readable, removes code duplication, and is a preparation work
6919 for adding support for aggregate projects.
6921 2011-08-04 Tristan Gingold <gingold@adacore.com>
6923 * s-po32gl.ads, s-po32gl.adb: New files.
6924 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
6925 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
6926 (Build_Finalization_Collection): Use it.
6927 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
6928 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
6930 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
6931 * gcc-interface/Make-lang.in: Update dependencies.
6933 2011-08-04 Emmanuel Briot <briot@adacore.com>
6935 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
6938 2011-08-04 Emmanuel Briot <briot@adacore.com>
6940 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
6941 command line is not a file name, also check whether it could be a unit
6944 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6946 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
6947 the header of the finalization routine.
6948 If the unit has no finalizer but is a body whose spec has one, then
6949 generate the decrement of the elaboration entity only.
6950 If the unit has a finalizer and is a spec, then do not generate the
6951 decrement of the elaboration entity.
6952 (Gen_Finalize_Library_C): Likewise.
6954 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6956 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
6957 (Bounds_Size_Expression): Removed.
6958 (Double_Alignment_Of): New subsidiary routine.
6959 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
6960 for a hole in the dope vector of unconstrained arrays due to different
6961 index and element alignments.
6963 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6965 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
6966 raise program_error because body has not been seen yet.
6968 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6970 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
6973 2011-08-04 Vincent Celier <celier@adacore.com>
6975 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
6977 2011-08-04 Yannick Moy <moy@adacore.com>
6979 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
6980 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
6982 2011-08-04 Thomas Quinot <quinot@adacore.com>
6984 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
6985 instantiation in RCI.
6987 2011-08-04 Emmanuel Briot <briot@adacore.com>
6989 * make.adb: Share more code with gprbuild
6991 2011-08-04 Emmanuel Briot <briot@adacore.com>
6993 * projects.texi: Added documentation for the IDE'Gnat project file
6996 2011-08-04 Nicolas Roche <roche@adacore.com>
6998 * gnat_rm.texi: Minor editing.
7000 2011-08-04 Javier Miranda <miranda@adacore.com>
7002 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7003 and the library case for VM targets.
7004 (Gen_Adainit_Ada): Likewise.
7006 2011-08-04 Robert Dewar <dewar@adacore.com>
7008 * g-altive.ads: Minor comment updates.
7009 * prj-nmsc.adb: Minor reformatting.
7011 2011-08-04 Javier Miranda <miranda@adacore.com>
7014 (Normalize_Scalars_Config): Value of the configuration switch set by
7015 pragma Normalize_Scalars when it appears in the gnat.adc file.
7016 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7017 to save and restore settings of this pragma.
7019 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7020 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7022 2011-08-04 Vincent Celier <celier@adacore.com>
7024 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7026 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7028 * makeutl.adb: Minor reformatting.
7030 2011-08-04 Olivier Hainque <hainque@adacore.com>
7032 * g-altive.ads: Update comments to reflect that only the soft
7033 binding is available today.
7035 2011-08-04 Robert Dewar <dewar@adacore.com>
7037 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7038 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7039 * gcc-interface/Make-lang.in: Update dependencies.
7041 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7043 * prj-env.adb: Remove local debug traces.
7045 2011-08-04 Yannick Moy <moy@adacore.com>
7047 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7048 was used instead of Hi_OK, which could cause a read of an uninitialized
7049 value later on. Detected while working on the new warning.
7050 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7052 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7053 in more cases, in order to detect more unreferenced values.
7054 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7055 object for expression, if any.
7057 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7059 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7060 the operand types instead of the Esize.
7062 2011-08-04 Steve Baird <baird@adacore.com>
7064 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7065 enable CodePeer_Mode.
7066 * bindusg.adb (Display): Add help message describing -P binder switch.
7067 * gnat_ugn.texi: Document -P binder switch.
7068 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7069 user-defined main program directly.
7070 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7071 user-defined main program in the context clause of the package body.
7073 2011-08-04 Yannick Moy <moy@adacore.com>
7075 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7076 duplicate of Defining_Entity
7077 (Get_Unique_Entity_For_Decl): rename function into
7078 Unique_Defining_Entity
7079 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7080 (Formal_Proof_On): remove synthesized flag
7081 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7082 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7083 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7084 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7085 Annotate (Formal_Proof)
7087 2011-08-04 Emmanuel Briot <briot@adacore.com>
7089 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7090 source files with non-standard naming schemes, in imported projects
7092 2011-08-04 Emmanuel Briot <briot@adacore.com>
7094 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7095 specified on the gprbuild command line, we need to compile all units
7096 within that file, not just the first one we find
7097 Fix error message for mains that are not found.
7099 2011-08-04 Thomas Quinot <quinot@adacore.com>
7101 * sem_ch6.adb: Update comment.
7102 * sem_ch12.adb: Minor reformatting.
7104 2011-08-04 Bob Duff <duff@adacore.com>
7106 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7107 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7108 race condition whose symptom is to fail to lock Parent. That, in turn,
7109 causes Parent.Awake_Count to be accessed without locking Parent, which
7110 causes another race condition whose symptom is that Parent.Awake_Count
7111 can be off by 1 (either too high or too low). The solution is to lock
7112 Parent unconditionally, and then lock Acceptor, before reading
7113 Acceptor.Terminate_Alternative.
7115 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7117 * debug.adb: Update comment.
7119 2011-08-04 Robert Dewar <dewar@adacore.com>
7121 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7122 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7123 exp_ch6.adb: Minor reformatting.
7125 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7127 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7130 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7132 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7134 2011-08-04 Thomas Quinot <quinot@adacore.com>
7136 * sinfo.ads: Minor reformatting.
7138 2011-08-04 Emmanuel Briot <briot@adacore.com>
7140 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7141 even if there is no location.
7143 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7145 * sem_res.adb, sem_ch4.adb: move check for restriction
7146 No_Task_Hierarchy to resolve_allocator.
7148 2011-08-04 Thomas Quinot <quinot@adacore.com>
7150 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7151 This flag of N_Pragma nodes is not used, remove it as well as all of
7152 the associated circuitry.
7154 2011-08-04 Javier Miranda <miranda@adacore.com>
7156 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7157 runtime check on duplicated externa tags
7158 * debug.adb Document switch -gnatdQ.
7160 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7162 * a-fihema.ads: Minor typo fix.
7164 2011-08-04 Yannick Moy <moy@adacore.com>
7166 * sem_ch10.adb: Minor comment update.
7168 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7170 * einfo.adb: Update the node field usage to reflect the renaming of
7171 Return_Flag to Return_ Flag_Or_Transient_Decl.
7172 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7173 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7174 (Write_Field15_Name): Change Return_Flag to
7175 Return_Flag_Or_Transient_Decl.
7176 * einfo.ads: Rename node field Return_Flag to
7177 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7178 occurrences in entities.
7179 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7180 associated Inline pragma.
7181 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7182 associated Inline pragma.
7183 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7185 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7186 Return_Flag and Set_Return_Flag.
7187 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7188 objects generated for controlled transients declared inside an
7189 Exception_With_Actions. Update the calls to Return_Flag.
7190 (Process_Object_Declaration): Add code to add a null guard for hook
7191 objects generated for controlled transients declared inside an
7192 Exception_With_Actions. Update related comment.
7193 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7194 objects generated for controlled transients declared inside an
7195 Exception_With_Actions. Update the calls to Return_Flag.
7196 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7198 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7200 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7201 positional aggregate.
7203 2011-08-04 Vincent Celier <celier@adacore.com>
7205 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7206 SLOC only for pragmas.
7208 2011-08-04 Emmanuel Briot <briot@adacore.com>
7210 * projects.texi: Minor typo fix.
7212 2011-08-04 Emmanuel Briot <briot@adacore.com>
7214 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7215 on case-sensitive file systems.
7217 2011-08-04 Thomas Quinot <quinot@adacore.com>
7219 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7220 nested in a disabled pragma.
7221 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7222 enclosing pragma, if any, for X decisions.
7224 2011-08-04 Thomas Quinot <quinot@adacore.com>
7226 * sem_prag.adb: Minor reformatting.
7228 2011-08-04 Vincent Celier <celier@adacore.com>
7230 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7231 allowed in no run time mode.
7233 2011-08-04 Vincent Celier <celier@adacore.com>
7235 * make.adb (Check): When -gnatc is used, check for the source file
7236 inside the ALI file with a canonical case file name.
7238 2011-08-04 Emmanuel Briot <briot@adacore.com>
7240 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7241 overriding the separator.
7243 2011-08-04 Robert Dewar <dewar@adacore.com>
7245 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7246 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7248 2011-08-04 Robert Dewar <dewar@adacore.com>
7250 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7252 2011-08-04 Yannick Moy <moy@adacore.com>
7254 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7255 'Result only appears in postcondition of function.
7257 2011-08-04 Thomas Quinot <quinot@adacore.com>
7259 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7260 external tag, include the value of the external tag in the exception
7263 2011-08-04 Yannick Moy <moy@adacore.com>
7265 * sem_attr.adb (Result): modify error message for misplaced 'Result
7267 2011-08-04 Sergey Rybin <rybin@adacore.com>
7269 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7270 clear that the second argument must be an identifier.
7272 2011-08-04 Thomas Quinot <quinot@adacore.com>
7274 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7275 -fpreserve-control-flow, insert an IF statement on the barrier
7276 condition to ensure that a conditional branch instruction is generated.
7278 2011-08-04 Emmanuel Briot <briot@adacore.com>
7280 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7281 (Processing_Flags.Ignore_Missing_With): new flag.
7283 2011-08-04 Emmanuel Briot <briot@adacore.com>
7285 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7286 Source_List_File on case-insensitive systems where the file is actually
7287 on a case-sensitive file system (NFS,...).
7289 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7291 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7292 function return contains a controlled [extension] aggregate and the
7293 return statement is not part of a handled sequence of statements, wrap
7294 the return in a block. This ensures that all controlled temporaries
7295 generated during aggregate resolution will be picked up by the
7296 finalization machinery.
7298 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7300 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7301 components, freeze type before resolution, to ensure that default
7302 initializations are present for all components.
7303 * sem_res.adb (Resolve_Actuals): the designated object of an
7304 accces-to-constant type is a legal actual in a call to an
7305 initialization procedure.
7307 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7309 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7310 N_Unchecked_Type_Conversion to the possible containers of a renamed
7313 2011-08-04 Yannick Moy <moy@adacore.com>
7315 * par-ch13.adb (Aspect_Specifications_Present): recognize
7316 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7317 is issued in Strict mode.
7318 * par.adb: Fix typos in comments.
7320 2011-08-04 Yannick Moy <moy@adacore.com>
7322 * sem_attr.adb (Result): modify error message to take into account Post
7323 aspect when compiling Ada 2012 (or newer) code.
7325 2011-08-04 Nicolas Roche <roche@adacore.com>
7327 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7328 remove need for GCC exceptions.
7330 2011-08-04 Vincent Celier <celier@adacore.com>
7332 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7333 project, not the source file name.
7334 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7335 excluded, continue looking. This excluded source will only be returned
7336 if there is no other source with the same base name that is not locally
7339 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7341 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7342 private and one of the operands is a real literal, use a qualified
7343 expression rather than a conversion which is not meaningful to the
7346 2011-08-04 Yannick Moy <moy@adacore.com>
7348 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7349 corresponding aspect X'Class are allowed, proceed with analysis of the
7350 aspect instead of skipping it.
7352 2011-08-04 Tristan Gingold <gingold@adacore.com>
7354 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7355 This will allow to have an Ada implementation for the subprogram.
7357 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7359 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7360 completion and aspects are present, apply them to the entity for the
7361 type which is currently the partial view, but which is the one that
7363 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7364 applies to a partial view, indicate that the full view has predicates
7365 and delayed aspects.
7366 (Replace_Type_Reference): Handle properly predicates that apply to the
7367 full view of a private completion.
7369 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7371 * layout.adb (Layout_Type): For composite types, do not set Esize.
7372 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7374 (Size_Known): Look at the RM size of components instead of the Esize.
7375 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7376 issue warning and activate Implicit_Packing.
7377 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7378 if the Esize is not known.
7379 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7380 for elementary types only.
7381 (Analyze_Record_Representation_Clause): Look at the RM size instead
7382 of the Esize to issue errors.
7383 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7385 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7387 Look at the RM size instead of the Esize for types if the latter is
7389 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7391 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7393 * sem_type.adb: proper handling of equality not involving anonymous
7396 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7398 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7399 Vis_Decls. When creating a library-level finalizer for a package spec,
7400 both the declaration and body of the finalizer are inserted either in
7401 the visible or private declarations of the package spec.
7403 2011-08-04 Javier Miranda <miranda@adacore.com>
7405 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7406 use of the full-view of a type when invoking Is_Ancestor.
7407 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7408 the full-view of private parents is requested, then use also the
7409 full-view of the parent of the first derivation.
7411 2011-08-04 Tristan Gingold <gingold@adacore.com>
7413 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7414 instead of the locally imported procedure.
7415 * s-taprop-mingw.adb (Enter_Task): Ditto.
7416 * s-valrea.adb (Scan_Real): Ditto.
7417 * s-imgrea.adb (Set_Image_Real): Ditto.
7418 * s-flocon.ads: Make the package pure.
7420 2011-08-04 Thomas Quinot <quinot@adacore.com>
7422 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7423 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7424 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7425 New subprogram, moved here from...
7426 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7427 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7428 rewriting of the last argument into a procedure call statement here...
7429 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7432 2011-08-04 Thomas Quinot <quinot@adacore.com>
7434 * par_sco.adb: Minor reformatting.
7436 2011-08-04 Robert Dewar <dewar@adacore.com>
7438 * erroutc.adb: Minor reformatting.
7440 2011-08-04 Thomas Quinot <quinot@adacore.com>
7442 * par_sco.adb: Comment update.
7444 2011-08-04 Tristan Gingold <gingold@adacore.com>
7446 * s-flocon.ads: New file.
7447 * g-flocon.ads: Now a renaming of s-flocon.
7448 * Makefile.rtl: Add s-flocon.o
7450 2011-08-04 Javier Miranda <miranda@adacore.com>
7452 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7453 constrained, do not attempt to build a subtype of it.
7455 2011-08-04 Yannick Moy <moy@adacore.com>
7457 * errout.ads Change comments: remove 'R'M as an example where quotes
7458 are needed; add ALFA as another case where quotes are not needed
7459 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7460 case where quotes are not needed.
7461 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7462 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7463 Remove all occurrences of 'A'L'F'A
7465 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7467 * sem_ch13.adb: check legality of invariant pragma.
7469 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7471 * bindgen.adb: Add comments.
7473 2011-08-04 Yannick Moy <moy@adacore.com>
7475 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7477 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7478 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7480 2011-08-04 Robert Dewar <dewar@adacore.com>
7482 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7483 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7484 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7486 2011-08-04 Thomas Quinot <quinot@adacore.com>
7488 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7490 2011-08-04 Thomas Quinot <quinot@adacore.com>
7493 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7496 2011-08-04 Robert Dewar <dewar@adacore.com>
7498 * einfo.ads, exp_ch4.adb: Minor reformatting.
7500 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7502 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7504 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7506 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7507 type in all cases to compute list of primitive operations, because full
7508 view may be an itype that is not attached to the list of declarations.
7510 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7512 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7513 library has already been finalized.
7514 (Gen_Adafinal_C): Likewise.
7515 (Gen_Adainit_Ada): Generate an early return if the library has
7516 already been elaborated.
7517 (Gen_Adainit_C): Likewise.
7518 (Gen_Output_File_Ada): Generate an elaboration flag.
7519 (Gen_Output_File_C): Likewise.
7521 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7523 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7524 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7525 built in the first place.
7526 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7527 for CodePeer because Finalize_Address was not built to begin with.
7528 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7530 2011-08-04 Pascal Obry <obry@adacore.com>
7532 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7533 filenames, this ensures unicity of filenames across processes.
7535 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7537 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7538 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7539 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7540 Add False as the actual to From_Abort in the generated call to
7541 Raise_From_Controlled_Operation.
7543 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7545 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7546 so that the ali file name can be retrieved from outside of this package.
7547 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7548 doing nothing in the general case, but used to update the object file
7549 timestamp if directly generated by the backend.
7550 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7551 to a later time than the ali file one.
7553 2011-08-04 Yannick Moy <moy@adacore.com>
7555 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7556 entities whose body contains an Annotate pragma which forces formal
7558 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7559 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7560 Mark_Non_ALFA_Subprogram to pass in a message and node.
7561 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7562 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7563 surrounding subprogram.
7564 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7565 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7566 as not in ALFA is annotated with Formal_Proof being On, then an error
7567 is issued based on the additional parameters for message and node.
7568 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7569 * gcc-interface/Make-lang.in: Update dependencies.
7571 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7573 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7574 Finalize_Address when CodePeer is enabled.
7576 2011-08-04 Pascal Obry <obry@adacore.com>
7578 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7579 the latter returns a pointer to a static buffer which is deallocated
7580 at the end of the routine.
7582 2011-08-04 Yannick Moy <moy@adacore.com>
7584 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7585 after index creation; mark unconstrained base array type generated as
7586 being in/not in ALFA as well
7587 (Make_Index): mark subtype created as in/not in ALFA
7588 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7589 over a loop as in/not in ALFA, depending on its type and form of loop
7592 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7594 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7595 directly to False on .NET and JVM.
7597 2011-08-04 Yannick Moy <moy@adacore.com>
7599 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7600 constraint that subtype must come from source code to be in ALFA, so
7601 that anonymous subtypes can be in ALFA too.
7603 2011-08-04 Yannick Moy <moy@adacore.com>
7605 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7606 reference for ALFA mode.
7607 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7608 procedure public so as to use it from formal verification back-end.
7610 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7612 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7613 invalid checks of the Parameter, making Remove_Switch not working
7616 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7618 * targparm.ads: Update header: no run-time exception is needed on this
7621 2011-08-04 Vincent Celier <celier@adacore.com>
7623 * a-fihema.adb: Use System.IO instead of GNAT.IO
7625 2011-08-04 Thomas Quinot <quinot@adacore.com>
7627 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7628 are forbidden in Compiler_Unit mode.
7630 2011-08-04 Robert Dewar <dewar@adacore.com>
7632 * sem_util.adb: Minor reformatting.
7634 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7636 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7637 library-level finalizers.
7638 (Gen_Finalize_Library_C): Update the import string for library-level
7640 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7641 library-level finalizer.
7642 * exp_ch7.adb: Remove with and use clauses for Stringt.
7643 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7644 Spec_Decl. Add local variable Body_Id. The names of library-level
7645 finalizers are now manually fully qualified and are no longer external.
7646 A single name is now capable of servicing .NET, JVM and non-VM targets.
7647 Pragma Export is no longer required to provide visibility for the name.
7648 (Create_Finalizer_String): Removed.
7649 (New_Finalizer_Name): New routine which mimics New_..._Name.
7651 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7653 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7654 elaboration counter to Standard_Short_Integer.
7655 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7656 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7657 (Gen_Elab_Externals_C): Likewise.
7659 2011-08-04 Ed Falis <falis@adacore.com>
7661 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7662 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7663 system-vxworks-mips.ads, system-vxworks-x86.ads
7664 (Always_Compatible_Rep): set to False for all VxWorks targets.
7666 2011-08-04 Robert Dewar <dewar@adacore.com>
7668 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7669 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7670 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7671 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7672 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7673 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7674 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7675 Minor reformatting and code reorganization.
7677 2011-08-04 Emmanuel Briot <briot@adacore.com>
7679 * projects.texi: Added doc for aggregate projects.
7681 2011-08-04 Emmanuel Briot <briot@adacore.com>
7683 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7684 Add support for overriding the Project_Path in aggregate projects.
7686 2011-08-04 Robert Dewar <dewar@adacore.com>
7688 * a-cofove.ads: Minor reformatting.
7690 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7692 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7693 on the generated code.
7694 (Build_Finalize_Statements): Update the comment on the generated code.
7695 (Build_Initialize_Statements): Update the comment on the generated code.
7696 (Build_Object_Declarations): Add local variable Result. The object
7697 declarations are now built in sequence.
7698 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7701 2011-08-04 Robert Dewar <dewar@adacore.com>
7703 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7705 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7707 * einfo.ads (Elaboration_Entity): Document new definition and use.
7708 (Elaboration_Entity_Required): Adjust to above change.
7709 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7710 * exp_ch12.adb: And with and use for Snames.
7711 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7712 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7713 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7714 <Check_Unit_Name>: Deal with N_Expanded_Name.
7715 <Attribute_Elaborated>: Extend to all unit names.
7716 * sem_elab.adb: And with and use for Uintp.
7717 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7718 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7719 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7720 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7721 from Gen_Adainit_Ada.
7722 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7723 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7724 case, do not call System.Standard_Library.Adafinal; instead call
7725 finalize_library if needed.
7726 (Gen_Adafinal_C): Likewise.
7727 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7728 non-main program case.
7729 (Gen_Adainit_C): Generate a couple of external declarations here.
7730 In the main program case, set SSL.Finalize_Library_Objects.
7731 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7732 (Gen_Elab_Calls_C): Likewise.
7733 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7734 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7735 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7737 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7738 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7740 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7741 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7742 of external declarations. Call Gen_Finalize_Library_C.
7744 2011-08-04 Emmanuel Briot <briot@adacore.com>
7746 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7747 Compute_Compilation_Phases): new subprogram.
7748 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7749 The number of mains as well as the various compilation phases that
7750 need to be run are now project tree specific, since various
7751 aggregated trees might have different requirements. In particular,
7752 they do not all require bind or link phases.
7754 2011-08-04 Emmanuel Briot <briot@adacore.com>
7756 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7757 (Project_Tree_Appdata): New type.
7758 It is now possible to associate application-specific data to a project
7759 tree. In particular, this is used in the gprbuild builder to avoid a
7760 number of global tables and htables, especially now that there can be
7761 several project trees loaded at once because of aggregate projects.
7762 (Debug_Name): new procedure.
7763 * projects.texi: Clarify syntax of "**" for Source_Dirs
7765 2011-08-03 Emmanuel Briot <briot@adacore.com>
7767 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7768 the "roots" for a main.
7769 (Fill_From_Project): add support for aggregate projects. Main units
7770 in aggregated projects are now automatically added in the list of
7771 files to build (although this fails later on in gprbuild, because
7772 these files are not using the root proejct tree, so this needs
7774 * gcc-interface/Make-lang.in: Update dependencies.
7776 2011-08-03 Yannick Moy <moy@adacore.com>
7778 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
7779 conditional expression in ALFA.
7780 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
7781 expressions as not in ALFA.
7783 2011-08-03 Robert Dewar <dewar@adacore.com>
7785 * a-cofove.adb: Minor reformatting.
7787 2011-08-03 Emmanuel Briot <briot@adacore.com>
7789 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
7790 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
7792 These packages are more logically placed in the Queue package, since
7793 they manipulate the queue. It is also likely that they can be adapted
7794 for gnatmake, thus sharing more code.
7795 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
7796 that we could move the above.
7798 2011-08-03 Emmanuel Briot <briot@adacore.com>
7800 * errutil.adb (Finalize): clean up the list of error messages on exit.
7801 Calling this subprogram multiple times will no longer show duplicate
7802 error messages on stderr.
7804 2011-08-03 Emmanuel Briot <briot@adacore.com>
7806 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
7807 Getopt_Switches when we have already define a command line
7810 2011-08-03 Yannick Moy <moy@adacore.com>
7812 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
7813 in ALFA. Instead, they are considered as assertions to prove.
7814 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
7815 nodes as not in ALFA. Instead, include conditional expressions in ALFA
7816 if they have no ELSE part, or if they occur in pre- and postconditions,
7817 where the Condition cannot have side-effects in ALFA
7818 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
7819 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
7820 Instead, include type conversion between scalar types in ALFA.
7821 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
7822 if-and-only-if its type is in ALFA.
7824 2011-08-03 Thomas Quinot <quinot@adacore.com>
7826 * scos.adb, get_scos.adb, put_scos.adb
7827 New code letter for decisions: G (entry guard)
7829 (Traverse_Subprogram_Body): Rename to...
7830 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
7831 (Traverse_Protected_Body): New subprogram
7832 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
7833 protected bodies and entry bodies.
7835 2011-08-03 Yannick Moy <moy@adacore.com>
7837 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
7838 entities with get/set subprograms, which is set on procedure entities
7839 generated by the compiler for a postcondition.
7840 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
7841 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
7842 entity for a declaration
7843 (Get_Unique_Entity_For_Decl): new function returning an entity which
7844 represents a declaration, so that matching spec and body have the same
7847 2011-08-03 Robert Dewar <dewar@adacore.com>
7849 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
7850 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
7852 2011-08-03 Yannick Moy <moy@adacore.com>
7854 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
7855 library-level because retriction No_Implicit_Dynamic_Code in the
7856 front-end prevents its definition as a local subprogram
7857 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
7858 for reuse in other contexts
7859 (Traverse_Declarations_Or_Statements,
7860 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7861 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
7862 procedures take a callback parameter to be called on all declarations
7864 (Traverse_All_Compilation_Units): new generic function to traverse a
7865 compilation unit and call a callback parameter on all declarations
7867 2011-08-03 Javier Miranda <miranda@adacore.com>
7869 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
7870 in Java since they are always enclosed in a namespace that
7871 differentiates them, and overloaded entities are supported by the VM.
7873 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7875 * checks.adb (Determine_Range): If a computed bound of an operation is
7876 outside the range of the base type of the expression, and overflow
7877 checks are enabled, the result is unknown and cannot be used for any
7878 subsequent constant folding.
7879 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
7880 unknown, so is the result of the comparison.
7882 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7884 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
7885 From_Abort. When finalization was triggered by an abort, propagate
7886 Standard'Abort_Signal rather than Program_Error.
7887 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
7889 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
7890 From_Abort. When finalization was triggered by an abort, propagate
7891 Standard'Abort_Signal rather than Program_Error.
7892 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
7894 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
7895 Abort_Id. Update the calls to Build_Object_Declarations and
7896 Build_Raise_Statement to include Abort_Id.
7897 (Build_Adjust_Statements): New local variable Abort_Id. Update the
7898 calls to Build_Object_Declarations and Build_Raise_Statement to include
7900 (Build_Finalize_Statements): New local variable Abort_Id. Update the
7901 calls to Build_Object_Declarations and Build_Raise_Statement to include
7903 (Build_Components): Create an entity for Abort_Id when exceptions are
7904 allowed on the target.
7905 (Build_Finalizer): New local variable Abort_Id.
7906 (Build_Initialize_Statements): New local variable Abort_Id. Update the
7907 calls to Build_Object_Declarations and Build_Raise_Statement to include
7909 (Build_Object_Declarations): Add new formal Abort_Id. Create the
7910 declaration of flag Abort_Id to preserve the original abort status
7911 before finalization code is executed.
7912 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
7913 runtime routine Raise_From_Controlled_Operation.
7914 (Create_Finalizer): Update the call to Build_Raise_Statement to include
7915 Abort_Id. Update the call to Build_Object_Declarations to include
7916 Abort_Id. Update the layout of the finalizer body.
7917 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
7918 (Process_Transient_Objects): New local variable Abort_Id. Remove the
7919 clunky code to create all flags and objects related to
7920 exception propagation and replace it with a call to
7921 Build_Object_Declarations. Update the call to Build_Raise_Statement to
7923 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
7924 Add new formal Abort_Id and associated comment on its use.
7925 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
7927 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
7928 Remove the clunky code to create all flags and objects related to
7929 exception propagation and replace it with a call to
7930 Build_Object_Declarations. Update the call to Build_Raise_Statement.
7932 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7934 * s-tassta.adb: Fix minor typos.
7936 2011-08-03 Robert Dewar <dewar@adacore.com>
7938 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
7939 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
7941 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7943 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
7944 to packages. This ensures that the finalizer body will not end up
7945 inside the freeze node.
7946 (Process_Declarations): Add code to detect whether a freeze node has a
7947 nested finalization collection.
7949 2011-08-03 Pascal Obry <obry@adacore.com>
7951 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
7952 (Current_Session): Return a not null access to Session_Type.
7953 (Default_Session): Likewise.
7955 2011-08-03 Robert Dewar <dewar@adacore.com>
7957 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
7958 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
7960 2011-08-03 Pascal Obry <obry@adacore.com>
7962 * g-awk.ads: Minor comment fix.
7964 2011-08-03 Sergey Rybin <rybin@adacore.com>
7966 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7967 the tree structure related to discriminant constraints.
7968 Original_Discriminant cannot be used any more for computing the
7969 defining name for the reference to a discriminant.
7971 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7973 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
7974 function is not visibly tagged, this is not a dispatching call and
7975 therfore is not Tag_Indeterminate, even if the function is marked as
7976 dispatching on result.
7978 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7980 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
7981 (Expand_N_Free_Statement): Add a guard to protect against run-times
7982 which do not support controlled types.
7983 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
7984 against run-times which do not support controlled types.
7985 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
7986 against run-times which do not support controlled types.
7987 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
7988 against run-times which do not support controlled types.
7989 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
7990 protect against run-times which do not support controlled types.
7992 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7994 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
7995 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
7997 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7999 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8000 modified in the source, to prevent spurious warnings when compiling
8003 2011-08-03 Thomas Quinot <quinot@adacore.com>
8005 * a-except-2005.adb: Minor reformatting.
8007 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8009 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8010 is a renaming declaration in the private part of a package, do not emit
8011 a warning that the with_clause could be moved because the renaming may
8012 be used in the body or in a child unit.
8014 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8016 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8017 Propagate the Comes_From_Source attribute from the original return
8018 object to the renaming.
8020 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8022 * exp_ch7.adb (Build_Raise_Statement): Do not call
8023 Raise_From_Controlled_Operation when this routine is not present in
8024 the run-time library.
8025 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8026 libraries (Ravenscar), tasks are non-terminating, and protected objects
8027 and tasks can only appear at library level, so we do not want
8028 finalization of protected objects nor tasks.
8029 * exp_intr.adb: Minor clarification in comment.
8030 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8031 Gen_Output_File_C): Remove references to finalization of library-level
8032 objects when using restricted run-time libraries.
8034 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8036 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8037 Original_Discriminant only if the parent type is a generic formal.
8039 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8041 * exp_ch13.adb: Add with and use clause for Targparm;
8042 (Expand_N_Free_Statement): Prevent the generation of a custom
8043 Deallocate on .NET/JVM targets since this requires pools and address
8045 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8046 .NET/JVM targets, attach the newly allocated object to the access
8047 type's finalization collection. Do not generate a call to
8048 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8049 exist in the runtime.
8050 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8051 create a custom Allocate for object that do not require initialization.
8052 Attach a newly allocated object to the access type's finalization
8053 collection on .NET/JVM.
8054 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8055 assignment of controlled types on .NET/JVM. The two hidden pointers
8056 Prev and Next and stored and later restored after the assignment takes
8058 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8059 kludge for .NET/JVM to recognize a particular piece of code coming from
8060 Heap_Management and change the call to Finalize into Deep_Finalize.
8061 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8062 finalization collections on .NET/JVM only for types derived from
8063 Controlled. Separate the association of storage pools with a collection
8064 and only allow it on non-.NET/JVM targets.
8065 (Make_Attach_Call): New routine.
8066 (Make_Detach_Call): New routine.
8067 (Process_Object_Declarations): Suppress the generation of
8068 build-in-place return object clean up code on .NET/JVM since it uses
8070 * exp_ch7.ads (Make_Attach_Call): New routine.
8071 (Make_Detach_Call): New routine.
8072 * exp_intr.adb Add with and use clause for Targparm.
8073 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8074 on .NET/JVM targets.
8075 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8076 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8077 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8078 names used in finalization.
8080 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8082 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8083 (Attach, Detach): Lock the current task when chaining an object onto a
8086 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8088 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8089 Rewritten to create the message strings when the exception is not
8090 raised by an abort during finalization.
8091 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8092 Raise_From_Controlled_Operation and update its associated comment.
8093 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8094 Ada.Finalization.Heap_Management provides key functionality
8095 associated with controlled objects on the heap, their creation,
8096 finalization and reclamation. Type Finalization_Collection is
8097 effectively a wrapper which sits ontop of a storage pool and performs
8098 all necessary bookkeeping for all the objects it contains. Each
8099 access-to-controlled or access-to-class-wide type receives a collection
8100 as part of its expansion. The compiler generates buffer code and
8101 invokes Allocate / Deallocate to create and destroy allocated
8103 * a-finali.adb ("="): Removed.
8104 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8105 fields Prev and Next.
8106 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8107 A library unit with at least one controlled object on the library level
8108 has a special finalizer which is invoked by the binder. To signal this,
8109 ali files carry field PF.
8110 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8111 associated comment on field usage.
8112 * a-tags.adb (Get_RC_Offset): Removed.
8113 (Needs_Finalization): New routine.
8114 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8115 Dispatch tables now carry field Needs_Finalization which provides
8116 runtime indication whether a type is controlled or has controlled
8117 components or both. Remove field RC_Offset.
8118 (Get_RC_Offset): Removed along with its associated pragma Export.
8119 Since tagged types with controlled components no longer carry hidden
8120 field _controller, the special mechanism to retrieve its location is no
8122 (Needs_Finalization): New routine.
8123 * atree.ads, atree.adb (Elist24): New routine.
8124 (Set_Elist24): New routine.
8125 * atree.h: Add a define clause for Elist24.
8126 * bindgen.adb New library-level variable Lib_Final_Built.
8127 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8128 presence of a VM target, the routine generates calls to the proper
8129 library finalization routine.
8130 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8131 targets. Set the correct library finalization routine depending on
8132 whether the library has controlled objects or this is a VM compilation.
8133 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8134 to library-level finalizers of compiled units in reverse order of
8135 elaboration. It also produces exception management code and reraises a
8136 potential exception after all units have been finalized.
8137 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8138 library-level finalizers of compiled units in reverse order of
8140 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8141 definitions of all library-level finalizers available to the compilation
8142 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8144 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8145 System.Standard_Library.Adafinal directly. If the library needs
8146 finalization actions, create the sequence of finalization calls.
8147 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8148 Generate a with clause for System.Soft_Links when compiling for a VM.
8149 Remove the code which imports System.Standard_Library.Adafinal as
8150 Do_Finalize. Generate the library finalization routine.
8151 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8152 If the library needs finalization actions, create all the definitions
8153 of library- level finalizers.
8154 (Has_Finalizer): New routine. Determines whether at least one compiled
8155 unit has a library-level finalizer.
8156 Add type Qualification_Mode.
8157 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8158 * einfo.adb: New usage of field 15 as Return_Flag.
8159 Remove Finalization_Chain_Entity from the usages of field 19.
8160 Remove Associated_Final_Chain from the usages of field 23.
8161 New usage of field 23 as Associated_Collection.
8162 New usage of field 24 as Finalizer.
8163 New usage of flag 252 as Is_Processed_Transient.
8164 (Associated_Final_Chain): Removed.
8165 (Associated_Collection): New routine.
8166 (Finalization_Chain_Entity): Removed.
8167 (Finalizer): New routine.
8168 (Is_Finalizer): New routine.
8169 (Is_Processed_Transient): New routine.
8170 (Return_Flag): New routine.
8171 (Set_Associated_Final_Chain): Removed.
8172 (Set_Associated_Collection): New routine.
8173 (Set_Finalization_Chain_Entity): Removed.
8174 (Set_Finalizer): New routine.
8175 (Set_Is_Processed_Transient): New routine.
8176 (Set_Return_Flag): New routine.
8177 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8179 (Write_Field8_Name): Alphabetize the output.
8180 (Write_Field11_Name): Alphabetize the output.
8181 (Write_Field12_Name): Alphabetize the output.
8182 (Write_Field13_Name): Alphabetize the output.
8183 (Write_Field14_Name): Alphabetize the output.
8184 (Write_Field15_Name): Alphabetize the output.
8185 (Write_Field16_Name): Alphabetize the output.
8186 (Write_Field17_Name): Alphabetize the output.
8187 (Write_Field18_Name): Alphabetize the output.
8188 (Write_Field19_Name): Alphabetize the output. Remove the output of
8189 Finalization_Chain_Entity.
8190 (Write_Field20_Name): Alphabetize the output.
8191 (Write_Field21_Name): Alphabetize the output.
8192 (Write_Field22_Name): Alphabetize the output.
8193 (Write_Field23_Name): Alphabetize the output. Remove the output of
8194 Associated_Final_Chain. Add output for Associated_Collection.
8195 (Write_Field24_Name): Alphabetize the output.
8196 (Write_Field25_Name): Add output for Finalizer.
8197 (Write_Field26_Name): Alphabetize the output.
8198 (Write_Field27_Name): Alphabetize the output.
8199 (Write_Field28_Name): Alphabetize the output.
8200 * einfo.ads: Add new field description for Associated_Collection and
8202 Remove Associated_Final_Chain and its uses in nodes.
8203 Remove Finalization_Chain_Entity and its uses in nodes.
8204 Add new field description for Finalizer and its uses in nodes.
8205 Add new synthesized attribute Is_Finalizer.
8206 Add new flag description for Is_Processed_Transient and its uses in
8208 Add new field description for Return_Flag and its uses in nodes.
8209 (Associated_Final_Chain): Removed along with its pragma Inline.
8210 (Associated_Collection): New routine and pragma Inline.
8211 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8212 (Finalizer): New routine and pragma Inline.
8213 (Is_Finalizer): New routine and pragma Inline.
8214 (Is_Processed_Transient): New routine and pragma Inline.
8215 (Return_Flag): New routine and pragma Inline.
8216 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8217 (Set_Associated_Collection): New routine and pragma Inline.
8218 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8219 (Set_Finalizer): New routine and pragma Inline.
8220 (Set_Is_Processed_Transient): New routine and pragma Inline.
8221 (Set_Return_Flag): New routine and pragma Inline.
8222 * exp_aggr.adb: Alphabetize subprograms.
8223 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8224 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8225 associated comments. Remove local variables External_Final_List and
8227 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8228 Ancestor. Remove the retrieval of finalization lists. Update the call to
8230 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8231 lists. Update the call to Late_Expansion.
8232 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8233 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8234 (Gen_Assign): Remove the retrieval of the finalization list used to
8235 build the assignment. Update the calls to Make_Init_Call and
8237 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8238 Remove the mechanism to determine attachment levels and finalization
8239 list retrieval. Remove the processing for coextensions.
8240 (Init_Controller): Removed. Controllers no longer exist.
8241 (Late_Expansion): Remove formals Flist and Obj along with their
8242 associated comments. Update the calls to Build_Record_Aggr_Code and
8243 Build_Array_Aggr_Code.
8244 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8245 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8246 appear in entry bodies, protected subprograms and task bodies.
8247 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8248 * exp_ch3.adb (Add_Final_Chain): Removed.
8249 (Build_Array_Init_Proc): Alphabetize local variables.
8250 (Build_Assignment): Alphabetize local variables. Update the call to
8252 (Build_Class_Wide_Master): Rename local variables to better reflect
8254 (Build_Discriminant_Assignments): Code reformatting.
8255 (Build_Init_Call_Thru): Code reformatting.
8256 (Build_Init_Procedure): Code reformatting. Generate a special version
8257 of Deep_Finalize which is capable of finalizing all initialized
8258 components and ignore the rest.
8259 (Build_Init_Statements): Rename local variables to better reflect their
8261 Reimplement the mechanism to include the creation and update of an index
8262 variable called a "counter". It is used as a bookmark for tracing
8263 initialized and non-initialized components.
8264 (Build_Initialization_Call): Remove local variable Controller_Typ.
8265 Alphabetize all local variables. Remove the initialization of the
8266 record controller and update the call to Make_Init_Call.
8267 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8268 New local variable Counter.
8269 (Constrain_Array): Alphabetize.
8270 (Expand_Freeze_Array_Type): Create a collection instead of a
8272 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8273 Finalize_Address which is used in conjunction with allocated controlled
8275 (Expand_N_Object_Declaration): Remove the creation of a finalization
8276 list for anonymous access types. Update the calls to Make_Init_Call and
8278 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8279 retrieval of finalization lists. Remove the expansion of the record
8280 controller. Create TSS primitive Finalize_Address used in conjunction
8281 with controlled objects on the heap. Create finalization collections
8282 for access-to-controlled record components.
8283 (Expand_Record_Controller): Removed.
8284 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8285 class-wide types now requires additional processing. Create
8286 finalization collections for access-to-controlled types.
8287 (Increment_Counter): New routine.
8288 (Make_Counter): New routine.
8289 (Make_Eq_If): Remove the mention of Name_uController.
8290 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8291 types coming from System.Finalization_Root.
8292 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8293 (Predefined_Primitive_Bodies): There is no longer need to skip types
8294 coming from System.Finalization_Root.
8295 (Stream_Operation_OK): Do not generate stream routines for
8296 type Ada.Finalization.Heap_Management.Finalization_Collection.
8297 * exp_ch3.ads: Alphabetize subprograms.
8298 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8299 Add with and use clause for Lib.
8300 (Complete_Coextension_Finalization): Removed.
8301 (Complete_Controlled_Allocation): New routine. Create a finalization
8302 collection for anonymous access-to-controlled types. Create a custom
8303 Allocate which interfaces with the back end and the machinery in
8305 (Expand_Allocator_Expression): Add necessary calls to
8306 Complete_Controlled_Allocation. Remove the retrieval of finalization
8307 lists. Update the calls to Make_Adjust_Call. Generate a call to
8308 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8309 the associated collection.
8310 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8311 Code clean up. Remove the retrieval of finalization lists and
8313 Update the call to Make_Init_Call. Generate a call to
8314 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8315 the associated collection.
8316 (Get_Allocator_Final_List): Removed. Finalization lists are not
8318 (Suitable_Element): Remove the mention of Name_uController.
8319 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8320 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8321 the left hand side, carry out the assignment and adjust the left hand
8323 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8324 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8325 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8326 BIP_Collection and BIPcollection.
8327 (Build_Heap_Allocator): New routine used to allocate the return object
8328 of a build-in-place function onto a collection.
8329 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8330 (Expand_Call): Do not replace direct calls to Deep routines with their
8332 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8333 and update their occurrences. Add a special return flag to monitor the
8334 [ab]normal execution of the function. The flag is set right before the
8336 Rewrite the mechanism used to allocate a build-in-place return object
8337 on the heap or on a storage pool.
8338 (Is_Direct_Deep_Call): New routine.
8339 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8340 build-in-place function call instead of a final list. Build a call to
8341 Set_Finalize_Address_Ptr to decorate the associated collection.
8342 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8343 order to name the build-in-place function call's result for later
8344 finalization. Add a collection to a build-in-place function call
8345 instead of a final list.
8346 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8347 build-in-place function call instead of a final list. Remove the code
8348 which moves one final list and transforms it into the actual in a
8349 nested build-in-place call.
8350 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8351 build-in-place function call instead of a final list.
8352 (Move_Final_List): Removed.
8353 (Needs_BIP_Collection): New routine.
8354 (Needs_BIP_Final_List): Removed.
8355 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8356 enumeration type BIP_Formal_Kind.
8357 Update the related comment.
8358 (Needs_BIP_Collection): New routine.
8359 (Needs_BIP_Final_List): Removed.
8360 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8361 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8362 majority of subprograms in this unit. Add Name_Finalize_Address to
8363 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8364 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8365 statements for an array type.
8366 (Build_Adjust_Statements): Create the adjust statements for a record
8368 (Build_Cleanup_Statements): New routine. A procedure which given any
8369 construct containing asynchronous calls, references to _master, or is a
8370 task body, a task allocation or a protected body produces the necessary
8371 runtime calls to clean up these constructs.
8372 (Build_Exception_Handler): New routine.
8373 (Build_Final_List): Removed.
8374 (Build_Finalization_Collection): New routine. A core procedure which
8375 creates a collection to service heap allocated controlled objects
8376 associated with an access-to-controlled type.
8377 (Build_Finalize_Statements): Create the finalization statements for a
8379 (Build_Finalizer): New routine. A core procedure which given any
8380 construct with declarations and/or statements detects all objects which
8381 need any type of clean up (controlled objects, protected objects) and
8382 generates all necessary code to clean up the said objects in the proper
8384 (Build_Finalizer_Call): New routine.
8385 (Build_Initialize_Statements): Create the initialization statements for
8386 an array type. The generated routine contains code to finalize partially
8388 (Build_Object_Declarations): New routine.
8389 (Build_Raise_Statement): New routine.
8390 (Clean_Simple_Protected_Objects): Removed.
8391 (Controller_Component): Removed.
8392 (Enclosing_Function): New routine.
8393 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8394 either declarations or statements or both.
8395 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8396 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8398 (Find_Final_List): Removed.
8399 (Global_Flist_Ref): Removed.
8400 (In_Finalization_Root): Removed.
8401 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8402 scope in terms of tree nodes. Process all transient variables within
8404 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8405 generated after the adjust.
8406 (Make_Attach_Call): Removed.
8407 (Make_Call): New routine.
8408 (Make_Clean): Removed.
8409 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8411 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8413 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8415 (Make_Final_Call): Modified to simply create a call to either
8416 Deep_Finalize or Finalize.
8417 (Make_Finalize_Address_Body): New routine.
8418 (Make_Finalize_Address_Stmts): New routine. A function which produces
8419 TSS primitive Finalize_Address used in conjunction with heap allocated
8421 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8422 (Make_Init_Call): Rewritten. There is no longer an attach call
8423 generated after initialization.
8424 (Make_Local_Deep_Finalize): New routine.
8425 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8426 (Make_Transient_Block): Remove the finalization list retrieval and
8428 (Needs_Finalization): Moved to Exp_Util.
8429 (Parent_Field_Type): New routine.
8430 (Preprocess_Components): New routine.
8431 (Process_Transient_Objects): New routine.
8432 (Wrap_HSS_In_Block): New routine.
8433 (Wrap_Transient_Declaration): Remove finalization list management and
8434 controller insertion.
8435 (Wrap_Transient_Expression): Code reformatting.
8436 (Wrap_Transient_Statement): Code reformatting.
8437 * exp_ch7.ads (Build_Final_List): Removed.
8438 (Build_Finalization_Collection): New routine.
8439 (Build_Raise_Statement): New routine.
8440 (Controller_Component): Removed.
8441 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8442 (Find_Final_List): Removed.
8443 (In_Finalization_Root): Removed.
8444 (Is_Simple_Protected_Type): Update related comment.
8445 (Make_Adjust_Call): New parameter profile and associated comments.
8446 (Make_Attach_Call): Removed.
8447 (Make_Final_Call): New parameter profile and associated comments.
8448 (Make_Finalize_Address_Body): New routine.
8449 (Make_Init_Call): New parameter profile and associated comments.
8450 (Make_Local_Deep_Finalize): New routine.
8451 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8452 (Needs_Finalization): Moved to Exp_Util.
8453 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8454 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8455 (Find_Protection_Type): Moved to Exp_Util.
8456 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8457 (Make_DT): Update sequence of dispatch table initialization. Remove the
8458 initialization of field RC_Offset. Add initialization of field Needs_
8460 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8461 Reimplement how an object is first finalized, then deallocated.
8462 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8464 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8465 Register TSS_Finalize_Address with type TSS_Names.
8466 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8467 procedure provides the interface between an allocation / deallocation
8468 and the support machinery in Ada.Finalization.Heap_Management.
8469 (Find_Init_Call): Code reformatting.
8470 (Find_Init_Call_In_List): Code reformatting.
8471 (Find_Protection_Type): Moved from Exp_Ch9.
8472 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8473 (Has_Controlled_Coextensions): Removed.
8474 (Has_Controlled_Objects): New routine.
8475 (In_Library_Level_Package_Body): New routine.
8476 (Insert_Action_After): New routine.
8477 (Is_Finalizable_Transient): New routine. This predicate determines
8478 whether an object declaration is one of the many variants of controlled
8480 (Is_Null_Access_BIP_Func_Call): New routine.
8481 (Is_Non_BIP_Func_Call): New routine.
8482 (Is_Related_To_Func_Return): New routine.
8483 (Needs_Finalization): Moved from Exp_Ch7.
8484 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8485 (Find_Protection_Type): Moved from Exp_Ch9.
8486 (Has_Controlled_Coextensions): Removed.
8487 (Has_Controlled_Objects): New routine.
8488 (In_Library_Level_Package_Body): New routine.
8489 (Insert_Action_After): New routine.
8490 (Is_Finalizable_Transient): New routine.
8491 (Is_Null_Access_BIP_Func_Call): New routine.
8492 (Is_Non_BIP_Func_Call): New routine.
8493 (Is_Related_To_Func_Return): New routine.
8494 (Needs_Finalization): Moved from Exp_ch7.
8495 * expander.adb (Expand): Add a case for N_Free_Statement.
8496 * freeze.adb (Freeze_All): Replace the generation of a finalization
8497 list with a collection for access-to-controlled types.
8498 (Freeze_Entity): Code reformatting.
8499 (Freeze_Record_Type): Remove the freezing of a record controller
8501 (Freeze_Subprogram): Code reformatting.
8502 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8504 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8505 has a library-level finalizer.
8506 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8507 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8508 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8509 files. Add a-fihema to the list of object files.
8511 Alphabetize the associations in type Is_Parameterless_Attribute.
8512 * rtsfind.ads: Ada.Finalization_List.Controller and
8513 System.Finalization_Implementation are no longer a GNAT unit.
8514 Update the range of type Ada_Finalization_Child. Remove the following
8515 recoverable entities:
8517 RE_Attach_To_Final_List
8521 RE_Finalizable_Ptr_Ptr
8522 RE_Global_Final_List
8523 RE_Limited_Record_Controller
8526 RE_Record_Controller
8527 RE_Simple_List_Controller
8529 Add the following recoverable entities:
8531 RE_Add_Offset_To_Address
8535 RE_Exception_Identity
8536 RE_Finalization_Collection
8537 RE_Finalization_Collection_Ptr
8538 RE_Needs_Finalization
8539 RE_Save_Library_Occurrence
8540 RE_Set_Finalize_Address_Ptr
8541 RE_Set_Storage_Pool_Ptr
8543 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8545 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8546 (First_Stored_Discriminant): Remove the mention of Name_uController.
8547 * sem_aux.ads: Comment reformatting.
8548 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8549 to redecorate an already existing class-wide type.
8550 (Decorate_Tagged_Type): New parameter profile and associated comment.
8551 Create a "shadow class-wide type" for a shadow entity.
8552 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8553 of the final chain along with the associated comment.
8554 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8555 Full_Desig and set it to the full view of the designated type.
8556 Initialize the finalization collection to empty.
8557 (Build_Derived_Record_Type): Alphabetize local variables. Code
8559 (Collect_Fixed_Components): Remove the mention of Name_uController.
8560 (Create_Constrained_Components): Remove the mention of Name_uController.
8561 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8562 class-wide type of a shadow entity.
8563 (Process_Full_View): Update the machinery which marks type
8564 Limited_Controlled's entity as limited.
8565 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8566 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8567 list, instead make a collection build-in-place formal.
8568 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8569 a designated type in order to establish a match between the renaming
8570 and the renamed entity.
8571 (Find_Selected_Component): Add guard to prevent spurious exceptions
8572 from being raised on .NET/JVM.
8573 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8574 to the list of primitive that need special processing. Update arrays
8575 C_Names and D_Names.
8576 (Replace_Types): Handle class-wide types.
8577 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8578 different parameter profile, look at the first formal.
8579 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8580 use clauses for Exp_Util.
8581 * sem_res.adb: Remove with and use clauses for Elists.
8582 (Propagate_Coextensions): Removed.
8583 (Resolve_Allocator): Do not propagate the list of coextensions from one
8584 allocator to another.
8585 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8586 Deaccessed_T to Desig_Typ.
8587 (Enter_Name): Remove the mention of Name_uController.
8588 (Gather_Components): Remove the mention of Name_uController.
8589 (Incomplete_Or_Private_View): New routine.
8590 (Is_Coextension_Root): Removed.
8591 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8592 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8593 (Is_Coextension_Root): Removed.
8594 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8595 Controlled types are now derived from a null tagged record. Remove
8596 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8597 * sinfo.adb (Coextensions): Removed.
8598 (Set_Coextensions): Removed.
8599 * sinfo.ads: Remove Coextensions from the explanation of node fields
8600 and its uses in nodes.
8601 Update the field usage of N_Allocator.
8602 (Coextensions): Removed along with its pragma Inline.
8603 (Set_Coextensions): Removed along with its pragma Inline.
8604 * snames.ads-tmpl: Remove names
8609 Name_uLocal_Final_List
8610 Name_Finalization_Root
8617 Name_Finalize_Address
8618 * s-pooglo.adb (Allocate): Add overriding indicator.
8619 (Deallocate): Add overriding indicator.
8620 (Storage_Size): Add overriding indicator.
8621 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8622 than Finalize_Global_List.
8623 (Null_Finalize_Global_List): Removed.
8624 (Save_Library_Occurrence): New routine.
8625 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8626 initialization. Add variable Finalize_Library_Objects along with its
8627 pragma Export. Add variables Library_Exception and
8628 Library_Exception_Set along with their pragma Export.
8629 (Null_Finalize_Global_List): Removed.
8630 (Save_Library_Occurrence): New routine.
8631 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8632 rather than Finalize_Global_List.
8633 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8634 of the constructed node.
8636 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8638 * link.c: Include "auto-host.h" before system headers.
8640 2011-08-03 Vincent Celier <celier@adacore.com>
8642 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8643 that are not extended. Do not check if a library project that is
8644 extended should be regenerated. Do not add to table Library_Paths the
8645 libraries that are in extended projects. Link only with libraries that
8646 are in libray projects that are not extended.
8647 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8648 for a library project that is extended.
8650 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8652 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8653 conforming subprogram renamings that appear to be completions if they
8654 are not fully conformant.
8655 Such renamings are homographs but not completions.
8656 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8657 names in a subprogram renaming that appears in an instance.
8659 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8661 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8662 not immutably limited, build actual subtype from expression to provide
8663 proper bounds to caller.
8665 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8667 * sem_ch8.adb: Minor comment correction.
8669 2011-08-03 Thomas Quinot <quinot@adacore.com>
8671 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8672 returning a limited array, use an extended return statement.
8674 2011-08-03 Vincent Celier <celier@adacore.com>
8676 * make.adb (Initialize): If --subdirs= is used, but no project file is
8677 specified, attempt to create the specify subdir if it does not already
8678 exist and use it as the object directory as if -D had been specified.
8680 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8682 * s-tpopsp-vms.adb: New file.
8683 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8684 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8686 2011-08-03 Emmanuel Briot <briot@adacore.com>
8688 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8691 2011-08-03 Yannick Moy <moy@adacore.com>
8693 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8694 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8695 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8696 detect that an array has static bounds.
8698 2011-08-03 Thomas Quinot <quinot@adacore.com>
8700 * exp_dist.adb: Minor reformatting.
8702 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8704 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8705 (ATCB_Key): Removed, not always used.
8707 2011-08-03 Emmanuel Briot <briot@adacore.com>
8709 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8710 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8711 most remaining global variables.
8713 2011-08-03 Robert Dewar <dewar@adacore.com>
8715 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8716 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8719 2011-08-03 Javier Miranda <miranda@adacore.com>
8721 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8722 that must be passed by copy in VM targets.
8724 2011-08-03 Emmanuel Briot <briot@adacore.com>
8726 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8727 duplicates a similar htable now in the project tree.
8729 2011-08-03 Claire Dross <dross@adacore.com>
8731 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8732 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8733 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8734 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8735 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8736 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8737 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8740 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8742 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8743 (ATCB_Key): Removed, not always used.
8744 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8746 * s-tpopsp-tls.adb: New file.
8747 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8748 x86/x64/ia64/powerpc/sparc Linux.
8750 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8752 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8753 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8755 2011-08-03 Thomas Quinot <quinot@adacore.com>
8757 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8758 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8759 Fix type selection for mapping integer types to PolyORB types.
8761 2011-08-03 Bob Duff <duff@adacore.com>
8763 * sem_ch7.adb: Minor comment clarification.
8765 2011-08-03 Bob Duff <duff@adacore.com>
8767 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8768 an error analyzing a choice, skip further processing. Further
8769 processing could cause a crash or cascade errors.
8771 2011-08-03 Emmanuel Briot <briot@adacore.com>
8773 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
8774 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
8775 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
8776 prj-env.ads (Shared_Project_Tree_Data): new type
8777 An aggregate project and its aggregated trees need to share the common
8778 data structures used for lists of strings, packages,... This makes the
8779 code simpler since otherwise we have to pass the root tree (also used
8780 for the configuration file data) in addition to the current project
8781 tree. This also avoids ambiguities as to which tree should be used.
8782 And finally this saves a bit of memory.
8783 (For_Every_Project_Imported): new parameter Tree.
8784 Since aggregated projects are using a different tree, we need to let
8785 the caller know which tree to use to manipulate the returned project.
8787 2011-08-03 Robert Dewar <dewar@adacore.com>
8789 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
8790 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
8791 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
8792 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
8794 2011-08-03 Javier Miranda <miranda@adacore.com>
8796 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
8797 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
8799 2011-08-03 Bob Duff <duff@adacore.com>
8801 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
8804 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
8806 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
8807 g-sehash.ads: Fix typo. Update header.
8809 2011-08-03 Thomas Quinot <quinot@adacore.com>
8811 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
8814 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8816 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
8817 prefixes of private types along with records, since the selector may be
8819 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
8820 private types along with records, since the selector may be a
8823 2011-08-03 Emmanuel Briot <briot@adacore.com>
8825 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
8827 2011-08-03 Javier Miranda <miranda@adacore.com>
8829 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
8830 Tagged_Type_Expansion.
8832 2011-08-03 Yannick Moy <moy@adacore.com>
8834 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
8835 violation when the argument of concatenation is the name of a
8838 2011-08-03 Emmanuel Briot <briot@adacore.com>
8840 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
8841 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
8842 (Process_Declarative_Items): new parameter Child_Env.
8844 2011-08-03 Yannick Moy <moy@adacore.com>
8846 * alfa.ads: Update format of ALFA section in ALI file in order to
8847 add a mapping from bodies to specs when both are present.
8848 (ALFA_Scope_Record): Add components for spec file/scope.
8849 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
8851 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
8852 collected, fill in the spec information when relevant.
8853 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
8856 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8858 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
8859 code unit to decide whether to add internally generated subprograms.
8861 2011-08-03 Javier Miranda <miranda@adacore.com>
8863 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
8864 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
8865 be handled by copy in VM targets.
8867 2011-08-03 Emmanuel Briot <briot@adacore.com>
8869 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
8870 code with Makeutl.Get_Switches.
8871 * prj-tree.adb: Update comment.
8873 2011-08-03 Thomas Quinot <quinot@adacore.com>
8875 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
8876 subprogram with a limited formal that does not support external
8879 2011-08-03 Yannick Moy <moy@adacore.com>
8881 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
8883 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
8884 not from current unit in two phases, because it is not possible to
8885 change the table while iterating over its content.
8886 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
8888 2011-08-03 Sergey Rybin <rybin@adacore.com>
8890 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
8891 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
8893 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8895 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
8896 and the component type is composite, this is ambiguous for predefined
8897 concatenation, but if the node is not overloaded and the entity is a use
8898 -defined function its profile can be used to resolve that aggregate.
8900 2011-08-03 Robert Dewar <dewar@adacore.com>
8902 * exp_ch4.adb: Minor code cleanup.
8904 2011-08-03 Thomas Quinot <quinot@adacore.com>
8906 * exp_dist.adb: Do not generate distribution stubs if serious errors
8907 have been diagnosed.
8909 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8911 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
8912 the first formal of a primitive operation, go to the base type to
8913 handle properly an access to a derived type with constrained
8915 * sem_type.adb (Disambiguate): an immediately visible operator hides a
8916 user-defined function that is only use-visible.
8918 2011-08-03 Robert Dewar <dewar@adacore.com>
8920 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
8921 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
8922 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
8923 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
8924 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
8925 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
8926 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
8927 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
8929 2011-08-03 Robert Dewar <dewar@adacore.com>
8931 * repinfo.adb (List_Mechanism): Add handling of
8932 Convention_Ada_Pass_By_XXX.
8933 * sem_mech.adb (Set_Mechanism): Ditto.
8934 * sem_prag.adb (Process_Convention): Add entries for
8935 Convention_Ada_Pass_By_XXX.
8936 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
8938 2011-08-03 Pascal Obry <obry@adacore.com>
8940 * makeutl.adb: Minor reformatting.
8942 2011-08-03 Vincent Celier <celier@adacore.com>
8945 (Get_File_Name) If the file cannot be found when there are no config
8946 pragmas file and May_Fail is True, return No_File instead of the file
8947 name, to be consistent.
8949 2011-08-03 Pascal Obry <obry@adacore.com>
8951 * adaint.c (__gnat_is_executable_file_attr): Avoid access
8954 2011-08-03 Javier Miranda <miranda@adacore.com>
8957 (Same_Representation): In VM targets the representation of arrays with
8958 aliased components differs from arrays with non-aliased components.
8960 2011-08-03 Emmanuel Briot <briot@adacore.com>
8962 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
8963 not systematically lower case attribute indexes that contain no "."
8964 Fix definition of several Naming attributes, which take
8965 a unit name as index and therefore should be case insensitive.
8966 Minor refactoring (reduce length of variable names).
8968 2011-08-03 Emmanuel Briot <briot@adacore.com>
8970 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
8972 2011-08-03 Emmanuel Briot <briot@adacore.com>
8974 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
8975 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
8976 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
8977 prj-tree.ads (Prj.Tree.Environment): new type.
8979 2011-08-03 Emmanuel Briot <briot@adacore.com>
8981 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
8982 prj-tree.adb, prj-tree.ads (Environment): new type.
8984 2011-08-03 Emmanuel Briot <briot@adacore.com>
8986 * prj-tree.ads: Remove unused variable.
8988 2011-08-03 Yannick Moy <moy@adacore.com>
8990 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8991 issuing messages related to SPARK restriction violation.
8993 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8995 * sem_ch6.adb: guard against error nodes in return statements.
8997 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8999 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9000 a warning can only appear on a configuration file, so emit warning
9001 without further checks.
9003 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9005 * s-interr.ads: add overriding keyword.
9007 2011-08-03 Geert Bosch <bosch@adacore.com>
9009 * exp_attr.adb: Fix minor typo.
9011 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9013 * par-ch4.adb: improve error recovery.
9015 2011-08-03 Emmanuel Briot <briot@adacore.com>
9017 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9018 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9021 2011-08-03 Emmanuel Briot <briot@adacore.com>
9023 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9024 "external" as an attribute name in aggregate projects.
9026 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9028 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9029 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9030 from 0, so we need to adjust.
9032 2011-08-03 Emmanuel Briot <briot@adacore.com>
9034 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9035 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9037 2011-08-03 Yannick Moy <moy@adacore.com>
9039 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9040 restriction on overloaded entity if the entity is not an operator.
9042 2011-08-03 Yannick Moy <moy@adacore.com>
9044 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9045 restrict.ads: Rename remaining Check_Formal_Restriction* into
9046 Check_SPARK_Restriction*.
9048 2011-08-03 Emmanuel Briot <briot@adacore.com>
9050 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9051 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9053 (Project_Empty): removed
9054 (Empty_Project): new parameter Qualifier
9055 This is used to have fields specific to aggregate projects, cleaner
9056 New field to store the list of aggregated projects.
9057 (Check_Aggregate_Project): removed
9058 (Process_Aggregated_Projects, Free): new subprograms.
9060 2011-08-03 Olivier Hainque <hainque@adacore.com>
9062 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9064 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9066 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9067 explicit dereference of an unconstrained type, create a constrained
9068 subtype for it, as is done for function calls that return an
9071 2011-08-03 Thomas Quinot <quinot@adacore.com>
9073 * g-pehage.adb (Finalize): Avoid possible double-free.
9075 2011-08-03 Steve Baird <baird@adacore.com>
9077 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9078 Elab_Spec/Body attrs in CodePeer_Mode.
9080 2011-08-03 Javier Miranda <miranda@adacore.com>
9082 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9083 low bound is not known at compile time but they have no others choice.
9084 Done because in this case the bounds can be obtained directly from the
9087 2011-08-03 Ed Falis <falis@adacore.com>
9089 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9090 on VxWorks SMP. Remove unusable constant ANY_CPU.
9092 2011-08-03 Emmanuel Briot <briot@adacore.com>
9094 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9095 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9096 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9097 Prj.Env.Initialize_Empty): new subprograms
9098 (Get_Env, Find_Project): remove parameter Target_Name.
9100 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9102 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9103 as a condition for the delayed call to Derived_Subprograms done for the
9104 case of the rewriting of a derived type that constrains the
9105 discriminants of its parent type.
9106 Avoids redundant subprogram derivations for private subtype derivations.
9108 2011-08-03 Javier Miranda <miranda@adacore.com>
9110 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9111 Build_Record_Aggr_Code.
9112 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9113 discriminants in extension aggregates.
9115 2011-08-03 Emmanuel Briot <briot@adacore.com>
9117 * prj-pp.adb (Print): also output project qualifiers, since in
9118 particular "aggregate" is mandatory in an aggregate project.
9120 2011-08-03 Emmanuel Briot <briot@adacore.com>
9122 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9123 (Debug_Output): new function.
9125 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9127 * gnat_ugn.texi: Document -Wstack-usage.
9128 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9130 2011-08-03 Thomas Quinot <quinot@adacore.com>
9132 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9133 have keyword LIMITED.
9135 2011-08-03 Yannick Moy <moy@adacore.com>
9137 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9138 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9139 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9140 section (does not happen in compiler, only if code directly calls
9142 * get_alfa.adb, get_alfa.ads: New files.
9143 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9145 * lib-xref-alfa.adb: New file.
9146 * lib-xref.adb, lib-xref.ads
9147 (Xref_Entry): redefine information needed in cross-references for ALFA.
9148 Push ALFA treatments in separated local package.
9149 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9150 identifiers. Return entity of package body instead of spec. Return
9151 Empty for a scope with no location.
9152 (Generate_Reference): adapt to new components for ALFA information.
9153 Remove the need for D references on definitions.
9154 (Is_Local_Reference): moved to ALFA local package
9155 (Output_References): extract subfunction as Extract_Source_Name
9156 (Output_Local_References): remove procedure, replaced by filtering of
9157 cross-references in package ALFA and printing in Put_ALFA.
9158 (Write_Entity_Name): remove procedure
9159 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9160 print exact name of entity as it appears in source file
9161 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9162 * put_alfa.adb, put_alfa.ads: New files.
9163 * xref_lib.adb (Search_Xref): protect read of cross-references against
9164 reading other sections of the ALI file, in gnatxref
9165 (Search): protect read of cross-references against reading other
9166 sections of the ALI file, in gnatfind.
9167 * gcc-interface/Make-lang.in: Update dependencies.
9169 2011-08-03 Thomas Quinot <quinot@adacore.com>
9171 * sem_ch3.adb: Minor reformatting.
9173 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9175 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9176 raising an exception.
9178 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9180 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9181 type, always use 1 as the lower bound or string, even if lower bound of
9182 context is not static, to handle properly null strings in a non-static
9185 2011-08-03 Bob Duff <duff@adacore.com>
9187 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9188 always legal on the right-hand side of an assignment statement; there
9189 is always an applicable index constraint in this case. Therefore, the
9190 check for Pkind = N_Assignment_Statement is now unconditional -- it
9191 doesn't depend on whether Is_Constrained (Typ).
9193 2011-08-03 Robert Dewar <dewar@adacore.com>
9195 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9197 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9199 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9200 for an itype created within a generic unit.
9202 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9204 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9205 suppresses all inlining.
9207 2011-08-03 Robert Dewar <dewar@adacore.com>
9209 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9210 exp_aggr.adb: Minor reformatting.
9212 2011-08-03 Thomas Quinot <quinot@adacore.com>
9214 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9215 tagged assignment when discriminant checks are suppressed. This is
9216 useless and extremely costly in terms of static stack usage.
9218 2011-08-03 Bob Duff <duff@adacore.com>
9220 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9221 of generics, because this leads to the wrong entity in the wrong scope,
9222 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9224 (Process_Interface_Name): Follow Alias for instances of generics, to
9225 correct for the above change.
9227 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9229 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9230 is an integer literal it is always safe to replace the reference. In
9231 addition, if the reference appears in the generated code for an object
9232 declaration it is necessary to copy because otherwise the reference
9233 might be to the uninitilized value of the discriminant of the object
9236 2011-08-03 Pascal Obry <obry@adacore.com>
9238 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9239 ACL used, in this case we want to check for ending .exe, not .exe
9240 anywhere in the path.
9242 2011-08-03 Sergey Rybin <rybin@adacore.com>
9244 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9245 the tree structure (semantic decoration of references to record
9248 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9250 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9251 choices of a named array aggregate, bail out when any choices are
9252 marked as Errors_Posted.
9254 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9256 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9257 in which entity is frozen, to handle properly loop variables in
9260 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9262 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9263 subtype is not static, compute the upper bound using attributes, to
9264 handle properly index types that are not integer types.
9266 2011-08-03 Bob Duff <duff@adacore.com>
9268 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9269 Update copyright notice.
9271 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9273 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9274 Original_Discriminant if within an instance.
9275 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9277 2011-08-03 Thomas Quinot <quinot@adacore.com>
9279 * einfo.ads: Minor reformatting.
9281 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9283 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9284 composite type with an unfrozen subcomponent, in the profile of a
9285 primitive operation.
9287 2011-08-03 Robert Dewar <dewar@adacore.com>
9289 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9291 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9293 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9294 unconstrained type with discriminants is initialized with an aggregate,
9295 use the constrained subtype of the aggregate as the type of the object,
9296 because it is immutable, and this allows the back-end to generate no
9297 code for the object declaration.
9299 2011-08-03 Robert Dewar <dewar@adacore.com>
9301 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9302 comparison operand is variable, and turns out to be zero or negative.
9304 2011-08-03 Javier Miranda <miranda@adacore.com>
9307 (Expand_Dispatching_Constructor_Call): Disable expansion of
9308 code required for native targets. Done to avoid generating
9309 references to unavailable runtime entities in VM targets.
9311 (Expand_N_Object_Declaration): Add missing support to handle
9312 the explicit initialization of class-wide interface objects.
9315 2011-08-03 Matthew Heaney <heaney@adacore.com>
9317 * a-cobove.adb (Merge): Move source onto target, instead of using
9320 2011-08-03 Matthew Heaney <heaney@adacore.com>
9322 * a-cbdlli.adb (Splice): Move source items from first to last.
9324 2011-08-03 Yannick Moy <moy@adacore.com>
9326 * sem_util.ads: Add comment.
9328 2011-08-03 Javier Miranda <miranda@adacore.com>
9331 (Expand_Record_Aggregate): In VM targets disable the expansion into
9332 assignments of aggregates whose type is not known at compile time.
9334 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9336 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9337 protected entries and task entries, to build the proper renaming
9338 declaration for entry formals, used in debugging.
9339 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9340 parameters in the same way.
9342 2011-08-02 Robert Dewar <dewar@adacore.com>
9344 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9345 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9346 code reorganization.
9348 2011-08-02 Robert Dewar <dewar@adacore.com>
9350 * debug.adb: Debug flag d.P to suppress length comparison optimization
9351 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9352 comparison of Length by comparing First/Last instead.
9354 2011-08-02 Matthew Heaney <heaney@adacore.com>
9356 * a-cobove.ads: Code clean up.
9358 2011-08-02 Vincent Celier <celier@adacore.com>
9360 * adaint.c (file_names_case_sensitive_cache): New static int.
9361 (__gnat_get_file_names_case_sensitive): Cache the return value in
9362 file_names_case_sensitive_cache at the first invocation, to avoid
9363 multiple calls to getenv.
9365 2011-08-02 Bob Duff <duff@adacore.com>
9367 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9369 2011-08-02 Yannick Moy <moy@adacore.com>
9371 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9372 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9373 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9374 indicate that we are in a precondition or postcondition. This is used in
9375 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9376 decide whether to flag the spec or body of the current subprogram as
9379 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9381 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9383 * a-extiin.ads: New file.
9385 2011-08-02 Bob Duff <duff@adacore.com>
9387 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9388 now raises Name_Error instead of Use_Error in certain cases. The other
9389 parts of this AI were already implemented properly.
9391 2011-08-02 Vincent Celier <celier@adacore.com>
9393 * link.c: Only import "auto-host.h" when building the gnattools.
9395 2011-08-02 Yannick Moy <moy@adacore.com>
9397 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9398 which calls a local subprogram, so extract subprogram
9399 from Mark_Non_ALFA_Subprogram_Body.
9401 2011-08-02 Javier Miranda <miranda@adacore.com>
9404 (Extract_Dispatching_Call): If the type of the dispatching object is an
9405 access type then return an explicit dereference in the Object out-mode
9408 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9410 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9411 compatibility checks for all indexes of an array subtype, not just the
9412 first. Reset Has_Dynamic_Range_Check on the subtype before each
9413 potential check to ensure that Insert_Range_Checks will not elide any
9414 of the dynamic checks.
9416 2011-08-02 Yannick Moy <moy@adacore.com>
9418 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9419 SPARK restriction at parsing time.
9420 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9421 directive only if the SPARK restriction is set for this unit.
9423 2011-08-02 Yannick Moy <moy@adacore.com>
9425 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9426 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9427 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9428 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9429 Mark_Non_ALFA_Subprogram_Body.
9430 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9433 2011-08-02 Yannick Moy <moy@adacore.com>
9435 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9438 2011-08-02 Robert Dewar <dewar@adacore.com>
9440 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9441 exp_ch3.adb: Minor reformatting.
9443 2011-08-02 Emmanuel Briot <briot@adacore.com>
9445 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9446 files, not any regular file.
9447 (__gnat_locate_file_with_predicate): new subprogram.
9449 2011-08-02 Yannick Moy <moy@adacore.com>
9451 * sinfo.adb, sinfo.ads: Restrict the use of flags
9452 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9453 nodes, plus N_Subtype_Declaration for the 2nd one.
9455 2011-08-02 Sergey Rybin <rybin@adacore.com>
9457 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9458 - fix bugs in the description of Source_Trace;
9459 - get rid of UNIT_NAME;
9461 2011-08-02 Javier Miranda <miranda@adacore.com>
9464 (Build_Dispatching_Requeue): Adding support for VM targets
9465 since we cannot directly reference the Tag entity.
9466 * exp_sel.adb (Build_K): Adding support for VM targets.
9467 (Build_S_Assignment): Adding support for VM targets.
9469 (Default_Prim_Op_Position): In VM targets do not restrict availability
9470 of predefined interface primitives to compiling in Ada 2005 mode.
9471 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9472 restricted to compiling in Ada 2005 mode.
9473 (Make_VM_TSD): Generate code that declares and initializes the OSD
9474 record. Needed to support dispatching calls through synchronized
9477 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9478 primitives associated with synchronized interfaces.
9479 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9480 primitives associated with synchronized interfaces.
9482 2011-08-02 Yannick Moy <moy@adacore.com>
9484 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9485 statements hidden in SPARK if preceded by the HIDE directive
9486 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9487 exception handlers as hidden in SPARK if preceded by the HIDE directive
9488 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9489 if starting with the HIDE directive
9490 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9491 starting with the HIDE directive; mark the declarations in a private
9492 part as hidden in SPARK if the private part starts with the HIDE
9494 * restrict.adb, restrict.ads
9495 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9496 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9497 argument node belongs to a part which is hidden in SPARK
9498 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9499 parts in SPARK; protect the possibly costly call to
9500 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9501 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9502 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9503 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9505 (Scan): recognize special comment starting with '#' and followed by
9506 SPARK keyword "hide" as a HIDE directive.
9508 2011-08-02 Yannick Moy <moy@adacore.com>
9510 * types.ads, erroutc.ads: Minor reformatting.
9512 2011-08-02 Vincent Celier <celier@adacore.com>
9514 * link.c: Add response file support for cross platforms.
9516 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9518 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9519 in an association, set parent field of copy before partial analysis.
9520 * sem_res.adb (Resolve_Slice): create reference to itype only when
9521 expansion is enabled.
9523 2011-08-02 Yannick Moy <moy@adacore.com>
9525 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9526 for new flag denoting which subprogram bodies are in ALFA
9527 * restrict.adb, sem_ch7.adb: Update comment
9528 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9529 sem_ch9.adb, sem_res.adb: Add calls to
9530 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9531 * sem_ch6.adb (Analyze_Function_Return): add calls to
9532 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9533 middle of the body, and extended return.
9534 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9535 False when missing return.
9536 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9537 to True for subprograms whose spec is in ALFA. Remove later on the flag
9538 on the entity used for a subprogram body when there exists a separate
9540 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9541 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9542 False, otherwise do nothing.
9544 2011-08-02 Robert Dewar <dewar@adacore.com>
9546 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9548 2011-08-02 Yannick Moy <moy@adacore.com>
9550 * sem_ch4.ads: minor formatting.
9552 2011-08-02 Yannick Moy <moy@adacore.com>
9554 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9555 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9556 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9557 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9558 opt.ads: cleanup of SPARK mode
9560 2011-08-02 Yannick Moy <moy@adacore.com>
9562 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9564 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9565 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9567 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9568 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9569 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9570 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9572 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9574 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9575 functions whose return type is not in ALFA.
9576 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9578 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9579 parameter's type is not in ALFA.
9580 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9583 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9585 * sem_ch6 (Analyze_Expression_Function): treat the function as
9586 Inline_Always, and introduce a subprogram declaration for it when it is
9588 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9589 expression functions, so that the back-end can determine whether they
9590 can in fact be inlined.
9591 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9592 a function body comes from an expression function.
9594 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9596 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9597 null exclusions to test Can_Never_Be_Null on the anonymous access types
9598 of the formals rather than testing the formals themselves. Exclude this
9599 check in cases where the Old_Formal is marked as a controlling formal,
9600 to avoid issuing spurious errors for bodies completing dispatching
9601 operations (due to the flag not getting set on controlling access
9602 formals in body specs).
9603 (Find_Corresponding_Spec): When checking full and subtype conformance of
9604 subprogram bodies in instances, pass Designated and E in that order, for
9605 consistency with the expected order of the formals (New_Id followed by
9608 2011-08-02 Robert Dewar <dewar@adacore.com>
9610 * sem_ch8.adb: Minor reformatting.
9612 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9614 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9615 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9616 primitive operations of class-wide actuals.
9618 2011-08-02 Javier Miranda <miranda@adacore.com>
9620 * exp_atag.ads, exp_atag.adb
9621 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9622 since its value is implicitly passed in argument Typ.
9623 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9624 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9625 Build_Common_Dispatching_Select_Statements.
9627 2011-08-02 Robert Dewar <dewar@adacore.com>
9629 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9630 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9633 2011-08-02 Robert Dewar <dewar@adacore.com>
9635 * sem_res.adb: Minor reformatting.
9636 * sem_prag.adb: Minor reformatting.
9638 2011-08-02 Javier Miranda <miranda@adacore.com>
9640 * exp_atag.adb, exp_atags.ads
9641 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9642 by the tagged type Entity. Required to use this routine in the VM
9643 targets since we do not have available the Tag entity in the VM
9646 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9647 Ada.Tags has not been previously loaded.
9649 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9650 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9652 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9653 view of enclosing scopes. Required to handle enclosing scopes that
9654 are synchronized types whose full view is a task type.
9656 (Build_VM_TSDs): Minor code improvement to avoid generating and
9657 analyzing lists with empty nodes.
9658 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9659 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9660 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9661 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9662 (Make_Select_Specific_Data_Table): Add support for VM targets.
9663 (Make_VM_TSD): Generate code to initialize the SSD structure of
9666 2011-08-02 Yannick Moy <moy@adacore.com>
9668 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9669 cross-references section in ALI.
9670 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9671 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9673 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9674 subprogram or package entity of a node
9675 (Is_Local_Reference_Type): new function returns True for references
9676 selected in local cross-references.
9677 (Lt): function extracted from Lt in Output_References
9678 (Write_Entity_Name): function extracted from Output_References
9679 (Generate_Definition): generate reference with type 'D' for definition
9680 of objects (object declaration and parameter specification), with
9681 appropriate locations and units, for use in local cross-references.
9682 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9683 references of type 'I' for initialization in object definition.
9684 (Output_References): move part of function Lt and procedure
9685 Write_Entity_Name outside of the body. Ignore references of types 'D'
9686 and 'I' introduced for local cross-references.
9687 (Output_Local_References): new procedure to output the local
9688 cross-references sections.
9689 (Lref_Entity_Status): new array defining whether an entity is a local
9690 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9691 with 'I' type when initialization expression is present.
9692 * get_scos.adb, get_scos.ads: Correct comments and typos
9694 2011-08-02 Javier Miranda <miranda@adacore.com>
9696 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9698 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9700 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9703 2011-08-02 Vincent Celier <celier@adacore.com>
9705 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9706 (No_Space_Img): New function
9707 (Find_Excluded_Sources): When reading from a file, record the file name
9708 and the line number for each excluded source.
9709 (Mark_Excluded_Sources): When reporting an error, if the excluded
9710 sources were read from a file, include file name and line number in
9713 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9715 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9717 2011-08-02 Robert Dewar <dewar@adacore.com>
9719 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9721 2011-08-02 Javier Miranda <miranda@adacore.com>
9723 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9724 generation of TSDs to the DOTNET compiler.
9725 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9726 generation of TSDs to the DOTNET compiler.
9728 2011-08-02 Javier Miranda <miranda@adacore.com>
9730 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9731 record of all the tagged types declared inside library level package
9732 declarations, library level package bodies or library level subprograms.
9733 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9734 associated with a given tagged type.
9735 (Build_VM_TSDs): New subprogram.
9736 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9737 compilation units that are subprograms.
9738 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9739 compilation units that are package bodies.
9740 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9741 units that are a package declaration or a package instantiation.
9742 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9743 reorganization to improve the error generated by the frontend when the
9744 function Ada.Tags.Secondary_Tag is not available.
9745 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9746 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9748 2011-08-02 Javier Miranda <miranda@adacore.com>
9750 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9752 2011-08-02 Robert Dewar <dewar@adacore.com>
9754 * s-imenne.ads: Minor reformatting.
9756 2011-08-02 Robert Dewar <dewar@adacore.com>
9758 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9759 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9760 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9762 2011-08-02 Robert Dewar <dewar@adacore.com>
9764 * einfo.ads (Materialize_Entity): Document this is only for renamings
9765 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9766 required debug information in the case where we transform the object
9767 declaration into a renaming declaration.
9768 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9770 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9773 2011-08-02 Robert Dewar <dewar@adacore.com>
9775 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9776 Suppress_Init_Procs.
9777 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9778 Suppress_Initialization/Initialization_Suppressed.
9779 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9780 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9781 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9782 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9784 2011-08-02 Robert Dewar <dewar@adacore.com>
9786 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9789 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9791 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9792 only have inheritable classwide pre/postconditions.
9794 2011-08-02 Javier Miranda <miranda@adacore.com>
9796 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9797 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9798 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9799 checks if the external tag of a type is the same as the external tag
9800 of some other declaration.
9802 2011-08-02 Thomas Quinot <quinot@adacore.com>
9804 * s-taskin.ads: Minor reformatting.
9806 2011-08-02 Emmanuel Briot <briot@adacore.com>
9808 * g-comlin.adb (Display_Help): swap the order in which it prints the
9809 short help and the general usage.
9811 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9813 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9814 the aspect declarations and attach them to the generic copy for
9815 subsequent analysis.
9816 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9817 declarations of the generic tree to the new subprogram declarations.
9818 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9819 conditions that apply to a subprogram instance.
9821 2011-08-02 Robert Dewar <dewar@adacore.com>
9823 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9825 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9827 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9828 private type with a tagged full view is not derived in the immediate
9829 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9831 2011-08-02 Robert Dewar <dewar@adacore.com>
9833 * exp_ch4.adb: Minor reformatting.
9835 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9837 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9838 Ada2012 iterator, the loop will be rewritten during expansion into a
9839 while loop with a cursor and an element declaration. Do not analyze the
9840 body in this case, because if the container is for indefinite types the
9841 actual subtype of the elements will only be determined when the cursor
9842 declaration is analyzed.
9844 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9846 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9847 size/alignment related attributes in CodePeer_Mode.
9849 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9851 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9852 Prepend_Element, since this can result in the operation getting the
9853 wrong slot in the full type's dispatch table if the full type has
9854 inherited operations. The incomplete type's operation will get added
9855 to the proper position in the full type's primitives
9856 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9857 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9858 dispatching operations, since there are cases where nonprimitive
9859 subprograms can get added to the list of incomplete dependents (such
9860 as subprograms in nested packages).
9861 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9862 private part when determining whether to add a primitive with a
9863 parameter of a tagged incomplete type to the Private_Dependents list.
9864 Such primitives can also occur in the visible part, and should not have
9865 been excluded from being private dependents.
9866 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9867 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9868 list of a Taft-amendment incomplete type is a primitive before issuing
9869 an error that the full type must appear in the same unit. There are
9870 cases where nonprimitives can be in the list (such as subprograms in
9872 * sem_disp.adb (Derives_From): Use correct condition for checking that
9873 a formal's type is derived from the type of the corresponding formal in
9874 the parent subprogram (the condition was completely wrong). Add
9875 checking that was missing for controlling result types being derived
9876 from the result type of the parent operation.
9878 2011-08-02 Yannick Moy <moy@adacore.com>
9880 * errout.adb (First_Node): minor renaming
9881 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9884 2011-08-02 Yannick Moy <moy@adacore.com>
9886 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9887 before accessing operands.
9888 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9889 decide whether an initialization expression respects SPARK rules, as
9890 the plain node is the expanded one. This allows for more valid warnings
9892 * gnat_rm.texi: Minor update.
9894 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9896 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9899 2011-08-02 Robert Dewar <dewar@adacore.com>
9901 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9903 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9905 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9906 loop statements and the element renaming declaration with a block when
9907 the element type is controlled.
9909 2011-08-02 Yannick Moy <moy@adacore.com>
9911 * sinfo.ads: Minor formatting.
9913 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9915 * sem_aggr.adb (Add_Association): if the association has a box and no
9916 expression, use the Sloc of the aggregate itself for the new
9918 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9921 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9923 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9924 When a container is provided via a function call, generate a renaming
9925 of the function result. This avoids the creation of a transient scope
9926 and the premature finalization of the container.
9927 * exp_ch7.adb (Is_Container_Cursor): Removed.
9928 (Wrap_Transient_Declaration): Remove the supression of the finalization
9929 of the list controller when the declaration denotes a container cursor,
9932 2011-08-02 Yannick Moy <moy@adacore.com>
9934 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9935 node is from source, instead of the original node being from source.
9937 (Resolve_Array_Aggregate): refine the check for a static expression, to
9938 recognize also static ranges
9939 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9940 Array_Type_Declaration): postpone the test for the type being a subtype
9941 mark after the type has been resolved, so that component-selection and
9942 expanded-name are discriminated.
9943 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9944 to distinguish the case of an iteration scheme, so that an error is
9945 issed on a non-static range in SPARK except in an iteration scheme.
9946 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9947 In_Iter_Schm = True.
9948 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9949 user-defined operators so that they are allowed in renaming
9951 (Find_Selected_Component): refine the check for prefixing of operators
9952 so that they are allowed in renaming. Move the checks for restrictions
9953 on selector name after analysis discriminated between
9954 component-selection and expanded-name.
9955 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9956 concatenation argument of string type if it is static.
9957 * sem_util.adb, sem_util.ads
9958 (Check_Later_Vs_Basic_Declarations): add a new function
9959 Is_Later_Declarative_Item to decice which declarations are allowed as
9960 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9961 mode, add that renamings are considered as later items.
9962 (Enclosing_Package): new function to return the enclosing package
9963 (Enter_Name): correct the rule for homonyms in SPARK
9964 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9965 from source (result of expansion) to avoid issuing wrong warnings.
9967 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9969 * errout.adb: On anything but an expression First_Node returns its
9972 2011-08-02 Pascal Obry <obry@adacore.com>
9974 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9976 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9978 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9979 Set the associated loop as the related expression of internally
9981 * exp_ch7.adb (Is_Container_Cursor): New routine.
9982 (Wrap_Transient_Declaration): Supress the finalization of the list
9983 controller when the declaration denotes a container cursor.
9985 2011-08-02 Yannick Moy <moy@adacore.com>
9987 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9989 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9990 expression is a simple expression. This check cannot be performed in
9991 the semantics, so just drop it.
9992 (P_Index_Or_Discriminant_Constraint): move check that the index or
9993 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9994 semantics. Other cases were previously checked in the semantics.
9995 * par-ch4.adb (P_Name): move checks that a selector name is not
9996 character literal or an operator symbol to Find_Selected_Component in
9998 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9999 declarations are not placed after later declarations in a separate
10000 procedure in Sem_Util (possibly not the best choice?), to be used both
10001 during parsing, for Ada 83 mode, and during semantic analysis, for
10003 * par-endh.adb (Check_End): move check that end label is not missing
10004 to Process_End_Label in the semantics
10005 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10006 the special case for SPARK restriction
10007 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10008 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10009 parameter Force to issue the error message even on internal node (used
10010 for generated end label). Call Check_Restriction to check when an error
10011 must be issued. In SPARK mode, issue an error message even if the
10012 restriction is not set.
10013 (Check_Restriction): new procedure with an additional out parameter to
10014 inform the caller that a message has been issued
10015 * sem_aggr.adb: Minor modification of message
10016 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10017 instead of issuing an error message directly
10018 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10019 declarations are not placed after later declarations, by calling
10020 Check_Later_Vs_Basic_Declarations
10021 (Analyze_Subtype_Declaration): move here the check that an index or
10022 discriminant constraint must be a subtype mark. Change the check that
10023 a subtype of String must start at one so that it works on subtype marks.
10024 * sem_ch4.adb (Analyze_Call): move here the check that a named
10025 association cannot follow a positional one in a call
10026 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10027 instead of issuing an error message directly
10028 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10029 selector name is not a character literal or an operator symbol. Move
10030 here the check that the prefix of an expanded name cannot be a
10031 subprogram or a loop statement.
10032 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10033 procedure called from parsing and semantics to check that basic
10034 declarations are not placed after later declarations
10035 (Process_End_Label): move here the check that end label is not missing
10037 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10039 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10040 representation clause in codepeer mode, since it confuses CodePeer and
10041 does not bring useful info.
10043 2011-08-02 Ed Falis <falis@adacore.com>
10045 * init.c: initialize fp hw on MILS.
10047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10049 * errout.adb (First_Node): for bodies, return the node itself (small
10050 optimization). For other nodes, do not check source_unit if the node
10051 comes from Standard.
10053 2011-08-02 Robert Dewar <dewar@adacore.com>
10055 * exp_ch3.adb: Minor comment additions.
10056 * sem_ch13.adb: Minor reformatting.
10058 2011-08-02 Pascal Obry <obry@adacore.com>
10060 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10062 2011-08-02 Robert Dewar <dewar@adacore.com>
10064 * sem_attr.adb: Minor reformatting.
10066 2011-08-02 Robert Dewar <dewar@adacore.com>
10068 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10069 (Has_Default_Component_Value): Removed
10070 * einfo.ads Comment updates
10071 (Has_Default_Aspect): Replaces Has_Default_Value
10072 (Has_Default_Component_Value): Removed
10074 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10076 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10077 (Get_Simple_Init_Val): Handle Default_Value aspect
10078 (Needs_Simple_Initialization): Handle Default_Value aspect
10079 * exp_ch3.ads: Needs_Simple_Initialization
10080 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10081 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10083 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10084 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10085 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10087 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10089 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10090 package containing iteration primitives.
10091 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10093 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10095 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10096 "of", pre-analyze expression in case it is a function call with
10097 finalization actions that must be placed ahead of the loop.
10098 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10099 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10101 2011-08-02 Geert Bosch <bosch@adacore.com>
10103 * cstand.adb (Create_Float_Types): Only consider C's long double for
10104 Long_Long_Float, in addition to double.
10106 2011-08-02 Robert Dewar <dewar@adacore.com>
10108 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10109 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10110 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10111 Minor reformatting.
10113 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10115 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10118 2011-08-02 Javier Miranda <miranda@adacore.com>
10120 * einfo.ads, einfo.adb
10121 (Original_Access_Type): Move this attribute to Node26 since there was
10122 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10123 which causes conflicts and breaks the generation of the .NET compiler.
10124 (Interface_Name): Add missing documentation on JGNAT only uses of
10127 2011-08-02 Geert Bosch <bosch@adacore.com>
10129 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10130 (Find_Back_End_Float_Type): Likewise
10131 (Create_Back_End_Float_Types): Likewise
10132 (Create_Float_Types): Likewise
10133 (Register_Float_Type): Likewise
10134 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10135 Nlist and split out type selection in new local Find_Base_Type function.
10136 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10138 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10140 2011-08-02 Robert Dewar <dewar@adacore.com>
10142 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10144 * opt.ads: Minor comment change.
10145 * sem_ch12.adb: Minor code reorganization.
10147 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10149 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10150 subtype's list of rep items to the list on the full subtype in the case
10151 where the lists are the same.
10153 2011-08-02 Geert Bosch <bosch@adacore.com>
10155 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10156 using the one from System.Strings, which also deallocates all strings.
10158 2011-08-02 Geert Bosch <bosch@adacore.com>
10160 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10162 * gcc-interface/Make-lang.in: Update dependencies.
10164 2011-08-02 Olivier Hainque <hainque@adacore.com>
10166 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10169 2011-08-02 Javier Miranda <miranda@adacore.com>
10171 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10172 associated with anonymous access to subprograms.
10174 2011-08-02 Geert Bosch <bosch@adacore.com>
10177 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10178 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10179 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10180 (Add_Symbol_Definition): Move to switch-c.adb
10181 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10182 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10183 (Add_Symbol_Definition): Move to switch-c.adb.
10184 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10186 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10187 Move to warnsw.adb.
10188 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10189 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10190 Move to warnsw.adb.
10191 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10192 (Add_Symbol_Definition): Moved from Prepcomp.
10193 * switch-c.ads: Update copyright notice. Use String_List instead of
10194 Argument_List, removing dependency on System.OS_Lib.
10196 2011-08-02 Yannick Moy <moy@adacore.com>
10198 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10199 mode on initialization expression which does not respect SPARK
10201 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10202 if the tree referenced by its argument represents an initialization
10203 expression in SPARK, suitable for initializing an object in an object
10206 2011-08-02 Javier Miranda <miranda@adacore.com>
10208 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10209 internally generated access to subprogram with its associated protected
10211 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10213 2011-08-02 Geert Bosch <bosch@adacore.com>
10215 * cstand.adb (Register_Float_Type): Print information about type to
10216 register, if the Debug_Flag_Dot_B is set.
10217 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10218 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10219 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10220 with a requested precision of more than Max_Digits digits and no more
10221 than Max_Base_Digits digits, if a range specification is present and the
10222 Predefined_Float_Types list has a suitable type to derive from.
10223 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10224 case of type completion with pragma Import
10226 (Process_Import_Predefined_Type): Processing to complete a type
10227 with pragma Import. Currently supports floating point types only.
10228 (Set_Convention_From_Pragma): Do nothing without underlying type.
10229 (Process_Convention): Guard against absence of underlying type,
10230 which may happen when importing incomplete types.
10231 (Process_Import_Or_Interface): Handle case of importing predefined
10232 types. Tweak error message.
10234 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10236 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10237 functions to previous change. Reorganize code slightly.
10239 2011-08-02 Geert Bosch <bosch@adacore.com>
10241 * back_end.ads (Register_Type_Proc): New call back procedure type for
10242 allowing the back end to provide information about available types.
10243 (Register_Back_End_Types): New procedure to register back end types.
10244 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10246 * cstand.adb (Back_End_Float_Types): New list for floating point types
10247 supported by the back end.
10248 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10249 (Copy_Float_Type): New procedure to make new copies of predefined types.
10250 (Register_Float_Type): New call back procedure to populate the BEFT list
10251 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10252 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10253 (Create_Float_Types): New procedure to create entities for floating
10254 point types predefined in Standard, and put these and any remaining
10255 BEFTs on the Predefined_Float_Types list.
10256 * stand.ads (Predefined_Float_Types): New list for predefined floating
10257 point types that do not have declarations in package Standard.
10259 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10261 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10262 entity node for the unit containing the parameter.
10263 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10264 (Add_Inlined_Subprogram): Likewise.
10265 * gcc-interface/Make-lang.in: Update dependencies.
10267 2011-08-02 Thomas Quinot <quinot@adacore.com>
10269 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10272 2011-08-02 Geert Bosch <bosch@adacore.com>
10274 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10276 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10278 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10279 computed value of Base_Type.
10281 2011-08-02 Yannick Moy <moy@adacore.com>
10283 * restrict.adb (Check_Restriction): issue an error for any use of
10284 class-wide, even if the No_Dispatch restriction is not set.
10285 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10286 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10287 when completing a private extension, the type named in the private part
10288 is not the same as that named in the visible part.
10289 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10290 of an inherited primitive operations of a tagged type or type extension
10291 that returns the tagged type.
10292 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10293 function which returns True for an implicit operation inherited by the
10294 derived type declaration for the argument type.
10295 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10298 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10300 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10301 Process_Bounds, to perform analysis with expansion of a range or an
10302 expression that is the iteration scheme for a loop.
10303 (Analyze_Iterator_Specification): If domain of iteration is given by a
10304 function call with a controlled result, as is the case if call returns
10305 a predefined container, ensure that finalization actions are properly
10307 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10309 2011-08-02 Javier Miranda <miranda@adacore.com>
10311 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10312 * gcc-interface/Make-lang.in: Update dependencies.
10314 2011-08-02 Javier Miranda <miranda@adacore.com>
10316 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10317 determine if the analysis is performed using N or Original_Node (N).
10318 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10319 functionality of routine Is_Variable avoids code duplication.
10320 * checks.adb (Determine_Range): Handle temporaries generated by
10321 Remove_Side_Effects.
10323 2011-08-02 Javier Miranda <miranda@adacore.com>
10325 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10326 expansion of the condition. Required since the previous analysis was
10327 done with expansion disabled (see Resolve_Quantified_Expression) and
10328 hence checks were not inserted and record comparisons have not been
10331 2011-08-02 Ed Falis <falis@adacore.com>
10333 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10336 2011-08-02 Bob Duff <duff@adacore.com>
10338 * opt.ads: Minor comment fix.
10340 2011-08-02 Bob Duff <duff@adacore.com>
10342 * sem_ch12.adb (Analyze_Package_Instantiation,
10343 Analyze_Subprogram_Instantiation): Turn off style checking while
10344 analyzing an instance. Whatever style checks that apply to the generic
10345 unit should apply, so it makes no sense to apply them in an instance.
10346 This was causing trouble when compiling an instance of a runtime
10347 unit that violates the -gnatyO switch.
10348 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10349 one of the two case statements, causing spurious errors.
10351 2011-08-02 Robert Dewar <dewar@adacore.com>
10353 * uname.adb: Minor reformatting.
10354 * gnatcmd.adb: Minor reformatting.
10355 * exp_attr.adb: Minor reformatting.
10357 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10359 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10360 No_Dispatching_Calls, do not look for the Assign primitive, because
10361 predefined primitives are not created in this case.
10363 2011-08-02 Bob Duff <duff@adacore.com>
10365 * stylesw.ads: Minor comment fixes.
10367 2011-08-02 Robert Dewar <dewar@adacore.com>
10369 * freeze.adb (Add_To_Result): New procedure.
10371 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10373 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10374 time, if the specific run-time routines for handling streams of strings
10375 are not available, use the default mechanism.
10377 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10379 * s-regpat.ads: Fix typo.
10381 2011-08-02 Vincent Celier <celier@adacore.com>
10383 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10384 not null, call it to create the in memory config project file without
10385 parsing an existing default config project file.
10387 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10389 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10391 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10393 * sem_elim.adb: an abstract subprogram does not need an eliminate
10394 pragma for its descendant to be eliminable.
10396 2011-08-02 Ed Falis <falis@adacore.com>
10398 * init.c: revert to handling before previous checkin for VxWorks
10399 * s-intman-vxworks.adb: delete unnecessary declarations related to
10400 using Ada interrupt facilities for handling signals.
10401 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10402 * s-intman-vxworks.ads: Import __gnat_install_handler as
10403 Initialize_Interrupts.
10404 * s-taprop-vxworks.adb: Delete Signal_Mask.
10405 (Abort_Handler): change construction of mask to unblock exception
10408 2011-08-02 Jerome Guitton <guitton@adacore.com>
10410 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10411 Debug_Raise_Exception before propagation starts.
10413 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10415 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10416 to Restriction_Check_Required.
10417 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10418 * sem_res.adb (Resolve_Call): Likewise.
10419 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10421 2011-08-02 Bob Duff <duff@adacore.com>
10423 * stylesw.ads: Update comment.
10424 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10425 * errout.ads: Remove obsolete comment.
10427 2011-08-02 Javier Miranda <miranda@adacore.com>
10429 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10430 (Set_Is_Safe_To_Reevaluate): new procedure.
10431 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10432 assignment is allowed on safe-to-reevaluate variables.
10433 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10434 temporary created to remove side effects in expressions that use
10435 the secondary stack as safe-to-reevaluate.
10436 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10437 variables that are not true constants.
10439 2011-08-02 Robert Dewar <dewar@adacore.com>
10441 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10442 sem_res.adb, sem_ch6.adb: Minor reformatting.
10444 2011-08-02 Jerome Guitton <guitton@adacore.com>
10446 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10448 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10450 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10451 not set Overridden_Operation if subprogram is an initialization
10454 2011-08-02 Yannick Moy <moy@adacore.com>
10456 * par-ch6.adb: Correct obsolete name in comments
10457 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10458 which takes two message arguments (existing function takes one), with
10459 second message used for continuation.
10460 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10461 block statements that originate from a source block statement, not
10462 generated block statements
10463 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10464 symmetry with procedure case
10465 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10466 function to issue an error in formal mode if a package specification
10467 contains more than one tagged type or type extension.
10468 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10469 parameters matching formals of tagged types are objects (or ancestor
10470 type conversions of objects), not general expressions. Issue an error
10471 on view conversions that are not involving ancestor conversion of an
10473 (Resolve_Type_Conversion): in formal mode, issue an error on the
10474 operand of an ancestor type conversion which is not an object
10475 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10476 procedure so that it works also for actuals of function calls
10477 (Is_Actual_Tagged_Parameter): new function which determines if its
10478 argument is an actual parameter of a formal of tagged type in a
10480 (Is_SPARK_Object_Reference): new function which determines if the tree
10481 referenced by its argument represents an object in SPARK
10483 2011-08-02 Robert Dewar <dewar@adacore.com>
10485 * sem_ch3.adb: Minor reformatting
10486 Minor comment addition
10487 Minor error msg text change
10489 2011-08-02 Javier Miranda <miranda@adacore.com>
10491 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10492 function. Used to be more precise when we generate a variable plus one
10493 assignment to remove side effects in the evaluation of the Bound
10495 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10496 of the bound expression to force its re-analysis and thus expand the
10497 associated transient scope (if required). Code cleanup replacing the
10498 previous code that declared the constant entity by an invocation to
10499 routine Force_Evaluation which centralizes this work in the frontend.
10501 2011-08-02 Robert Dewar <dewar@adacore.com>
10503 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10504 (Base_Type): Now uses improved Is_Base_Type function
10505 * einfo.ads (Base_Type): Inline this function
10507 2011-08-02 Robert Dewar <dewar@adacore.com>
10509 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10510 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10512 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10514 * gcc-interface/Make-lang.in: Update dependencies.
10515 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10518 2011-08-02 Yannick Moy <moy@adacore.com>
10520 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10521 non-simple expression used in delta constraint
10522 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10523 index constraint which is not a subtype mark
10524 * par.adb: With and use Restrict
10525 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10526 mode on component type which is not a subtype mark and default
10527 expression on component
10528 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10529 of string which does not have a lower index bound equal to 1
10530 (Array_Type_Declaration): issue an error in formal mode on index or
10531 component type which is not a subtype mark, and on aliased keyword on
10533 (Derived_Type_Declaration): issue an error in formal mode on interface,
10534 limited or abstract type
10535 (Record_Type_Declaration): issue an error in formal mode on interface
10536 (Record_Type_Definition): issue an error in formal mode on tagged types
10537 and type extensions not declared in the specification of a library unit
10538 package; on null non-tagged record; on variant part
10540 2011-08-02 Vincent Celier <celier@adacore.com>
10542 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10543 not declared for qualified library project when Library_Name is not
10544 declared, but Library_Dir is.
10546 2011-08-02 Robert Dewar <dewar@adacore.com>
10548 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10549 pragmas (affects aspects [Component_]Default_Value
10550 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10551 component type for the resolution
10553 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10555 * einfo.adb (Base_Type): Tune implementation for speed.
10557 2011-08-02 Robert Dewar <dewar@adacore.com>
10559 * freeze.adb: Minor reformatting.
10561 2011-08-02 Thomas Quinot <quinot@adacore.com>
10563 * scos.ads: Update comments.
10565 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10567 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10568 base type, because the parent may be a subtype of a private type whose
10569 convention is established in a private part.
10571 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10573 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10574 statement in a block when the expansion of the return expression has
10575 created a finalization chain.
10576 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10577 with the parent node.
10578 Add N_Extended_Return_Statement to handle the case where a transient
10579 object declaration appears in the Return_Object_Declarations list of
10580 an extended return statement.
10582 2011-08-02 Matthew Gingell <gingell@adacore.com>
10584 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10585 unused parameter 'name'.
10587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10589 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10590 inherited operation, check whether its alias, which is the source
10591 operastion that it renames, has been marked eliminated.
10593 2011-08-02 Javier Miranda <miranda@adacore.com>
10595 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10596 in-mode parameter whose type is an access type since it can be used to
10597 modify its designated object. Enforce code that handles as safe an
10598 access type that is not access-to-constant but it is the result of a
10599 previous removal of side-effects.
10600 (Remove_Side_Effects): Minor code reorganization of cases which require
10601 no action. Done to incorporate documentation on new cases uncovered
10602 working in this ticket: no action needed if this routine was invoked
10603 too early and the nodes are not yet decorated.
10604 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10605 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10606 were issued with actuals that are implicitly provided by
10609 2011-08-02 Robert Dewar <dewar@adacore.com>
10611 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10613 2011-08-02 Yannick Moy <moy@adacore.com>
10615 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10616 to issue an error in formal mode on attribute not supported in this mode
10617 (Analyze_Attribute): issue errors on standard attributes not supported
10619 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10620 comment, and issue error in formal mode on modulus which is not a power
10622 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10624 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10626 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10627 operator on modular type (except 'not').
10629 2011-08-02 Robert Dewar <dewar@adacore.com>
10631 * gnat_rm.texi: Minor reformatting.
10633 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10635 * s-osinte-linux.ads: Minor comment update and reformatting.
10636 * i-cexten.ads: Make this unit pure, as for its parent.
10637 Will allow its usage in more contexts if needed.
10639 2011-08-02 Robert Dewar <dewar@adacore.com>
10641 * s-utf_32.ads: Minor comment fix.
10643 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10645 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10646 operation of a tagged synchronized type, handle the case where the
10647 controlling argument is overloaded.
10649 2011-08-02 Yannick Moy <moy@adacore.com>
10651 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10652 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10653 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10654 SPARK mode and formal verification mode on processing SPARK restriction
10655 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10656 requiring consistency checking.
10658 2011-08-02 Robert Dewar <dewar@adacore.com>
10660 * sem_res.adb: Minor reformatting.
10662 2011-08-02 Robert Dewar <dewar@adacore.com>
10664 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10665 a-cforse.ads: Remove unneeded with of Ada.Containers
10666 Remove commented out pragma Inline's
10667 Move specifications of new subprograms to the actual specs
10669 2011-08-02 Yannick Moy <moy@adacore.com>
10671 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10672 a-cforse.ads: Update comments.
10674 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10676 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10678 2011-08-02 Robert Dewar <dewar@adacore.com>
10680 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10681 a-cforse.ads, a-cofove.ads: Minor reformatting.
10683 2011-08-02 Claire Dross <dross@adacore.com>
10685 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10686 a-cofove.ads: Add comments.
10688 2011-08-02 Yannick Moy <moy@adacore.com>
10690 * gnat_rm.texi: Document formal containers.
10692 2011-08-02 Emmanuel Briot <briot@adacore.com>
10694 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10695 are empty sections.
10697 2011-08-02 Robert Dewar <dewar@adacore.com>
10699 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10702 2011-08-02 Robert Dewar <dewar@adacore.com>
10704 * aspects.adb: New aspects Default_Value and Default_Component_Value
10705 New format of Aspect_Names table checks for omitted entries
10706 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10707 handling of boolean aspects for derived types.
10708 New aspects Default_Value and Default_Component_Value
10709 New format of Aspect_Names table checks for omitted entries
10710 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10711 (Has_Default_Value): New flag
10712 (Has_Default_Component_Value): New flag
10713 (Has_Default_Value): New flag
10714 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10716 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10717 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10718 Default_Value and Default_Component_Value
10719 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10720 New aspects Default_Value and Default_Component_Value
10721 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10722 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10724 2011-08-02 Vincent Celier <celier@adacore.com>
10726 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10727 inherit library kind.
10729 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10731 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10732 Minor reformatting.
10734 2011-08-02 Robert Dewar <dewar@adacore.com>
10736 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10738 2011-08-02 Yannick Moy <moy@adacore.com>
10740 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10742 2011-08-02 Robert Dewar <dewar@adacore.com>
10744 * impunit.adb: Add comment.
10746 2011-08-02 Yannick Moy <moy@adacore.com>
10748 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10749 qualification of aggregates in formal mode
10750 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10752 (Resolve_Aggregate): complete the test that an aggregate is adequately
10753 qualified in formal mode
10755 2011-08-02 Pascal Obry <obry@adacore.com>
10757 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10758 * mlib-prj.adb: Supress warning when compiling binder generated file.
10759 (Build_Library): Supress all warnings when compiling the binder
10762 2011-08-02 Yannick Moy <moy@adacore.com>
10764 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10766 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10767 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10768 Add with/use clauses to make Check_Formal_Restriction visible
10770 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10772 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10773 in-parameters when type of the generic formal is private in the generic
10774 spec and non-private in the body.
10776 2011-08-02 Claire Dross <dross@adacore.com>
10778 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10779 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10780 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10781 * impunit.adb, Makefile.rtl: Take new files into account.
10783 2011-08-02 Robert Dewar <dewar@adacore.com>
10785 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10786 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10788 2011-08-02 Yannick Moy <moy@adacore.com>
10790 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10792 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10793 matching static array bounds, taking into account the special case of
10795 * sem_ch3.adb: Typo in comment.
10797 2011-08-02 Yannick Moy <moy@adacore.com>
10799 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10800 which issues an error in formal mode if its argument node is originally
10802 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10803 has a discriminant specification so that it does not include the case
10805 (Derived_Type_Declaration): move here the test that a derived type has a
10806 discriminant specification
10807 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10808 first element of a component association before accessing its choices
10809 (presence of component association is not enough)
10810 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10811 declaration is a library item before accessing the next element in a
10812 list, as library items are not member of lists
10813 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10814 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10815 Check_Formal_Restriction whenever possible.
10817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10819 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10820 reference when needed.
10822 2011-08-02 Bob Duff <duff@adacore.com>
10824 * gnat_ugn.texi: Fix typo.
10826 2011-08-02 Vincent Celier <celier@adacore.com>
10828 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10829 archive file name. Do not use the full path name of archives for Open
10832 2011-08-02 Robert Dewar <dewar@adacore.com>
10834 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10835 Analyze_Aspect_Specifications
10837 (Analyze_Aspect_Specifications): New handling for boolean aspects
10838 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10839 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10840 sequence for Analyze_Aspect_Specifications
10841 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10842 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10844 2011-08-02 Robert Dewar <dewar@adacore.com>
10846 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10847 aspects, since these no longer exist.
10849 2011-08-02 Robert Dewar <dewar@adacore.com>
10851 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10852 semicolon, do not try to see if there are aspects following it.
10853 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10856 2011-08-02 Robert Dewar <dewar@adacore.com>
10858 * sem_ch8.adb, aspects.ads: Minor reformatting.
10860 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10862 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10863 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10865 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10867 2011-08-02 Yannick Moy <moy@adacore.com>
10869 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10870 mode on subprogram declaration outside of package specification, unless
10871 it is followed by a pragma Import
10872 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10873 Access_Type_Declaration): issue error in formal mode on access type
10874 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10876 (Analyze_Object_Declaration): issue error in formal mode on object
10877 declaration which does not respect SPARK restrictions
10878 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10879 declaration which does not respect SPARK restrictions
10880 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10881 error in formal mode on digits or delta constraint
10882 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10883 decimal fixed point type
10884 (Derived_Type_Declaration): issue error in formal mode on derived type
10885 other than type extensions of tagged record types
10886 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10887 with check on access definition
10888 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10889 mode on protected definition.
10890 (Analyze_Task_Definition): issue error in formal mode on task definition
10892 2011-08-02 Robert Dewar <dewar@adacore.com>
10894 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10896 2011-08-02 Javier Miranda <miranda@adacore.com>
10898 * sem_ch6.adb (Can_Override_Operator): New function.
10899 (Verify_Overriding_Indicator): Add missing code to check overriding
10900 indicator in operators. Fixes regression.
10901 (Check_Overriding_Indicator): Minor reformating after replacing the
10902 code that evaluates if the subprogram can override an operator by
10903 invocations to the above new function.
10905 (Write_Field26_Name): Add missing code to ensure that, following
10906 the documentation in einfo.ads, this field is not shown as attribute
10907 "Static_Initialization" on non-dispatching functions.
10909 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10911 * sem_res.adb (Resolve_Call): A call to
10912 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10913 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10914 i.e., when the second parameter is of type Time_Span.
10916 2011-08-02 Vincent Celier <celier@adacore.com>
10918 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10919 with an archive instead of -L<library dir> -l<library name>.
10921 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10923 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10924 mark the base types In_Use in addition to making the operations
10927 2011-08-02 Ed Falis <falis@adacore.com>
10929 * init.c: add and setup __gnat_signal_mask for the exception signals
10930 * s-inmaop-vxworks.adb: new file.
10931 * s-intman-vxworks.adb: remove unnecessary initializations and
10933 * s-intman-vxworks.ads: remove unnecessary variable
10934 * s-taprop-vxworks.adb: simplify signal initialization
10936 2011-08-02 Robert Dewar <dewar@adacore.com>
10938 * sem_ch8.adb: Minor code reorganization, comment updates.
10940 2011-08-02 Robert Dewar <dewar@adacore.com>
10942 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10943 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10945 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10946 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10948 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10950 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10951 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10952 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10953 use_type_clauses, to handle more efficiently use_type and use_all_type
10955 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10956 Ada2012 Use_All_Type clause.
10957 (Use_Class_Wide_Operations): new procedure.
10959 2011-08-02 Robert Dewar <dewar@adacore.com>
10961 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10962 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10963 expression to expression function.
10965 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10967 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10968 if types are compatible.
10970 2011-08-02 Yannick Moy <moy@adacore.com>
10972 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10973 returns True if its argument array types have same dimension and same
10974 static bounds at each index.
10975 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10976 OUT or IN OUT paramaters which are not view conversions in SPARK.
10977 (Resolve_Arithmetic_Op): issue an error in formal mode on
10978 multiplication or division with operands of fixed point types which are
10979 not qualified or explicitly converted.
10980 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10981 Boolean or array type (except String) operands.
10982 (Resolve_Equality_Op): issue an error in formal mode on equality
10983 operators for array types other than String with non-matching static
10985 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10986 for array types with non-matching static bounds. Factorize the code in
10987 Matching_Static_Array_Bounds.
10988 (Resolve_Qualified_Expression): issue an error in formal mode on
10989 qualified expressions for array types with non-matching static bounds.
10990 (Resolve_Type_Conversion): issue an error in formal mode on type
10991 conversion for array types with non-matching static bounds
10993 2011-08-02 Robert Dewar <dewar@adacore.com>
10995 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10997 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10999 * par-ch9.adb: save location of entry for proper error message.
11001 2011-08-02 Javier Miranda <miranda@adacore.com>
11003 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11004 (Use_Full_View) which permits this routine to climb through the
11005 ancestors using the full-view of private parents.
11006 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11007 Use_Full_View to true in calls to Is_Ancestor.
11008 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11009 true in call to Is_Ancestor.
11010 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11011 Use_Full_View to true in call to Is_Ancestor.
11012 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11013 call to Is_Ancestor.
11014 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11015 Use_Full_View to true in calls to Is_Ancestor.
11016 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11017 Make_Select_Specific_Data_Table, Register_Primitive,
11018 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11019 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11020 to true in call to Is_Ancestor.
11021 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11022 Use_Full_View to true in calls to Is_Ancestor.
11024 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11025 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11027 2011-08-02 Robert Dewar <dewar@adacore.com>
11029 * gnat_rm.texi: Minor reformatting.
11030 * sem_prag.adb: Minor reformatting.
11032 2011-08-02 Tristan Gingold <gingold@adacore.com>
11034 * vms_data.ads: Add VMS qualifier for -gnateP.
11036 2011-08-02 Robert Dewar <dewar@adacore.com>
11038 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11039 * par-ch7.adb (P_Package): Proper placement of aspects for package
11040 decl/instantiation.
11041 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11042 (End_Statements): Add Is_Sloc parameterr
11043 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11044 (Check_End): Ad Is_Sloc parameter
11045 (End_Statements): Add Is_Sloc parameterr
11047 2011-08-02 Vincent Celier <celier@adacore.com>
11049 * ug_words: Add VMS qualifier equivalent to -gnateP:
11050 /SYMBOL_PREPROCESSING.
11052 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11054 * gnat-style.texi: For hexadecimal numeric literals the typical
11055 grouping of digits is 4 to represent 2 bytes.
11056 A procedure spec which is split into several lines is indented two
11059 2011-08-02 Yannick Moy <moy@adacore.com>
11061 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11062 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11063 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11065 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11066 choice in array aggregate
11067 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11069 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11070 positional and named aggregate for record, or others in record
11071 aggregate, or multiple choice in record aggregate
11072 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11073 array operands to logical operations AND, OR and XOR do not have the
11074 same static lower and higher bounds
11075 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11077 2011-08-01 Robert Dewar <dewar@adacore.com>
11079 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11080 Replaces Last_Source_Node_In_Sequence.
11081 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11082 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11083 parens and blank in string (this was inconsistently implemented).
11085 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11086 blank in string (this was inconsistently implemented).
11088 (Set_Global_Switches): Set formal mode switches appropriately
11089 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11091 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11092 call Set_Error_Msg_Lang to set "spark" as language name.
11093 * par.adb: Remove unnecessary call to set formal language for errout
11094 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11095 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11097 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11098 calls to it, moved after resolution so that types are known
11099 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11100 result of concatenation is not of type String
11101 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11102 concatenation is not properly restricted
11103 * gnat_rm.texi: Add doc on pragma Spark_95.
11104 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11105 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11106 * gcc-interface/Make-lang.in: Update dependencies.
11108 2011-08-01 Javier Miranda <miranda@adacore.com>
11110 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11111 condition that detects if the overridden operation must replace an
11114 2011-08-01 Javier Miranda <miranda@adacore.com>
11116 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11117 code declarations inserted by Insert_Actions in each alternative of the
11118 N_Case_Expression node.
11120 2011-08-01 Robert Dewar <dewar@adacore.com>
11122 * sem_ch6.adb: Minor code reorganization.
11123 * sem_util.adb: Minor reformatting.
11125 2011-08-01 Pascal Obry <obry@adacore.com>
11127 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11128 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11130 2011-08-01 Yannick Moy <moy@adacore.com>
11132 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11133 literal or operator symbol which is prefixed
11134 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11135 mode on access attributes.
11136 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11137 that concatenation operands are properly restricted in formal mode
11138 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11139 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11140 result of the concatenation has a type different from String.
11141 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11142 Analyze_Quantified_Expression, Analyze_Slice,
11143 Analyze_Null): issue an error in formal mode on unsupported constructs
11145 (Analyze_Block_Statement): only issue error on source block statement
11146 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11147 function which returns the last node in a list of nodes for which
11148 Comes_From_Source returns True, if any
11149 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11150 Last_Source_Node_In_Sequence
11151 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11152 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11153 mode on unsupported constructs
11154 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11155 rest of the actions may be needed later on since the error is marked as
11157 * sinfo.ads: Typos in comments.
11159 2011-08-01 Pascal Obry <obry@adacore.com>
11161 * projects.texi: Minor editing.
11163 2011-08-01 Yannick Moy <moy@adacore.com>
11165 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11166 insertion character ~~
11167 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11168 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11169 with insertion character ~~
11170 (Set_Msg_Text): treat insertion character ~~
11171 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11172 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11173 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11174 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11175 errors related to the formal language restriction not serious
11176 (insertion character |).
11177 * par.adb (Par): set formal language for error messages if needed
11178 * sem_ch6.adb (Check_Missing_Return): take into account possible
11179 generated statements at the end of the function
11180 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11181 enumeration value to define a new pragma SPARK_95
11182 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11183 SPARK_Version): new type and variables to store the SPARK version
11185 (SPARK_Mode): return True when SPARK_Version is set
11186 * par-prag.adb: Correct indentation
11187 (Prag): take Pragma_SPARK_95 into account
11188 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11191 2011-08-01 Robert Dewar <dewar@adacore.com>
11193 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11194 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11195 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11197 2011-08-01 Pascal Obry <obry@adacore.com>
11199 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11200 Target_Name to Get_Path call.
11201 (Parse_Single_Project): Likewise.
11202 (Post_Parse_Context_Clause): Likewise.
11203 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11204 Call Initialise_Project_Path with the proper Target_Name.
11205 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11207 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11208 with the proper Target_Name.
11209 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11210 Part.Parse routine.
11211 (Parse_Project_And_Apply_Config): Likewise.
11212 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11213 This is fine as this part of the code is supporting only native
11215 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11216 is fine as this part of the code is supporting only native compilation.
11218 2011-08-01 Yannick Moy <moy@adacore.com>
11220 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11221 of homonym, unless the homonym is one of the cases allowed in SPARK
11222 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11223 package declaration occurring after a body.
11225 2011-08-01 Robert Dewar <dewar@adacore.com>
11227 * checks.adb, exp_ch4.adb: Minor reformatting.
11229 2011-08-01 Javier Miranda <miranda@adacore.com>
11231 * einfo.ads (Access_Disp_Table): Fix documentation.
11232 (Dispatch_Table_Wrappers): Fix documentation.
11234 2011-08-01 Pascal Obry <obry@adacore.com>
11236 * prj-env.adb, prj-env.ads: Minor reformatting.
11238 2011-08-01 Yannick Moy <moy@adacore.com>
11240 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11241 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11242 procedures out of these packages.
11243 * errout.ads, errout.adb
11244 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11245 procedures in of this package
11246 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11247 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11248 on misplaced later vs initial declarations, like in Ada 83
11249 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11250 formal mode on attribute of private type whose full type declaration
11252 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11253 package declaration inside a package specification
11254 (Analyze_Full_Type_Declaration): issue error in formal mode on
11255 controlled type or discriminant type
11256 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11257 user-defined operator means that it should come from the source
11258 (New_Overloaded_Entity): issue error in formal mode on overloaded
11260 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11262 2011-08-01 Thomas Quinot <quinot@adacore.com>
11264 * atree.adb: Minor reformatting.
11265 * checks.adb: Minor reformatting.
11267 2011-08-01 Vincent Celier <celier@adacore.com>
11269 * s-parame-vms-ia64.ads: Fix typo in comment
11271 * s-parame-vms-restrict.ads: Removed, unused.
11273 2011-08-01 Javier Miranda <miranda@adacore.com>
11276 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11278 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11279 * sem_ch3.ads, sem_ch3.adb
11280 (Is_Constant_Bound): New extended version of the subprogram that was
11281 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11282 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11283 * sem_aux.ads (Constant_Value): Fix typo in comment.
11284 * checks.adb (Generate_Index_Checks): New implementation which, for
11285 array objects with constant bounds, generates the runtime check
11286 referencing the bounds of the array type. For other cases this routine
11287 provides its previous behavior obtaining such values from the array
11289 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11291 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11292 we cannot have semantic interpretations of the new node.
11294 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11296 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11299 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11301 * sem_ch8.adb: Minor code editing.
11302 * s-vxwext.adb: Remove trailing space.
11303 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11304 consistency with other files.
11306 2011-08-01 Thomas Quinot <quinot@adacore.com>
11308 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11310 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11312 * par-ch10.adb: reject parameterized expressions as compilation unit.
11313 * sem_ch4.adb: handle properly conditional expression with overloaded
11314 then_clause and no else_clause.
11316 2011-08-01 Tristan Gingold <gingold@adacore.com>
11318 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11319 like done by System.Aux_DEC.
11320 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11322 2011-08-01 Yannick Moy <moy@adacore.com>
11324 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11325 missing label at end of declaration (subprogram or package)
11326 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11327 of positional and named parameter association
11328 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11329 Error_Msg_SP which adds a prefix to the error message giving the name
11330 of the formal language analyzed
11331 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11332 access result type in subprogram, unconstrained array as result type,.
11333 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11335 * sem_ch8.adb: Code clean up.
11337 2011-08-01 Javier Miranda <miranda@adacore.com>
11339 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11340 * einfo.ads (Access_Disp_Table): Fix documentation.
11341 (Dispatch_Table_Wrappers): Fix documentation.
11342 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11343 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11344 to enforce the documentation of this attribute.
11345 (Set_Is_Interface): Cleanup the assertion.
11346 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11347 the Underlying_Type entity before reading attribute Access_Disp_Table.
11348 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11349 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11350 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11351 the Underlying_Type entity before reading attribute Access_Disp_Table.
11352 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11353 Locate the Underlying_Type entity before reading attribute
11356 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11358 * s-poosiz.ads: Additional overriding indicators.
11360 2011-08-01 Yannick Moy <moy@adacore.com>
11362 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11364 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11365 parameter specification does not include a subtype mark.
11366 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11367 formal mode on abstract subprogram.
11368 (Analyze_Subprogram_Specification): issue error in formal mode on
11369 user-defined operator.
11370 (Process_Formals): issue error in formal mode on access parameter and
11371 default expression.
11372 * sem_ch9.adb (Analyze_Abort_Statement,
11373 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11374 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11375 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11376 Analyze_Requeue, Analyze_Selective_Accept,
11377 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11378 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11379 issue error in formal mode on user-defined raise statement.
11381 2011-08-01 Thomas Quinot <quinot@adacore.com>
11383 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11384 declaration being hidden when overriding an implicit inherited
11386 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11387 (-gnats), do not complain about a source file that contains only a
11390 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11392 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11393 variable if already set.
11395 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11397 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11398 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11399 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11400 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11401 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11402 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11403 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11404 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11405 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11406 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11407 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11408 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11409 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11410 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11411 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11412 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11413 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11414 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11415 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11416 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11417 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11418 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11419 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11420 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11421 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11422 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11423 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11424 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11425 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11426 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11427 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11428 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11429 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11430 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11431 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11432 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11433 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11434 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11435 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11436 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11437 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11438 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11439 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11440 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11441 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11442 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11443 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11444 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11445 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11446 Use GNAT instead of GNARL.
11448 2011-08-01 Bob Duff <duff@adacore.com>
11450 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11451 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11452 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11455 2011-08-01 Yannick Moy <moy@adacore.com>
11457 * debug.adb (d.D) reverve flag for the SPARK mode
11458 (d.E) reverve flag for SPARK generation mode
11459 (d.F) reverve flag for Why generation mode
11460 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11461 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11462 functions which return True when the corresponding modes are set
11463 (Formal_Language): return "spark" or "alfa" when in formal verification
11465 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11466 Error_Msg to prefix the error message with a tag giving the formal
11468 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11469 message with a tag giving the formal language
11470 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11472 (Analyze_Case_Statement): issue error in formal mode on case statement
11473 with a single "others" case alternative
11474 (Analyze_Exit_Statement): issue errors in formal mode on exit
11475 statements which do not respect SPARK restrictions
11476 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11477 (Check_Unreachable_Code): always issue an error (not a warning) in
11478 formal mode on unreachable code (concerns both code after an infinite
11479 loop and after an unconditional jump, both not allowed in SPARK)
11480 * sem_ch6.adb (Analyze_Return_Statement): add call to
11481 Set_Return_Present for a procedure containing a return statement
11482 (already done for functions in Analyze_Function_Return)
11483 (Analyze_Function_Return): issue error in formal mode on extended
11484 return or if return is not last statement in function
11485 (Check_Missing_Return): issue error in formal mode if function does
11486 not end with return or if procedure contains a return
11487 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11488 function to detect if there is an inner scope of its parameter S which
11491 2011-08-01 Thomas Quinot <quinot@adacore.com>
11493 * sem_ch6.ads: Minor reformatting.
11495 2011-08-01 Javier Miranda <miranda@adacore.com>
11497 * sem_util.adb (Abstract_Interface_List): Complete condition when
11498 processing private type declarations to avoid reading unavailable
11500 (Is_Synchronized_Tagged_Type): Complete condition when processing
11501 private extension declaration nodes to avoid reading unavailable
11504 2011-08-01 Thomas Quinot <quinot@adacore.com>
11506 * sem_ch3.adb: Minor reformatting.
11508 2011-08-01 Thomas Quinot <quinot@adacore.com>
11510 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11511 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11512 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11513 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11514 for VMS, instead parametrize the common implementation with
11515 System.Parameters declarations.
11517 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11519 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11521 2011-08-01 Tristan Gingold <gingold@adacore.com>
11523 * seh_init.c: Fix SEH handler installation on win64.
11525 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11527 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11528 double analysis of an anonymous access to subprogram, because it can
11529 lead to improper sharing of profiles and a back-end crash.
11531 2011-08-01 Robert Dewar <dewar@adacore.com>
11533 * make.adb, sem_ch4.adb: Minor reformatting.
11534 * gcc-interface/Make-lang.in: Update dependencies.
11535 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11537 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11539 * gnat_rm.texi: Fix definition of Long_Integer.
11541 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11543 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11544 to prevent storage exhaustion.
11545 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11546 finalized is a function body, insert the cleanup code before the final
11547 return statement, to prevent spurious warnings.
11548 * s-pooglo.ads: add overriding indicator.
11550 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11552 * sem_ch4.adb (Operator_Check): improve error message when both a
11553 with_clause and a use_clause are needed to make operator usage legal.
11554 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11555 determine whether a compilation unit is visible within an other,
11556 either through a with_clause in the current unit, or a with_clause in
11557 its library unit or one one of its parents.
11559 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11561 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11562 over an arbitrary expression of an array or container type.
11563 * lib-xref.adb: clarify comment.
11565 2011-08-01 Bob Duff <duff@adacore.com>
11567 * einfo.ads: Minor reformatting.
11568 * debug.adb: Minor comment improvement.
11570 2011-08-01 Javier Miranda <miranda@adacore.com>
11572 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11573 consider hidden subprograms as valid candidates.
11575 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11577 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11579 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11581 * gnat_ugn.texi: Fix typo.
11583 2011-08-01 Robert Dewar <dewar@adacore.com>
11585 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11586 lib-xref.adb: Minor reformatting
11588 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11590 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11591 when to generate a call to Move_Final_List.
11592 (Has_Controlled_Parts): Remove this function.
11594 2011-08-01 Geert Bosch <bosch@adacore.com>
11596 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11597 "," in choice list.
11599 2011-08-01 Thomas Quinot <quinot@adacore.com>
11601 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11602 explicit raise of a predefined exception as Comes_From_Source if the
11603 original N_Raise_Statement comes from source.
11605 2011-08-01 Robert Dewar <dewar@adacore.com>
11607 * sinfo.ads: Add comment.
11608 * sem_ch6.adb: Minor reformatting.
11610 2011-08-01 Robert Dewar <dewar@adacore.com>
11612 * freeze.adb (Freeze_Entity): Refine check for bad component size
11613 clause to avoid rejecting confirming clause when atomic/aliased present.
11615 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11617 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11618 better determine whether an entity reference is a write.
11619 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11621 * lib-xref.adb (Output_References): Do no suppress a read reference at
11622 the same location as an immediately preceeding modify-reference, to
11623 handle properly in-out actuals.
11625 2011-08-01 Tristan Gingold <gingold@adacore.com>
11627 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11629 2011-08-01 Quentin Ochem <ochem@adacore.com>
11631 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11632 heap to compute the result.
11634 2011-08-01 Robert Dewar <dewar@adacore.com>
11636 * atree.ads: Minor reformatting.
11638 2011-08-01 Emmanuel Briot <briot@adacore.com>
11640 * g-expect.adb (Get_Command_Output): Fix memory leak.
11642 2011-08-01 Geert Bosch <bosch@adacore.com>
11644 * cstand.adb (P_Float_Type): New procedure to print the definition of
11645 predefined fpt types.
11646 (P_Mixed_Name): New procedure to print a name using mixed case
11647 (Print_Standard): Use P_Float_Type for printing floating point types
11648 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11649 precision IEEE float.
11651 2011-08-01 Thomas Quinot <quinot@adacore.com>
11653 * sem_ch3.adb: Minor reformatting.
11655 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11657 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11658 the completion of a generic function, insert the new body rather than
11659 rewriting the original.
11661 2011-08-01 Yannick Moy <moy@adacore.com>
11663 * sinfo.ads, errout.ads: Typos in comments.
11665 2011-08-01 Robert Dewar <dewar@adacore.com>
11667 * par-endh.adb: Minor reformatting.
11669 2011-08-01 Robert Dewar <dewar@adacore.com>
11671 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11672 (Pre_Post_Aspects): New subtype.
11673 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11674 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11675 * par-ch7.adb (P_Package): Remove Decl parameter
11676 (P_Package): Handle new syntax for aspects (before IS)
11677 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11679 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11680 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11681 (P_Package): Remove Decl parameter
11682 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11684 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11686 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11687 * sinfo.ads: Document new syntax for aspects in packages etc.
11688 * sprint.adb: Handle new syntax of aspects before IS in package
11690 2011-08-01 Thomas Quinot <quinot@adacore.com>
11692 * atree.ads: Minor reformatting.
11693 * sem_prag.adb: Minor reformatting.
11695 2011-08-01 Robert Dewar <dewar@adacore.com>
11697 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11698 case expr alternative.
11700 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11702 * sem_ch12.adb: Fix typo.
11704 2011-08-01 Geert Bosch <bosch@adacore.com>
11706 * sem_prag.adb (Check_No_Link_Name): New procedure.
11707 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11708 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11709 instead of Standard_Long_Long_Float_Size global. Preparation for
11710 eventual removal of per type constants.
11711 * exp_util.ads (Get_Stream_Size): New function returning the stream
11712 size value of subtype E.
11713 * exp_util.adb (Get_Stream_Size): Implement new function.
11714 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11716 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11718 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11720 2011-08-01 Geert Bosch <bosch@adacore.com>
11722 * cstand.adb: Fix comments.
11723 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11724 count of arguments.
11726 2011-08-01 Robert Dewar <dewar@adacore.com>
11728 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11730 2011-08-01 Geert Bosch <bosch@adacore.com>
11732 * atree.ads: Fix comment.
11734 2011-08-01 Robert Dewar <dewar@adacore.com>
11736 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11737 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11738 * par.adb: Add with for Namet.Sp.
11739 * par-tchk.adb: Minor reformatting.
11741 2011-08-01 Vincent Celier <celier@adacore.com>
11743 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11744 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11745 of the init procedure of a SAL.
11746 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11749 2011-08-01 Thomas Quinot <quinot@adacore.com>
11751 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11754 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11756 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11758 2011-08-01 Thomas Quinot <quinot@adacore.com>
11760 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11761 conformant with its spec (return True only for types that have
11762 an overriding Initialize primitive operation that prevents them from
11763 having preelaborable initialization).
11764 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11765 initialization for controlled types in Ada 2005 or later mode.
11767 2011-08-01 Robert Dewar <dewar@adacore.com>
11769 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11771 (Same_Aspect): New function.
11772 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11773 Type_Invariant, Precondition, Postcondition.
11774 * snames.ads-tmpl: Add Name_Type_Invariant.
11776 2011-08-01 Robert Dewar <dewar@adacore.com>
11778 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11780 (Freeze_All_Ent): Fix error in handling inherited aspects.
11781 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11782 already analyzed, but don't skip entire processing of a declaration,
11783 that's wrong in some cases of declarations being rewritten.
11784 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11785 Don't delay for integer, string literals
11786 Treat predicates in usual manner for delay, remove special case code,
11788 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11789 (Build_Predicate_Function): Update saved expression in aspect
11790 (Build_Invariant_Procedure): Update saved expression in aspect
11791 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11792 of replacement of discriminant references if the reference is simple.
11794 2011-08-01 Robert Dewar <dewar@adacore.com>
11796 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11797 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11798 Static_Predicate and Dynamic_Predicate.
11799 (Build_Predicate_Function): Add processing for Static_Predicate
11800 and Dynamic_Predicate.
11801 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11802 (From_Static_Predicate): New flag
11803 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11805 2011-08-01 Robert Dewar <dewar@adacore.com>
11807 * usage.adb: Documentation cleanup for Ada version modes in usage.
11808 * expander.adb: Minor reformatting.
11810 2011-08-01 Robert Dewar <dewar@adacore.com>
11812 * atree.ads: Minor comment fix.
11813 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11814 a-witeio.ads, sem_prag.adb: Minor reformatting.
11816 2011-08-01 Doug Rupp <rupp@adacore.com>
11818 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11819 pointers. Use descrip.h header file for convenience. Add some
11822 2011-08-01 Robert Dewar <dewar@adacore.com>
11824 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11825 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11826 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11828 (Check_Aspect_At_End_Of_Declarations): New procedure
11829 (Analye_Aspect_Specification): Minor changes for above procedures
11830 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11831 specification node as well.
11833 2011-08-01 Pascal Obry <obry@adacore.com>
11835 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11836 Windows files. Use GetFilesAttributes() in this case to check for file
11837 existence instead of returning with an error code.
11839 2011-08-01 Vincent Celier <celier@adacore.com>
11841 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11842 High is above Source length.
11844 2011-08-01 Robert Dewar <dewar@adacore.com>
11846 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11848 2011-08-01 Robert Dewar <dewar@adacore.com>
11850 * aspects.ads (Boolean_Aspects): New subtype.
11851 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11852 for derived types in cases where the parent type and derived type have
11854 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11855 with aspects when parent type also has aspects.
11856 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11857 boolean expression at this point).
11858 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11859 accordance with final decision on the Ada 2012 feature.
11860 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11862 2011-08-01 Matthew Heaney <heaney@adacore.com>
11864 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11866 2011-08-01 Pascal Obry <obry@adacore.com>
11868 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11869 Fix Replace_Slice when High is above current string size.
11870 (Replace_Slice): Fix DL computation when High is above current
11873 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11875 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11877 2011-08-01 Matthew Heaney <heaney@adacore.com>
11879 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11882 2011-08-01 Pascal Obry <obry@adacore.com>
11884 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11887 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11889 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11890 access to protected subprograms in generic bodies.
11891 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11892 protected type, indicate that the convention of the subprogram is
11893 Convention_Protected, because it may be used in subsequent declarations
11894 within the protected declaration.
11896 2011-08-01 Vincent Celier <celier@adacore.com>
11898 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11899 and "final" procedures when the name of the library is "ada", to avoid
11900 duplicate symbols "adainit" and "adafinal" in executables.
11902 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11904 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11905 quantified expression that appears within a postcondition and uses the
11906 Ada2012 'Result attribute.
11908 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11910 * init.c (__gnat_error_handler): Cast reason to int.
11911 (__gnat_install_handler): Explain sa_sigaction use.
11913 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11915 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11916 subprogram has copy-in copy-out parameters, try to promote the mode of
11917 the return type if it is passed in registers.
11919 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11921 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11922 left operand as addressable.
11924 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11926 * gcc-interface/gigi.h (build_function_stub): Remove.
11927 (build_return_expr): Likewise.
11928 (convert_vms_descriptor): Declare.
11929 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11930 (build_function_stub): Move to...
11931 * gcc-interface/utils2.c (build_return_expr): Move to...
11932 * gcc-interface/trans.c (build_function_stub): ...here.
11933 (build_return_expr): ...here.
11934 (Subprogram_Body_to_gnu): Add local variable for language_function.
11935 Disconnect the parameter attributes cache, if any, once done with it.
11936 Call end_subprog_body only after setting the end_locus.
11937 Build the stub associated with the function, if any, at the very end.
11938 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11939 variables and streamline control flow.
11941 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11944 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11945 g-trasym-dwarf.adb.
11947 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11950 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11951 Assign to act.sa_sigaction.
11952 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11953 current->return_address to char * before arithmetic.
11955 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11957 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11958 Correct argument types.
11959 Extract code from reason.
11960 (__gnat_install_handler): Assign to act.sa_sigaction.
11962 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11964 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11965 (GNAT1_OBJS): ...here.
11967 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11970 * g-socthi-mingw.adb (Fill): Fix formatting.
11972 * gcc-interface/gigi.h: Move around comment.
11974 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11977 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11979 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11982 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11984 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11986 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11987 range comparison if Pmode is SImode.
11989 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11990 Eric Botcazou <ebotcazou@adacore.com>
11992 * adadecode.c: Wrap up in extern "C" block.
11993 * adadecode.h: Likewise.
11994 * adaint.c: Likewise. Remove 'const' keyword.
11995 * adaint.h: Likewise.
11996 * argv.c: Likewise.
11997 * atree.h: Likewise.
11999 * cstreams.c: Likewise.
12001 * exit.c: Likewise.
12003 * final.c: Likewise.
12004 * init.c: Likewise.
12005 * initialize.c: Likewise.
12006 * link.c: Likewise.
12007 * namet.h: Likewise.
12008 * nlists.h: Likewise.
12009 * raise.c: Likewise.
12010 * raise.h: Likewise.
12011 * repinfo.h: Likewise.
12012 * seh_init.c: Likewise.
12013 * targext.c: Likewise.
12014 * tracebak.c: Likewise.
12015 * uintp.h: Likewise.
12016 * urealp.h: Likewise.
12017 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12018 * xsinfo.adb: Likewise.
12019 * xsnamest.adb: Likewise.
12020 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12021 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12022 * gcc-interface/misc.c: Likewise.
12023 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12024 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12025 ada/targext.o here...
12026 (GNAT_ADA_OBJS): ...and not here.
12027 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12028 (GNATBIND_OBJS): Reorder.
12030 2011-07-07 Richard Henderson <rth@redhat.com>
12032 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12033 dwarf2out_frame_init.
12035 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12037 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12039 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12042 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12044 2011-07-06 Richard Guenther <rguenther@suse.de>
12046 * gcc-interface/misc.c (gnat_init): Merge calls to
12047 build_common_tree_nodes and build_common_tree_nodes_2.
12048 Re-initialize boolean_false_node.
12050 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12051 Olivier Hainque <hainque@adacore.com>
12052 Nicolas Setton <setton@adacore.com>
12054 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12055 the type according to the ARTIFICIAL_P parameter.
12056 (create_type_decl): Likewise.
12057 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12059 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12061 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12062 (gnatbind): Likewise.
12064 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12066 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12068 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12070 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12071 local variable throughout. Remove useless call to Base_Type.
12072 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12073 Take it also into account for the volatileness of the field. Set the
12074 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12076 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12078 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12079 on a dereference built for a by-ref object if it has an address clause.
12081 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12083 * einfo.ads (Address_Taken): Document use for the second argument of
12084 Asm_Input and Asm_Output attributes.
12085 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12086 argument is an entity name, then set Address_Taken on it.
12087 <Attribute_Asm_Output>: Likewise.
12088 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12089 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12090 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12091 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12093 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12095 PR middle-end/46500
12096 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12098 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12100 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12101 (ada/utils.o): Update dependencies.
12102 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12103 ../../../libcpp/libcpp.a.
12104 * gcc-interface/utils.c: Include common/common-target.h.
12105 (process_attributes): Use targetm_common.have_named_sections.
12107 2011-06-07 Richard Guenther <rguenther@suse.de>
12109 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12112 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12114 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12115 TREE_THIS_NOTRAP flag.
12117 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12119 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12122 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12124 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12125 constants whose full view has discriminants specially.
12127 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12129 * gcc-interface/utils.c: Include diagnostic.h.
12130 (gnat_write_global_declarations): Output debug information for all
12131 global type declarations before finalizing the compilation unit.
12132 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12134 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12136 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12138 2011-05-25 Kai Tietz <ktietz@redhat.com>
12140 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12141 initialization instead of const/none-const pointer assignment.
12143 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12145 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12146 $(EXTRA_GNAT1_OBJS).
12147 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12148 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12149 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12150 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12151 libcommon-target.a instead of prefix.o.
12153 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12156 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12158 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12160 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12161 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12162 instead of version.o.
12164 2011-05-18 Kai Tietz <ktietz@redhat.com>
12166 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12167 boolean_false_node instead of integer_zero_node.
12168 (convert_with_check): Likewise.
12169 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12171 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12173 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12174 type of the parameter is an unconstrained array, convert the actual to
12175 the type of the formal in the In Out and Out cases as well.
12177 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12179 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12180 call build_function_type_array or build_varargs_function_type_array
12182 (create_subprog_type): Don't call build_function_type; call
12183 build_function_type_vec instead.
12185 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12187 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12188 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12189 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12191 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12193 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12195 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12196 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12198 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12200 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12202 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12204 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12205 instead of accessing TYPE_ARG_TYPES directly.
12206 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12208 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12211 * gcc-interface/gigi.h (get_variant_part): Declare.
12212 * gcc-interface/decl.c (get_variant_part): Make global.
12213 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12214 types have the same constant size, are record types and T1 has a
12215 variant part while T2 doesn't.
12217 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12219 * gcc-interface/utils.c (begin_subprog_body): Do not call
12221 (end_subprog_body): Likewise.
12223 2011-05-04 Richard Guenther <rguenther@suse.de>
12225 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12227 (pos_to_constructor): Likewise.
12229 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12230 Eric Botcazou <ebotcazou@adacore.com>
12232 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12233 of build_function_type. Adjust calls to...
12234 (build_raise_check): ...this. Do not take a void_tree parameter.
12235 Call build_function_type_list instead of build_function_type.
12236 Fix head comment and swap couple of conditional blocks.
12238 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12240 * gnatvsn.ads (Library_Version): Bump to 4.7.
12241 (Current_Year): Bump to 2011.
12243 2011-04-29 Michael Matz <matz@suse.de>
12245 * gcc-interface/misc.c (gnat_handle_option): Set
12246 warn_maybe_uninitialized.
12248 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12250 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12251 the Watson/McCabe paper.
12253 2011-04-23 Jim Meyering <meyering@redhat.com>
12255 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12257 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12259 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12262 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12264 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12266 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12267 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12268 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12269 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12270 <all>: Do not set flags on the reused DECL node coming from an alias.
12271 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12272 don't need debug info here...
12273 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12274 (gigi): Adjust calls to create_subprog_decl.
12275 (build_raise_check): Likewise.
12276 (establish_gnat_vms_condition_handler): Likewise.
12277 (Compilation_Unit_to_gnu): Likewise.
12278 (gnat_to_gnu): Likewise.
12280 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12282 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12283 (NO_REORDER_ADAFLAGS): New variable.
12284 (EXTRA_GNATTOOLS): Always define.
12285 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12286 Clean up and adjust list of files compiled with special options.
12287 * gcc-interface/Make-lang.in: Likewise.
12288 (ada/decl.o): Cosmetical change.
12289 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12291 2011-04-20 Jim Meyering <meyering@redhat.com>
12293 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12295 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12297 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12298 $(CFLAGS) on the link line.
12300 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12302 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12303 padded type built for the return type if it is unconstrained.
12305 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12307 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12309 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12311 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12312 before calling TREE_CHAIN.
12313 * gcc-interface/misc.c (gnat_init_ts): New function.
12314 (LANG_HOOKS_INIT_TS): Define.
12316 2011-04-12 Martin Jambor <mjambor@suse.cz>
12318 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12319 instead of cgraph_node.
12321 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12323 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12324 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12327 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12329 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12330 of aggregate types that contain a placeholder.
12332 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12334 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12336 (handle_type_generic_attribute): Likewise.
12338 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12341 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12343 2011-04-04 Kai Tietz <ktietz@redhat.com>
12346 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12349 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12351 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12352 type case, do not strip a padding type around the array type.
12354 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12356 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12359 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12361 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12362 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12363 code for -feliminate-unused-debug-types.
12364 (gnat_post_options): Likewise.
12366 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12368 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12369 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12372 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12374 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12375 DECL_ARTIFICIAL flag on enumeration types.
12377 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12379 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12380 fat pointer types artificial unconditionally.
12381 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12384 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12386 * gcc-interface/gigi.h (get_dummy_type): Declare.
12387 (build_dummy_unc_pointer_types): Likewise.
12388 (finish_fat_pointer_type): Likewise.
12389 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12390 fat pointer type has been built, complete it in place.
12391 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12392 and thin pointers. Remove useless variable.
12393 (finish_fat_pointer_type): Make global and move to...
12394 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12395 (get_dummy_type): New function.
12396 (build_dummy_unc_pointer_types): Likewise.
12397 (gnat_pushdecl): Propage the name to the anonymous variants only.
12398 (update_pointer_to): Only adjust the pointer types in the unconstrained
12401 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12403 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12404 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12405 if this is a Taft amendment type and the full declaration is available.
12406 * gcc-interface/trans.c (process_type): Likewise.
12407 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12408 (process_freeze_entity): Likewise.
12409 * gcc-interface/utils.c (dummy_global): New static variable.
12410 (gnat_write_global_declarations): If there are types declared as used
12411 at the global level, insert them in the global hash table.
12413 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12415 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12416 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12417 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12419 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12420 flag of the type accordingly.
12421 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12423 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12425 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12426 finalizing types when updating the pointers to the designated type.
12427 <all>: Finalize the deferred types even if we didn't defer processing
12428 of incomplete types in this invocation.
12430 2011-04-01 Olivier Hainque <hainque@adacore.com>
12431 Nicolas Setton <setton@adacore.com>
12432 Eric Botcazou <ebotcazou@adacore.com>
12434 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12435 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12437 2011-03-28 Kai Tietz <ktietz@redhat.com>
12439 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12441 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12442 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12444 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12446 2011-03-28 Tristan Gingold <gingold@adacore.com>
12449 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12450 Use ada output of gnatbind.
12451 (ada/b_gnatb.adb): Ditto.
12452 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12453 (ada.mostlyclean, ada.stage1)
12454 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12455 (ada.stagefeedback): Adjust.
12456 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12457 Use ada output of gnatbind.
12458 (b_gnatm.adb): Ditto.
12459 (b_gnatl.o, b_gnatm.o): New rules.
12461 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12463 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12464 for the padded type built to support a specified size or alignment.
12466 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12468 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12469 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12470 unconditionally to the end of the unit when the designated type is
12472 <all>: Rename local variable. Attempt to un-defer types only and do it
12473 for limited_with'ed types as well.
12474 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12475 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12476 consistently and remove redundant call to finalize_from_with_types.
12478 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12480 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12481 subprograms without a previous spec declared in the same unit.
12482 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12483 subprograms at the end of the unit instead of at the beginning.
12484 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12485 isn't public for the special handling of non-inline functions nested
12486 inside inline external functions.
12488 2011-03-25 Jeff Law <law@redhat.com>
12490 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12492 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12494 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12495 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12496 to compute Set_Size_Depends_On_Discriminant.
12497 (Layout_Type): Call it on array types in back-end layout mode.
12498 * sem_util.adb (Requires_Transient_Scope): Return true for array
12499 types only if the size depends on the value of discriminants.
12500 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12501 type if the RHS is a call to a function that returns an unconstrained
12502 type with default discriminant.
12504 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12506 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12507 non-conversion to the nominal result type at the end.
12509 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12511 * gcc-interface/trans.c (create_temporary): New function taken from...
12512 (create_init_temporary): ...here. Call it.
12513 (call_to_gnu): Create the temporary for the return value early, if any.
12514 Create it for a function with copy-in/copy-out parameters if there is
12515 no target; in other cases of copy-in/copy-out, use another temporary.
12516 Push the new binding level lazily. Add and rename local variables.
12518 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12520 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12522 (set_rm_size): Likewise.
12524 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12526 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12527 for the padded type built in order to support a specified alignment.
12528 Fix incorrect formatting.
12530 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12533 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12535 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12537 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12538 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12539 to the end of the list. Adjust recursive call. Rename local variable.
12540 If REORDER is true, reorder components of the record type.
12541 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12542 components_to_record and adjust the parameter list.
12544 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12546 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12547 disabled, use the variable for bounds of loop iteration scheme.
12549 2011-03-21 Kai Tietz <ktietz@redhat.com>
12552 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12554 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12556 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12557 out whether the expression is read-only. Short-circuit placeholder
12558 case and rename a couple of local variables.
12560 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12562 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12563 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12564 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12565 (convert): Deal with conversions from a smaller form type specially.
12567 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12569 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12570 its argument, except for the special -I- switch.
12572 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12574 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12577 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12579 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12581 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12583 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12585 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12586 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12587 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12588 Do not generate the check directly, instead instantiate the template
12589 check present in the descriptor.
12590 (make_descriptor_field): Move around.
12591 (build_vms_descriptor32): Build a template check in the POINTER field.
12592 (build_vms_descriptor): Remove useless suffixes.
12593 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12595 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12598 * targext.c: Include target files if IN_RTS is defined.
12600 2011-01-26 Richard Guenther <rguenther@suse.de>
12603 * targext.c: Include config.h.
12604 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12607 2011-01-04 Pascal Obry <obry@adacore.com>
12608 Eric Botcazou <ebotcazou@adacore.com>
12610 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12612 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12614 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12615 end-of-case on the end label and its associated gotos, if any.
12617 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12619 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12620 expressions of the parameter cache within the statement group of
12621 the CICO mechanism.
12623 2011-01-04 Olivier Hainque <hainque@adacore.com>
12624 Eric Botcazou <ebotcazou@adacore.com>
12626 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12627 (set_end_locus_from_node): New function.
12628 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12629 make and the function end_locus.
12630 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12631 for the elaboration subprogram.
12632 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12633 set the end_locus of the expression as well.
12635 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12638 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12639 variables that are referenced in exception handlers volatile.
12643 Copyright (C) 2011 Free Software Foundation, Inc.
12645 Copying and distribution of this file, with or without modification,
12646 are permitted in any medium without royalty provided the copyright
12647 notice and this notice are preserved.
12649 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12650 - fix bugs in the description of Source_Trace;
12651 - get rid of UNIT_NAME;
12653 2011-08-02 Javier Miranda <miranda@adacore.com>
12656 (Build_Dispatching_Requeue): Adding support for VM targets
12657 since we cannot directly reference the Tag entity.
12658 * exp_sel.adb (Build_K): Adding support for VM targets.
12659 (Build_S_Assignment): Adding support for VM targets.
12661 (Default_Prim_Op_Position): In VM targets do not restrict availability
12662 of predefined interface primitives to compiling in Ada 2005 mode.
12663 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12664 restricted to compiling in Ada 2005 mode.
12665 (Make_VM_TSD): Generate code that declares and initializes the OSD
12666 record. Needed to support dispatching calls through synchronized
12669 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12670 primitives associated with synchronized interfaces.
12671 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12672 primitives associated with synchronized interfaces.
12674 2011-08-02 Yannick Moy <moy@adacore.com>
12676 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12677 statements hidden in SPARK if preceded by the HIDE directive
12678 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12679 exception handlers as hidden in SPARK if preceded by the HIDE directive
12680 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12681 if starting with the HIDE directive
12682 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12683 starting with the HIDE directive; mark the declarations in a private
12684 part as hidden in SPARK if the private part starts with the HIDE
12686 * restrict.adb, restrict.ads
12687 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12688 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12689 argument node belongs to a part which is hidden in SPARK
12690 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12691 parts in SPARK; protect the possibly costly call to
12692 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12693 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12694 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12695 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12697 (Scan): recognize special comment starting with '#' and followed by
12698 SPARK keyword "hide" as a HIDE directive.
12700 2011-08-02 Yannick Moy <moy@adacore.com>
12702 * types.ads, erroutc.ads: Minor reformatting.
12704 2011-08-02 Vincent Celier <celier@adacore.com>
12706 * link.c: Add response file support for cross platforms.
12708 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12710 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12711 in an association, set parent field of copy before partial analysis.
12712 * sem_res.adb (Resolve_Slice): create reference to itype only when
12713 expansion is enabled.
12715 2011-08-02 Yannick Moy <moy@adacore.com>
12717 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12718 for new flag denoting which subprogram bodies are in ALFA
12719 * restrict.adb, sem_ch7.adb: Update comment
12720 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12721 sem_ch9.adb, sem_res.adb: Add calls to
12722 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12723 * sem_ch6.adb (Analyze_Function_Return): add calls to
12724 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12725 middle of the body, and extended return.
12726 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12727 False when missing return.
12728 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12729 to True for subprograms whose spec is in ALFA. Remove later on the flag
12730 on the entity used for a subprogram body when there exists a separate
12732 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12733 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12734 False, otherwise do nothing.
12736 2011-08-02 Robert Dewar <dewar@adacore.com>
12738 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12740 2011-08-02 Yannick Moy <moy@adacore.com>
12742 * sem_ch4.ads: minor formatting.
12744 2011-08-02 Yannick Moy <moy@adacore.com>
12746 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12747 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12748 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12749 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12750 opt.ads: cleanup of SPARK mode
12752 2011-08-02 Yannick Moy <moy@adacore.com>
12754 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12756 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12757 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12759 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12760 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12761 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12762 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12764 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12766 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12767 functions whose return type is not in ALFA.
12768 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12770 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12771 parameter's type is not in ALFA.
12772 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12775 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12777 * sem_ch6 (Analyze_Expression_Function): treat the function as
12778 Inline_Always, and introduce a subprogram declaration for it when it is
12780 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12781 expression functions, so that the back-end can determine whether they
12782 can in fact be inlined.
12783 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12784 a function body comes from an expression function.
12786 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12788 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12789 null exclusions to test Can_Never_Be_Null on the anonymous access types
12790 of the formals rather than testing the formals themselves. Exclude this
12791 check in cases where the Old_Formal is marked as a controlling formal,
12792 to avoid issuing spurious errors for bodies completing dispatching
12793 operations (due to the flag not getting set on controlling access
12794 formals in body specs).
12795 (Find_Corresponding_Spec): When checking full and subtype conformance of
12796 subprogram bodies in instances, pass Designated and E in that order, for
12797 consistency with the expected order of the formals (New_Id followed by
12800 2011-08-02 Robert Dewar <dewar@adacore.com>
12802 * sem_ch8.adb: Minor reformatting.
12804 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12806 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12807 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12808 primitive operations of class-wide actuals.
12810 2011-08-02 Javier Miranda <miranda@adacore.com>
12812 * exp_atag.ads, exp_atag.adb
12813 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12814 since its value is implicitly passed in argument Typ.
12815 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12816 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12817 Build_Common_Dispatching_Select_Statements.
12819 2011-08-02 Robert Dewar <dewar@adacore.com>
12821 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12822 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12823 Minor reformatting.
12825 2011-08-02 Robert Dewar <dewar@adacore.com>
12827 * sem_res.adb: Minor reformatting.
12828 * sem_prag.adb: Minor reformatting.
12830 2011-08-02 Javier Miranda <miranda@adacore.com>
12832 * exp_atag.adb, exp_atags.ads
12833 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12834 by the tagged type Entity. Required to use this routine in the VM
12835 targets since we do not have available the Tag entity in the VM
12838 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12839 Ada.Tags has not been previously loaded.
12841 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12842 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12844 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12845 view of enclosing scopes. Required to handle enclosing scopes that
12846 are synchronized types whose full view is a task type.
12848 (Build_VM_TSDs): Minor code improvement to avoid generating and
12849 analyzing lists with empty nodes.
12850 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12851 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12852 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12853 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12854 (Make_Select_Specific_Data_Table): Add support for VM targets.
12855 (Make_VM_TSD): Generate code to initialize the SSD structure of
12858 2011-08-02 Yannick Moy <moy@adacore.com>
12860 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12861 cross-references section in ALI.
12862 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12863 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12865 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12866 subprogram or package entity of a node
12867 (Is_Local_Reference_Type): new function returns True for references
12868 selected in local cross-references.
12869 (Lt): function extracted from Lt in Output_References
12870 (Write_Entity_Name): function extracted from Output_References
12871 (Generate_Definition): generate reference with type 'D' for definition
12872 of objects (object declaration and parameter specification), with
12873 appropriate locations and units, for use in local cross-references.
12874 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12875 references of type 'I' for initialization in object definition.
12876 (Output_References): move part of function Lt and procedure
12877 Write_Entity_Name outside of the body. Ignore references of types 'D'
12878 and 'I' introduced for local cross-references.
12879 (Output_Local_References): new procedure to output the local
12880 cross-references sections.
12881 (Lref_Entity_Status): new array defining whether an entity is a local
12882 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12883 with 'I' type when initialization expression is present.
12884 * get_scos.adb, get_scos.ads: Correct comments and typos
12886 2011-08-02 Javier Miranda <miranda@adacore.com>
12888 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12890 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12892 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12895 2011-08-02 Vincent Celier <celier@adacore.com>
12897 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12898 (No_Space_Img): New function
12899 (Find_Excluded_Sources): When reading from a file, record the file name
12900 and the line number for each excluded source.
12901 (Mark_Excluded_Sources): When reporting an error, if the excluded
12902 sources were read from a file, include file name and line number in
12905 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12907 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12909 2011-08-02 Robert Dewar <dewar@adacore.com>
12911 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12913 2011-08-02 Javier Miranda <miranda@adacore.com>
12915 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12916 generation of TSDs to the DOTNET compiler.
12917 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12918 generation of TSDs to the DOTNET compiler.
12920 2011-08-02 Javier Miranda <miranda@adacore.com>
12922 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12923 record of all the tagged types declared inside library level package
12924 declarations, library level package bodies or library level subprograms.
12925 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12926 associated with a given tagged type.
12927 (Build_VM_TSDs): New subprogram.
12928 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12929 compilation units that are subprograms.
12930 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12931 compilation units that are package bodies.
12932 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12933 units that are a package declaration or a package instantiation.
12934 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12935 reorganization to improve the error generated by the frontend when the
12936 function Ada.Tags.Secondary_Tag is not available.
12937 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12938 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12940 2011-08-02 Javier Miranda <miranda@adacore.com>
12942 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12944 2011-08-02 Robert Dewar <dewar@adacore.com>
12946 * s-imenne.ads: Minor reformatting.
12948 2011-08-02 Robert Dewar <dewar@adacore.com>
12950 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12951 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12952 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12954 2011-08-02 Robert Dewar <dewar@adacore.com>
12956 * einfo.ads (Materialize_Entity): Document this is only for renamings
12957 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12958 required debug information in the case where we transform the object
12959 declaration into a renaming declaration.
12960 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12962 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12963 Materialize_Entity.
12965 2011-08-02 Robert Dewar <dewar@adacore.com>
12967 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12968 Suppress_Init_Procs.
12969 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12970 Suppress_Initialization/Initialization_Suppressed.
12971 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12972 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12973 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12974 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12976 2011-08-02 Robert Dewar <dewar@adacore.com>
12978 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12979 Minor reformatting.
12981 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12983 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12984 only have inheritable classwide pre/postconditions.
12986 2011-08-02 Javier Miranda <miranda@adacore.com>
12988 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12989 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12990 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12991 checks if the external tag of a type is the same as the external tag
12992 of some other declaration.
12994 2011-08-02 Thomas Quinot <quinot@adacore.com>
12996 * s-taskin.ads: Minor reformatting.
12998 2011-08-02 Emmanuel Briot <briot@adacore.com>
13000 * g-comlin.adb (Display_Help): swap the order in which it prints the
13001 short help and the general usage.
13003 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13005 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13006 the aspect declarations and attach them to the generic copy for
13007 subsequent analysis.
13008 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13009 declarations of the generic tree to the new subprogram declarations.
13010 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13011 conditions that apply to a subprogram instance.
13013 2011-08-02 Robert Dewar <dewar@adacore.com>
13015 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13017 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13019 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13020 private type with a tagged full view is not derived in the immediate
13021 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13023 2011-08-02 Robert Dewar <dewar@adacore.com>
13025 * exp_ch4.adb: Minor reformatting.
13027 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13029 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13030 Ada2012 iterator, the loop will be rewritten during expansion into a
13031 while loop with a cursor and an element declaration. Do not analyze the
13032 body in this case, because if the container is for indefinite types the
13033 actual subtype of the elements will only be determined when the cursor
13034 declaration is analyzed.
13036 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13038 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13039 size/alignment related attributes in CodePeer_Mode.
13041 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13043 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13044 Prepend_Element, since this can result in the operation getting the
13045 wrong slot in the full type's dispatch table if the full type has
13046 inherited operations. The incomplete type's operation will get added
13047 to the proper position in the full type's primitives
13048 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13049 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13050 dispatching operations, since there are cases where nonprimitive
13051 subprograms can get added to the list of incomplete dependents (such
13052 as subprograms in nested packages).
13053 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13054 private part when determining whether to add a primitive with a
13055 parameter of a tagged incomplete type to the Private_Dependents list.
13056 Such primitives can also occur in the visible part, and should not have
13057 been excluded from being private dependents.
13058 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13059 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13060 list of a Taft-amendment incomplete type is a primitive before issuing
13061 an error that the full type must appear in the same unit. There are
13062 cases where nonprimitives can be in the list (such as subprograms in
13064 * sem_disp.adb (Derives_From): Use correct condition for checking that
13065 a formal's type is derived from the type of the corresponding formal in
13066 the parent subprogram (the condition was completely wrong). Add
13067 checking that was missing for controlling result types being derived
13068 from the result type of the parent operation.
13070 2011-08-02 Yannick Moy <moy@adacore.com>
13072 * errout.adb (First_Node): minor renaming
13073 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13076 2011-08-02 Yannick Moy <moy@adacore.com>
13078 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13079 before accessing operands.
13080 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13081 decide whether an initialization expression respects SPARK rules, as
13082 the plain node is the expanded one. This allows for more valid warnings
13084 * gnat_rm.texi: Minor update.
13086 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13088 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13091 2011-08-02 Robert Dewar <dewar@adacore.com>
13093 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13095 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13097 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13098 loop statements and the element renaming declaration with a block when
13099 the element type is controlled.
13101 2011-08-02 Yannick Moy <moy@adacore.com>
13103 * sinfo.ads: Minor formatting.
13105 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13107 * sem_aggr.adb (Add_Association): if the association has a box and no
13108 expression, use the Sloc of the aggregate itself for the new
13110 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13113 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13115 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13116 When a container is provided via a function call, generate a renaming
13117 of the function result. This avoids the creation of a transient scope
13118 and the premature finalization of the container.
13119 * exp_ch7.adb (Is_Container_Cursor): Removed.
13120 (Wrap_Transient_Declaration): Remove the supression of the finalization
13121 of the list controller when the declaration denotes a container cursor,
13124 2011-08-02 Yannick Moy <moy@adacore.com>
13126 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13127 node is from source, instead of the original node being from source.
13129 (Resolve_Array_Aggregate): refine the check for a static expression, to
13130 recognize also static ranges
13131 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13132 Array_Type_Declaration): postpone the test for the type being a subtype
13133 mark after the type has been resolved, so that component-selection and
13134 expanded-name are discriminated.
13135 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13136 to distinguish the case of an iteration scheme, so that an error is
13137 issed on a non-static range in SPARK except in an iteration scheme.
13138 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13139 In_Iter_Schm = True.
13140 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13141 user-defined operators so that they are allowed in renaming
13143 (Find_Selected_Component): refine the check for prefixing of operators
13144 so that they are allowed in renaming. Move the checks for restrictions
13145 on selector name after analysis discriminated between
13146 component-selection and expanded-name.
13147 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13148 concatenation argument of string type if it is static.
13149 * sem_util.adb, sem_util.ads
13150 (Check_Later_Vs_Basic_Declarations): add a new function
13151 Is_Later_Declarative_Item to decice which declarations are allowed as
13152 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13153 mode, add that renamings are considered as later items.
13154 (Enclosing_Package): new function to return the enclosing package
13155 (Enter_Name): correct the rule for homonyms in SPARK
13156 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13157 from source (result of expansion) to avoid issuing wrong warnings.
13159 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13161 * errout.adb: On anything but an expression First_Node returns its
13164 2011-08-02 Pascal Obry <obry@adacore.com>
13166 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13168 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13170 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13171 Set the associated loop as the related expression of internally
13173 * exp_ch7.adb (Is_Container_Cursor): New routine.
13174 (Wrap_Transient_Declaration): Supress the finalization of the list
13175 controller when the declaration denotes a container cursor.
13177 2011-08-02 Yannick Moy <moy@adacore.com>
13179 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13181 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13182 expression is a simple expression. This check cannot be performed in
13183 the semantics, so just drop it.
13184 (P_Index_Or_Discriminant_Constraint): move check that the index or
13185 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13186 semantics. Other cases were previously checked in the semantics.
13187 * par-ch4.adb (P_Name): move checks that a selector name is not
13188 character literal or an operator symbol to Find_Selected_Component in
13190 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13191 declarations are not placed after later declarations in a separate
13192 procedure in Sem_Util (possibly not the best choice?), to be used both
13193 during parsing, for Ada 83 mode, and during semantic analysis, for
13195 * par-endh.adb (Check_End): move check that end label is not missing
13196 to Process_End_Label in the semantics
13197 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13198 the special case for SPARK restriction
13199 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13200 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13201 parameter Force to issue the error message even on internal node (used
13202 for generated end label). Call Check_Restriction to check when an error
13203 must be issued. In SPARK mode, issue an error message even if the
13204 restriction is not set.
13205 (Check_Restriction): new procedure with an additional out parameter to
13206 inform the caller that a message has been issued
13207 * sem_aggr.adb: Minor modification of message
13208 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13209 instead of issuing an error message directly
13210 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13211 declarations are not placed after later declarations, by calling
13212 Check_Later_Vs_Basic_Declarations
13213 (Analyze_Subtype_Declaration): move here the check that an index or
13214 discriminant constraint must be a subtype mark. Change the check that
13215 a subtype of String must start at one so that it works on subtype marks.
13216 * sem_ch4.adb (Analyze_Call): move here the check that a named
13217 association cannot follow a positional one in a call
13218 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13219 instead of issuing an error message directly
13220 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13221 selector name is not a character literal or an operator symbol. Move
13222 here the check that the prefix of an expanded name cannot be a
13223 subprogram or a loop statement.
13224 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13225 procedure called from parsing and semantics to check that basic
13226 declarations are not placed after later declarations
13227 (Process_End_Label): move here the check that end label is not missing
13229 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13231 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13232 representation clause in codepeer mode, since it confuses CodePeer and
13233 does not bring useful info.
13235 2011-08-02 Ed Falis <falis@adacore.com>
13237 * init.c: initialize fp hw on MILS.
13239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13241 * errout.adb (First_Node): for bodies, return the node itself (small
13242 optimization). For other nodes, do not check source_unit if the node
13243 comes from Standard.
13245 2011-08-02 Robert Dewar <dewar@adacore.com>
13247 * exp_ch3.adb: Minor comment additions.
13248 * sem_ch13.adb: Minor reformatting.
13250 2011-08-02 Pascal Obry <obry@adacore.com>
13252 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13254 2011-08-02 Robert Dewar <dewar@adacore.com>
13256 * sem_attr.adb: Minor reformatting.
13258 2011-08-02 Robert Dewar <dewar@adacore.com>
13260 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13261 (Has_Default_Component_Value): Removed
13262 * einfo.ads Comment updates
13263 (Has_Default_Aspect): Replaces Has_Default_Value
13264 (Has_Default_Component_Value): Removed
13266 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13268 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13269 (Get_Simple_Init_Val): Handle Default_Value aspect
13270 (Needs_Simple_Initialization): Handle Default_Value aspect
13271 * exp_ch3.ads: Needs_Simple_Initialization
13272 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13273 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13275 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13276 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13277 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13279 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13281 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13282 package containing iteration primitives.
13283 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13285 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13287 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13288 "of", pre-analyze expression in case it is a function call with
13289 finalization actions that must be placed ahead of the loop.
13290 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13291 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13293 2011-08-02 Geert Bosch <bosch@adacore.com>
13295 * cstand.adb (Create_Float_Types): Only consider C's long double for
13296 Long_Long_Float, in addition to double.
13298 2011-08-02 Robert Dewar <dewar@adacore.com>
13300 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13301 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13302 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13303 Minor reformatting.
13305 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13307 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13310 2011-08-02 Javier Miranda <miranda@adacore.com>
13312 * einfo.ads, einfo.adb
13313 (Original_Access_Type): Move this attribute to Node26 since there was
13314 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13315 which causes conflicts and breaks the generation of the .NET compiler.
13316 (Interface_Name): Add missing documentation on JGNAT only uses of
13319 2011-08-02 Geert Bosch <bosch@adacore.com>
13321 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13322 (Find_Back_End_Float_Type): Likewise
13323 (Create_Back_End_Float_Types): Likewise
13324 (Create_Float_Types): Likewise
13325 (Register_Float_Type): Likewise
13326 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13327 Nlist and split out type selection in new local Find_Base_Type function.
13328 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13330 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13332 2011-08-02 Robert Dewar <dewar@adacore.com>
13334 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13336 * opt.ads: Minor comment change.
13337 * sem_ch12.adb: Minor code reorganization.
13339 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13341 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13342 subtype's list of rep items to the list on the full subtype in the case
13343 where the lists are the same.
13345 2011-08-02 Geert Bosch <bosch@adacore.com>
13347 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13348 using the one from System.Strings, which also deallocates all strings.
13350 2011-08-02 Geert Bosch <bosch@adacore.com>
13352 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13354 * gcc-interface/Make-lang.in: Update dependencies.
13356 2011-08-02 Olivier Hainque <hainque@adacore.com>
13358 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13361 2011-08-02 Javier Miranda <miranda@adacore.com>
13363 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13364 associated with anonymous access to subprograms.
13366 2011-08-02 Geert Bosch <bosch@adacore.com>
13369 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13370 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13371 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13372 (Add_Symbol_Definition): Move to switch-c.adb
13373 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13374 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13375 (Add_Symbol_Definition): Move to switch-c.adb.
13376 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13378 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13379 Move to warnsw.adb.
13380 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13381 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13382 Move to warnsw.adb.
13383 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13384 (Add_Symbol_Definition): Moved from Prepcomp.
13385 * switch-c.ads: Update copyright notice. Use String_List instead of
13386 Argument_List, removing dependency on System.OS_Lib.
13388 2011-08-02 Yannick Moy <moy@adacore.com>
13390 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13391 mode on initialization expression which does not respect SPARK
13393 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13394 if the tree referenced by its argument represents an initialization
13395 expression in SPARK, suitable for initializing an object in an object
13398 2011-08-02 Javier Miranda <miranda@adacore.com>
13400 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13401 internally generated access to subprogram with its associated protected
13403 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13405 2011-08-02 Geert Bosch <bosch@adacore.com>
13407 * cstand.adb (Register_Float_Type): Print information about type to
13408 register, if the Debug_Flag_Dot_B is set.
13409 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13410 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13411 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13412 with a requested precision of more than Max_Digits digits and no more
13413 than Max_Base_Digits digits, if a range specification is present and the
13414 Predefined_Float_Types list has a suitable type to derive from.
13415 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13416 case of type completion with pragma Import
13418 (Process_Import_Predefined_Type): Processing to complete a type
13419 with pragma Import. Currently supports floating point types only.
13420 (Set_Convention_From_Pragma): Do nothing without underlying type.
13421 (Process_Convention): Guard against absence of underlying type,
13422 which may happen when importing incomplete types.
13423 (Process_Import_Or_Interface): Handle case of importing predefined
13424 types. Tweak error message.
13426 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13428 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13429 functions to previous change. Reorganize code slightly.
13431 2011-08-02 Geert Bosch <bosch@adacore.com>
13433 * back_end.ads (Register_Type_Proc): New call back procedure type for
13434 allowing the back end to provide information about available types.
13435 (Register_Back_End_Types): New procedure to register back end types.
13436 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13438 * cstand.adb (Back_End_Float_Types): New list for floating point types
13439 supported by the back end.
13440 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13441 (Copy_Float_Type): New procedure to make new copies of predefined types.
13442 (Register_Float_Type): New call back procedure to populate the BEFT list
13443 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13444 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13445 (Create_Float_Types): New procedure to create entities for floating
13446 point types predefined in Standard, and put these and any remaining
13447 BEFTs on the Predefined_Float_Types list.
13448 * stand.ads (Predefined_Float_Types): New list for predefined floating
13449 point types that do not have declarations in package Standard.
13451 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13453 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13454 entity node for the unit containing the parameter.
13455 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13456 (Add_Inlined_Subprogram): Likewise.
13457 * gcc-interface/Make-lang.in: Update dependencies.
13459 2011-08-02 Thomas Quinot <quinot@adacore.com>
13461 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13464 2011-08-02 Geert Bosch <bosch@adacore.com>
13466 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13468 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13470 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13471 computed value of Base_Type.
13473 2011-08-02 Yannick Moy <moy@adacore.com>
13475 * restrict.adb (Check_Restriction): issue an error for any use of
13476 class-wide, even if the No_Dispatch restriction is not set.
13477 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13478 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13479 when completing a private extension, the type named in the private part
13480 is not the same as that named in the visible part.
13481 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13482 of an inherited primitive operations of a tagged type or type extension
13483 that returns the tagged type.
13484 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13485 function which returns True for an implicit operation inherited by the
13486 derived type declaration for the argument type.
13487 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13490 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13492 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13493 Process_Bounds, to perform analysis with expansion of a range or an
13494 expression that is the iteration scheme for a loop.
13495 (Analyze_Iterator_Specification): If domain of iteration is given by a
13496 function call with a controlled result, as is the case if call returns
13497 a predefined container, ensure that finalization actions are properly
13499 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13501 2011-08-02 Javier Miranda <miranda@adacore.com>
13503 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13504 * gcc-interface/Make-lang.in: Update dependencies.
13506 2011-08-02 Javier Miranda <miranda@adacore.com>
13508 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13509 determine if the analysis is performed using N or Original_Node (N).
13510 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13511 functionality of routine Is_Variable avoids code duplication.
13512 * checks.adb (Determine_Range): Handle temporaries generated by
13513 Remove_Side_Effects.
13515 2011-08-02 Javier Miranda <miranda@adacore.com>
13517 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13518 expansion of the condition. Required since the previous analysis was
13519 done with expansion disabled (see Resolve_Quantified_Expression) and
13520 hence checks were not inserted and record comparisons have not been
13523 2011-08-02 Ed Falis <falis@adacore.com>
13525 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13528 2011-08-02 Bob Duff <duff@adacore.com>
13530 * opt.ads: Minor comment fix.
13532 2011-08-02 Bob Duff <duff@adacore.com>
13534 * sem_ch12.adb (Analyze_Package_Instantiation,
13535 Analyze_Subprogram_Instantiation): Turn off style checking while
13536 analyzing an instance. Whatever style checks that apply to the generic
13537 unit should apply, so it makes no sense to apply them in an instance.
13538 This was causing trouble when compiling an instance of a runtime
13539 unit that violates the -gnatyO switch.
13540 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13541 one of the two case statements, causing spurious errors.
13543 2011-08-02 Robert Dewar <dewar@adacore.com>
13545 * uname.adb: Minor reformatting.
13546 * gnatcmd.adb: Minor reformatting.
13547 * exp_attr.adb: Minor reformatting.
13549 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13551 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13552 No_Dispatching_Calls, do not look for the Assign primitive, because
13553 predefined primitives are not created in this case.
13555 2011-08-02 Bob Duff <duff@adacore.com>
13557 * stylesw.ads: Minor comment fixes.
13559 2011-08-02 Robert Dewar <dewar@adacore.com>
13561 * freeze.adb (Add_To_Result): New procedure.
13563 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13565 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13566 time, if the specific run-time routines for handling streams of strings
13567 are not available, use the default mechanism.
13569 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13571 * s-regpat.ads: Fix typo.
13573 2011-08-02 Vincent Celier <celier@adacore.com>
13575 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13576 not null, call it to create the in memory config project file without
13577 parsing an existing default config project file.
13579 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13581 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13583 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13585 * sem_elim.adb: an abstract subprogram does not need an eliminate
13586 pragma for its descendant to be eliminable.
13588 2011-08-02 Ed Falis <falis@adacore.com>
13590 * init.c: revert to handling before previous checkin for VxWorks
13591 * s-intman-vxworks.adb: delete unnecessary declarations related to
13592 using Ada interrupt facilities for handling signals.
13593 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13594 * s-intman-vxworks.ads: Import __gnat_install_handler as
13595 Initialize_Interrupts.
13596 * s-taprop-vxworks.adb: Delete Signal_Mask.
13597 (Abort_Handler): change construction of mask to unblock exception
13600 2011-08-02 Jerome Guitton <guitton@adacore.com>
13602 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13603 Debug_Raise_Exception before propagation starts.
13605 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13607 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13608 to Restriction_Check_Required.
13609 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13610 * sem_res.adb (Resolve_Call): Likewise.
13611 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13613 2011-08-02 Bob Duff <duff@adacore.com>
13615 * stylesw.ads: Update comment.
13616 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13617 * errout.ads: Remove obsolete comment.
13619 2011-08-02 Javier Miranda <miranda@adacore.com>
13621 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13622 (Set_Is_Safe_To_Reevaluate): new procedure.
13623 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13624 assignment is allowed on safe-to-reevaluate variables.
13625 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13626 temporary created to remove side effects in expressions that use
13627 the secondary stack as safe-to-reevaluate.
13628 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13629 variables that are not true constants.
13631 2011-08-02 Robert Dewar <dewar@adacore.com>
13633 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13634 sem_res.adb, sem_ch6.adb: Minor reformatting.
13636 2011-08-02 Jerome Guitton <guitton@adacore.com>
13638 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13640 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13642 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13643 not set Overridden_Operation if subprogram is an initialization
13646 2011-08-02 Yannick Moy <moy@adacore.com>
13648 * par-ch6.adb: Correct obsolete name in comments
13649 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13650 which takes two message arguments (existing function takes one), with
13651 second message used for continuation.
13652 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13653 block statements that originate from a source block statement, not
13654 generated block statements
13655 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13656 symmetry with procedure case
13657 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13658 function to issue an error in formal mode if a package specification
13659 contains more than one tagged type or type extension.
13660 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13661 parameters matching formals of tagged types are objects (or ancestor
13662 type conversions of objects), not general expressions. Issue an error
13663 on view conversions that are not involving ancestor conversion of an
13665 (Resolve_Type_Conversion): in formal mode, issue an error on the
13666 operand of an ancestor type conversion which is not an object
13667 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13668 procedure so that it works also for actuals of function calls
13669 (Is_Actual_Tagged_Parameter): new function which determines if its
13670 argument is an actual parameter of a formal of tagged type in a
13672 (Is_SPARK_Object_Reference): new function which determines if the tree
13673 referenced by its argument represents an object in SPARK
13675 2011-08-02 Robert Dewar <dewar@adacore.com>
13677 * sem_ch3.adb: Minor reformatting
13678 Minor comment addition
13679 Minor error msg text change
13681 2011-08-02 Javier Miranda <miranda@adacore.com>
13683 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13684 function. Used to be more precise when we generate a variable plus one
13685 assignment to remove side effects in the evaluation of the Bound
13687 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13688 of the bound expression to force its re-analysis and thus expand the
13689 associated transient scope (if required). Code cleanup replacing the
13690 previous code that declared the constant entity by an invocation to
13691 routine Force_Evaluation which centralizes this work in the frontend.
13693 2011-08-02 Robert Dewar <dewar@adacore.com>
13695 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13696 (Base_Type): Now uses improved Is_Base_Type function
13697 * einfo.ads (Base_Type): Inline this function
13699 2011-08-02 Robert Dewar <dewar@adacore.com>
13701 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13702 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13704 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13706 * gcc-interface/Make-lang.in: Update dependencies.
13707 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13710 2011-08-02 Yannick Moy <moy@adacore.com>
13712 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13713 non-simple expression used in delta constraint
13714 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13715 index constraint which is not a subtype mark
13716 * par.adb: With and use Restrict
13717 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13718 mode on component type which is not a subtype mark and default
13719 expression on component
13720 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13721 of string which does not have a lower index bound equal to 1
13722 (Array_Type_Declaration): issue an error in formal mode on index or
13723 component type which is not a subtype mark, and on aliased keyword on
13725 (Derived_Type_Declaration): issue an error in formal mode on interface,
13726 limited or abstract type
13727 (Record_Type_Declaration): issue an error in formal mode on interface
13728 (Record_Type_Definition): issue an error in formal mode on tagged types
13729 and type extensions not declared in the specification of a library unit
13730 package; on null non-tagged record; on variant part
13732 2011-08-02 Vincent Celier <celier@adacore.com>
13734 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13735 not declared for qualified library project when Library_Name is not
13736 declared, but Library_Dir is.
13738 2011-08-02 Robert Dewar <dewar@adacore.com>
13740 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13741 pragmas (affects aspects [Component_]Default_Value
13742 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13743 component type for the resolution
13745 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13747 * einfo.adb (Base_Type): Tune implementation for speed.
13749 2011-08-02 Robert Dewar <dewar@adacore.com>
13751 * freeze.adb: Minor reformatting.
13753 2011-08-02 Thomas Quinot <quinot@adacore.com>
13755 * scos.ads: Update comments.
13757 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13759 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13760 base type, because the parent may be a subtype of a private type whose
13761 convention is established in a private part.
13763 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13765 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13766 statement in a block when the expansion of the return expression has
13767 created a finalization chain.
13768 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13769 with the parent node.
13770 Add N_Extended_Return_Statement to handle the case where a transient
13771 object declaration appears in the Return_Object_Declarations list of
13772 an extended return statement.
13774 2011-08-02 Matthew Gingell <gingell@adacore.com>
13776 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13777 unused parameter 'name'.
13779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13781 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13782 inherited operation, check whether its alias, which is the source
13783 operastion that it renames, has been marked eliminated.
13785 2011-08-02 Javier Miranda <miranda@adacore.com>
13787 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13788 in-mode parameter whose type is an access type since it can be used to
13789 modify its designated object. Enforce code that handles as safe an
13790 access type that is not access-to-constant but it is the result of a
13791 previous removal of side-effects.
13792 (Remove_Side_Effects): Minor code reorganization of cases which require
13793 no action. Done to incorporate documentation on new cases uncovered
13794 working in this ticket: no action needed if this routine was invoked
13795 too early and the nodes are not yet decorated.
13796 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13797 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13798 were issued with actuals that are implicitly provided by
13801 2011-08-02 Robert Dewar <dewar@adacore.com>
13803 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13805 2011-08-02 Yannick Moy <moy@adacore.com>
13807 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13808 to issue an error in formal mode on attribute not supported in this mode
13809 (Analyze_Attribute): issue errors on standard attributes not supported
13811 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13812 comment, and issue error in formal mode on modulus which is not a power
13814 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13816 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13818 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13819 operator on modular type (except 'not').
13821 2011-08-02 Robert Dewar <dewar@adacore.com>
13823 * gnat_rm.texi: Minor reformatting.
13825 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13827 * s-osinte-linux.ads: Minor comment update and reformatting.
13828 * i-cexten.ads: Make this unit pure, as for its parent.
13829 Will allow its usage in more contexts if needed.
13831 2011-08-02 Robert Dewar <dewar@adacore.com>
13833 * s-utf_32.ads: Minor comment fix.
13835 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13837 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13838 operation of a tagged synchronized type, handle the case where the
13839 controlling argument is overloaded.
13841 2011-08-02 Yannick Moy <moy@adacore.com>
13843 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13844 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13845 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13846 SPARK mode and formal verification mode on processing SPARK restriction
13847 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13848 requiring consistency checking.
13850 2011-08-02 Robert Dewar <dewar@adacore.com>
13852 * sem_res.adb: Minor reformatting.
13854 2011-08-02 Robert Dewar <dewar@adacore.com>
13856 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13857 a-cforse.ads: Remove unneeded with of Ada.Containers
13858 Remove commented out pragma Inline's
13859 Move specifications of new subprograms to the actual specs
13861 2011-08-02 Yannick Moy <moy@adacore.com>
13863 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13864 a-cforse.ads: Update comments.
13866 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13868 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13870 2011-08-02 Robert Dewar <dewar@adacore.com>
13872 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13873 a-cforse.ads, a-cofove.ads: Minor reformatting.
13875 2011-08-02 Claire Dross <dross@adacore.com>
13877 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13878 a-cofove.ads: Add comments.
13880 2011-08-02 Yannick Moy <moy@adacore.com>
13882 * gnat_rm.texi: Document formal containers.
13884 2011-08-02 Emmanuel Briot <briot@adacore.com>
13886 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13887 are empty sections.
13889 2011-08-02 Robert Dewar <dewar@adacore.com>
13891 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13894 2011-08-02 Robert Dewar <dewar@adacore.com>
13896 * aspects.adb: New aspects Default_Value and Default_Component_Value
13897 New format of Aspect_Names table checks for omitted entries
13898 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13899 handling of boolean aspects for derived types.
13900 New aspects Default_Value and Default_Component_Value
13901 New format of Aspect_Names table checks for omitted entries
13902 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13903 (Has_Default_Value): New flag
13904 (Has_Default_Component_Value): New flag
13905 (Has_Default_Value): New flag
13906 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13908 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13909 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13910 Default_Value and Default_Component_Value
13911 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13912 New aspects Default_Value and Default_Component_Value
13913 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13914 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13916 2011-08-02 Vincent Celier <celier@adacore.com>
13918 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13919 inherit library kind.
13921 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13923 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13924 Minor reformatting.
13926 2011-08-02 Robert Dewar <dewar@adacore.com>
13928 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13930 2011-08-02 Yannick Moy <moy@adacore.com>
13932 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13934 2011-08-02 Robert Dewar <dewar@adacore.com>
13936 * impunit.adb: Add comment.
13938 2011-08-02 Yannick Moy <moy@adacore.com>
13940 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13941 qualification of aggregates in formal mode
13942 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13944 (Resolve_Aggregate): complete the test that an aggregate is adequately
13945 qualified in formal mode
13947 2011-08-02 Pascal Obry <obry@adacore.com>
13949 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13950 * mlib-prj.adb: Supress warning when compiling binder generated file.
13951 (Build_Library): Supress all warnings when compiling the binder
13954 2011-08-02 Yannick Moy <moy@adacore.com>
13956 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13958 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13959 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13960 Add with/use clauses to make Check_Formal_Restriction visible
13962 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13964 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13965 in-parameters when type of the generic formal is private in the generic
13966 spec and non-private in the body.
13968 2011-08-02 Claire Dross <dross@adacore.com>
13970 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13971 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13972 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13973 * impunit.adb, Makefile.rtl: Take new files into account.
13975 2011-08-02 Robert Dewar <dewar@adacore.com>
13977 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13978 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13980 2011-08-02 Yannick Moy <moy@adacore.com>
13982 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13984 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13985 matching static array bounds, taking into account the special case of
13987 * sem_ch3.adb: Typo in comment.
13989 2011-08-02 Yannick Moy <moy@adacore.com>
13991 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13992 which issues an error in formal mode if its argument node is originally
13994 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13995 has a discriminant specification so that it does not include the case
13997 (Derived_Type_Declaration): move here the test that a derived type has a
13998 discriminant specification
13999 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14000 first element of a component association before accessing its choices
14001 (presence of component association is not enough)
14002 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14003 declaration is a library item before accessing the next element in a
14004 list, as library items are not member of lists
14005 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14006 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14007 Check_Formal_Restriction whenever possible.
14009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14011 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14012 reference when needed.
14014 2011-08-02 Bob Duff <duff@adacore.com>
14016 * gnat_ugn.texi: Fix typo.
14018 2011-08-02 Vincent Celier <celier@adacore.com>
14020 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14021 archive file name. Do not use the full path name of archives for Open
14024 2011-08-02 Robert Dewar <dewar@adacore.com>
14026 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14027 Analyze_Aspect_Specifications
14029 (Analyze_Aspect_Specifications): New handling for boolean aspects
14030 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14031 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14032 sequence for Analyze_Aspect_Specifications
14033 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14034 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14036 2011-08-02 Robert Dewar <dewar@adacore.com>
14038 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14039 aspects, since these no longer exist.
14041 2011-08-02 Robert Dewar <dewar@adacore.com>
14043 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14044 semicolon, do not try to see if there are aspects following it.
14045 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14048 2011-08-02 Robert Dewar <dewar@adacore.com>
14050 * sem_ch8.adb, aspects.ads: Minor reformatting.
14052 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14054 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14055 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14057 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14059 2011-08-02 Yannick Moy <moy@adacore.com>
14061 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14062 mode on subprogram declaration outside of package specification, unless
14063 it is followed by a pragma Import
14064 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14065 Access_Type_Declaration): issue error in formal mode on access type
14066 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14068 (Analyze_Object_Declaration): issue error in formal mode on object
14069 declaration which does not respect SPARK restrictions
14070 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14071 declaration which does not respect SPARK restrictions
14072 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14073 error in formal mode on digits or delta constraint
14074 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14075 decimal fixed point type
14076 (Derived_Type_Declaration): issue error in formal mode on derived type
14077 other than type extensions of tagged record types
14078 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14079 with check on access definition
14080 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14081 mode on protected definition.
14082 (Analyze_Task_Definition): issue error in formal mode on task definition
14084 2011-08-02 Robert Dewar <dewar@adacore.com>
14086 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14088 2011-08-02 Javier Miranda <miranda@adacore.com>
14090 * sem_ch6.adb (Can_Override_Operator): New function.
14091 (Verify_Overriding_Indicator): Add missing code to check overriding
14092 indicator in operators. Fixes regression.
14093 (Check_Overriding_Indicator): Minor reformating after replacing the
14094 code that evaluates if the subprogram can override an operator by
14095 invocations to the above new function.
14097 (Write_Field26_Name): Add missing code to ensure that, following
14098 the documentation in einfo.ads, this field is not shown as attribute
14099 "Static_Initialization" on non-dispatching functions.
14101 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14103 * sem_res.adb (Resolve_Call): A call to
14104 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14105 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14106 i.e., when the second parameter is of type Time_Span.
14108 2011-08-02 Vincent Celier <celier@adacore.com>
14110 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14111 with an archive instead of -L<library dir> -l<library name>.
14113 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14115 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14116 mark the base types In_Use in addition to making the operations
14119 2011-08-02 Ed Falis <falis@adacore.com>
14121 * init.c: add and setup __gnat_signal_mask for the exception signals
14122 * s-inmaop-vxworks.adb: new file.
14123 * s-intman-vxworks.adb: remove unnecessary initializations and
14125 * s-intman-vxworks.ads: remove unnecessary variable
14126 * s-taprop-vxworks.adb: simplify signal initialization
14128 2011-08-02 Robert Dewar <dewar@adacore.com>
14130 * sem_ch8.adb: Minor code reorganization, comment updates.
14132 2011-08-02 Robert Dewar <dewar@adacore.com>
14134 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14135 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14137 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14138 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14140 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14142 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14143 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14144 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14145 use_type_clauses, to handle more efficiently use_type and use_all_type
14147 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14148 Ada2012 Use_All_Type clause.
14149 (Use_Class_Wide_Operations): new procedure.
14151 2011-08-02 Robert Dewar <dewar@adacore.com>
14153 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14154 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14155 expression to expression function.
14157 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14159 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14160 if types are compatible.
14162 2011-08-02 Yannick Moy <moy@adacore.com>
14164 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14165 returns True if its argument array types have same dimension and same
14166 static bounds at each index.
14167 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14168 OUT or IN OUT paramaters which are not view conversions in SPARK.
14169 (Resolve_Arithmetic_Op): issue an error in formal mode on
14170 multiplication or division with operands of fixed point types which are
14171 not qualified or explicitly converted.
14172 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14173 Boolean or array type (except String) operands.
14174 (Resolve_Equality_Op): issue an error in formal mode on equality
14175 operators for array types other than String with non-matching static
14177 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14178 for array types with non-matching static bounds. Factorize the code in
14179 Matching_Static_Array_Bounds.
14180 (Resolve_Qualified_Expression): issue an error in formal mode on
14181 qualified expressions for array types with non-matching static bounds.
14182 (Resolve_Type_Conversion): issue an error in formal mode on type
14183 conversion for array types with non-matching static bounds
14185 2011-08-02 Robert Dewar <dewar@adacore.com>
14187 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14189 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14191 * par-ch9.adb: save location of entry for proper error message.
14193 2011-08-02 Javier Miranda <miranda@adacore.com>
14195 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14196 (Use_Full_View) which permits this routine to climb through the
14197 ancestors using the full-view of private parents.
14198 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14199 Use_Full_View to true in calls to Is_Ancestor.
14200 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14201 true in call to Is_Ancestor.
14202 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14203 Use_Full_View to true in call to Is_Ancestor.
14204 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14205 call to Is_Ancestor.
14206 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14207 Use_Full_View to true in calls to Is_Ancestor.
14208 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14209 Make_Select_Specific_Data_Table, Register_Primitive,
14210 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14211 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14212 to true in call to Is_Ancestor.
14213 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14214 Use_Full_View to true in calls to Is_Ancestor.
14216 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14217 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14219 2011-08-02 Robert Dewar <dewar@adacore.com>
14221 * gnat_rm.texi: Minor reformatting.
14222 * sem_prag.adb: Minor reformatting.
14224 2011-08-02 Tristan Gingold <gingold@adacore.com>
14226 * vms_data.ads: Add VMS qualifier for -gnateP.
14228 2011-08-02 Robert Dewar <dewar@adacore.com>
14230 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14231 * par-ch7.adb (P_Package): Proper placement of aspects for package
14232 decl/instantiation.
14233 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14234 (End_Statements): Add Is_Sloc parameterr
14235 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14236 (Check_End): Ad Is_Sloc parameter
14237 (End_Statements): Add Is_Sloc parameterr
14239 2011-08-02 Vincent Celier <celier@adacore.com>
14241 * ug_words: Add VMS qualifier equivalent to -gnateP:
14242 /SYMBOL_PREPROCESSING.
14244 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14246 * gnat-style.texi: For hexadecimal numeric literals the typical
14247 grouping of digits is 4 to represent 2 bytes.
14248 A procedure spec which is split into several lines is indented two
14251 2011-08-02 Yannick Moy <moy@adacore.com>
14253 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14254 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14255 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14257 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14258 choice in array aggregate
14259 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14261 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14262 positional and named aggregate for record, or others in record
14263 aggregate, or multiple choice in record aggregate
14264 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14265 array operands to logical operations AND, OR and XOR do not have the
14266 same static lower and higher bounds
14267 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14269 2011-08-01 Robert Dewar <dewar@adacore.com>
14271 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14272 Replaces Last_Source_Node_In_Sequence.
14273 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14274 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14275 parens and blank in string (this was inconsistently implemented).
14277 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14278 blank in string (this was inconsistently implemented).
14280 (Set_Global_Switches): Set formal mode switches appropriately
14281 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14283 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14284 call Set_Error_Msg_Lang to set "spark" as language name.
14285 * par.adb: Remove unnecessary call to set formal language for errout
14286 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14287 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14289 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14290 calls to it, moved after resolution so that types are known
14291 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14292 result of concatenation is not of type String
14293 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14294 concatenation is not properly restricted
14295 * gnat_rm.texi: Add doc on pragma Spark_95.
14296 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14297 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14298 * gcc-interface/Make-lang.in: Update dependencies.
14300 2011-08-01 Javier Miranda <miranda@adacore.com>
14302 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14303 condition that detects if the overridden operation must replace an
14306 2011-08-01 Javier Miranda <miranda@adacore.com>
14308 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14309 code declarations inserted by Insert_Actions in each alternative of the
14310 N_Case_Expression node.
14312 2011-08-01 Robert Dewar <dewar@adacore.com>
14314 * sem_ch6.adb: Minor code reorganization.
14315 * sem_util.adb: Minor reformatting.
14317 2011-08-01 Pascal Obry <obry@adacore.com>
14319 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14320 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14322 2011-08-01 Yannick Moy <moy@adacore.com>
14324 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14325 literal or operator symbol which is prefixed
14326 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14327 mode on access attributes.
14328 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14329 that concatenation operands are properly restricted in formal mode
14330 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14331 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14332 result of the concatenation has a type different from String.
14333 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14334 Analyze_Quantified_Expression, Analyze_Slice,
14335 Analyze_Null): issue an error in formal mode on unsupported constructs
14337 (Analyze_Block_Statement): only issue error on source block statement
14338 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14339 function which returns the last node in a list of nodes for which
14340 Comes_From_Source returns True, if any
14341 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14342 Last_Source_Node_In_Sequence
14343 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14344 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14345 mode on unsupported constructs
14346 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14347 rest of the actions may be needed later on since the error is marked as
14349 * sinfo.ads: Typos in comments.
14351 2011-08-01 Pascal Obry <obry@adacore.com>
14353 * projects.texi: Minor editing.
14355 2011-08-01 Yannick Moy <moy@adacore.com>
14357 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14358 insertion character ~~
14359 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14360 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14361 with insertion character ~~
14362 (Set_Msg_Text): treat insertion character ~~
14363 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14364 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14365 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14366 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14367 errors related to the formal language restriction not serious
14368 (insertion character |).
14369 * par.adb (Par): set formal language for error messages if needed
14370 * sem_ch6.adb (Check_Missing_Return): take into account possible
14371 generated statements at the end of the function
14372 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14373 enumeration value to define a new pragma SPARK_95
14374 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14375 SPARK_Version): new type and variables to store the SPARK version
14377 (SPARK_Mode): return True when SPARK_Version is set
14378 * par-prag.adb: Correct indentation
14379 (Prag): take Pragma_SPARK_95 into account
14380 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14383 2011-08-01 Robert Dewar <dewar@adacore.com>
14385 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14386 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14387 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14389 2011-08-01 Pascal Obry <obry@adacore.com>
14391 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14392 Target_Name to Get_Path call.
14393 (Parse_Single_Project): Likewise.
14394 (Post_Parse_Context_Clause): Likewise.
14395 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14396 Call Initialise_Project_Path with the proper Target_Name.
14397 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14399 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14400 with the proper Target_Name.
14401 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14402 Part.Parse routine.
14403 (Parse_Project_And_Apply_Config): Likewise.
14404 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14405 This is fine as this part of the code is supporting only native
14407 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14408 is fine as this part of the code is supporting only native compilation.
14410 2011-08-01 Yannick Moy <moy@adacore.com>
14412 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14413 of homonym, unless the homonym is one of the cases allowed in SPARK
14414 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14415 package declaration occurring after a body.
14417 2011-08-01 Robert Dewar <dewar@adacore.com>
14419 * checks.adb, exp_ch4.adb: Minor reformatting.
14421 2011-08-01 Javier Miranda <miranda@adacore.com>
14423 * einfo.ads (Access_Disp_Table): Fix documentation.
14424 (Dispatch_Table_Wrappers): Fix documentation.
14426 2011-08-01 Pascal Obry <obry@adacore.com>
14428 * prj-env.adb, prj-env.ads: Minor reformatting.
14430 2011-08-01 Yannick Moy <moy@adacore.com>
14432 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14433 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14434 procedures out of these packages.
14435 * errout.ads, errout.adb
14436 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14437 procedures in of this package
14438 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14439 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14440 on misplaced later vs initial declarations, like in Ada 83
14441 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14442 formal mode on attribute of private type whose full type declaration
14444 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14445 package declaration inside a package specification
14446 (Analyze_Full_Type_Declaration): issue error in formal mode on
14447 controlled type or discriminant type
14448 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14449 user-defined operator means that it should come from the source
14450 (New_Overloaded_Entity): issue error in formal mode on overloaded
14452 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14454 2011-08-01 Thomas Quinot <quinot@adacore.com>
14456 * atree.adb: Minor reformatting.
14457 * checks.adb: Minor reformatting.
14459 2011-08-01 Vincent Celier <celier@adacore.com>
14461 * s-parame-vms-ia64.ads: Fix typo in comment
14463 * s-parame-vms-restrict.ads: Removed, unused.
14465 2011-08-01 Javier Miranda <miranda@adacore.com>
14468 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14470 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14471 * sem_ch3.ads, sem_ch3.adb
14472 (Is_Constant_Bound): New extended version of the subprogram that was
14473 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14474 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14475 * sem_aux.ads (Constant_Value): Fix typo in comment.
14476 * checks.adb (Generate_Index_Checks): New implementation which, for
14477 array objects with constant bounds, generates the runtime check
14478 referencing the bounds of the array type. For other cases this routine
14479 provides its previous behavior obtaining such values from the array
14481 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14483 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14484 we cannot have semantic interpretations of the new node.
14486 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14488 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14491 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14493 * sem_ch8.adb: Minor code editing.
14494 * s-vxwext.adb: Remove trailing space.
14495 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14496 consistency with other files.
14498 2011-08-01 Thomas Quinot <quinot@adacore.com>
14500 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14502 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14504 * par-ch10.adb: reject parameterized expressions as compilation unit.
14505 * sem_ch4.adb: handle properly conditional expression with overloaded
14506 then_clause and no else_clause.
14508 2011-08-01 Tristan Gingold <gingold@adacore.com>
14510 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14511 like done by System.Aux_DEC.
14512 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14514 2011-08-01 Yannick Moy <moy@adacore.com>
14516 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14517 missing label at end of declaration (subprogram or package)
14518 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14519 of positional and named parameter association
14520 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14521 Error_Msg_SP which adds a prefix to the error message giving the name
14522 of the formal language analyzed
14523 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14524 access result type in subprogram, unconstrained array as result type,.
14525 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14527 * sem_ch8.adb: Code clean up.
14529 2011-08-01 Javier Miranda <miranda@adacore.com>
14531 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14532 * einfo.ads (Access_Disp_Table): Fix documentation.
14533 (Dispatch_Table_Wrappers): Fix documentation.
14534 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14535 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14536 to enforce the documentation of this attribute.
14537 (Set_Is_Interface): Cleanup the assertion.
14538 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14539 the Underlying_Type entity before reading attribute Access_Disp_Table.
14540 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14541 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14542 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14543 the Underlying_Type entity before reading attribute Access_Disp_Table.
14544 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14545 Locate the Underlying_Type entity before reading attribute
14548 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14550 * s-poosiz.ads: Additional overriding indicators.
14552 2011-08-01 Yannick Moy <moy@adacore.com>
14554 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14556 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14557 parameter specification does not include a subtype mark.
14558 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14559 formal mode on abstract subprogram.
14560 (Analyze_Subprogram_Specification): issue error in formal mode on
14561 user-defined operator.
14562 (Process_Formals): issue error in formal mode on access parameter and
14563 default expression.
14564 * sem_ch9.adb (Analyze_Abort_Statement,
14565 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14566 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14567 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14568 Analyze_Requeue, Analyze_Selective_Accept,
14569 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14570 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14571 issue error in formal mode on user-defined raise statement.
14573 2011-08-01 Thomas Quinot <quinot@adacore.com>
14575 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14576 declaration being hidden when overriding an implicit inherited
14578 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14579 (-gnats), do not complain about a source file that contains only a
14582 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14584 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14585 variable if already set.
14587 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14589 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14590 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14591 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14592 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14593 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14594 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14595 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14596 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14597 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14598 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14599 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14600 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14601 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14602 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14603 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14604 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14605 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14606 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14607 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14608 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14609 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14610 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14611 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14612 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14613 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14614 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14615 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14616 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14617 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14618 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14619 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14620 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14621 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14622 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14623 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14624 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14625 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14626 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14627 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14628 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14629 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14630 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14631 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14632 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14633 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14634 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14635 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14636 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14637 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14638 Use GNAT instead of GNARL.
14640 2011-08-01 Bob Duff <duff@adacore.com>
14642 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14643 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14644 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14647 2011-08-01 Yannick Moy <moy@adacore.com>
14649 * debug.adb (d.D) reverve flag for the SPARK mode
14650 (d.E) reverve flag for SPARK generation mode
14651 (d.F) reverve flag for Why generation mode
14652 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14653 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14654 functions which return True when the corresponding modes are set
14655 (Formal_Language): return "spark" or "alfa" when in formal verification
14657 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14658 Error_Msg to prefix the error message with a tag giving the formal
14660 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14661 message with a tag giving the formal language
14662 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14664 (Analyze_Case_Statement): issue error in formal mode on case statement
14665 with a single "others" case alternative
14666 (Analyze_Exit_Statement): issue errors in formal mode on exit
14667 statements which do not respect SPARK restrictions
14668 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14669 (Check_Unreachable_Code): always issue an error (not a warning) in
14670 formal mode on unreachable code (concerns both code after an infinite
14671 loop and after an unconditional jump, both not allowed in SPARK)
14672 * sem_ch6.adb (Analyze_Return_Statement): add call to
14673 Set_Return_Present for a procedure containing a return statement
14674 (already done for functions in Analyze_Function_Return)
14675 (Analyze_Function_Return): issue error in formal mode on extended
14676 return or if return is not last statement in function
14677 (Check_Missing_Return): issue error in formal mode if function does
14678 not end with return or if procedure contains a return
14679 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14680 function to detect if there is an inner scope of its parameter S which
14683 2011-08-01 Thomas Quinot <quinot@adacore.com>
14685 * sem_ch6.ads: Minor reformatting.
14687 2011-08-01 Javier Miranda <miranda@adacore.com>
14689 * sem_util.adb (Abstract_Interface_List): Complete condition when
14690 processing private type declarations to avoid reading unavailable
14692 (Is_Synchronized_Tagged_Type): Complete condition when processing
14693 private extension declaration nodes to avoid reading unavailable
14696 2011-08-01 Thomas Quinot <quinot@adacore.com>
14698 * sem_ch3.adb: Minor reformatting.
14700 2011-08-01 Thomas Quinot <quinot@adacore.com>
14702 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14703 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14704 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14705 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14706 for VMS, instead parametrize the common implementation with
14707 System.Parameters declarations.
14709 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14711 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14713 2011-08-01 Tristan Gingold <gingold@adacore.com>
14715 * seh_init.c: Fix SEH handler installation on win64.
14717 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14719 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14720 double analysis of an anonymous access to subprogram, because it can
14721 lead to improper sharing of profiles and a back-end crash.
14723 2011-08-01 Robert Dewar <dewar@adacore.com>
14725 * make.adb, sem_ch4.adb: Minor reformatting.
14726 * gcc-interface/Make-lang.in: Update dependencies.
14727 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14729 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14731 * gnat_rm.texi: Fix definition of Long_Integer.
14733 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14735 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14736 to prevent storage exhaustion.
14737 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14738 finalized is a function body, insert the cleanup code before the final
14739 return statement, to prevent spurious warnings.
14740 * s-pooglo.ads: add overriding indicator.
14742 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14744 * sem_ch4.adb (Operator_Check): improve error message when both a
14745 with_clause and a use_clause are needed to make operator usage legal.
14746 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14747 determine whether a compilation unit is visible within an other,
14748 either through a with_clause in the current unit, or a with_clause in
14749 its library unit or one one of its parents.
14751 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14753 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14754 over an arbitrary expression of an array or container type.
14755 * lib-xref.adb: clarify comment.
14757 2011-08-01 Bob Duff <duff@adacore.com>
14759 * einfo.ads: Minor reformatting.
14760 * debug.adb: Minor comment improvement.
14762 2011-08-01 Javier Miranda <miranda@adacore.com>
14764 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14765 consider hidden subprograms as valid candidates.
14767 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14769 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14771 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14773 * gnat_ugn.texi: Fix typo.
14775 2011-08-01 Robert Dewar <dewar@adacore.com>
14777 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14778 lib-xref.adb: Minor reformatting
14780 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14782 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14783 when to generate a call to Move_Final_List.
14784 (Has_Controlled_Parts): Remove this function.
14786 2011-08-01 Geert Bosch <bosch@adacore.com>
14788 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14789 "," in choice list.
14791 2011-08-01 Thomas Quinot <quinot@adacore.com>
14793 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14794 explicit raise of a predefined exception as Comes_From_Source if the
14795 original N_Raise_Statement comes from source.
14797 2011-08-01 Robert Dewar <dewar@adacore.com>
14799 * sinfo.ads: Add comment.
14800 * sem_ch6.adb: Minor reformatting.
14802 2011-08-01 Robert Dewar <dewar@adacore.com>
14804 * freeze.adb (Freeze_Entity): Refine check for bad component size
14805 clause to avoid rejecting confirming clause when atomic/aliased present.
14807 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14809 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14810 better determine whether an entity reference is a write.
14811 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14813 * lib-xref.adb (Output_References): Do no suppress a read reference at
14814 the same location as an immediately preceeding modify-reference, to
14815 handle properly in-out actuals.
14817 2011-08-01 Tristan Gingold <gingold@adacore.com>
14819 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14821 2011-08-01 Quentin Ochem <ochem@adacore.com>
14823 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14824 heap to compute the result.
14826 2011-08-01 Robert Dewar <dewar@adacore.com>
14828 * atree.ads: Minor reformatting.
14830 2011-08-01 Emmanuel Briot <briot@adacore.com>
14832 * g-expect.adb (Get_Command_Output): Fix memory leak.
14834 2011-08-01 Geert Bosch <bosch@adacore.com>
14836 * cstand.adb (P_Float_Type): New procedure to print the definition of
14837 predefined fpt types.
14838 (P_Mixed_Name): New procedure to print a name using mixed case
14839 (Print_Standard): Use P_Float_Type for printing floating point types
14840 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14841 precision IEEE float.
14843 2011-08-01 Thomas Quinot <quinot@adacore.com>
14845 * sem_ch3.adb: Minor reformatting.
14847 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14849 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14850 the completion of a generic function, insert the new body rather than
14851 rewriting the original.
14853 2011-08-01 Yannick Moy <moy@adacore.com>
14855 * sinfo.ads, errout.ads: Typos in comments.
14857 2011-08-01 Robert Dewar <dewar@adacore.com>
14859 * par-endh.adb: Minor reformatting.
14861 2011-08-01 Robert Dewar <dewar@adacore.com>
14863 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14864 (Pre_Post_Aspects): New subtype.
14865 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14866 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14867 * par-ch7.adb (P_Package): Remove Decl parameter
14868 (P_Package): Handle new syntax for aspects (before IS)
14869 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14871 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14872 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14873 (P_Package): Remove Decl parameter
14874 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14876 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14878 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14879 * sinfo.ads: Document new syntax for aspects in packages etc.
14880 * sprint.adb: Handle new syntax of aspects before IS in package
14882 2011-08-01 Thomas Quinot <quinot@adacore.com>
14884 * atree.ads: Minor reformatting.
14885 * sem_prag.adb: Minor reformatting.
14887 2011-08-01 Robert Dewar <dewar@adacore.com>
14889 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14890 case expr alternative.
14892 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14894 * sem_ch12.adb: Fix typo.
14896 2011-08-01 Geert Bosch <bosch@adacore.com>
14898 * sem_prag.adb (Check_No_Link_Name): New procedure.
14899 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14900 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14901 instead of Standard_Long_Long_Float_Size global. Preparation for
14902 eventual removal of per type constants.
14903 * exp_util.ads (Get_Stream_Size): New function returning the stream
14904 size value of subtype E.
14905 * exp_util.adb (Get_Stream_Size): Implement new function.
14906 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14908 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14910 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14912 2011-08-01 Geert Bosch <bosch@adacore.com>
14914 * cstand.adb: Fix comments.
14915 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14916 count of arguments.
14918 2011-08-01 Robert Dewar <dewar@adacore.com>
14920 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14922 2011-08-01 Geert Bosch <bosch@adacore.com>
14924 * atree.ads: Fix comment.
14926 2011-08-01 Robert Dewar <dewar@adacore.com>
14928 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14929 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14930 * par.adb: Add with for Namet.Sp.
14931 * par-tchk.adb: Minor reformatting.
14933 2011-08-01 Vincent Celier <celier@adacore.com>
14935 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14936 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14937 of the init procedure of a SAL.
14938 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14941 2011-08-01 Thomas Quinot <quinot@adacore.com>
14943 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14946 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14948 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14950 2011-08-01 Thomas Quinot <quinot@adacore.com>
14952 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14953 conformant with its spec (return True only for types that have
14954 an overriding Initialize primitive operation that prevents them from
14955 having preelaborable initialization).
14956 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14957 initialization for controlled types in Ada 2005 or later mode.
14959 2011-08-01 Robert Dewar <dewar@adacore.com>
14961 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14963 (Same_Aspect): New function.
14964 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14965 Type_Invariant, Precondition, Postcondition.
14966 * snames.ads-tmpl: Add Name_Type_Invariant.
14968 2011-08-01 Robert Dewar <dewar@adacore.com>
14970 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14972 (Freeze_All_Ent): Fix error in handling inherited aspects.
14973 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14974 already analyzed, but don't skip entire processing of a declaration,
14975 that's wrong in some cases of declarations being rewritten.
14976 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14977 Don't delay for integer, string literals
14978 Treat predicates in usual manner for delay, remove special case code,
14980 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14981 (Build_Predicate_Function): Update saved expression in aspect
14982 (Build_Invariant_Procedure): Update saved expression in aspect
14983 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14984 of replacement of discriminant references if the reference is simple.
14986 2011-08-01 Robert Dewar <dewar@adacore.com>
14988 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14989 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14990 Static_Predicate and Dynamic_Predicate.
14991 (Build_Predicate_Function): Add processing for Static_Predicate
14992 and Dynamic_Predicate.
14993 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14994 (From_Static_Predicate): New flag
14995 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14997 2011-08-01 Robert Dewar <dewar@adacore.com>
14999 * usage.adb: Documentation cleanup for Ada version modes in usage.
15000 * expander.adb: Minor reformatting.
15002 2011-08-01 Robert Dewar <dewar@adacore.com>
15004 * atree.ads: Minor comment fix.
15005 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15006 a-witeio.ads, sem_prag.adb: Minor reformatting.
15008 2011-08-01 Doug Rupp <rupp@adacore.com>
15010 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15011 pointers. Use descrip.h header file for convenience. Add some
15014 2011-08-01 Robert Dewar <dewar@adacore.com>
15016 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15017 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15018 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15020 (Check_Aspect_At_End_Of_Declarations): New procedure
15021 (Analye_Aspect_Specification): Minor changes for above procedures
15022 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15023 specification node as well.
15025 2011-08-01 Pascal Obry <obry@adacore.com>
15027 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15028 Windows files. Use GetFilesAttributes() in this case to check for file
15029 existence instead of returning with an error code.
15031 2011-08-01 Vincent Celier <celier@adacore.com>
15033 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15034 High is above Source length.
15036 2011-08-01 Robert Dewar <dewar@adacore.com>
15038 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15040 2011-08-01 Robert Dewar <dewar@adacore.com>
15042 * aspects.ads (Boolean_Aspects): New subtype.
15043 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15044 for derived types in cases where the parent type and derived type have
15046 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15047 with aspects when parent type also has aspects.
15048 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15049 boolean expression at this point).
15050 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15051 accordance with final decision on the Ada 2012 feature.
15052 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15054 2011-08-01 Matthew Heaney <heaney@adacore.com>
15056 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15058 2011-08-01 Pascal Obry <obry@adacore.com>
15060 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15061 Fix Replace_Slice when High is above current string size.
15062 (Replace_Slice): Fix DL computation when High is above current
15065 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15067 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15069 2011-08-01 Matthew Heaney <heaney@adacore.com>
15071 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15074 2011-08-01 Pascal Obry <obry@adacore.com>
15076 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15079 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15081 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15082 access to protected subprograms in generic bodies.
15083 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15084 protected type, indicate that the convention of the subprogram is
15085 Convention_Protected, because it may be used in subsequent declarations
15086 within the protected declaration.
15088 2011-08-01 Vincent Celier <celier@adacore.com>
15090 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15091 and "final" procedures when the name of the library is "ada", to avoid
15092 duplicate symbols "adainit" and "adafinal" in executables.
15094 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15096 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15097 quantified expression that appears within a postcondition and uses the
15098 Ada2012 'Result attribute.
15100 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15102 * init.c (__gnat_error_handler): Cast reason to int.
15103 (__gnat_install_handler): Explain sa_sigaction use.
15105 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15107 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15108 subprogram has copy-in copy-out parameters, try to promote the mode of
15109 the return type if it is passed in registers.
15111 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15113 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15114 left operand as addressable.
15116 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15118 * gcc-interface/gigi.h (build_function_stub): Remove.
15119 (build_return_expr): Likewise.
15120 (convert_vms_descriptor): Declare.
15121 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15122 (build_function_stub): Move to...
15123 * gcc-interface/utils2.c (build_return_expr): Move to...
15124 * gcc-interface/trans.c (build_function_stub): ...here.
15125 (build_return_expr): ...here.
15126 (Subprogram_Body_to_gnu): Add local variable for language_function.
15127 Disconnect the parameter attributes cache, if any, once done with it.
15128 Call end_subprog_body only after setting the end_locus.
15129 Build the stub associated with the function, if any, at the very end.
15130 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15131 variables and streamline control flow.
15133 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15136 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15137 g-trasym-dwarf.adb.
15139 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15142 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15143 Assign to act.sa_sigaction.
15144 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15145 current->return_address to char * before arithmetic.
15147 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15149 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15150 Correct argument types.
15151 Extract code from reason.
15152 (__gnat_install_handler): Assign to act.sa_sigaction.
15154 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15156 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15157 (GNAT1_OBJS): ...here.
15159 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15162 * g-socthi-mingw.adb (Fill): Fix formatting.
15164 * gcc-interface/gigi.h: Move around comment.
15166 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15169 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15171 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15174 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15176 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15178 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15179 range comparison if Pmode is SImode.
15181 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15182 Eric Botcazou <ebotcazou@adacore.com>
15184 * adadecode.c: Wrap up in extern "C" block.
15185 * adadecode.h: Likewise.
15186 * adaint.c: Likewise. Remove 'const' keyword.
15187 * adaint.h: Likewise.
15188 * argv.c: Likewise.
15189 * atree.h: Likewise.
15191 * cstreams.c: Likewise.
15193 * exit.c: Likewise.
15195 * final.c: Likewise.
15196 * init.c: Likewise.
15197 * initialize.c: Likewise.
15198 * link.c: Likewise.
15199 * namet.h: Likewise.
15200 * nlists.h: Likewise.
15201 * raise.c: Likewise.
15202 * raise.h: Likewise.
15203 * repinfo.h: Likewise.
15204 * seh_init.c: Likewise.
15205 * targext.c: Likewise.
15206 * tracebak.c: Likewise.
15207 * uintp.h: Likewise.
15208 * urealp.h: Likewise.
15209 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15210 * xsinfo.adb: Likewise.
15211 * xsnamest.adb: Likewise.
15212 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15213 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15214 * gcc-interface/misc.c: Likewise.
15215 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15216 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15217 ada/targext.o here...
15218 (GNAT_ADA_OBJS): ...and not here.
15219 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15220 (GNATBIND_OBJS): Reorder.
15222 2011-07-07 Richard Henderson <rth@redhat.com>
15224 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15225 dwarf2out_frame_init.
15227 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15229 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15231 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15234 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15236 2011-07-06 Richard Guenther <rguenther@suse.de>
15238 * gcc-interface/misc.c (gnat_init): Merge calls to
15239 build_common_tree_nodes and build_common_tree_nodes_2.
15240 Re-initialize boolean_false_node.
15242 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15243 Olivier Hainque <hainque@adacore.com>
15244 Nicolas Setton <setton@adacore.com>
15246 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15247 the type according to the ARTIFICIAL_P parameter.
15248 (create_type_decl): Likewise.
15249 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15251 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15253 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15254 (gnatbind): Likewise.
15256 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15258 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15260 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15262 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15263 local variable throughout. Remove useless call to Base_Type.
15264 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15265 Take it also into account for the volatileness of the field. Set the
15266 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15268 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15270 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15271 on a dereference built for a by-ref object if it has an address clause.
15273 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15275 * einfo.ads (Address_Taken): Document use for the second argument of
15276 Asm_Input and Asm_Output attributes.
15277 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15278 argument is an entity name, then set Address_Taken on it.
15279 <Attribute_Asm_Output>: Likewise.
15280 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15281 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15282 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15283 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15285 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15287 PR middle-end/46500
15288 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15290 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15292 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15293 (ada/utils.o): Update dependencies.
15294 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15295 ../../../libcpp/libcpp.a.
15296 * gcc-interface/utils.c: Include common/common-target.h.
15297 (process_attributes): Use targetm_common.have_named_sections.
15299 2011-06-07 Richard Guenther <rguenther@suse.de>
15301 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15304 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15306 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15307 TREE_THIS_NOTRAP flag.
15309 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15311 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15314 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15316 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15317 constants whose full view has discriminants specially.
15319 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15321 * gcc-interface/utils.c: Include diagnostic.h.
15322 (gnat_write_global_declarations): Output debug information for all
15323 global type declarations before finalizing the compilation unit.
15324 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15326 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15328 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15330 2011-05-25 Kai Tietz <ktietz@redhat.com>
15332 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15333 initialization instead of const/none-const pointer assignment.
15335 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15337 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15338 $(EXTRA_GNAT1_OBJS).
15339 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15340 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15341 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15342 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15343 libcommon-target.a instead of prefix.o.
15345 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15348 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15350 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15352 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15353 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15354 instead of version.o.
15356 2011-05-18 Kai Tietz <ktietz@redhat.com>
15358 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15359 boolean_false_node instead of integer_zero_node.
15360 (convert_with_check): Likewise.
15361 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15363 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15365 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15366 type of the parameter is an unconstrained array, convert the actual to
15367 the type of the formal in the In Out and Out cases as well.
15369 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15371 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15372 call build_function_type_array or build_varargs_function_type_array
15374 (create_subprog_type): Don't call build_function_type; call
15375 build_function_type_vec instead.
15377 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15379 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15380 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15381 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15383 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15385 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15387 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15388 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15390 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15392 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15394 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15396 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15397 instead of accessing TYPE_ARG_TYPES directly.
15398 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15400 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15403 * gcc-interface/gigi.h (get_variant_part): Declare.
15404 * gcc-interface/decl.c (get_variant_part): Make global.
15405 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15406 types have the same constant size, are record types and T1 has a
15407 variant part while T2 doesn't.
15409 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15411 * gcc-interface/utils.c (begin_subprog_body): Do not call
15413 (end_subprog_body): Likewise.
15415 2011-05-04 Richard Guenther <rguenther@suse.de>
15417 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15419 (pos_to_constructor): Likewise.
15421 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15422 Eric Botcazou <ebotcazou@adacore.com>
15424 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15425 of build_function_type. Adjust calls to...
15426 (build_raise_check): ...this. Do not take a void_tree parameter.
15427 Call build_function_type_list instead of build_function_type.
15428 Fix head comment and swap couple of conditional blocks.
15430 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15432 * gnatvsn.ads (Library_Version): Bump to 4.7.
15433 (Current_Year): Bump to 2011.
15435 2011-04-29 Michael Matz <matz@suse.de>
15437 * gcc-interface/misc.c (gnat_handle_option): Set
15438 warn_maybe_uninitialized.
15440 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15442 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15443 the Watson/McCabe paper.
15445 2011-04-23 Jim Meyering <meyering@redhat.com>
15447 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15449 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15451 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15454 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15456 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15458 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15459 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15460 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15461 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15462 <all>: Do not set flags on the reused DECL node coming from an alias.
15463 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15464 don't need debug info here...
15465 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15466 (gigi): Adjust calls to create_subprog_decl.
15467 (build_raise_check): Likewise.
15468 (establish_gnat_vms_condition_handler): Likewise.
15469 (Compilation_Unit_to_gnu): Likewise.
15470 (gnat_to_gnu): Likewise.
15472 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15474 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15475 (NO_REORDER_ADAFLAGS): New variable.
15476 (EXTRA_GNATTOOLS): Always define.
15477 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15478 Clean up and adjust list of files compiled with special options.
15479 * gcc-interface/Make-lang.in: Likewise.
15480 (ada/decl.o): Cosmetical change.
15481 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15483 2011-04-20 Jim Meyering <meyering@redhat.com>
15485 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15487 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15489 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15490 $(CFLAGS) on the link line.
15492 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15494 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15495 padded type built for the return type if it is unconstrained.
15497 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15499 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15501 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15503 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15504 before calling TREE_CHAIN.
15505 * gcc-interface/misc.c (gnat_init_ts): New function.
15506 (LANG_HOOKS_INIT_TS): Define.
15508 2011-04-12 Martin Jambor <mjambor@suse.cz>
15510 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15511 instead of cgraph_node.
15513 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15515 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15516 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15519 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15521 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15522 of aggregate types that contain a placeholder.
15524 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15526 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15528 (handle_type_generic_attribute): Likewise.
15530 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15533 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15535 2011-04-04 Kai Tietz <ktietz@redhat.com>
15538 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15541 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15543 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15544 type case, do not strip a padding type around the array type.
15546 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15548 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15551 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15553 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15554 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15555 code for -feliminate-unused-debug-types.
15556 (gnat_post_options): Likewise.
15558 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15560 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15561 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15564 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15566 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15567 DECL_ARTIFICIAL flag on enumeration types.
15569 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15571 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15572 fat pointer types artificial unconditionally.
15573 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15576 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15578 * gcc-interface/gigi.h (get_dummy_type): Declare.
15579 (build_dummy_unc_pointer_types): Likewise.
15580 (finish_fat_pointer_type): Likewise.
15581 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15582 fat pointer type has been built, complete it in place.
15583 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15584 and thin pointers. Remove useless variable.
15585 (finish_fat_pointer_type): Make global and move to...
15586 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15587 (get_dummy_type): New function.
15588 (build_dummy_unc_pointer_types): Likewise.
15589 (gnat_pushdecl): Propage the name to the anonymous variants only.
15590 (update_pointer_to): Only adjust the pointer types in the unconstrained
15593 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15595 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15596 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15597 if this is a Taft amendment type and the full declaration is available.
15598 * gcc-interface/trans.c (process_type): Likewise.
15599 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15600 (process_freeze_entity): Likewise.
15601 * gcc-interface/utils.c (dummy_global): New static variable.
15602 (gnat_write_global_declarations): If there are types declared as used
15603 at the global level, insert them in the global hash table.
15605 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15607 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15608 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15609 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15611 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15612 flag of the type accordingly.
15613 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15615 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15617 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15618 finalizing types when updating the pointers to the designated type.
15619 <all>: Finalize the deferred types even if we didn't defer processing
15620 of incomplete types in this invocation.
15622 2011-04-01 Olivier Hainque <hainque@adacore.com>
15623 Nicolas Setton <setton@adacore.com>
15624 Eric Botcazou <ebotcazou@adacore.com>
15626 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15627 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15629 2011-03-28 Kai Tietz <ktietz@redhat.com>
15631 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15633 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15634 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15636 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15638 2011-03-28 Tristan Gingold <gingold@adacore.com>
15641 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15642 Use ada output of gnatbind.
15643 (ada/b_gnatb.adb): Ditto.
15644 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15645 (ada.mostlyclean, ada.stage1)
15646 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15647 (ada.stagefeedback): Adjust.
15648 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15649 Use ada output of gnatbind.
15650 (b_gnatm.adb): Ditto.
15651 (b_gnatl.o, b_gnatm.o): New rules.
15653 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15655 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15656 for the padded type built to support a specified size or alignment.
15658 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15660 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15661 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15662 unconditionally to the end of the unit when the designated type is
15664 <all>: Rename local variable. Attempt to un-defer types only and do it
15665 for limited_with'ed types as well.
15666 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15667 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15668 consistently and remove redundant call to finalize_from_with_types.
15670 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15672 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15673 subprograms without a previous spec declared in the same unit.
15674 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15675 subprograms at the end of the unit instead of at the beginning.
15676 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15677 isn't public for the special handling of non-inline functions nested
15678 inside inline external functions.
15680 2011-03-25 Jeff Law <law@redhat.com>
15682 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15684 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15686 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15687 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15688 to compute Set_Size_Depends_On_Discriminant.
15689 (Layout_Type): Call it on array types in back-end layout mode.
15690 * sem_util.adb (Requires_Transient_Scope): Return true for array
15691 types only if the size depends on the value of discriminants.
15692 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15693 type if the RHS is a call to a function that returns an unconstrained
15694 type with default discriminant.
15696 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15698 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15699 non-conversion to the nominal result type at the end.
15701 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15703 * gcc-interface/trans.c (create_temporary): New function taken from...
15704 (create_init_temporary): ...here. Call it.
15705 (call_to_gnu): Create the temporary for the return value early, if any.
15706 Create it for a function with copy-in/copy-out parameters if there is
15707 no target; in other cases of copy-in/copy-out, use another temporary.
15708 Push the new binding level lazily. Add and rename local variables.
15710 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15712 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15714 (set_rm_size): Likewise.
15716 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15718 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15719 for the padded type built in order to support a specified alignment.
15720 Fix incorrect formatting.
15722 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15725 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15727 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15729 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15730 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15731 to the end of the list. Adjust recursive call. Rename local variable.
15732 If REORDER is true, reorder components of the record type.
15733 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15734 components_to_record and adjust the parameter list.
15736 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15738 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15739 disabled, use the variable for bounds of loop iteration scheme.
15741 2011-03-21 Kai Tietz <ktietz@redhat.com>
15744 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15746 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15748 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15749 out whether the expression is read-only. Short-circuit placeholder
15750 case and rename a couple of local variables.
15752 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15754 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15755 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15756 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15757 (convert): Deal with conversions from a smaller form type specially.
15759 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15761 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15762 its argument, except for the special -I- switch.
15764 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15766 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15769 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15771 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15773 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15775 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15777 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15778 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15779 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15780 Do not generate the check directly, instead instantiate the template
15781 check present in the descriptor.
15782 (make_descriptor_field): Move around.
15783 (build_vms_descriptor32): Build a template check in the POINTER field.
15784 (build_vms_descriptor): Remove useless suffixes.
15785 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15787 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15790 * targext.c: Include target files if IN_RTS is defined.
15792 2011-01-26 Richard Guenther <rguenther@suse.de>
15795 * targext.c: Include config.h.
15796 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15799 2011-01-04 Pascal Obry <obry@adacore.com>
15800 Eric Botcazou <ebotcazou@adacore.com>
15802 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15804 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15806 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15807 end-of-case on the end label and its associated gotos, if any.
15809 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15811 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15812 expressions of the parameter cache within the statement group of
15813 the CICO mechanism.
15815 2011-01-04 Olivier Hainque <hainque@adacore.com>
15816 Eric Botcazou <ebotcazou@adacore.com>
15818 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15819 (set_end_locus_from_node): New function.
15820 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15821 make and the function end_locus.
15822 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15823 for the elaboration subprogram.
15824 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15825 set the end_locus of the expression as well.
15827 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15830 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15831 variables that are referenced in exception handlers volatile.
15835 Copyright (C) 2011 Free Software Foundation, Inc.
15837 Copying and distribution of this file, with or without modification,
15838 are permitted in any medium without royalty provided the copyright
15839 notice and this notice are preserved.