1 2011-10-24 Robert Dewar <dewar@adacore.com>
3 * sem.adb (Initialize): Fix bug that blew up if called a second
6 2011-10-24 Robert Dewar <dewar@adacore.com>
8 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
9 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
11 2011-10-24 Robert Dewar <dewar@adacore.com>
13 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
16 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
18 * gnat_rm.texi Add an entry for restriction No_Finalization.
20 2011-10-24 Ed Schonberg <schonberg@adacore.com>
22 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
23 current instance is within the one that contains the generic,
24 the freeze node for the current one must appear in the current
25 declarative part. Ditto if the current instance is within another
26 package instance. In both of these cases the freeze node of the
27 previous instance is not relevant.
29 2011-10-24 Gary Dismukes <dismukes@adacore.com>
31 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
32 of AAMP-specific switches -univ and -aamp_target.
34 2011-10-24 Robert Dewar <dewar@adacore.com>
36 * a-tienau.adb (Put): Deal properly with limited line length.
38 2011-10-24 Robert Dewar <dewar@adacore.com>
40 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
42 2011-10-24 Tristan Gingold <gingold@adacore.com>
44 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
47 2011-10-24 Ed Schonberg <schonberg@adacore.com>
49 * sem_ch12.adb (Earlier): make available globally. If both
50 nodes have the same sloc, the freeze node that does not come
51 from source is the later one.
52 (True_Parent): Make available globally.
53 (Previous_Instance): Subsidiary of
54 Insert_Freeze_Node_For_Instance, to check whether the generic
55 parent of the current instance is declared within a previous
56 instance in the same unit or declarative part, in which case the
57 freeze nodes of both instances must appear in order to prevent
58 elaboration problems in gigi.
59 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
60 freeze point, and the freeze node of a preceding instantiation
61 must be inserted before it.
63 2011-10-24 Robert Dewar <dewar@adacore.com>
65 * checks.ads, checks.adb: Add handling of Synchronization_Check
66 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
68 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
69 flag Minor code reorganization.
70 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
71 * par-prag.adb: Add dummy entries for pragma
72 Disable/Enable_Atomic_Synchronization.
73 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
74 case of Atomic_Synchronization specially (not suppressed
75 by All_Checks, cannot be set from Source).
76 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
77 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
78 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
79 entry for pragma Disable/Enable_Atomic_Synchronization
80 * switch-c.adb: The -gnatp switch does not disable
81 Atomic_Synchronization Add -gnatep switch to disable
82 Atomic_Synchronization.
83 * types.ads: Add entry for Synchronization_Check
84 * usage.adb: Add line for -gnated switch
85 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
87 2011-10-24 Geert Bosch <bosch@adacore.com>
89 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix
90 bounds start at Integer'First.
92 2011-10-24 Robert Dewar <dewar@adacore.com>
94 * sem_ch12.adb, s-gearop.adb: Minor reformatting
96 2011-10-24 Robert Dewar <dewar@adacore.com>
98 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings
99 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings
101 2011-10-24 Emmanuel Briot <briot@adacore.com>
103 * prj-proc.adb (Process_Expression_Variable_Decl): No special
104 handling for Project_Path unless it is an attribute.
106 2011-10-24 Javier Miranda <miranda@adacore.com>
108 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
109 (Install_Hidden_Primitives): New subprogram.
110 (Restore_Hidden_Primitives): New subprogram.
111 (Analyze_Formal_Package_Declaration,
112 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
113 Invoke Check_Hidden_Primitives after every call to
114 Analyze_Associations, and invoke Restore_Hidden_Primitives to
115 restore their visibility after processing the instantiation.
116 (Instantiate_Package_Body): Install visible primitives before
117 analyzing the instantiation and uninstall them to restore their
118 visibility when the instantiation has been analyzed.
119 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
120 (Remove_Suffix): New subprogram
121 * sem_ch3.adb (Derive_Subprogram): When handling
122 a derived subprogram for the instantiation of a formal derived
123 tagged type, inherit the dispatching attributes from the actual
124 subprogram (not from the parent type).
126 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
128 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
130 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
132 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
134 (Build_Discriminant_Assignments): Add local variable D_Loc and update
136 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
137 Var_Loc and update their uses.
138 (Build_Record_Init_Proc): Code reformatting.
139 (Increment_Counter): Add formal parameter Loc.
140 (Make_Counter): Add formal parameter Loc.
142 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
144 * sem_disp.adb (Covers_Some_Interface): Fix typo.
146 2011-10-24 Matthew Heaney <heaney@adacore.com>
148 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority):
149 Predicate had wrong sense.
151 2011-10-24 Yannick Moy <moy@adacore.com>
153 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
154 Translate arguments in positional notation into pragma argument
155 association arguments for the generated pragma.
157 2011-10-24 Arnaud Charlet <charlet@adacore.com>
159 * exp_ch5.adb: Fix minor typo.
161 2011-10-24 Ed Schonberg <schonberg@adacore.com>
163 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
164 the case of a component reference in an instance body, when the
165 enclosing type is private.
167 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
169 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
170 driver for getting the project support into gnatelim section.
172 2011-10-24 Robert Dewar <dewar@adacore.com>
174 * gnat_rm.texi: Minor correction to documentation on address
177 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
179 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
180 (Attach_Unprotected): New routine.
181 (Delete_Finalize_Address): Removed.
182 (Delete_Finalize_Address_Unprotected): New routine.
183 (Detach): Synchronize and call the unprotected version.
184 (Detach_Unprotected): Remove locking.
185 (Finalize): Add various comment on synchronization. Lock the critical
186 region and call the unprotected versions of routines.
187 (Finalize_Address): Removed.
188 (Finalize_Address_Unprotected): New routine.
189 (Set_Finalize_Address): Synchronize and call
190 the unprotected version.
191 (Set_Finalize_Address_Unprotected): New routine.
192 (Set_Heterogeneous_Finalize_Address): Removed.
193 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
194 (Set_Is_Heterogeneous): Add comment on synchronization and
196 * s-finmas.ads: Flag Finalization_Started is no longer atomic
197 because synchronization uses task locking / unlocking.
198 (Attach): Add comment on usage.
199 (Attach_Unprotected): New routine.
200 (Delete_Finalize_Address): Renamed to
201 Delete_Finalize_Address_Unprotected.
202 (Detach): Add comment on usage.
203 (Detach_Unprotected): New routine.
204 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
205 (Set_Finalize_Address): Add comment on usage.
206 (Set_Finalize_Address_Unprotected): New routine.
207 (Set_Heterogeneous_Finalize_Address): Renamed to
208 Set_Heterogeneous_Finalize_Address_Unprotected.
209 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
210 Allocation_Locked. Add various comments on synchronization. Lock
211 the critical region and call the unprotected version of
213 (Deallocate_Any_Controlled): Add various comments on
214 synchronization. Lock the critical region and call the unprotected
217 2011-10-24 Ed Schonberg <schonberg@adacore.com>
219 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
220 are universal and must carry the corresponding type.
221 * sem_eval.adb (Check_Non_Static_Context): If the type of the
222 expression is universal real, as may be the case for a fixed point
223 expression with constant operands in the context of a conversion,
224 there is nothing to check.
225 * s-finmas.adb: Minor reformatting
227 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
229 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
231 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
233 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
235 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
236 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
238 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
240 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
241 (unchecked_conversion_nop): Use it.
242 (gnat_to_gnu): Likewise.
244 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
246 * back_end.adb (Call_Back_End): Pass the maximum logical line number
247 instead of the maximum physical line number to gigi.
248 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
250 2011-10-16 Tom Tromey <tromey@redhat.com>
251 Dodji Seketeli <dodji@redhat.com>
253 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the
254 new public ordinary map interface.
256 2011-10-16 Tristan Gingold <gingold@adacore.com>
258 * link.c (_AIX): Add support for GNU ld.
260 2011-10-16 Fedor Rybin <frybin@adacore.com>
262 * gnat_ugn.texi: Fixing gnattest example names in the doc.
263 Adding explanation to additional tests usage.
265 2011-10-16 Robert Dewar <dewar@adacore.com>
267 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
269 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
271 * a-convec.adb: Fix minor inconsistencies.
273 2011-10-16 Matthew Heaney <heaney@adacore.com>
275 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
276 Implementation): Specify pragma Implementation_Defined.
278 2011-10-15 Nicolas Roche <roche@adacore.com>
280 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
281 either rtp-smp or ravenscar-cert-rtp runtimes.
283 2011-10-15 Bob Duff <duff@adacore.com>
285 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
286 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
288 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
289 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
291 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
292 pool only if RE_Root_Storage_Pool_Ptr is available.
293 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
294 pool actual unless RE_Root_Storage_Pool_Ptr is available.
295 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
296 formal only if RE_Root_Storage_Pool_Ptr is available.
298 2011-10-15 Matthew Heaney <heaney@adacore.com>
300 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
301 type): Specify Priority aspect for protected type.
303 2011-10-14 Ed Schonberg <schonberg@adacore.com>
305 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
306 is a generic actual, it is a subtype of a type that was frozen
307 by the instantiation, and even if not marked frozen it does not
308 affect the construction of the dispatch table.
310 2011-10-14 Robert Dewar <dewar@adacore.com>
312 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
314 * s-rident.ads: Add missing Compiler_Unit pragma.
316 2011-10-14 Gary Dismukes <dismukes@adacore.com>
318 * sem_res.adb: Minor reformatting.
320 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
322 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
323 Code and comment reformatting. Use BIP_Task_Master
324 when creating a _master.
325 (BIP_Formal_Suffix): Code reformatting. Correct the case for
327 (Make_Build_In_Place_Call_In_Object_Declaration): Use
328 BIP_Task_Master when creating a reference to the enclosing
329 function's _master formal.
330 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
332 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
333 (Needs_BIP_Finalization_Master): Alphabetized.
334 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
337 2011-10-14 Ed Schonberg <schonberg@adacore.com>
339 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
340 reject an aliased keyword on the object declaration of an extended
341 return statement. In older versions of the language indicate
342 that this is illegal in the standard.
344 2011-10-14 Pascal Obry <obry@adacore.com>
346 * sem_util.adb, sem_ch4.adb: Minor reformatting.
348 2011-10-14 Ed Schonberg <schonberg@adacore.com>
350 * sem_ch13.adb: Recognize properly procedure calls that are
351 transformed into code statements.
353 2011-10-14 Vincent Celier <celier@adacore.com>
355 * projects.texi: Minor fix in project example.
357 2011-10-14 Ed Schonberg <schonberg@adacore.com>
359 * sem_util.adb: Return objects are aliased if their type is
360 immutably limited as per AI05-0053.
362 2011-10-14 Gary Dismukes <dismukes@adacore.com>
364 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
365 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
366 Short_Circuit_And_Or expansion code (moved to sem_res).
367 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
368 "and" and "or" operators as short-circuit "and then" and "or
369 else", when pragma Short_Circuit_And_Or is active.
371 2011-10-13 Robert Dewar <dewar@adacore.com>
373 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
374 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
376 2011-10-13 Arnaud Charlet <charlet@adacore.com>
378 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
380 2011-10-13 Jerome Guitton <guitton@adacore.com>
382 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
384 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
386 * a-convec.ads (Cursor): Minor reformatting.
387 * a-convec.adb (Next): Fix minor inconsistencies.
388 (Previous): Likewise.
390 2011-10-13 Ed Schonberg <schonberg@adacore.com>
392 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
393 New predicate to determine whether some operations on an array
394 type are available when the full view of its component may differ
395 from the view of the point of the array declaration.
396 * sem_ch4.adb (Find_Equality_Types): Use
397 Available_Full_View_Of_Component.
398 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
400 2011-10-13 Ed Schonberg <schonberg@adacore.com>
402 * sem_ch9.adb: Analyze aspects while discriminants of protected
405 2011-10-13 Geert Bosch <bosch@adacore.com>
407 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
408 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
409 longer depend on an external library.
410 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
411 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
413 * gcc-interface/Make-lang.in: Update dependencies.
415 2011-10-13 Cyrille Comar <comar@adacore.com>
417 * gnat_ugn.texi: Minor editing.
419 2011-10-13 Vincent Celier <celier@adacore.com>
421 * projects.texi: Add documentation on packages and attributes
422 that are inherited from a project being extended into the
425 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
427 * exp_ch3.adb (Build_Master): Rewritten.
428 (Expand_N_Full_Type_Declaration): Reformat the declarative
429 region. Update the call to Build_Master_Renaming.
430 (Expand_Previous_Access_Type): Rewritten.
431 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
432 Add local constant Result_Subt and update related usage.
433 (Expand_N_Extended_Return_Statement): Add local constant
434 Result_Subt and update related usage.
435 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
436 new context detection mechanism.
437 (Build_Class_Wide_Master):
438 Use Insert_Action to add the renaming into the tree.
439 (Build_Master_Entity): Rewritten to use the new context detection
441 (Build_Master_Renaming): Add formal parameter Ins_Nod
442 and related usage. Use Insert_Action to add the renaming into the
444 (Find_Enclosing_Context): New subsidiary routine. Rather
445 than relying on enclosing scopes, this routine looks at the
446 tree structure to figure out the proper context for a _master
447 or a _chain. This approach eliminates the issues with transient
448 scopes which have not been converted into blocks.
449 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
450 to better reflect the new usage. Update the related comment.
451 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
452 the comment on usage.
453 * sem_ch3.adb (Access_Definition): Update the calls to
454 Build_Master_Entity and Build_Master_Renaming.
455 * sem_ch6.adb (Create_Extra_Formals): Add local variable
456 Full_Subt. Code reformatting.
457 * sem_util.adb (Is_Iterator): Alphabetized.
458 (Is_LHS): Alphabetized.
459 (Is_Limited_Class_Wide_Type): New routine.
460 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
462 2011-10-13 Geert Bosch <bosch@adacore.com>
464 * a-ngrear.adb (Solve): Make generic and move to
465 System.Generic_Array_Operations.
466 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
467 New generic solvers to compute a vector resp. matrix Y such
468 that A * Y = X, approximately.
469 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
470 Implement using Forward_Eliminate and Back_Substitute
471 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
473 * a-ngcoar.ads ("abs"): Fix return type to be real.
475 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
478 * s-linux-alpha.ads: Do not "with" Interfaces.C.
479 * s-linux-sparc.ads: Likewise.
481 2011-10-13 Geert Bosch <bosch@adacore.com>
483 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
485 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
487 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
490 2011-10-13 Geert Bosch <bosch@adacore.com>
492 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
493 move to System.Generic_Array_Operations.
495 2011-10-13 Geert Bosch <bosch@adacore.com>
497 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
498 * s-gearop.ads (L2_Norm): Change profile to be suitable for
500 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
503 2011-10-13 Robert Dewar <dewar@adacore.com>
505 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
506 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
507 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
508 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
509 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
510 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
512 2011-10-13 Geert Bosch <bosch@adacore.com>
514 * s-gearop.adb: Minor comment additions.
516 2011-10-13 Fedor Rybin <frybin@adacore.com>
518 * gnat_ugn.texi: Add gnattest section.
520 2011-10-13 Ed Schonberg <schonberg@adacore.com>
522 * freeze.adb: Do not create body of renaming if declaration has
525 2011-10-13 Olivier Hainque <hainque@adacore.com>
527 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
528 further, to the ppc+kernel case only.
530 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
532 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
533 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
534 Do not create a pool formal on .NET/JVM.
535 (Expand_N_Extended_Return_Statement): Alphabetize local
536 variables. Do not create a renaming of the build-in-place pool
537 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
538 Add the user-defined pool only on non-VM targets.
539 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
540 local variables. Do not add a pool actual on .NET/JVM.
541 * sem_ch6.adb: Add with and use clause for Targparm.
542 (Create_Extra_Formals): Add build-in-place pool formal only on
544 * rtsfind.ads: Alphabetize entries.
546 2011-10-13 Sergey Rybin <rybin@adacore.com>
548 * gnat_ugn.texi: Minor correction.
550 2011-10-13 Ed Schonberg <schonberg@adacore.com>
552 * sem_ch8.adb: Minor error message improvement.
554 2011-10-13 Robert Dewar <dewar@adacore.com>
556 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
558 2011-10-13 Gary Dismukes <dismukes@adacore.com>
560 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
561 of a for loop for an enumeration type with an enumeration rep
562 clause, which involves moving the original loop parameter into
563 a nested block, the loop parameter's entity must be removed from
564 the entity list of the loop scope.
566 2011-10-13 Bob Duff <duff@adacore.com>
568 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
569 that gets passed in the same cases where BIP_Alloc_Form is passed
570 (caller-unknown-size results). BIP_Storage_Pool is used when
571 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
572 to the user-defined storage pool is passed at the call site,
573 and this pool is used in callee to allocate the result.
574 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
575 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
576 the additional BIP_Storage_Pool actual.
577 (Expand_N_Extended_Return_Statement): Allocate the function
578 result using the user-defined storage pool, if BIP_Alloc_Form =
580 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
581 * exp_ch4.adb: Don't overwrite storage pool set by
582 Expand_N_Extended_Return_Statement.
583 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
584 for use in build-in-place function calls within allocators
585 where the access type has a user-defined storage pool.
587 2011-10-13 Sergey Rybin <rybin@adacore.com>
589 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
592 2011-10-13 Nicolas Roche <roche@adacore.com>
594 * gnatlink.adb: Ensure that -mrtp is passed when
595 runtime name ends with 'rtp'.
597 2011-10-13 Ed Schonberg <schonberg@adacore.com>
599 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
600 unchecked union type can be limited.
602 2011-10-13 Olivier Hainque <hainque@adacore.com>
604 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
605 the use of the signal trampoline for PPC in the sjlj case as well.
606 Add legitimate casts, preventing compile time warnings on the
607 (sighandler *) profile.
609 2011-10-13 Yannick Moy <moy@adacore.com>
611 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
612 analysis in Alfa mode.
614 2011-10-13 Ed Schonberg <schonberg@adacore.com>
616 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
617 expressions are legal limited return values if each one of their
618 dependent expressions are legal.
620 2011-10-13 Ed Schonberg <schonberg@adacore.com>
622 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
623 if the prefix of the call is a qualified expression, rewrite as
625 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
626 code statement is legal if it is a rewriting of a procedure call.
628 2011-10-13 Ed Schonberg <schonberg@adacore.com>
630 * exp_aggr.adb (Flatten): If a component association has a box,
631 assume that aggregate is not static.
632 (Safe_Aggregate): If a component association in a non-limited
633 aggregate has a box, assume that it cannot be expanded in place.
635 2011-10-13 Vincent Celier <celier@adacore.com>
637 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
638 Process_Project_Tree_Phase_1 with Packages_To_Check.
639 (Process_Project_And_Apply_Config): Ditto
640 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
641 Remove default for argument Packages_To_Check.
642 * prj-proc.adb (Recursive_Process): New argument
645 (Process_Project_Tree_Phase_1): Ditto.
646 (Recursive_Project.Process_Aggregated_Projects): Call
647 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
649 * prj-proc.ads (Process): New argument Packages_To_Check
650 (Process_Project_Tree_Phase_1): Ditto
652 2011-10-13 Arnaud Charlet <charlet@adacore.com>
654 * gcc-interface/Makefile.in: Fix typo.
656 2011-10-13 Ed Schonberg <schonberg@adacore.com>
658 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
659 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
660 Use sloc of defining identifier of farmal type declaration,
661 as sloc of generated internal entity, to prevent misplaced
664 2011-10-13 Ed Schonberg <schonberg@adacore.com>
666 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
667 is fully defined before checking that it is a numeric type.
669 2011-10-13 Ed Schonberg <schonberg@adacore.com>
671 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
672 association for component X has a box, then X is covered in the
673 aggregate even if there is not default value for X in the type
674 declaration, and X has to be default-initialized.
676 2011-10-13 Ed Schonberg <schonberg@adacore.com>
678 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
679 'Value): Mark literals as referenced only if reference is in
682 2011-10-13 Matthew Heaney <heaney@adacore.com>
684 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
686 2011-10-13 Olivier Hainque <hainque@adacore.com>
688 * sigtramp.h: New file. Prototype and spec of the signal
689 trampoline to be called by an established handler to provide
690 dwarf call frame info before the real signal processing code.
691 * sigtramp-ppcvxw.c: New file. Implementation of the signal
692 trampoline for ppc-vxworks.
693 * init.c (vxworks section): Use it for ppc.
695 2011-10-13 Thomas Quinot <quinot@adacore.com>
697 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
698 (Check_Future_Identifier): New subprogram,
699 factors duplicated code from Par.Ch2.P_Identifier and
700 Par.Ch3.P_Defining_Identifier.
702 2011-10-13 Thomas Quinot <quinot@adacore.com>
704 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
705 if we fail to initialize CV attributes or CV.
707 2011-10-13 Thomas Quinot <quinot@adacore.com>
709 * s-tasren.adb (Timed_Selective_Wait, case
710 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
711 we know abortion is already deferred.
713 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
715 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
716 (Build_Master_Renaming (function)): Removed.
717 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
718 (Expand_Full_Type_Declaration): Alphabetize
719 variables. Reformatting of code and comments. Rewrite the
720 section on processing of anonymous access-to-task types in
722 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
723 (Build_Master_Renaming): Moved to exp_ch9.
724 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
725 (Build_Master_Entity): Add formal parameter
726 Use_Current. Reformatting of code and comments.
727 (Build_Master_Renaming): Moved from exp_ch3.
728 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
729 exp_ch3. Update comment on usage.
730 (Build_Master_Entity):
731 Add formal parameter Use_Current. Update comment on usage.
732 (Build_Master_Renaming): Moved from exp_ch3.
733 * sem_ch3.adb (Access_Definition): Remove redundant code to
734 create a _master and a renaming.
736 2011-10-13 Ed Schonberg <schonberg@adacore.com>
738 * lib-xref.adb: Do no emit reference to overridden operation,
739 if it is internally generated.
741 2011-10-13 Vincent Celier <celier@adacore.com>
743 * bindgen.adb: Remove any processing related to g-trasym
744 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
745 * mlib-prj.adb: Remove any processing related to g-trasym.
747 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
749 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
750 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
751 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
752 (ADA_FLAGS_TO_PASS): Likewise.
753 (COMMON_FLAGS_TO_PASS): New.
754 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
755 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
756 (gnatlib): Use COMMON_FLAGS_TO_PASS.
757 (ada.install-common): Likewise.
758 (install-gnatlib): Likewise.
759 (install-gnatlib-obj): Likewise.
760 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
761 (gnat-cross): Delete.
762 (gnatboot): Likewise.
763 (gnatboot2): Likewise.
764 (gnatboot3): Likewise.
765 (gnatstage1): Likewise.
766 (gnatstage2): Likewise.
767 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
768 (MOST_ADAFLAGS): Likewise.
769 (LOOSE_CFLAGS): Likewise.
770 (gnat-cross): Likewise.
771 (GNATLIBFLAGS): Add -W -Wall.
772 (GNATLIBCFLAGS_FOR_C): Likewise.
773 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
774 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
776 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
778 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
779 (push_range_check_info): Likewise.
780 (gnat_to_gnu) <N_Code_Statement>: Likewise.
781 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
782 (gnat_invariant_expr): Likewise.
783 * gcc-interface/utils.c (compute_related_constant): Likewise.
784 (max_size): Fix handling of SAVE_EXPR.
785 (remove_conversions): Fix formatting.
787 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
789 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
790 (DECL_INDUCTION_VAR): New macro.
791 (SET_DECL_INDUCTION_VAR): Likewise.
792 * gcc-interface/gigi.h (convert_to_index_type): Declare.
793 (gnat_invariant_expr): Likewise.
794 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
795 parameter, set DECL_LOOP_PARM_P on it.
796 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
797 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
798 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
799 (struct range_check_info_d): New type.
800 (struct loop_info_d): Likewise.
801 (gnu_loop_stack): New stack.
802 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
803 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
804 is set, do not test DECL_RENAMED_OBJECT.
805 (push_range_check_info): New function.
806 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
807 the label. Reference the label and the iteration variable from it.
808 Build the special induction variable in the unsigned version of the
809 size type, if it is larger than the base type. And attach it to the
810 iteration variable if the latter isn't by-ref. In the iteration scheme
811 case, initialize the invariant conditions in front of the loop if
812 deemed profitable. Use gnu_loop_stack.
813 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
814 <N_Raise_Constraint_Error>: Always process the reason. In the range
815 check and related cases, and if loop unswitching is enabled, compute
816 invariant conditions and push this information onto the stack.
817 Do not translate again the condition if it has been already translated.
818 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
819 DECL_LOOP_PARM_P isn't set.
820 (convert_to_index_type): New function.
821 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
822 to convert the index from the base index type to sizetype.
823 (gnat_invariant_expr): New function.
825 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
827 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
828 two parallel arrays to hold standard builtin declarations, and
829 replace it with a function based interface that can support
830 creating builtins on the fly in the future.
831 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
832 (gnat_to_gnu): Ditto.
834 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
837 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
838 * gcc-interface/utils.c (global_context): New variable.
839 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
840 that are either public external or at top level. Use "No" macro.
841 (end_subprog_body): Call decl_function_context.
842 (rest_of_subprog_body_compilation): Likewise.
844 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
846 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
847 (rest_of_subprog_body_compilation): Likewise.
848 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
849 test for useless conversions by means of gnat_useless_type_conversion.
850 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
851 (language_function): Add named_ret_val and other_ret_val.
852 (f_named_ret_val): New macro.
853 (f_other_ret_val): Likewise.
854 (gigi): Call rest_of_subprog_body_compilation.
855 (struct nrv_data): New structure.
856 (is_nrv_p): New predicate.
857 (prune_nrv_r): New helper function.
858 (prune_nrv_in_block): New function.
859 (finalize_nrv_r): New helper function.
860 (finalize_nrv): New function.
861 (return_value_ok_for_nrv_p): New predicate.
862 (build_return_expr): If optimization is enabled, record candidates for
863 the Named Return Value optimization.
864 (build_function_stub): Call rest_of_subprog_body_compilation.
865 (Subprogram_Body_to_gnu): If optimization is enabled and there are
866 candidates, finalize the Named Return Value optimization.
867 Call rest_of_subprog_body_compilation.
868 (call_to_gnu): At the end, if a return value is needed, simplify the
869 result before wrapping it up in a COMPOUND_EXPR.
870 * gcc-interface/utils.c (end_subprog_body): Split into...
871 (rest_of_subprog_body_compilation): ...this. New function.
872 (gnat_useless_type_conversion): Likewise.
874 2011-10-06 Thomas Quinot <quinot@adacore.com>
876 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
877 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
878 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
879 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
880 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
881 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
882 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
883 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
885 2011-10-06 Ed Schonberg <schonberg@adacore.com>
887 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
890 2011-10-06 Matthew Heaney <heaney@adacore.com>
892 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
893 (Dequeue_Only_High_Priority): Protected procedure now implemented.
895 2011-10-06 Vincent Celier <celier@adacore.com>
897 * g-trasym.adb: Replace old implementation with the default
898 implementation that returns list of addresses as "0x...".
899 * g-trasym.ads: Update the list of platforms with the full
900 capability. Indicate that there is a default implementation
902 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
903 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
904 is now a default implementation for all platforms without the full
907 2011-10-06 Robert Dewar <dewar@adacore.com>
909 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
910 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
911 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
912 reorganization (use conditional expressions).
914 2011-10-06 Robert Dewar <dewar@adacore.com>
916 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
917 floating divide by zero.
919 2011-10-06 Ed Schonberg <schonberg@adacore.com>
921 * sem_ch6.adb: Limited interfaces that are not immutably limited
922 are OK in return statements.
924 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
926 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
927 change to powerpc section.
929 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
931 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
934 2011-09-27 Ed Schonberg <schonberg@adacore.com>
936 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
937 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
938 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
940 * a-coorma.ads: Minor reformmating.
941 * einfo.ads: Improve the comment describing the
942 Directly_Designated_Type function.
943 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
945 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
948 2011-09-27 Robert Dewar <dewar@adacore.com>
950 * a-comutr.ads: Minor reformatting.
952 2011-09-27 Ed Schonberg <schonberg@adacore.com>
954 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
955 iterators to multiway trees.
957 2011-09-27 Yannick Moy <moy@adacore.com>
959 * debug.adb (d.D): New option for strict Alfa mode.
960 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
961 permissions as strictly as possible.
962 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
963 Alfa mode, now, interpret ranges of base types like GNAT does; in
964 strict mode, simply change the range of the implicit base Itype.
965 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
967 2011-09-27 Robert Dewar <dewar@adacore.com>
969 * exp_ch9.adb: Minor comment fixes.
971 2011-09-27 Ed Schonberg <schonberg@adacore.com>
973 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
976 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
978 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
979 instead of Directly_Designated_Type in the indirect array case.
981 2011-09-27 Robert Dewar <dewar@adacore.com>
983 * exp_util.adb, exp_aggr.adb: Minor reformatting.
985 2011-09-27 Ed Schonberg <schonberg@adacore.com>
987 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
988 on subtype declarations.
989 * exp_aggr.adb: Minor comment update.
991 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
993 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
994 test in the N_Explicit_Dereference case. Fold double logical
995 negation in the special loop case and conditionalize it on
996 Variable_Ref being true.
998 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1000 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1001 single protected object and the selector is a discriminant or an
1002 entry family, this is a non-overloaded candidate interpretation,
1003 and possible primitive operations of the type must not be
1006 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1008 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1010 2011-09-27 Pascal Obry <obry@adacore.com>
1012 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1013 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1014 Add dummy definitions for pthread_rwlock_t
1015 and pthread_rwlockattr_t on all POSIX platforms.
1016 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1018 (Finalize_Lock): Likewise.
1019 (Write_Lock): Likewise.
1022 2011-09-27 Tristan Gingold <gingold@adacore.com>
1024 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1027 2011-09-27 Pascal Obry <obry@adacore.com>
1029 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1030 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1031 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1032 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1033 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1034 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1035 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1036 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1037 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1038 s-taprop-posix.adb: Revert previous changes.
1039 (Lock): Now a record containing the two possible lock
1040 (mutex and read/write) defined in OS_Interface.
1041 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1043 (Initialize_Protection): Likewise.
1045 (Lock_Read_Only): Likewise.
1048 2011-09-27 Pascal Obry <obry@adacore.com>
1050 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1051 OS_Interface.pthread_rwlock_t.
1053 2011-09-27 Robert Dewar <dewar@adacore.com>
1055 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1056 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1057 sem_ch5.adb, sem_util.adb: Minor reformatting.
1059 2011-09-27 Pascal Obry <obry@adacore.com>
1061 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1062 (Finalize_Lock)[RW_Lock]: Likewise.
1063 (Write_Lock)[RW_Lock]: Likewise.
1064 (Unlock)[RW_Lock]: Likewise.
1065 (Read_Lock): Define L as RW_Lock (instead of Lock).
1066 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1067 routine for r/w lock.
1068 (Finalize_Lock)[RW_Lock]: Likewise.
1069 (Write_Lock)[RW_Lock]: Likewise.
1070 (Unlock)[RW_Lock]: Likewise.
1071 (Read_Lock): Define L as RW_Lock (instead of Lock).
1073 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1074 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1075 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1076 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1077 routine for standard lock.
1078 (Finalize_Lock)[RW_Lock]: Likewise.
1079 (Write_Lock)[RW_Lock]: Likewise.
1080 (Unlock)[RW_Lock]: Likewise.
1081 (Read_Lock): Define L as RW_Lock (instead of Lock).
1082 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1083 in the record definition.
1084 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1085 lock for 'R' locking policy.
1086 (Initialize_Protection): Likewise.
1088 (Lock_Read_Only): Likewise.
1090 * s-taspri-posix.ads (RW_Lock): New type defined as
1091 OS_Interface.pthread_rwlock_t.
1093 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1094 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1095 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1096 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1098 2011-09-27 Pascal Obry <obry@adacore.com>
1100 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1102 2011-09-27 Pascal Obry <obry@adacore.com>
1104 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1105 s-osinte-hpux.ads, s-osinte-irix.ads,
1106 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1108 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1109 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1110 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1111 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1112 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1113 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1115 2011-09-27 Pascal Obry <obry@adacore.com>
1117 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1118 (RE_Id): Add RE_Lock_Read_Only.
1119 (RE_Unit_Table): Likewise.
1120 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1121 to lift restriction on first character. Handle now the
1122 Name_Concurrent_Readers_Locking where policy character is set to
1124 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1126 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1127 read only lock for function in protected object.
1128 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1129 this routine is now used.
1131 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1133 * s-atocou-x86.adb (Decrement): Use %;.
1134 (Increment): Likewise.
1136 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1138 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1139 dereference of the pointer to the storage area. Remove useless type
1140 conversions and factor out common code.
1142 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1144 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1145 variable and use it throughout.
1146 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1147 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1148 first step. Also convert to the unpadded type as a last step.
1150 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1152 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1153 DECL_CHAIN in comment.
1154 * gcc-interface/trans.c (gigi): Likewise.
1155 (Attribute_to_gnu): Likewise.
1156 (build_function_stub): Likewise.
1157 (gnat_to_gnu): Likewise.
1158 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1159 (convert_vms_descriptor64): Likewise.
1160 (convert_vms_descriptor32): Likewise.
1162 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1164 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1165 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1166 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1167 the type of the record is TYPE_READONLY.
1169 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1170 Robert Dewar <dewar@adacore.com>
1172 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1173 OUT formal parameter which is of an null-exclusion access subtype.
1175 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1177 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1178 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1179 (gnat_to_gnu_param): Likewise.
1180 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1181 maybe_unconstrained_array instead of doing the work manually.
1182 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1183 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1184 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1185 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1186 (gnat_stabilize_reference): Likewise.
1188 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1190 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1191 (SET_TYPE_NULL_BOUNDS): Likewise.
1192 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1193 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1194 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1196 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1197 check that the initializer is a valid constant expression for use in
1198 initializing a static variable. Add missing guard.
1199 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1200 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1201 pointer for the bounds.
1202 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1203 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1205 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1207 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1208 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1209 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1210 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1211 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1212 to the indirect case.
1213 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1214 the TREE_THIS_NOTRAP flag.
1216 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1218 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1219 iteration scheme, always generate the do-while form if optimization
1220 is enabled. Use more straightforward test at the end.
1222 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1224 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1225 XNEW instead of xmalloc. Do not build useless pointer type.
1226 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1227 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1228 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1230 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1232 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1233 the alignment if this doesn't prevent BLKmode access to the object.
1235 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1237 * gcc-interface/Makefile.in (darwin): Do not issue the
1238 '-flat_namespace' linker flag during Ada build.
1239 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1240 default shared library options.
1242 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1244 * gcc-interface/decl.c (annotate_value): Look up expression for
1245 insertion in the cache at the end.
1247 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1249 * gcc-interface/Make-lang.in: Update dependencies.
1251 2011-09-19 Steve Baird <baird@adacore.com>
1253 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1254 configuration pragma names so that Is_Configuration_Pragma_Name
1255 will return True for Name_Annotate. Make corresponding change in
1256 Pragma_Id enumeration type. This is needed to allow an Annotate
1257 pragma to occur in a configuration pragma file (typically,
1259 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1260 * gnat_rm.texi: Note that pragma Annotate may be used as a
1261 configuration pragma.
1263 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1265 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1266 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1268 2011-09-19 Yannick Moy <moy@adacore.com>
1270 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1271 for expansion of set membership.
1272 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1273 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1274 visible for use in Alfa expansion.
1275 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1276 variable in Alfa mode.
1278 2011-09-19 Thomas Quinot <quinot@adacore.com>
1280 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1282 2011-09-19 Thomas Quinot <quinot@adacore.com>
1284 * exp_ch9.adb: Minor reformatting.
1286 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1288 * freeze.adb (Build_Renamed_Body): Generic subprograms
1289 instantiations cannot be poperly inlined by the compiler, do
1290 not set the Body_To_Inline attribute in such cases.
1291 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1292 inlining-related flags from the generic subprogram declaration.
1294 2011-09-19 Thomas Quinot <quinot@adacore.com>
1296 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1297 (Build_Stub_Type): Remove, instead copy components from
1298 System.Partition_Interface.RACW_Stub_Type.
1299 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1300 (Copy_Component_List): New subprogram.
1302 2011-09-19 Yannick Moy <moy@adacore.com>
1304 * lib-xref.adb (Generate_Reference): Ignore references to
1305 constants in Standard.
1307 2011-09-19 Robert Dewar <dewar@adacore.com>
1309 * err_vars.ads, errout.ads: Minor reformatting.
1311 2011-09-19 Robert Dewar <dewar@adacore.com>
1313 * aspects.ads (Impl_Defined_Aspects): New array
1314 * lib-writ.adb (No_Dependences): New name for No_Dependence
1315 * restrict.adb (No_Dependences): New name for No_Dependence
1316 (Check_Restriction_No_Specification_Of_Aspect): New
1318 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1319 (Restricted_Profile_Result): New variable
1320 (No_Specification_Of_Aspects): New variable
1321 (No_Specification_Of_Aspect_Warning): New variable
1322 * restrict.ads (No_Dependences): New name for No_Dependence
1323 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1324 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1325 * s-rident.ads: Add restriction
1326 No_Implementation_Aspect_Specifications, this is also added to
1327 the No_Implementation_Extensions profile.
1328 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1329 No_Implementation_Defined_Aspects
1330 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1331 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1332 No_Implementation_Aspects
1333 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1334 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1336 2011-09-19 Yannick Moy <moy@adacore.com>
1338 * lib-xref.adb (Generate_Reference): Take into account multiple
1339 renamings for Alfa refs.
1341 2011-09-19 Thomas Quinot <quinot@adacore.com>
1343 * g-socthi-mingw.adb: Minor reformatting.
1345 2011-09-19 Yannick Moy <moy@adacore.com>
1347 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1348 expansion to False in mode Alfa
1350 2011-09-19 Pascal Obry <obry@adacore.com>
1352 * mingw32.h: Remove obsolete code needed for old versions
1355 2011-09-19 Robert Dewar <dewar@adacore.com>
1357 * errout.ads: Minor reformatting.
1359 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1361 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1362 function is transformed into a declaration and a body, insert
1363 body at the end of the declarative part, to prevent premature
1364 freeze actions, and preserve original specification in the
1365 subprogram declaration.
1367 2011-09-19 Vincent Celier <celier@adacore.com>
1369 * projects.texi: Minor editing.
1371 2011-09-19 Robert Dewar <dewar@adacore.com>
1373 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1374 exp_aggr.adb: Minor reformatting.
1376 2011-09-19 Yannick Moy <moy@adacore.com>
1378 * lib-xref.adb (Generate_Reference): Change entity referenced
1379 to underlying object if any, or else reference to the HEAP.
1381 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1383 * gcc-interface/Make-lang.in: Update dependencies.
1385 2011-09-15 Robert Dewar <dewar@adacore.com>
1387 * tree_io.ads: Minor reformatting.
1388 * a-intnam.ads: Fix bad header.
1390 2011-09-15 Thomas Quinot <quinot@adacore.com>
1392 * a-exexpr-gcc.adb: Minor reformatting.
1394 2011-09-15 Yannick Moy <moy@adacore.com>
1396 * sem_ch6.adb: Propagate information that an expression function comes
1397 from source (otherwise references to this entity are not stored).
1399 2011-09-15 Robert Dewar <dewar@adacore.com>
1401 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1402 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1403 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1405 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1407 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1408 if the expression function is not a completion, create a
1409 new specification for the generated declaration, and keep the
1410 original specification in the generated body. Shorter code also
1411 ensures that proper warnings are generated for unused formals
1414 2011-09-15 Sergey Rybin <rybin@adacore.com>
1416 * tree_io.ads: Update ASIS_Version_Number because of the changes
1417 in the tree structures for expression functions.
1419 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1421 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1422 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1423 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1424 (CLOCK_REALTIME): Fix wrong value on some OSes.
1425 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1427 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1429 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1430 to unconstrained array case, deal with each branch of a COND_EXPR.
1431 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1432 a COND_EXPR in the initializer, if present.
1434 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1436 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1437 of an addressable type.
1438 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1439 Deal with those cases for which creating a temporary is mandatory.
1441 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1443 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1444 this is a real formal parameter before testing whether it is by ref.
1446 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1448 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1449 (build_call_1_expr): Likewise.
1450 (build_call_2_expr): Likewise.
1451 (build_call_n_expr): New prototype.
1452 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1453 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1454 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1455 (Exception_Handler_to_gnu_zcx): Likewise.
1456 (gnat_to_gnu): Likewise.
1457 (build_binary_op_trapv): Likewise.
1458 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1459 (build_call_1_expr): Likewise.
1460 (build_call_2_expr): Likewise.
1461 (build_call_n_expr): New function.
1462 (build_call_raise): Use build_call_n_expr.
1463 (build_call_raise_range): Likewise.
1464 (build_call_raise_column): Likewise.
1465 (build_call_alloc_dealloc_proc): Likewise.
1466 (maybe_wrap_malloc): Likewise.
1467 (maybe_wrap_free): Likewise.
1469 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1471 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1473 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1474 the result type is null if ENABLE_CHECKING. Set operation_type at the
1475 end unconditionally if not set in the previous cases.
1476 Use build2 and void_type_node for MODIFY_EXPR.
1477 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1479 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1481 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1482 precision when converting to or from an integral type whose precision
1483 is not equal to its size.
1485 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1487 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1489 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1491 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1493 * system-darwin-ppc64.ads: New file.
1495 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1497 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1500 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1502 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1503 size switches to the link phase for shared libs.
1505 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1507 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1508 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1510 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1512 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1513 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1514 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1516 (TOOLS_FLAGS_TO_PASS): New.
1517 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1519 2011-09-06 Robert Dewar <dewar@adacore.com>
1521 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1522 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1524 2011-09-06 Robert Dewar <dewar@adacore.com>
1526 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1527 * s-rident.ads: New restriction No_Implementation_Units
1528 (this restriction is also part of the profile
1529 No_Implementation_Extensions)
1530 * sem_ch10.adb (Analyze_With_Clause): Add check for
1531 No_Implementation_Units restriction.
1533 2011-09-06 Jerome Guitton <guitton@adacore.com>
1535 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1538 2011-09-06 Thomas Quinot <quinot@adacore.com>
1540 * s-solita.adb: Minor reformatting.
1542 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1544 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1545 is a rewriting of an expression function does not freeze previous
1548 2011-09-06 Robert Dewar <dewar@adacore.com>
1550 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1552 2011-09-06 Tristan Gingold <gingold@adacore.com>
1554 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1555 powerpc-wrs-vxworksae.
1557 2011-09-06 Thomas Quinot <quinot@adacore.com>
1559 * s-os_lib.ads (Spawn): Minor documentation clarification,
1560 Success is True for a zero exit status.
1562 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1564 * sem_ch5.adb: Add message for common iterator error.
1566 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1568 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1569 selected component discriminated by a current instance, replace
1570 the constraint with a reference to the target object, regardless
1571 of whether the context is an init_proc.
1573 2011-09-06 Robert Dewar <dewar@adacore.com>
1575 * exp_attr.adb: Descriptor_Size is never static.
1577 2011-09-06 Robert Dewar <dewar@adacore.com>
1579 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1581 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1583 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1586 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1588 * sem_res.adb (Resolve): An expression that is the body of an
1589 expression function does not freeze.
1591 2011-09-06 Matthew Heaney <heaney@adacore.com>
1593 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1594 a-cuprqu.adb: Changed copyright notice to indicate current
1597 2011-09-06 Vincent Celier <celier@adacore.com>
1599 * prj.adb: Minor spelling error fix in comment
1600 * sem_res.adb: Minor reformatting
1602 2011-09-06 Pascal Obry <obry@adacore.com>
1604 * sysdep.c (winflush_nt): Removed as not needed anymore.
1605 (winflush_95): Likewise.
1606 (winflush_init): Likewise.
1607 (winflush_function): Likewise.
1608 (getc_immediate_common): Remove call to winflush_function.
1610 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1612 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1613 processing for Descriptor_Size.
1614 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1615 to account for its broader usage.
1616 * sem_attr.adb (Analyze_Attribute): Change the error detection
1617 circuitry for Descriptor_Size as the attribute is now applicable
1620 2011-09-06 Robert Dewar <dewar@adacore.com>
1622 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1624 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1626 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1627 in a parameter association must not set the Referenced flag on
1629 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1631 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1633 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1635 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1637 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1638 gnatlink-re): Speed up by using -j0.
1640 2011-09-06 Yannick Moy <moy@adacore.com>
1642 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1643 Set_Corresponding_Aspect when creating pragma from aspect.
1644 (Add_Predicates): Use new field Corresponding_Aspect.
1645 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1646 name when present, for the purpose of issuing error messages;
1647 remove local procedure Error_Pragma_Arg_Alternate_Name.
1648 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1650 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1653 2011-09-06 Robert Dewar <dewar@adacore.com>
1655 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1657 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1659 * exp_ch6.adb (Build_Heap_Allocator): Add new
1660 local variable Desig_Typ. Code and comment reformatting. Add
1661 machinery to ensure that the allocation uses a fat pointer when
1662 the type of the return object is a constrained array and the
1663 function return type is an unconstrained array.
1665 2011-09-06 Vincent Celier <celier@adacore.com>
1667 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1668 parameters in subprograms.
1670 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1672 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1674 2011-09-06 Thomas Quinot <quinot@adacore.com>
1676 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1677 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1679 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1680 is null, destroy task specific data, to make API consistent with
1681 other platforms, and thus compatible with the shared version
1683 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1684 Document the above assumption.
1686 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1688 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1689 variable for type of return value when return type is
1690 unconstrained and context is an assignment.
1692 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1694 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1695 class-wide operation if expansion is not enabled.
1697 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1699 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1702 2011-09-06 Yannick Moy <moy@adacore.com>
1704 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1705 Aspect_Invariant): Do not issue error at this point on illegal
1706 pragma placement, as this is checked later on when analyzing
1707 the corresponding pragma.
1708 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1709 similar to Error_Pragma_Arg, except the source name of the
1710 aspect/pragma to use in warnings may be equal to parameter
1711 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1712 message to distinguish source name of pragma/aspect, and whether
1713 the illegality resides in the type being public, or being private
1714 without a public declaration
1716 2011-09-06 Thomas Quinot <quinot@adacore.com>
1718 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1719 size check (fd_set is implemented differently on that platform).
1721 2011-09-06 Thomas Quinot <quinot@adacore.com>
1723 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1724 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1725 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1726 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1727 (ATCB_Allocation): New subpackage of
1728 System.Tasking.Primitive_Operations, shared across all targets
1729 with full tasking runtime.
1730 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1732 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1733 taking care of establishing a local temporary ATCB if the one
1734 being deallocated is Self, to avoid a reference to the freed
1735 ATCB in Abort_Undefer.
1737 2011-09-06 Thomas Quinot <quinot@adacore.com>
1739 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1740 terminated, mark it for deallocation upon termination.
1741 (Terminate_Task): Call Free_Task again if the task is marked
1742 for automatic deallocation upon termination.
1744 2011-09-06 Robert Dewar <dewar@adacore.com>
1746 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1747 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1748 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1749 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1750 a-intnam-solaris.ads, a-intnam-tru64.ads,
1751 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1752 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1753 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1754 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1755 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1756 Add new profile No_Implementation_Extensions
1757 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1758 profile No_Implementation_Extensions
1759 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1760 Check violation of restriction No_Implementation_Identifiers
1761 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1762 Add entry for Name_No_Implementation_Extensions
1764 2011-09-06 Robert Dewar <dewar@adacore.com>
1766 * impunit.ads: Minor reformatting.
1768 2011-09-06 Robert Dewar <dewar@adacore.com>
1770 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1772 2011-09-06 Pascal Obry <obry@adacore.com>
1774 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1777 2011-09-06 Robert Dewar <dewar@adacore.com>
1779 * g-socket.adb: Minor reformatting
1781 2011-09-06 Javier Miranda <miranda@adacore.com>
1783 * ali.adb (Scan_ALI): Add missing support to load references of
1784 entities imported from other languages.
1785 * ali.ads (Xref_Record): Adding new fields to store the language and
1786 name of an imported entity.
1787 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1790 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1792 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1793 is allowed on a full type declaration if it is the completion of
1794 a private declarations.
1795 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1796 aspect is allowed on a full type declaration in the private part
1799 2011-09-06 Robert Dewar <dewar@adacore.com>
1801 * sem_ch8.ads: Minor reformatting
1803 2011-09-06 Thomas Quinot <quinot@adacore.com>
1805 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1806 Guard against socket values that are not in [0;FD_SETSIZE[
1808 2011-09-06 Robert Dewar <dewar@adacore.com>
1810 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1813 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1815 * s-linux-alpha.ads: Minor reformatting
1816 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1817 Use sizeof instead of corresponding C defines in s-oscons template.
1819 2011-09-06 Vadim Godunko <godunko@adacore.com>
1821 * a-convec.ads, a-iteint.ads: Minor reformatting.
1823 2011-09-06 Vincent Celier <celier@adacore.com>
1825 * projects.texi: Add menus and @node lines.
1827 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1829 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1830 where the return type is an unconstrained array and the context
1831 is an assignment. Optimize the case when the target of the
1832 assignment is a selected component.
1834 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1836 * s-solita.adb: Update comments.
1838 2011-09-06 Pascal Obry <obry@adacore.com>
1840 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1841 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1842 * s-oscons-tmplt.c: Add support for generating pthread related
1843 types size on GNU/Linux as done for Darwin.
1844 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1846 2011-09-06 Robert Dewar <dewar@adacore.com>
1848 * exp_ch6.adb: Fix minor typo.
1850 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1852 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1853 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1854 (Double_Size_Of): Alphabetized. Update the comment on usage.
1855 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1856 (Nearest_Multiple_Rounded_Up): New routine.
1857 (Size_Of): Update comment on usage. The generated expression now
1858 accounts for alignment gaps by rounding the size of the type to the
1859 nearest multiple rounded up of the type's alignment.
1861 2011-09-06 Robert Dewar <dewar@adacore.com>
1863 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1865 2011-09-06 Steve Baird <baird@adacore.com>
1867 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1868 derived subprograms in checking for presence of an
1869 Extra_Accessibility_Of_Result formal parameter.
1870 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1871 checking for presence of an Extra_Accessibility_Of_Result formal
1873 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1874 case where the Parameter_Associatiations attribute is already set,
1875 but set to an empty list.
1876 (Needs_Result_Accessibility_Level):
1877 Unconditionally return False. This is a temporary
1878 change, disabling the Extra_Accessibility_Of_Result
1880 (Expand_Simple_Function_Return): Check for
1881 Extra_Accessibility_Of_Result parameter's presence instead of
1882 testing Ada_Version when generating a runtime accessibility
1883 check which makes use of the parameter.
1885 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1887 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1888 expression in a given case alternative must be attached to the
1889 statement list of the ccrresponding case statement alternative
1890 They cannot be propagated ahead of the case statement, because
1891 the validity of the expression that generated the action may
1892 hold only for that alternative.
1894 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1896 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1897 (Alignment_Of): Remove the code for strict alignment targets.
1898 (Double_Alignment_Of): Removed.
1899 (Double_Size_Of): New routine.
1900 (Make_Finalize_Address_Stmts): Change the
1901 calculation of the dope's size. Update relevant comments.
1902 (Size_Of): New routine.
1904 2011-09-06 Steve Baird <baird@adacore.com>
1906 * einfo.ads (Extra_Accessibility): Update associated comment to use
1907 the term "present" correctly ("present" just means that it is not
1908 an error to query the value of the attribute - it does not imply
1909 that the value must be non-null).
1910 (Extra_Constrained): Ditto.
1911 (Is_Visible_Formal): Ditto.
1912 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1913 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1914 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1915 * exp_ch6.adb (Expand_Call): The callee may require an
1916 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1917 < Ada_2012. This can occur if the callee is exported from a Gnat
1918 runtimes unit. Also improve a comment.
1920 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1922 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1923 (Alignment_Of): Rename formal parameter Some_Typ
1924 to Typ, update related comment. Use the allocator alignment on
1925 strict alignment targets such as SPARC.
1926 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1929 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1931 * sem_ch9.adb (Check_Interfaces): Test
1932 Is_Limited_Type rather than Is_Limited_Record when checking that
1933 the partial view of a synchronized full view must be limited.
1935 2011-09-06 Emmanuel Briot <briot@adacore.com>
1937 * g-comlin.adb (Free): Fix memory leak.
1939 2011-09-06 Robert Dewar <dewar@adacore.com>
1941 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1943 2011-09-06 Steve Baird <baird@adacore.com>
1945 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1946 (Ada2012) cases described in AI05-0234 where the accessibility
1947 level of a function result is "determined by the point of
1948 call", an implicit parameter representing that accessibility
1949 level is passed in. Extra_Accessibilty_Of_Result yields this
1950 additional formal parameter. Extra_Accessibility_Of_Result
1951 is analogous to the existing Extra_Accessibility
1952 function used in the implementation of access parameters.
1953 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1954 Extra_Accessibility_Of_Result attribute.
1955 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1956 (Set_Extra_Accessibility_Of_Result): New procedure.
1957 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1958 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1959 an accessibility level literal to Natural; introduce a nested
1960 function, Make_Level_Literal, to do this.
1961 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1962 determines whether a given function (or access-to-function
1963 type) needs to have an implicitly-declared accessibility-level
1964 parameter added to its profile.
1965 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1966 previously declared in the body of Exp_Ch6.
1967 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1969 (Has_Unconstrained_Access_Discriminants): New Function; a
1970 predicate on subtype entities which returns True if the given
1971 subtype is unconstrained and has one or more access discriminants.
1972 (Expand_Call): When expanding a call to a function which takes an
1973 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1974 actual parameter value. In the case of a function call which is
1975 used to initialize an allocator, this may not be possible because
1976 the Etype of the allocator may not have been set yet. In this
1977 case, we defer passing in the parameter and handle it later in
1978 Expand_Allocator_Expression.
1979 (Expand_Simple_Function_Return): When returning from a function which
1980 returns an unconstrained subtype having at least one access
1981 discriminant, generate the accessibility check needed to ensure that
1982 the function result will not outlive any objects designated by its
1984 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1986 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1987 is used to initialize an allocator, we may need to pass in "the
1988 accessibility level determined by the point of call" (AI05-0234)
1989 to the function. Expand_Call, where such actual parameters are
1990 usually generated, is too early in this case because the Etype of
1991 the allocator (which is used in determining the level to be passed
1992 in) may not have been set yet when Expand_Call executes. Instead,
1993 we generate code to pass in the appropriate actual parameter
1994 in Expand_Allocator_Expression.
1995 * sem_ch6.adb (Create_Extra_Formals): Create
1996 the new Extra_Accessibility_Of_Result formal if
1997 Needs_Result_Accessibility_Level returns True. This includes the
1998 introduction of a nested procedure, Check_Against_Result_Level.
2000 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2002 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2005 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2007 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2008 for the synchronization. Move the test for null from
2009 s-stposu.Allocate_Any_Controlled to this routine since the check
2010 needs to be protected too.
2011 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2012 synchronization code.
2013 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2014 explaining the context in which this routine is used.
2015 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2016 to s-finmas.Set_Finalize_Address.
2018 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2020 * einfo.ads: Document that itypes have no parent field.
2022 2011-09-05 Robert Dewar <dewar@adacore.com>
2024 * rtsfind.adb (Check_CRT): Check for overloaded entity
2025 * rtsfind.ads: Document that entities to be found by rtsfind
2026 cannot be overloaded
2027 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2028 (Lock_Entries_With_Status): New name for Lock_Entries with two
2029 arguments (changed to meet rtsfind no overloading rule).
2031 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2033 * s-finmas.adb (Set_Finalize_Address (Address,
2034 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2035 (Set_Finalize_Address (in out Finalization_Master,
2036 Finalize_Address_Ptr): Add synchronization code.
2037 * s-finmas.ads (Set_Finalize_Address (Address,
2038 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2039 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2040 Set_Finalize_Address for the heterogeneous case.
2042 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2044 * sem_ch3.adb: Undo previous change, not suitable after all.
2046 2011-09-05 Robert Dewar <dewar@adacore.com>
2048 * einfo.ads: Minor comment clarification.
2050 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2052 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2053 no longer needs to search through the entities of the return
2054 statement scope to find the _chain.
2055 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2056 (Analyze_Block_Statement): Add local variable
2057 Is_BIP_Return_Statement. Add machinery to install all entities
2058 produced by the expansion of the return object declaration.
2059 (Install_Return_Entities): New routine.
2060 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2062 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2064 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2065 of subunit is incomplete.
2066 (Analyze_Proper_Body): If parent spec is not available, do not
2069 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2071 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2072 interface type conversions, that are expanded into dereferences.
2074 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2076 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2077 Examine the parameter and return profile of a subprogram and swap
2078 any incomplete types coming from a limited context with their
2079 corresponding non-limited views.
2080 (Exchange_Limited_Views): New routine.
2082 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2084 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2085 of internal entity to the subtype declaration, so that when
2086 entities are subsequently exchanged in a package body, the tree
2087 remains properly formatted for ASIS.
2089 2011-09-05 Johannes Kanig <kanig@adacore.com>
2091 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2093 (Display_Help): display the user given help message, if available.
2095 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2097 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2098 is legal if the original node is an identifier that is a
2099 parameterless function call.
2101 2011-09-05 Pascal Obry <obry@adacore.com>
2103 * prj-nmsc.adb: Minor reformatting.
2104 Add support for standalone aggregate library.
2105 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2106 * projects.texi: Fix documentation for aggregate library projects.
2108 2011-09-05 Robert Dewar <dewar@adacore.com>
2110 * sem_ch6.adb: Minor reformatting.
2112 2011-09-05 Matthew Gingell <gingell@adacore.com>
2114 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2115 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2116 the bottom of the stack is not overwritten.
2118 2011-09-05 Thomas Quinot <quinot@adacore.com>
2120 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2122 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2124 * sem_ch3.adb (Access_Definition): If an access type declaration
2125 appears in a child unit, the scope of whatever anonymous type
2126 may be generated is the child unit itself.
2128 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2130 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2131 Comes_From_Source on rewritten body.
2132 (Analyze_Subprogram_Body_Helper): Check that the original node for
2133 the body comes from source, when determining whether expansion
2134 of a protected operation is needed.
2136 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2138 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2139 a selected component and the right-hand side is a self-referential
2140 access, the proper prefix of the rewritten attribute is a copy
2141 of the left-hand side, not of its prefix.
2143 2011-09-05 Robert Dewar <dewar@adacore.com>
2145 * sem_ch5.adb: Minor reformatting.
2146 * sem_ch3.adb: Minor code clean up.
2148 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2150 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2151 restriction No_Dynamic_Attachment is in effect or not should
2152 not influence the default priority associated to a protected
2153 object. With this change, when the restriction is in effect (as
2154 is the case for the Ravenscar profile) the default priority of
2155 a protected object with an interrupt handler is in the range of
2156 interrupt priorities (Default_Interrupt_Priority) as required
2159 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2161 * a-iteint.ads: Fix header.
2163 2011-09-05 Vincent Celier <celier@adacore.com>
2165 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2166 with a directory separator to avoid output such as:
2167 "/path/to/objauto.cgpr" has been deleted.
2169 2011-09-05 Robert Dewar <dewar@adacore.com>
2171 * sem_ch3.adb: Minor reformatting.
2173 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2175 * sem_ch5.adb: Better error message.
2177 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2179 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2180 (Expand_Array_Aggregate): Detect a special case of an aggregate
2181 which contains tasks in the context of an unexpanded return
2182 statement of a build-in-place function.
2183 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2184 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2185 which contains tasks and expand it now that the original simple
2186 return statement has been rewritten.
2187 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2188 reformatting. Do not create a chain for an extended return
2189 statement if one is already available.
2190 (Has_Activation_Chain): New routine.
2192 2011-09-05 Marc Sango <sango@adacore.com>
2194 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2195 the wrong test and add the correct test to detect the violation
2196 of illegal use of unconstrained string type in SPARK mode.
2198 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2200 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2201 message on an iterator over an array.
2203 2011-09-05 Robert Dewar <dewar@adacore.com>
2205 * lib-xref-alfa.adb: Minor reformatting.
2207 2011-09-05 Robert Dewar <dewar@adacore.com>
2209 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2210 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2212 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2214 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2216 2011-09-05 Johannes Kanig <kanig@adacore.com>
2218 * lib-xref-alfa.adb: Update comments.
2220 2011-09-05 Thomas Quinot <quinot@adacore.com>
2222 * sem_res.adb: Minor reformatting
2224 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2226 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2227 present, create them now. Needed in case the return type was
2228 a limited view in the function declaration.
2229 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2230 tasks, build the activation chain for it. Pass a reference to
2231 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2232 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2233 with build_in_place calls.
2234 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2235 incomplete, inatialize its Corresponding_Record_Type component.
2236 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2239 2011-09-05 Johannes Kanig <kanig@adacore.com>
2241 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2244 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2246 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2247 appears within a package specification and the token after "IS"
2248 is not a parenthesis, assume that this is an unparenthesized
2249 expression function, even if the token appears in a line by
2251 * par.adb: Clarify use of Labl field of scope stack in error
2254 2011-09-05 Bob Duff <duff@adacore.com>
2256 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2257 conversions instead of normal type conversions in all cases where a
2258 type conversion would be illegal. In particular, use unchecked
2259 conversions when the operand types are private.
2261 2011-09-05 Johannes Kanig <kanig@adacore.com>
2263 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2264 objects of task type or protected type.
2266 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2268 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2269 function comes from source, indicate that so does its rewriting,
2270 so it is compatible with any subsequent expansion of the
2271 subprogram body (e.g. when it is a protected operation).
2272 * sem_ch4.adb: minor reformatting
2274 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2276 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2277 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2278 may lead to wrong ancestor package in the case of instantiated subunit
2279 bodies. If a subunit is instantiated, follow the chain of instantiations
2280 rather than the stub structure.
2282 2011-09-02 Robert Dewar <dewar@adacore.com>
2284 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2285 * gcc-interface/Make-lang.in: Update dependencies.
2287 2011-09-02 Marc Sango <sango@adacore.com>
2289 * sem_ch3.adb (Analyze_Object_Declaration): Change
2290 comment and add additional check to differentiate constant of
2291 type string from others unconstrained type.
2293 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2295 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2296 present in incomplete type declarations to refine the error
2297 message the full declaration is in the same unit.
2298 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2299 an incomplete type, set the Premature_Use for additional message.
2300 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2301 and Premature_Use is set, place additional information at the
2302 point of premature use.
2304 2011-09-02 Bob Duff <duff@adacore.com>
2306 * sem_ch6.adb: (Check_Post_State): Suppress warning
2307 "postcondition refers only to pre-state" when the expression has not
2308 yet been analyzed, because it causes false alarms. This can happen when
2309 the postcondition contains a quantified expression, because those are
2310 analyzed later. This is a temporary/partial fix.
2311 (Process_Post_Conditions): Minor: change wording of warning.
2313 2011-09-02 Marc Sango <sango@adacore.com>
2315 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2316 illegal use of unconstrained string type in SPARK mode.
2317 * sem_res.adb (Analyze_Operator_Symbol): Set the
2318 right place where the string operand of concatenation should be
2319 violate in SPARK mode.
2321 2011-09-02 Robert Dewar <dewar@adacore.com>
2323 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2324 exp_ch3.adb: Minor reformatting.
2326 2011-09-02 Vincent Celier <celier@adacore.com>
2328 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2329 as the compiler driver so Is_Compilable returns True for sources.
2330 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2333 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2335 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2336 condition, a reference to a controlling formal must be interpreted
2337 as having the class-wide type (or an access to such) so that the
2338 inherited condition can be properly applied to any overriding
2339 operation (see ARM12 6.6.1 (7)).
2341 2011-09-02 Tristan Gingold <gingold@adacore.com>
2343 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2346 2011-09-02 Javier Miranda <miranda@adacore.com>
2348 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2349 initializing expression of a class-wide interface object declaration
2350 if its type is limited.
2352 2011-09-02 Johannes Kanig <kanig@adacore.com>
2354 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2355 literals, take into account the type name; the type is *not*
2356 the scope for an enumeration literal.
2358 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2360 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2361 to reject an overriding indicator on a user-defined Adjust
2362 subprogram for a limited controlled type.
2364 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2366 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2367 for an actual that is a function call returning an unconstrained
2368 limited controlled type.
2370 2011-09-02 Tristan Gingold <gingold@adacore.com>
2372 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2374 2011-09-02 Johannes Kanig <kanig@adacore.com>
2376 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2377 from "HEAP" to __HEAP Change comment that refers to that variable
2378 * put_alfa.adb: Change comment that refers to that variable
2380 2011-09-02 Robert Dewar <dewar@adacore.com>
2382 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2384 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2386 * exp_util.adb (Extract_Renamed_Object): Renamed to
2387 Find_Renamed_Object. This routine has been reimplemented and now uses
2388 tree traversal to locate a renamed object.
2389 (Is_Aliased): Replace call to Extract_Renamed_Object with
2390 Find_Renamed_Object.
2392 2011-09-02 Tristan Gingold <gingold@adacore.com>
2394 * init.c: (__gnat_is_vms_v7): New function.
2396 2011-09-02 Olivier Hainque <hainque@adacore.com>
2398 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2399 that have a misaligned backchain, necessarily bogus.
2401 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2403 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2404 TSS routine Finalize_Address when compiling in Alfa mode.
2405 (Expand_Freeze_Record_Type): Do not create TSS routine
2406 Finalize_Address when compiling in Alfa mode.
2407 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2408 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2410 (Expand_N_Allocator): Do not produce a call to
2411 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2412 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2413 produce a call to primitive Set_Finalize_Address in Alfa mode because
2414 Finalize_Address is not built.
2415 * exp_ch7.adb (Build_Finalization_Master): Do not create
2416 finalization masters in Afa mode since they are not needed.
2417 (Build_Finalizer): Do not create scope and library-level
2418 finalizers in Alfa mode since they are not needed.
2419 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2420 "new" and "free" when applied to controlled objects in Alfa mode since
2423 2011-09-02 Vincent Celier <celier@adacore.com>
2425 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2426 only library names with the syntax of Ada identifiers, to avoid errors
2427 when compiling the binder generated files.
2428 * projects.texi: Document restriction on SAL library names
2430 2011-09-02 Thomas Quinot <quinot@adacore.com>
2432 * a-chtgbo.adb: Minor comment fix.
2434 2011-09-02 Robert Dewar <dewar@adacore.com>
2436 * lib-xref.adb: Minor reformatting
2438 2011-09-02 Vincent Celier <celier@adacore.com>
2440 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2441 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2442 --version and --help in usage.
2443 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2445 2011-09-02 Bob Duff <duff@adacore.com>
2447 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2448 compilers don't understand it.
2450 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2452 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2453 underlying subtype rather than its base type on the call to
2454 Build_Record_Or_Elementary_Input_Function, so that any
2455 constraints on a discriminated subtype will be available for
2456 doing the check required by AI05-0192.
2457 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2458 If the prefix subtype of the 'Input attribute is a constrained
2459 discriminated subtype, then check each constrained discriminant value
2460 against the corresponding value read from the stream.
2462 2011-09-02 Yannick Moy <moy@adacore.com>
2464 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2465 warnings on suspicious contracts, and enable them with -gnatwa.
2467 2011-09-02 Robert Dewar <dewar@adacore.com>
2469 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2472 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2474 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2475 which ensure that restriction No_Dynamic_Attachment has not been
2477 (Make_Initialize_Protection): Protected types with attach or
2478 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2479 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2480 which ensures that restriction No_Dynamic_Attachment has not been
2482 * sem_attr.adb: (Eval_Attribute): Transform
2483 VAX_Float_Type'First and 'Last into references to
2484 the temporaries which store the corresponding bounds. The
2485 transformation is needed since the back end cannot evaluate
2486 'First and 'Last on VAX.
2487 (Is_VAX_Float): New routine.
2489 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2491 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2492 generic unit is not intrinsic and has an explicit convention,
2493 the instance inherits it.
2495 2011-09-02 Robert Dewar <dewar@adacore.com>
2497 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2498 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2500 2011-09-02 Thomas Quinot <quinot@adacore.com>
2502 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2503 Guard against a prefix that is an N_Has_Entity but has no
2506 2011-09-02 Yannick Moy <moy@adacore.com>
2508 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2511 2011-09-02 Yannick Moy <moy@adacore.com>
2513 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2514 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2516 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2517 procedure looking for suspicious postconditions.
2518 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2519 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2520 options -gnatw.t and -gnatw.T.
2522 2011-09-02 Pascal Obry <obry@adacore.com>
2524 * prj.adb: Minor code refactoring. Move check for null project in
2526 * projects.texi: Fix minor typos.
2528 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2530 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2531 of iteration is an expression, its value must be captured in a
2532 renaming declaration, so that modification of the elements is
2533 propagated to the original container.
2535 2011-09-02 Pascal Obry <obry@adacore.com>
2537 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2538 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2539 prj-tree.adb: Minor reformatting and style fixes.
2541 2011-09-02 Robert Dewar <dewar@adacore.com>
2543 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2544 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2545 No_Implicit_Aliasing
2546 (Analyze_Attribute, case Address): ditto
2547 (Analyze_Attribute, case Unrestricted_Access): ditto
2548 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2549 No_Implicit_Aliasing restriction.
2550 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2552 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2554 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2555 is an unchecked conversion, apply test to its expression.
2557 2011-09-02 Javier Miranda <miranda@adacore.com>
2559 * sem_ch3.adb (Check_Abstract_Overriding): When
2560 traversing the chain of aliased subprograms avoid reporting a
2561 redundant error on the current entity.
2563 2011-09-02 Sergey Rybin <rybin@adacore.com>
2565 * gnat_ugn.texi: Minor clean up.
2567 2011-09-02 Bob Duff <duff@adacore.com>
2569 * s-htable.adb (Set_If_Not_Present): Use renaming
2570 instead of ":=", because the type Key is limited in the generic (even
2571 if not in the instances).
2573 2011-09-02 Robert Dewar <dewar@adacore.com>
2575 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2576 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2579 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2581 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2582 inherited component with the enclosing derived type. Code reformatting.
2584 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2586 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2587 return done when overflow checks are enabled, since comparisons against
2588 Lor and Hir should not be done when OK1 is False.
2590 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2592 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2593 Add new formal Master_Exp. When present, add that expression to the
2594 call as an extra actual.
2595 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2596 Fmaster_Actual and in the case of a BIP call initializing a return
2597 object of an enclosing BIP function set it to a
2598 new reference to the implicit finalization master
2599 formal of the enclosing function. Fmaster_Actual is
2600 then passed to the new formal Master_Exp on the call to
2601 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2602 initializations of Enclosing_Func to its declaration.
2604 2011-09-02 Thomas Quinot <quinot@adacore.com>
2606 * csets.ads: Minor reformatting
2608 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2610 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2611 the full view of a private type coming from an instantiation.
2612 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2613 loop to iterate over the declarations rather than use the
2614 First_Entity / Next_Entity scheme.
2616 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2618 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2619 X'range (N) into X'First (N) .. X'Last (N), do not share the
2620 dimension indicator N, if present. Even though it is a static
2621 constant, its source location may be modified when printing
2622 expanded code under -gnatDL, and node sharing will lead to chaos
2623 in Sprint on large files, by generating a sloc value that does
2624 not correspond to any source file.
2626 2011-09-02 Bob Duff <duff@adacore.com>
2628 * einfo.adb: (Has_Xref_Entry): Do not call
2629 Implementation_Base_Type. Lib.Xref has been
2630 rewritten to avoid the need for it, and it was costly.
2631 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2632 functions in support of efficient xref.
2633 * lib-xref-alfa.adb: Misc changes related to Key component of
2635 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2636 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2637 no longer does. This is the one place where it is needed.
2639 2011-09-02 Johannes Kanig <kanig@adacore.com>
2641 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2642 similar interface as the other Getopt function.
2644 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2646 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2647 a call to Set_Finalize_Address if there is no allocator available.
2648 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2649 a case of allocator expansion where the allocator is not expanded but
2650 needs a custom allocate routine. Code reformatting.
2651 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2652 Ren_Obj. Code reformatting.
2653 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2654 through the use of 'reference.
2655 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2656 as part of build-in-place expansion. They are intentionally marked as
2657 coming from source, but their parents are not.
2659 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2661 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2662 is the generated subprogram declaration for a child unit body
2663 that acts as spec, use the original body in the with_clause,
2664 to prevent binding errors.
2666 2011-09-02 Vincent Celier <celier@adacore.com>
2668 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2669 qualifier /MULTI_UNIT_INDEX=
2671 2011-09-02 Johannes Kanig <kanig@adacore.com>
2673 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2674 instead of calling the callback function
2676 2011-09-02 Robert Dewar <dewar@adacore.com>
2678 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2679 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2681 2011-09-02 Vincent Celier <celier@adacore.com>
2683 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2684 explicitly declared in an extending project, do not warn if a source
2685 for an inherited naming exception is not found.
2687 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2689 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2690 expansion is inactive.
2692 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2694 * sem_util.adb (Note_Possible_Modification): If the entity
2695 being modified is the renaming generated for an Ada2012 iterator
2696 element, the enclosing container or array is modified as well.
2698 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2700 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2701 Initialize): Define and initialize the
2702 mutex attributes and condition variable attributes locally.
2704 2011-09-02 Vincent Celier <celier@adacore.com>
2706 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2707 exception replaced in an extending project.
2708 (Check_Object): No error when the other source is locally removed.
2710 2011-09-02 Yannick Moy <moy@adacore.com>
2712 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2715 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2717 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2719 * gcc-interface/Make-lang.in: Update dependencies.
2721 2011-09-01 Robert Dewar <dewar@adacore.com>
2723 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2725 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2727 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2728 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2729 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2730 specific for systems where their glibc version does not define the
2731 routines to handle dynamically allocated CPU sets.
2733 2011-09-01 Vincent Celier <celier@adacore.com>
2735 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2736 prj-env.adb: Implement inheritance of naming exceptions in extending
2739 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2741 * gnatls.adb: Display simple message instead of content of
2744 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2746 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2747 access discriminant and anonymous access component scopes.
2748 (Inherit_Component): Reuse the itype of an access discriminant
2749 or anonymous access component by copying it in order to set the proper
2750 scope. This is done only when the parent and the derived type
2751 are in different scopes.
2752 (Set_Anonymous_Etype): New routine.
2754 2011-09-01 Robert Dewar <dewar@adacore.com>
2756 * a-convec.adb: Minor reformatting throughout.
2758 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2760 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2761 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2762 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2763 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2764 CPU_SET_S respectively because we are now using dynamically allocated
2765 CPU sets which are more portable across different glibc versions.
2766 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2767 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2768 masks dynamically according to the number of processors in the target
2770 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2771 respectively, so we need to pass the size of the masks as
2773 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2774 created cpu_set_t masks
2775 with the number of processors available in the target platform,
2776 instead of static bit arrays. It enhances portability because
2777 it uses the information from the target platform.
2778 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2779 are using a restricted run-time library, use the flag
2780 Configurable_Run_Time_Mode instead of Restricted_Profile.
2782 2011-09-01 Vincent Celier <celier@adacore.com>
2784 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2785 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2787 2011-09-01 Nicolas Roche <roche@adacore.com>
2789 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2790 on VxWorks in kernel mode.
2792 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2794 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2795 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2796 directly the bit array.
2797 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2798 the linux macros with the same name.
2799 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2800 wrappers around the CPU_ZERO and CPU_SET linux macros.
2802 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2804 * exp_ch7.adb (Find_Insertion_List): Removed.
2805 (Process_Transient_Objects): Insert the declarations of the hook
2806 access type and the hook object before the associated transient object.
2808 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2810 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2811 package System.Aux_Dec when using restricted run-time libraries which
2812 do not have this package.
2814 2011-09-01 Tristan Gingold <gingold@adacore.com>
2816 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2818 2011-09-01 Bob Duff <duff@adacore.com>
2820 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2821 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2823 2011-09-01 Thomas Quinot <quinot@adacore.com>
2825 * exp_ch5.adb: Minor reformatting
2826 * gnat_ugn.texi: Fix minor typos.
2827 * gcc-interface/Make-lang.in: Update dependencies.
2829 2011-09-01 Robert Dewar <dewar@adacore.com>
2831 * inline.adb, sem_aggr.adb: Minor reformatting.
2833 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2835 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2837 2011-09-01 Robert Dewar <dewar@adacore.com>
2839 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2841 2011-09-01 Bob Duff <duff@adacore.com>
2843 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2844 body" the same as "in inlined body", because visibility shouldn't
2847 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2849 * inline.adb (Add_Inlined_Body): Refine previous change.
2851 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2853 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2854 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2855 Test for case where call
2856 initializes an object of a return statement before testing for
2857 a constrained call, to ensure that all such cases get handled
2858 by simply passing on the caller's parameters. Also, in that
2859 case call Needs_BIP_Alloc_Form to determine whether to pass on
2860 the BIP_Alloc_Form parameter of the enclosing function rather
2861 than testing Is_Constrained. Add similar tests for the return
2862 of a BIP call to later processing to ensure consistent handling.
2863 (Needs_BIP_Alloc_Form): New utility function.
2864 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2865 a BIP_Alloc_Form formal with call to new utility function
2866 Needs_BIP_Alloc_Form.
2868 2011-09-01 Pascal Obry <obry@adacore.com>
2870 * prj-part.adb: Minor reformatting.
2872 2011-09-01 Vincent Celier <celier@adacore.com>
2874 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2875 half character in the unit name.
2877 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2879 * exp_ch4.adb: Minor code and comment reformatting.
2881 2011-09-01 Thomas Quinot <quinot@adacore.com>
2883 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2884 for Is_Limited_Type and Is_Tagged_Type in condition checking
2885 for by-reference type.
2886 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2887 subprograms may have a completion because of a previous
2888 Inline_Always clause, but the enclosing package must be marked
2889 inlined for the subprogram body to become visible to the backend.
2891 2011-09-01 Thomas Quinot <quinot@adacore.com>
2893 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2895 2011-09-01 Pascal Obry <obry@adacore.com>
2897 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2899 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2901 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2902 the formals of a subprogram stub that acts as a spec.
2904 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2906 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2907 type, declare a renaming for it, not an object declaration.
2909 2011-09-01 Yannick Moy <moy@adacore.com>
2911 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2912 Ignore_Errors to ignore failures to read ALI files when True.
2914 2011-09-01 Javier Miranda <miranda@adacore.com>
2916 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2917 constructor calls associated with non-tagged record types.
2919 2011-09-01 Robert Dewar <dewar@adacore.com>
2921 * g-socthi-vms.adb: Minor reformatting.
2923 2011-09-01 Nicolas Roche <roche@adacore.com>
2925 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2926 in order to avoid impact of imcompatible changes.
2927 * cstreams.c: Likewise
2929 * aux-io.c: Likewise
2931 2011-09-01 Yannick Moy <moy@adacore.com>
2933 * lib-writ.adb (Write_With_Lines): Always output complete information
2934 on "with" line in Alfa mode, as this is required by formal verification
2937 2011-09-01 Tristan Gingold <gingold@adacore.com>
2939 * g-socthi-vms.adb: Add comments.
2941 2011-09-01 Pascal Obry <obry@adacore.com>
2943 * prj.ads: Minor reformatting.
2945 2011-09-01 Vincent Celier <celier@adacore.com>
2947 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2948 exceptions in the config pragmas file.
2950 2011-09-01 Tristan Gingold <gingold@adacore.com>
2952 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2954 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2956 * exp_ch7.adb (Find_Insertion_List): New routine.
2957 (Process_Transient_Objects): Add code to handle the abnormal
2958 finalization of a controlled transient associated with a subprogram
2959 call. Since transients are cleaned up right after the associated
2960 context, an exception raised during a subprogram call may bypass the
2963 2011-09-01 Robert Dewar <dewar@adacore.com>
2965 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2968 2011-09-01 Robert Dewar <dewar@adacore.com>
2970 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2972 2011-09-01 Robert Dewar <dewar@adacore.com>
2974 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2976 2011-09-01 Thomas Quinot <quinot@adacore.com>
2978 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2979 GNATRTL_NONTASKING_OBJS.
2981 2011-09-01 Robert Dewar <dewar@adacore.com>
2983 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2984 possibility of this flag being set for formals in Ada 2012 mode.
2985 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2987 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2989 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2991 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2994 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2996 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2997 insertion node in a tree of nested Expression_With_Actions nodes.
2998 (Process_Transient_Object): In the case where a complex if statement
2999 has been converted into nested Expression_With_Actions nodes, the
3000 "hook" object and the associated access type must be inserted before
3001 the top most Expression_With_Actions.
3003 2011-09-01 Robert Dewar <dewar@adacore.com>
3005 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3006 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3008 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3010 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3012 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3014 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3016 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3017 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3018 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3019 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3020 Dispatching_Domains_Frozen): Move this local data to package
3021 System.Tasking because with the CPU aspect we need to have access
3022 to this data when creating the task in System.Tasking.Stages.Create_Task
3023 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3024 Move these variables from the body of
3025 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3026 we need to have access to this data when creating the task in
3027 System.Tasking.Stages.Create_Task.
3028 * s-taskin.adb (Initialize): Signal the allocation of the environment
3029 task to a CPU, if any, so that we know whether the CPU can be
3030 transferred to a different dispatching domain.
3031 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3032 is being allocated belongs to the dispatching domain where the task
3033 lives. Signal the allocation of the task to a CPU, if any, so that we
3034 know whether the CPU can be transferred to a different dispatching
3037 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3039 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3040 attributes Same_Storage and Overlaps_Storage.
3042 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3044 * exp_strm.adb: Remove with and use clause for Opt.
3045 (Build_Array_Input_Function): Remove the version-dependent generation
3046 of the return statement. The Ada 2005 tree is now the default.
3048 2011-09-01 Yannick Moy <moy@adacore.com>
3050 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3051 it is never empty when compiling in Alfa mode.
3053 2011-09-01 Robert Dewar <dewar@adacore.com>
3055 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3056 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3057 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3058 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3060 2011-09-01 Matthew Heaney <heaney@adacore.com>
3062 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3063 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3064 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3065 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3066 unbounded queue container.
3067 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3068 bounded queue container.
3069 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3070 unbounded priority queue container.
3071 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3072 bounded priority queue container.
3074 2011-08-31 Pascal Obry <obry@adacore.com>
3076 * a-direct.adb: Do not try to create an UNC path on Windows.
3077 (Create_Path): Skip leading computer name in UNC path if any.
3079 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3081 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3082 version-dependent generation of the return statement. The Ada 2005 tree
3085 2011-08-31 Thomas Quinot <quinot@adacore.com>
3087 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3088 types Stream_Element_Offset and Storage_Offset have a different native
3089 type depending on whether the platform is 32 or 64 bits. When
3090 exchanging them, always convert to 64 bits.
3092 2011-08-31 Yannick Moy <moy@adacore.com>
3094 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3095 --force-alfa to gnat2why.
3097 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3099 * sem_ch12.adb (Save_References): If the node has aspects, save
3100 references within the corresponding expressions in a separate step,
3101 because the aspects are not directly in the tree for the declaration
3102 to which they belong.
3104 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3106 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3107 in CodePeer mode, since representation clauses are partially ignored.
3108 * gcc-interface/Make-lang.in: Update dependencies.
3110 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3112 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3113 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3114 to any dispatching domain.
3116 2011-08-31 Thomas Quinot <quinot@adacore.com>
3118 * exp_ch4.adb: Minor reformatting.
3120 2011-08-31 Bob Duff <duff@adacore.com>
3122 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3123 on nodes for which it is not defined.
3124 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3127 2011-08-31 Bob Duff <duff@adacore.com>
3129 * sem_ch3.adb (Process_Full_View): Disable legality check if
3130 In_Instance, to avoid spurious errors.
3131 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3132 if In_Instance, to avoid spurious errors.
3134 2011-08-31 Pascal Obry <obry@adacore.com>
3136 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3137 directory speparators.
3138 (Compose): Use Dir_Seps to handle both forms.
3139 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3141 (Extension): Use Dir_Seps to handle both forms.
3143 2011-08-31 Pascal Obry <obry@adacore.com>
3145 * prj-conf.adb: Minor reformatting.
3147 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3149 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3150 dispatching domain aspect.
3151 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3153 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3154 Dispatching_Domain aspect in a similar way as we do for the Priority
3156 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3157 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3159 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3160 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3161 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3162 Dispatching_Domain and add it to the task definition.
3163 (Sig_Flags): Add Pragma_Dispatching_Domain.
3164 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3165 support to find the types Dispatching_Domain and
3166 Dispatching_Domain_Access.
3167 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3168 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3169 query the availability of a pragma Dispatching_Domain.
3170 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3171 the expander to pass the Dispatching_Domain when creating a task.
3172 (Name_Dispatching_Domain): Add this new name for a pragma.
3173 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3174 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3175 task has been allocated at creation time.
3176 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3177 Ravenscar is always null.
3178 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3179 the task has been allocated at creation time.
3180 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3181 a specific dispatching domain.
3182 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3183 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3184 and CPU are specified for the task, and the CPU value is not contained
3185 within the range of processors for the domain.
3187 2011-08-31 Vincent Celier <celier@adacore.com>
3189 * make.adb (Original_Gcc) : New constant String_Access.
3190 (Gnatmake): For VM targets, do not use VM version of the compiler if
3191 --GCC= has been specified.
3193 2011-08-31 Thomas Quinot <quinot@adacore.com>
3195 * sem_ch5.adb: Minor reformatting.
3197 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3199 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3202 2011-08-31 Bob Duff <duff@adacore.com>
3204 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3205 the access type is private; we don't care about privacy in expansion.
3207 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3209 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3210 subcomponents tnat may be limited, because they originate in view
3211 conflicts. If the original aggregate is legal and the actuals are
3212 legal, the aggregate itself is legal.
3214 2011-08-31 Matthew Heaney <heaney@adacore.com>
3216 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3219 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3221 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3224 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3226 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3227 Interrupt_Priority aspects, force the analysis of the aspect expression
3228 (when building the equivalent pragma). Otherwise, its analysis is done
3229 too late, after the task or protected object has been created.
3230 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3231 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3232 to the object declaration because they are needed in the type
3235 2011-08-31 Robert Dewar <dewar@adacore.com>
3237 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3238 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3241 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3243 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3244 if the corresponding type is malformed due to restriction violations.
3246 2011-08-31 Robert Dewar <dewar@adacore.com>
3248 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3250 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3252 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3253 would cause the generation of Set_Finalize_Address if the target is a
3254 VM and the designated type is not derived from [Limited_]Controlled.
3256 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3258 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3260 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3261 case of a compilation error.
3263 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3265 * init.c (__gnat_error_handler): Standardize the stack overflow or
3266 erroneous memory access message.
3267 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3268 or erroneous memory access message.
3270 2011-08-31 Robert Dewar <dewar@adacore.com>
3272 * sem_ch4.adb: Minor reformatting.
3273 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3275 2011-08-31 Thomas Quinot <quinot@adacore.com>
3277 * scos.ads: Minor documentation clarification.
3278 * put_scos.adb: Do not generate SCO unit header line for a unit that
3281 2011-08-31 Robert Dewar <dewar@adacore.com>
3283 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3285 2011-08-31 Tristan Gingold <gingold@adacore.com>
3287 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3288 hold variables between these following subprograms.
3289 (Build_Exception_Handler, Build_Object_Declarations,
3290 Build_Raise_Statement): Use the above type as parameter.
3291 Make the above adjustments.
3292 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3294 2011-08-31 Pascal Obry <obry@adacore.com>
3296 * projects.texi: Minor reformatting.
3298 2011-08-31 Tristan Gingold <gingold@adacore.com>
3300 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3301 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3303 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3305 * exp_ch5.adb: Minor code cleanup.
3306 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3307 prevent cascaded errors.
3308 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3309 variable of an iterator specification in current scope.
3310 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3311 postconditions on the stack, as they contain no return statements.
3313 2011-08-31 Yannick Moy <moy@adacore.com>
3315 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3316 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3317 call Qualify_Entity_Names.
3318 (Expand_Alfa): call Qualify_Entity_Names in more cases
3319 * lib-xref-alfa.adb: Take into account system package.
3320 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3321 CodePeer mode in which we are interested in finding bugs even if
3322 compiler cannot compile source.
3323 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3326 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3328 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3329 denoted by the subtype mark to ensure getting the concurrent type in
3330 the case where the subtype mark denotes a private subtype of a
3331 concurrent type (needed when using -gnatc).
3332 (Process_Subtype): For the processing specific to type kinds, case on
3333 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3334 subtype denotes a private subtype whose base type is nonprivate (needed
3335 for subtypes of private fulfilled by task types when compiling with
3338 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3340 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3341 late primitives that override interface operations when the full
3342 expander is not active, to avoid blowups in Register_Primitive when
3343 types don't have associated secondary dispatch tables.
3345 2011-08-31 Yannick Moy <moy@adacore.com>
3347 * alfa_test.adb: Code clean up.
3349 2011-08-31 Marc Sango <sango@adacore.com>
3351 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3352 by Comes_From_Source (Original_Node (N)) in order to treat also the
3353 nodes which have been rewritten.
3354 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3355 explicit dereference and slice violation in spark mode on the nodes
3356 coming only from the source code.
3358 2011-08-31 Robert Dewar <dewar@adacore.com>
3360 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3361 lib-xref-alfa.adb: Minor reformatting.
3363 2011-08-31 Matthew Heaney <heaney@adacore.com>
3365 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3367 2011-08-31 Javier Miranda <miranda@adacore.com>
3369 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3370 only for class-wide subprograms conflicting with entities of concurrent
3373 2011-08-31 Matthew Heaney <heaney@adacore.com>
3375 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3378 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3380 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3381 general description of the routine.
3383 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3385 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3386 doubly-linked lists.
3388 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3390 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3391 check is needed for a left-hand side that is a dereference, and the
3392 base type is private without discriminants (whereas the full type does
3393 have discriminants), an extra retrieval of the underlying type may be
3394 needed in the case where the subtype is a record subtype whose base
3395 type is private. Update comments.
3397 2011-08-31 Javier Miranda <miranda@adacore.com>
3399 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3400 found check if there is a class-wide subprogram covering the primitive.
3402 2011-08-31 Yannick Moy <moy@adacore.com>
3404 * sem_res.adb: Further cases where full expansion test is needed,
3405 rather than expansion test.
3407 2011-08-31 Pascal Obry <obry@adacore.com>
3409 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3411 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3413 * exp_ch5.adb: Handle iterators over derived container types.
3415 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3417 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3418 (Has_Anonymous_Master): New routine.
3419 (Set_Has_Anonymous_Master): New routine.
3420 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3421 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3422 (Current_Anonymous_Master): New routine.
3423 (Current_Unit_First_Declaration): Removed.
3424 (Current_Unit_Scope): Removed.
3425 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3426 their objects on a per-unit heterogeneous finalization master.
3428 2011-08-31 Matthew Heaney <heaney@adacore.com>
3430 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3433 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3435 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3438 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3440 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3441 where the actual is an unexpanded call to 'Input.
3443 2011-08-31 Yannick Moy <moy@adacore.com>
3445 * sem_ch4.adb: Code clean up.
3447 2011-08-31 Yannick Moy <moy@adacore.com>
3449 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3451 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3453 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3454 and TSS primitive Finalize_Address if finalization is suppressed.
3455 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3456 primitive Finalize_Address if finalization is suppressed.
3458 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3460 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3461 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3462 sure that the underlying task has already been created before trying
3463 to change its affinity.
3464 (Set_CPU): Use the term processor instead of CPU, as we do in
3467 2011-08-31 Vincent Celier <celier@adacore.com>
3469 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3470 * prj-nmsc.adb (Process_Compiler): Process attribute
3471 Source_File_Switches.
3472 * prj.ads (Language_Config): New name list component
3473 Name_Source_File_Switches.
3474 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3476 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3478 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3479 discriminated component of an actual, expand at once to prevent
3480 ouf-of-order references with generated subtypes.
3482 2011-08-31 Yannick Moy <moy@adacore.com>
3484 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3485 reference to operator in Alfa xrefs.
3487 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3489 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3490 where the parent instance was frozen before the current instance due to
3491 the presence of a source body. Update calls to Insert_After_Last_Decl.
3492 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3493 Update the comment which illustrates the purpose of the routine.
3494 Package instances are now frozen by source bodies which appear after
3495 the instance. This ensures that entities coming from within the
3496 instance are available for use in the said bodies.
3497 (Install_Body): Add code to handle the case where the parent instance
3498 was frozen before the current instance due to the presence of a source
3499 body. Update calls to Insert_After_Last_Decl.
3501 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3503 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3505 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3507 2011-08-31 Yannick Moy <moy@adacore.com>
3509 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3511 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3512 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3513 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3514 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3515 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3516 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3517 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3518 ALFA in Alfa (we dropped acronym).
3519 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3520 operations in a case where it returned previously No_Elist.
3522 2011-08-31 Robert Dewar <dewar@adacore.com>
3524 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3525 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3526 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3527 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3528 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3529 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3532 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3534 * sem_ch12 (Check_Private_View): Revert previous change.
3535 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3536 conversion is in a generic instance.
3538 2011-08-31 Matthew Heaney <heaney@adacore.com>
3540 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3541 * a-chtgbo.adb (Free): Allow 0 as index value.
3543 2011-08-31 Matthew Heaney <heaney@adacore.com>
3545 * a-cborma.adb (Insert): Add comment to explain why no element
3548 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3550 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3551 spec discriminant is already a concurrent type, in which case just use
3552 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3554 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3556 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3557 system-linux-mips.ads, system-linux-mipsel.ads,
3558 system-linux-mips64el.ads, system-linux-ppc64.ads,
3559 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3561 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3563 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3564 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3565 (build_unary_op): Likewise.
3567 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3569 * raise-gcc.c: Do not include coretypes.h and tm.h.
3570 (setup_to_install): Remove test for compiler macro.
3571 * targext.c: Document use for the library.
3572 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3574 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3576 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3577 the expression to the nominal type if the latter is a record type with
3578 a variant part and the type of the former is a record type without one.
3580 2011-08-30 Yannick Moy <moy@adacore.com>
3582 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3583 expansion in Alfa mode.
3584 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3585 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3587 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3588 * sem_res.adb: Ditto.
3589 * gcc-interface/Make-lang.in: Update dependencies.
3591 2011-08-30 Thomas Quinot <quinot@adacore.com>
3593 * g-socket.ads: Minor documentation adjustment.
3595 2011-08-30 Robert Dewar <dewar@adacore.com>
3597 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3599 2011-08-30 Yannick Moy <moy@adacore.com>
3601 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3602 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3603 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3604 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3605 Revert change which introduced files for "light"
3606 expansion, to be replaced by a single file for Alfa expansion.
3608 2011-08-30 Robert Dewar <dewar@adacore.com>
3610 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3611 Minor code reorg/reformatting.
3613 2011-08-30 Yannick Moy <moy@adacore.com>
3615 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3616 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3617 used for testing full expansion, that is active expansion not in the
3618 reduced mode for Alfa
3619 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3620 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3621 of the verbose (Expander_Active and not ALFA_Mode)
3623 2011-08-30 Tristan Gingold <gingold@adacore.com>
3625 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3626 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3627 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3628 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3630 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3632 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3633 access conversions to check that the conversion is a rewritten node,
3634 rather than just having Comes_From_Source set to False, which wasn't
3637 2011-08-30 Robert Dewar <dewar@adacore.com>
3639 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3640 g-socket.ads: Minor reformatting.
3642 2011-08-30 Thomas Quinot <quinot@adacore.com>
3644 * sem_util.adb: Minor reformatting.
3646 2011-08-30 Tristan Gingold <gingold@adacore.com>
3648 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3649 to be compliant with the ABI.
3651 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3653 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3654 of a designated type when the related access type is an actual in an
3655 instance. This ensures that the full view of designated type is
3656 available when inside the body of the instance.
3658 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3660 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3661 in a position to be modified, a slice is treated like an indexed
3664 2011-08-30 Thomas Quinot <quinot@adacore.com>
3666 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3667 field tv_sec in struct timeval.
3669 2011-08-30 Yannick Moy <moy@adacore.com>
3671 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3672 blocks of code doing full expansion, previously only guarded by
3673 Expander_Active, by anding the test that ALFA_Mode is not set
3675 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3677 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3678 add the function to the list of private dependents, for subsequent
3679 legality check on Taft amendment types.
3680 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3681 Private_Dependents, as for other incomplete types.
3682 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3683 Taft-amendment type is used as the return type of a function.
3685 2011-08-30 Javier Miranda <miranda@adacore.com>
3687 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3688 which emits an error by a call to a new routine which report the error.
3689 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3690 entity does not cover an existing interface.
3691 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3693 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3694 protected procedures or entries whose mode is not conformant.
3695 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3696 an error by a call to a new routine which report the error.
3698 2011-08-30 Robert Dewar <dewar@adacore.com>
3700 * gnat_rm.texi: Minor change.
3701 * exp_attr_light.adb: Minor reformatting.
3703 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3705 * sem_ch3.adb: Patch inheritance of aspects in
3706 Complete_Private_Subtype, to avoid infinite loop.
3708 2011-08-30 Javier Miranda <miranda@adacore.com>
3710 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3711 been reported and a subprogram covering an interface primitive is not
3712 found then skip generating the internal entity. Done to avoid crashing
3714 (Check_Abstract_Overriding): Change text of error of wrong formal of
3715 protected subprogram or entry. Done for consistency to emit exactly the
3716 same error reported by Check_Synchronized_Overriding. In addition, the
3717 error is restricted to protected types (bug found working on AI05-0090)
3719 2011-08-30 Yannick Moy <moy@adacore.com>
3721 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3722 expansion in Alfa mode.
3723 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3724 * exp_light.adb, exp_light.ads: New package defining light expansion.
3725 * expander.adb (Expand): Call light expansion in Alfa mode
3726 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3728 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3730 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3731 * gnat1drv.adb (Adjust_Global_Switches): Comment
3733 2011-08-30 Yannick Moy <moy@adacore.com>
3735 * lib-xref-alfa.adb: Minor refactoring.
3737 2011-08-30 Yannick Moy <moy@adacore.com>
3739 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3741 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3742 expansion in Alfa mode.
3743 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3746 2011-08-30 Robert Dewar <dewar@adacore.com>
3748 * debug_a.adb: Update comment.
3750 2011-08-30 Robert Dewar <dewar@adacore.com>
3752 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3753 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3754 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3755 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3757 2011-08-30 Robert Dewar <dewar@adacore.com>
3759 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3762 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3764 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3765 Build_Finalization_Master by supplying an insertion node and enclosing
3766 scope. In its old version, the call did not generate a finalization
3768 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3769 recognize anonymous access-to-controlled components. Rewrite the
3770 machinery which creates finalization masters to service anonymous
3771 access-to-controlled components of a record type. In its current state,
3772 only one heterogeneous master is necessary to handle multiple anonymous
3774 (Freeze_Type): Comment reformatting.
3775 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3777 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3778 associates TSS primitive Finalize_Address with either the master itself
3779 or with the internal hash table depending on the mode of operation of
3782 2011-08-30 Javier Miranda <miranda@adacore.com>
3784 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3785 interface type then do not generate code to compare this component.
3786 Required since they have no components and their equality operator is
3789 2011-08-30 Steve Baird <baird@adacore.com>
3791 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3792 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3793 returns the (static) accessibility level of the object. Otherwise, the
3794 same as Type_Access_Level.
3795 (Dynamic_Accessibility_Level): New function; given an expression which
3796 could occur as the rhs of an assignment to a saooaaat (i.e., an
3797 expression of an access-to-object type), return the new value for the
3798 saooaaat's associated Extra_Accessibility object.
3799 (Effective_Extra_Accessibility): New function; same as
3800 Einfo.Extra_Accessibility except that object renames are looked through.
3802 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3803 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3805 (Effective_Extra_Accessibility): New function; see sem_util.ads
3807 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3808 (Extra_Accessibility): Update comments.
3809 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3810 except RM_Size field (which is only for types) is unaffected.
3812 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3813 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3815 (Init_Size): Add assertion that we are not trashing the
3816 Extra_Accessibility attribute of an object.
3817 (Init_Size_Align): Add assertion that we are not trashing the
3818 Extra_Accessibility attribute of an object.
3819 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3820 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3821 differently for the type of a (non-library-level) saooaaat depending
3822 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3823 is queried in this set of changes - everything else (in particular,
3824 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3825 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3826 The special treatment of library-level saooaaats is an optimization,
3827 not required for correctnesss. This is based on the observation that the
3828 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3829 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3831 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3832 false for the type of a saooaaat, declare and initialize its
3833 accessibility level object and set the Extra_Accessibility attribute
3834 of the saooaaat to refer to this object.
3835 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3836 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3837 calls to Effective_Extra_Accessibility in order to support
3838 renames of saooaaats.
3839 (Expand_N_Type_Conversion): Add new local function,
3840 Has_Extra_Accessibility, and call it when determining whether an
3841 accessibility check is needed.
3842 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3843 evaluate to True (without raising an exception).
3845 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3846 saooaaat, update its associated Extra_Accessibility object (if
3847 it has one). This includes an accessibility check.
3848 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3849 a saooaaat, update its Extra_Accessibility object too (if it
3851 (Expand_Call): Replace a couple of calls to Type_Access_Level
3852 with calls to Dynamic_Access_Level to handle cases where
3853 passing a literal (any literal) is incorrect.
3854 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3855 checks associated with "Saooaat := Some_Object'Access;"; this must
3856 be rejected if Some_Object is declared in a more nested scope
3858 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3859 assignment to a saooaaat even if Is_Local_Anonymous_Access
3860 returns False for its type (indicating a 2012-style saooaaat).
3862 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3863 (which is only appropriate for objects, not types) with a call
3864 of Init_Object_Size_Align in order to avoid trashing the
3865 Extra_Accessibility attribute of a rename (the two attributes
3868 (Valid_Conversion) Replace six calls to Type_Access_Level with
3869 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3870 Ada2012 non-library-level saooaaat, the former returns library level
3871 while the latter returns the (static) accessibility level of the
3872 saooaaat. A type conversion to the anonymous type of a saooaaat
3873 can only occur as part of an assignment to the saooaaat, so we
3874 know that such a conversion must be in a lhs context, so Deepest
3875 yields the result that we need. If such a conversion could occur,
3876 say, as the operand of an equality operator, then this might not
3877 be right. Also add a test so that static accessibilty checks are
3878 performed for converting to a saooaaat's type even if
3879 Is_Local_Anonymous_Access yields False for the type.
3881 2011-08-30 Javier Miranda <miranda@adacore.com>
3883 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3884 controls generation of a warning associated with late declaration of
3885 dispatching functions. Required to avoid generating spurious
3888 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3890 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3891 return object has an anonymous access type and the function's type is
3892 a named access type.
3893 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3894 conversions on implicit conversions, since such conversions can occur
3895 for anonymous access cases due to expansion. Issue error for attempt
3896 to rename an anonymous expression as an object of a named access type.
3897 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3898 to indicate whether this function should report errors on invalid
3900 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3901 the expression is of an anonymous access type and the expected type is
3902 a named general access type, rewrite the expression as a type
3903 conversion, unless this is an expression of a membership test.
3904 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3905 calling of Error_Msg_N on new formal Report_Errs.
3906 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3907 calling of Error_Msg_NE on new formal Report_Errs.
3908 (Valid_Conversion): Move declaration of this function to the package
3909 spec, to allow calls from membership test processing. For Ada 2012,
3910 enforce legality restrictions on implicit conversions of anonymous
3911 access values to general access types, disallowing such conversions in
3912 cases where the expression has a dynamic accessibility level (access
3913 parameters, stand-alone anonymous access objects, or a component of a
3914 dereference of one of the first two cases).
3915 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3916 in the context of a named general access expected type.
3917 * exp_ch4.adb Add with and use of Exp_Ch2.
3918 (Expand_N_In): Add processing for membership tests applied to
3919 expressions of an anonymous access type. First, Valid_Conversion is
3920 called to check whether the test is statically False, and then the
3921 conversion is expanded to test that the expression's accessibility
3922 level is no deeper than that of the tested type. In the case of
3923 anonymous access-to-tagged types, a tagged membership test is applied
3925 (Tagged_Membership): Extend to handle access type cases, applying the
3926 test to the designated types.
3927 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3928 accessibility level, and the actual is a 'Access applied to a current
3929 instance, pass the accessibility level of the type of the current
3930 instance rather than applying Object_Access_Level to the prefix. Add a
3931 ??? comment, since this level isn't quite right either (will eventually
3932 need to pass an implicit level parameter to init procs).
3934 2011-08-30 Bob Duff <duff@adacore.com>
3936 * s-taskin.ads: Minor comment fix.
3938 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3940 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3941 component and the selector is a dispatching operation, check if it is
3942 a prefixed call before rewriting as a parameterless function call.
3944 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3946 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3947 tsystem.h into $(RTSDIR) instead of rts.
3949 2011-08-29 Robert Dewar <dewar@adacore.com>
3951 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3953 * gcc-interface/Make-lang.in: Update dependencies.
3955 2011-08-29 Yannick Moy <moy@adacore.com>
3957 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3958 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3959 table to hold dereferences.
3960 (Add_ALFA_Xrefs): Take into account dereferences as special
3961 reads/writes to the variable "HEAP".
3962 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3963 (Generate_Dereference): New procedure to store a read/write dereferencew
3965 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3966 the special "HEAP" var.
3967 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3969 * sem_util.adb (Note_Possible_Modification): Store write dereference
3972 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3974 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3975 ensures that the level of the subpool access type is not deeper than
3976 that of the pool object.
3977 * sem_util.adb (Object_Access_Level): Expand to handle defining
3979 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3980 subpool handle name of a rewritten allocator.
3982 2011-08-29 Robert Dewar <dewar@adacore.com>
3984 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3986 2011-08-29 Thomas Quinot <quinot@adacore.com>
3988 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3989 values, we generate multiple triples of parameters in the TypeCode.
3990 Bump Choice_Index for each such triple so that a subsequent default
3991 choice is associated with the correct index in the typecode.
3993 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3995 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3997 (First, Last): Handle properly an iterator over a null container.
3999 2011-08-29 Bob Duff <duff@adacore.com>
4001 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4002 processing if we run across a node with no Scope. This can happen if
4003 we're with-ing an library-level instance, and that instance got errors
4004 that caused "instantiation abandoned".
4005 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4006 an exception instead of using Assert, so it won't go into an infinite
4007 loop, even when assertions are turned off.
4009 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4011 * a-coorse.adb: Proper handling of empty ordered sets.
4013 2011-08-29 Johannes Kanig <kanig@adacore.com>
4015 * debug.adb: Add comments.
4017 2011-08-29 Thomas Quinot <quinot@adacore.com>
4019 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4022 2011-08-29 Yannick Moy <moy@adacore.com>
4024 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4025 declaration for Itypes in Alfa mode.
4027 2011-08-29 Robert Dewar <dewar@adacore.com>
4029 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4030 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4031 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4034 2011-08-29 Tristan Gingold <gingold@adacore.com>
4036 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4038 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4039 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4042 2011-08-29 Robert Dewar <dewar@adacore.com>
4044 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4046 2011-08-29 Javier Miranda <miranda@adacore.com>
4048 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4049 renamings of formal subprograms when the actual for a formal type is
4052 2011-08-29 Matthew Heaney <heaney@adacore.com>
4054 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4057 2011-08-29 Matthew Heaney <heaney@adacore.com>
4059 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4060 components of record type.
4061 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4064 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4066 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4067 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4070 2011-08-29 Robert Dewar <dewar@adacore.com>
4072 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4075 2011-08-29 Matthew Heaney <heaney@adacore.com>
4077 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4078 components of record type.
4080 2011-08-29 Bob Duff <duff@adacore.com>
4082 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4083 by the termination handler.
4085 2011-08-29 Yannick Moy <moy@adacore.com>
4087 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4088 created in Alfa mode, instead of inserting artificial declarations of
4089 non-Itypes in the tree.
4090 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4091 know if an Itype has a corresponding declaration, as defined in
4094 2011-08-29 Yannick Moy <moy@adacore.com>
4096 * gnat1drv.adb: Minor rewrite.
4098 2011-08-29 Bob Duff <duff@adacore.com>
4100 * s-tasuti.adb (Make_Passive): Work around race condition in
4101 Make_Independent, which can cause Wait_Count to be zero. So instead of
4102 asserting that Wait_Count > 0, and then decrementing it, decrement it
4103 only if Wait_Count > 0.
4104 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4105 should be nonnegative, so declare them Natural instead of Integer.
4107 2011-08-29 Robert Dewar <dewar@adacore.com>
4109 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4110 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4111 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4112 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4113 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4115 2011-08-29 Tristan Gingold <gingold@adacore.com>
4117 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4119 2011-08-29 Vadim Godunko <godunko@adacore.com>
4121 * s-parint.ads: Minor comment clarification.
4123 2011-08-29 Vincent Celier <celier@adacore.com>
4125 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4126 may be used as identifiers.
4128 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4130 * a-coinho.ads: Minor reformating.
4132 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4134 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4135 container of a derived type.
4137 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4139 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4140 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4142 2011-08-29 Pascal Obry <obry@adacore.com>
4144 * exp_disp.adb: Minor comment fix.
4145 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4146 to avoid warnings when compiling with -Wall.
4147 (Make_Disp_Conditional_Select_Body): Likewise.
4148 (Make_Disp_Timed_Select_Body): Likewise.
4150 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4152 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4153 an entity name, generate reference for it.
4155 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4157 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4159 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4160 the class-wide type.
4161 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4163 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4165 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4166 subtype for an object whose type is an unconstrained union.
4168 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4170 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4171 is allowed in a component definition, by AI95-406.
4173 2011-08-29 Matthew Heaney <heaney@adacore.com>
4175 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4177 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4179 * a-except-2005.adb: Alphabetize all routines.
4180 (Triggered_By_Abort): New routine.
4181 * a-except-2005.ads (Triggered_By_Abort): New routine.
4182 * a-except.adb Alphabetize all routines.
4183 (Triggered_By_Abort): New routine.
4184 * a-except.ads (Triggered_By_Abort): New routine.
4185 * exp_ch7.adb: Update all comments involving the detection of aborts in
4187 (Build_Object_Declarations): Do not generate code to detect the
4188 presence of an abort at the start of finalization code, use a runtime
4190 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4192 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4193 allocate a task on a subpool.
4194 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4195 The flag disables all actions related to the maintenance of
4196 Finalize_Address_Table when subpools are not in use.
4197 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4199 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4200 performs costly task locking when subpools are not in use.
4202 2011-08-29 Yannick Moy <moy@adacore.com>
4204 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4205 types and dispatching calls in Alfa mode.
4206 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4207 correspondance between body and spec scopes, to reuse utility functions
4208 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4209 by testing the presence of the library unit for the body
4210 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4211 mode the expansion of accept statements is skipped
4212 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4213 the unique entity corresponding to the one returned by
4214 Unique_Defining_Entity applied to the enclosing declaration of the
4217 2011-08-29 Bob Duff <duff@adacore.com>
4219 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4220 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4221 an alias for pn. ppp is an alias for pt.
4223 2011-08-29 Javier Miranda <miranda@adacore.com>
4225 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4226 aggregate to take a consistent decision on the need to convert into
4227 assignments aggregates that initialize constant objects.
4229 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4231 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4232 Build_Allocate_Deallocate_Proc in order to handle allocation of
4233 non-controlled objects on subpools.
4234 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4235 to be end-user visible.
4236 * s-finmas.adb: Add with and use clause for System.HTable.
4237 Add an instantiation of Simple_HTable which provides a mapping between
4238 the address of a controlled object and the corresponding
4239 Finalize_Address used to clean up the object. The table is used when a
4240 master is operating in heterogeneous mode.
4241 (Attach): Explain why the input node is not verified on being already
4243 (Delete_Finalize_Address): New routine.
4244 (Detach): Add pragma Assert which ensures that a node is already
4246 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4247 since nodes are no longer removed on traversal. Explain why node
4248 detachment is undesirable in this case.
4249 (Get_Finalize_Address): New routine.
4250 (Hash): New routine.
4251 (Is_Empty_List): Removed.
4252 (pm): Renamed to Print_Master. Add output for discriminant
4254 Comment reformatting.
4255 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4256 * s-finmas.ads: Various comments additions / improvements.
4257 Type Finalization_Master has a discriminant which determines the mode of
4259 (Delete_Finalize_Address): New routine.
4260 (Get_Finalize_Address): New routine.
4261 (pm): Renamed to Print_Master.
4262 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4263 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4264 use clause for System.IO.
4265 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4266 Finalize_Address depending on the mode of allocation and the mode of
4268 (Deallocate_Any_Controlled): Remove the relation pair object -
4269 Finalize_Address regardless of the master mode. Add comment explaining
4271 (Detach): Ensure that fields Prev and Next are null after detachment.
4272 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4273 scheme to check whether the list of subpools is empty. There is no
4274 longer need to store the next subpool or advance the current pointer.
4275 (Is_Empty_List): New routine.
4276 (Print_Pool): New routine.
4277 (Print_Subpool): New routine.
4278 * s-stposu.ads: Various comments additions / improvements.
4279 Field Master of type Root_Subpool is now a heterogeneous collection.
4280 (Print_Pool): New routine.
4281 (Print_Subpool): New routine.
4283 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4285 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4286 forms, using aspects of container types.
4287 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4288 Has_Implicit_Dereference flags, that may be set on the partial view.
4289 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4290 container type with an indexing aspect.
4291 (Analyze_Quantified_Expression): Analyze construct with expansion
4292 disabled, because it will be rewritten as a loop during expansion.
4293 (Try_Container_Indexing): The prefix itself may be a container type
4294 with an indexing aspect, as with a vector of vectors.
4295 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4296 the original doamin of iteration, for name capture.
4297 (Analyze_Iterator_Specification): If the domain is an expression that
4298 needs finalization, create a separate declaration for it.
4299 For an iterator with "of" retrieve default iterator info from aspect of
4300 container type. For "in" iterator, retrieve type of Iterate function.
4301 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4302 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4303 analysis, to prevent spurious errors about late attributes.
4304 * sprint.adb: Handle quantified expression with either loop or iterator
4306 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4309 2011-08-29 Vincent Celier <celier@adacore.com>
4311 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4312 Binder or Linker of the main project file.
4314 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4316 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4319 2011-08-29 Yannick Moy <moy@adacore.com>
4321 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4323 2011-08-29 Yannick Moy <moy@adacore.com>
4325 * exp_ch11.adb: Minor expansion of comment.
4327 2011-08-29 Yannick Moy <moy@adacore.com>
4329 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4331 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4333 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4334 interpretation, set the type before resolving the operands, because
4335 legality checks on an exponention operand need to know the type of the
4338 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4340 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4341 cleanups on a master if the instance is within a generic unit.
4342 Complement to the corresponding fix to inline.adb for K520-030.
4344 2011-08-29 Tristan Gingold <gingold@adacore.com>
4346 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4348 * exp_intr.adb: Minor comment fix.
4350 2011-08-29 Bob Duff <duff@adacore.com>
4352 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4353 Delay_Required was used as an uninitialized variable.
4355 2011-08-29 Robert Dewar <dewar@adacore.com>
4357 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4358 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4359 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4361 2011-08-29 Thomas Quinot <quinot@adacore.com>
4363 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4364 Remove unused variables.
4366 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4368 * sem_res.adb: Remove Build_Explicit_Dereference.
4369 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4370 from sem_res.adb, used in analysis of additional constructs.
4371 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4372 expansion of iterators.
4373 (Is_Object_Reference): Recognize variables rewritten as explicit
4374 dereferences in Ada2012.
4375 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4376 Reversible_Iterator names, for expansion of Ada2012 iterators.
4377 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4378 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4379 linked list container.
4380 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4381 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4383 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4385 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4388 2011-08-29 Vincent Celier <celier@adacore.com>
4390 * make.adb (Gnatmake): Get the maximum number of simultaneous
4391 compilation processes after the Builder switches has been scanned, as
4392 there may include -jnn.
4394 2011-08-29 Matthew Heaney <heaney@adacore.com>
4396 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4398 2011-08-29 Tristan Gingold <gingold@adacore.com>
4400 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4401 GNAT_DRIVER_COMMAND_LINE to 255.
4403 2011-08-29 Pascal Obry <obry@adacore.com>
4405 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4406 reformatting and style fix (class attribute casing).
4408 2011-08-29 Yannick Moy <moy@adacore.com>
4410 * exp_ch11.adb: Yet another case where expansion should be common
4411 between CodePeer and Alfa.
4413 2011-08-29 Yannick Moy <moy@adacore.com>
4415 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4417 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4419 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4420 incomplete type and its completion match.
4422 2011-08-29 Yannick Moy <moy@adacore.com>
4424 * exp_ch13.adb: Adjust previous change.
4426 2011-08-29 Robert Dewar <dewar@adacore.com>
4428 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4429 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4432 2011-08-29 Emmanuel Briot <briot@adacore.com>
4434 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4435 initialize aggregated projects.
4437 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4439 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4440 depth of candidates to resolve a potentially spurious ambiguity between
4441 two visible subprograms.
4443 2011-08-29 Yannick Moy <moy@adacore.com>
4445 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4447 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4448 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4451 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4453 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4456 2011-08-29 Thomas Quinot <quinot@adacore.com>
4458 * sem_res.adb: Minor reformatting.
4460 2011-08-29 Johannes Kanig <kanig@adacore.com>
4462 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4464 * gnat1drv.adb (Adjust_Global_Switches): Set
4465 Use_Expressions_With_Actions to False in ALFA mode.
4466 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4469 2011-08-29 Yannick Moy <moy@adacore.com>
4471 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4472 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4473 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4474 tagged types and dispatching calls in Alfa mode.
4476 2011-08-29 Javier Miranda <miranda@adacore.com>
4478 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4479 we do not report an error on an Empty node.
4481 2011-08-29 Geert Bosch <bosch@adacore.com>
4483 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4484 a-nlrear.o and a-nurear.o.
4486 2011-08-29 Robert Dewar <dewar@adacore.com>
4488 * freeze.adb: Minor code reorganization.
4490 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4491 sem_ch6.adb: Minor reformatting
4493 2011-08-29 Tristan Gingold <gingold@adacore.com>
4495 * s-except.ads, s-except.adb: Provide dummy body.
4497 2011-08-29 Yannick Moy <moy@adacore.com>
4499 * sem_warn.adb (Within_Postcondition): Take into account the case of
4500 an Ensures component in a Test_Case.
4502 2011-08-29 Tristan Gingold <gingold@adacore.com>
4504 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4505 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4506 System_Exceptions_Debug
4507 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4508 * a-except.adb: With and use System.Exceptions_Debug instead of
4510 * a-except-2005.adb: Likewise.
4511 * s-assert.adb: Likewise.
4512 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4513 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4514 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4515 s-excdeb. Update dependencies.
4516 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4517 as these no longer need external libraries.
4519 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4521 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4522 exponentiation operator on universal values in a context that requires
4525 2011-08-29 Tristan Gingold <gingold@adacore.com>
4527 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4528 before calling notify_handled_exception.
4529 * a-exextr.adb: Fix comment.
4531 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4533 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4534 Finalize_Address of the access type's finalization master.
4535 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4536 access type's finalization master. Add a guard to prevent
4537 Associated_Storage_Pool from being set on .NET/JVM.
4538 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4539 attribute Finalize_Address of the access type's finalization master.
4540 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4541 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4542 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4544 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4545 use clause for System.IO
4546 (Detach): Relax the assertion, to be reinstated later.
4547 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4548 Relax the assertion on Finalize_Address, to be reinstated later.
4549 (Is_Empty_List): New routine.
4550 (pm): New debug routine.
4551 (Set_Finalize_Address): New routine.
4552 * s-finmas.ads (pm): New debug routine.
4553 (Set_Finalize_Address): New routine.
4554 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4556 2011-08-29 Tristan Gingold <gingold@adacore.com>
4558 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4559 Remove convention C.
4561 2011-08-29 Tristan Gingold <gingold@adacore.com>
4563 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4564 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4565 (Finalize_TCB): Remove its finalization.
4566 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4567 * s-soflin.adb (NT_Exc_Stack): Remove
4568 (Get_Exc_Stack_Addr_NT): Likewise.
4569 (Get_Exc_Stack_Addr_Soft): Likewise.
4570 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4571 (Get_Exc_Stack_Addr): Likewise.
4572 (Get_Exc_Stack_Addr_Soft): Likewise
4573 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4574 (Exc_Stack_Ptr_T): Likewise.
4575 (Private_Data): Remove Exc_Stack_Ptr component.
4577 2011-08-29 Tristan Gingold <gingold@adacore.com>
4579 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4581 2011-08-29 Tristan Gingold <gingold@adacore.com>
4583 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4585 2011-08-29 Geert Bosch <bosch@adacore.com>
4587 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4588 L2_Norm, Swap_Column): New generic subprograms
4589 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4590 L2_Norm, Swap_Column): Implement new subprograms in order to
4591 eliminate dependency on BLAS and LAPACK libraries in
4592 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4593 version. Forward_Eliminate/Back_Substitute can be used to put a
4594 matrix in row echelon or reduced row echelon form using partial
4596 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4597 Swap_Column): Instantiate from System.Generic_Array_Operations.
4598 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4599 (Sqrt): Local function for simple computation of square root without
4600 adding dependencies on Generic_Elementary_Functions.
4601 (Swap): New subprogram to exchange floating point numbers.
4602 (Inverse): Reimplement using Jordan-Gauss elimination.
4603 (Jacobi): New procedure implementing Jacobi's method for computation
4604 of eigensystems, based on Rutishauser's implementation.
4605 (L2_Norm): Implement directly using the inner product.
4606 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4607 decreasing eigenvalue as required by the Ada RM.
4608 (Swap_Column): New helper procedure for Sort_Eigensystem.
4609 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4610 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4613 2011-08-29 Thomas Quinot <quinot@adacore.com>
4615 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4618 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4620 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4621 than the current node.
4622 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4623 Finalization_Master. The list headers have two fields instead of three.
4624 This should fix alignment issue but subpool allocations are now
4625 unusable. Alphabetize subprograms.
4626 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4627 the size of the header when converting the beginning of the object to
4628 a FM_Node. Set the master's Finalize_Address attribute if not already
4630 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4631 header when converting the beginning of the object to a FM_Node.
4633 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4635 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4636 reraise when compiling for CodePeer.
4638 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4640 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4641 now needed by a-convec.adb. Fix warning.
4643 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4645 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4646 processing of TSS routine Finalize_Address when compiling in
4649 2011-08-29 Thomas Quinot <quinot@adacore.com>
4651 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4652 sem_warn.adb: Minor reformatting.
4654 2011-08-29 Emmanuel Briot <briot@adacore.com>
4656 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4657 languages from aggregated projects.
4659 2011-08-29 Yannick Moy <moy@adacore.com>
4661 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4662 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4663 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4664 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4665 for stubs are traversed too when parameter is set
4666 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4667 (Traverse_Declarations_Or_Statements): Do the special traversing for
4668 stubs when required.
4669 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4670 return subprogram or package body from stub.
4671 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4672 stubs without prior subprogram decl.
4674 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4676 * gnat_ugn.texi: Fix typo.
4678 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4680 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4681 which accounts for size vs alignment issues and calculates the size of
4683 (Deallocate_Any_Controlled): Ditto.
4684 (Nearest_Multiple_Rounded_Up): New routine.
4686 2011-08-29 Tristan Gingold <gingold@adacore.com>
4688 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4689 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4690 (Set_Exception_Msg): Ditto.
4691 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4693 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4694 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4695 (Raise_With_Msg): Remove Cleanup_Flag.
4696 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4697 Clean_Flag and Private_Data components.
4699 2011-08-29 Yannick Moy <moy@adacore.com>
4701 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4703 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4704 of an explicitly declared type, so that the base types of the original
4705 type and this generated type are the same, and a "type" (not a subtype
4707 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4708 small" in Alfa mode, like in CodePeer mode.
4709 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4710 clauses in Alfa mode.
4712 2011-08-29 Javier Miranda <miranda@adacore.com>
4714 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4715 function to the package spec.
4716 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4717 internally generated bodies of null procedures locate the internally
4718 generated spec enforcing mode conformance.
4719 (Is_Interface_Conformant): Ensure that the controlling formal of the
4722 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4724 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4725 reject the pragma if it appears to apply to a formal subprogram.
4727 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4729 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4730 inner expression, to prevent double evaluation.
4732 2011-08-29 Tristan Gingold <gingold@adacore.com>
4734 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4736 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4737 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4738 (Raise_Current_Excep): Adjust call.
4739 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4741 2011-08-29 Thomas Quinot <quinot@adacore.com>
4743 * exp_disp.adb: Minor reformatting.
4745 2011-08-29 Tristan Gingold <gingold@adacore.com>
4747 * a-exexpr.adb (Setup_Exception): Removed.
4748 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4749 * a-except.adb (Exception_Propagation): Removed.
4750 * a-except-2005.adb (Setup_Exception): Removed.
4751 (Reraise): Remove call to Setup_Exception.
4752 (Reraise_Occurrence): Ditto.
4753 (Reraise_Occurrence_Always): Ditto.
4754 (Reraise_Occurrence_No_Defer): Ditto.
4755 (Transfer_Occurrence): Ditto.
4756 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4757 (Set_Exception_Msg): Ditto.
4759 2011-08-29 Robert Dewar <dewar@adacore.com>
4761 * a-convec.adb, exp_disp.adb: Minor reformatting.
4763 2011-08-29 Tristan Gingold <gingold@adacore.com>
4765 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4767 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4769 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4770 Exception_Handlers to No_List instead of Empty_List in the case where
4771 there are no handlers.
4773 2011-08-29 Tristan Gingold <gingold@adacore.com>
4775 * gcc-interface/gigi.h (enum standard_datatypes): Add
4776 ADT_reraise_zcx_decl
4777 (reraise_zcx_decl): New macro.
4778 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4779 (gigi): Set reraise_zcx_decl.
4780 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4781 (gnat_to_gnu): Handle N_Raise_Statement.
4783 2011-08-29 Robert Dewar <dewar@adacore.com>
4785 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4786 a-undesu.adb: Minor reformatting.
4788 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4790 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4791 table, accept an unfrozen untagged component if it is an actual for a
4792 formal incomplete type.
4793 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4794 provide new iterator forms over vectors.
4795 Introduce type Iterator in package body to implement operations of
4796 Reversible_Iterator interface.
4797 * a-iteint.ads: Make package pure so it is usable with new container
4798 packages, that are categorized Remote_Types.
4800 2011-08-29 Robert Dewar <dewar@adacore.com>
4802 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4804 2011-08-29 Bob Duff <duff@adacore.com>
4806 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4807 of <>, because this is the routine that checks for dimensionality
4808 errors (for example, for a two-dimensional array, (others => <>) should
4809 be (others => (others => <>)).
4811 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4813 * impunit.adb: Add new run-time units.
4814 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4815 s-stposu.ads, s-stposu.adb: Code clean up.
4816 Handle protected class-wide or task class-wide types
4817 Handle C/C++/CIL/Java types.
4818 * s-spsufi.adb, s-spsufi.ads: New files.
4820 2011-08-29 Yannick Moy <moy@adacore.com>
4822 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4823 library-level subprogram.
4824 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4826 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4828 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4830 * gnat_rm.texi: Update doc for Test_Case pragma.
4832 2011-08-29 Tristan Gingold <gingold@adacore.com>
4834 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4836 (GCC_Exception_Access): New type.
4837 (Unwind_DeleteException): New imported procedure
4838 (Foreign_Exception): Import it.
4839 (GNAT_GCC_Exception): Simply have the occurrence inside.
4840 (To_GCC_Exception): New function.
4841 (To_GNAT_GCC_Exception): New function.
4842 (GNAT_GCC_Exception_Cleanup): New procedure..
4843 (Propagate_GCC_Exception): New procedure.
4844 (Reraise_GCC_Exception): New procedure.
4845 (Setup_Current_Excep): New procedure.
4846 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4847 (Unwind_RaiseException): Ditto.
4848 (Unwind_ForcedUnwind): Ditto.
4850 (Begin_Handler): Change type of parameter.
4851 (End_Handler): Ditto. Now delete the exception if still present.
4852 (Setup_Key): Removed.
4853 (Is_Setup_And_Not_Propagated): Removed.
4854 (Set_Setup_And_Not_Propagated): Ditto.
4855 (Clear_Setup_And_Not_Propagated): Ditto.
4856 (Save_Occurrence_And_Private): Ditto.
4857 (EID_For): Add 'not null' constraint on parameter.
4858 (Setup_Exception): Does nothing.
4859 (Propagate_Exception): Simplified.
4860 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4861 re-raise is not expanded anymore.
4862 * s-except.ads (Foreign_Exception): New exception - placeholder for
4864 * raise-gcc.c (__gnat_setup_current_excep): Declare
4865 (CXX_EXCEPTION_CLASS): Define (not yet used)
4866 (GNAT_EXCEPTION_CLASS): Define.
4867 (is_handled_by): Handle foreign exceptions.
4868 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4870 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4872 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4874 2011-08-29 Thomas Quinot <quinot@adacore.com>
4876 * a-synbar-posix.adb: Minor reformatting.
4878 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4880 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4881 a-exetim-default.ads (Interrupt_Clocks_Supported,
4882 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4883 definitions to be compliant with AI-0171. The target systems do not
4884 support separate account for the execution time of interrupt handlers.
4886 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4888 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4889 in the barrier to put first the easiest to evaluate (and the one which
4890 will be True more often). More efficient.
4892 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4894 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4896 2011-08-29 Bob Duff <duff@adacore.com>
4898 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4899 attributes that are now aspects, as specified by AI05-0229-1.
4900 * sem_ch13.adb (Analyze_Aspect_Specifications,
4901 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4902 pragmas or attribute references, as appropriate.
4904 2011-08-29 Robert Dewar <dewar@adacore.com>
4906 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4907 a-synbar-posix.ads: Minor reformatting.
4909 2011-08-29 Yannick Moy <moy@adacore.com>
4911 * snames.ads-tmpl: Add name Force.
4913 2011-08-29 Pascal Obry <obry@adacore.com>
4915 * prj-nmsc.adb: Minor reformatting.
4917 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4919 * a-exetim.ads (Interrupt_Clocks_Supported,
4920 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4921 definitions to be compliant with AI-0171.
4923 2011-08-29 Robert Dewar <dewar@adacore.com>
4925 * a-ngelfu.adb: Add comments.
4927 2011-08-29 Geert Bosch <bosch@adacore.com>
4929 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4930 the closest machine number to Pi / 2.0.
4932 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4934 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4935 package Ada.Synchronous_Barriers.
4936 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4937 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4938 default implementation using protected objects and another one
4939 a-synbar-posix using POSIX barriers as the underlying support.
4940 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4941 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4942 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4943 Clean up dependencies.
4944 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4946 2011-08-29 Robert Dewar <dewar@adacore.com>
4948 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4949 exp_dist.adb: Minor code reorganization.
4952 2011-08-29 Thomas Quinot <quinot@adacore.com>
4954 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4955 primitive operation must support external streaming if it is not a
4956 controlling access result.
4958 2011-08-29 Thomas Quinot <quinot@adacore.com>
4960 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4962 2011-08-29 Bob Duff <duff@adacore.com>
4964 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4965 restriction on allocators, as required by AI05-0013-1.
4966 * restrict.ads: Minor comment fix.
4968 2011-08-29 Tristan Gingold <gingold@adacore.com>
4970 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4971 (To_Jmpbuf_Address): Ditto
4972 (builtin_longjmp): Ditto
4974 2011-08-29 Thomas Quinot <quinot@adacore.com>
4976 * sem_res.adb: Minor reformatting.
4978 2011-08-29 Vincent Celier <celier@adacore.com>
4980 * make.adb (Gnatmake): Move special processing for VM targets after the
4981 call to Get_Target_Parameters.
4983 2011-08-29 Thomas Quinot <quinot@adacore.com>
4985 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4987 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4989 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4990 where an anonymous access discriminant of a limited designated type
4991 appears in a non-immutably limited discriminated type and issue an
4992 error message. Add local variable Desig_T and replace all occurrences
4995 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4997 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4998 implementation is compliant to RM D.15(15/2) after the modification
4999 imposed by AI05-0094-1 (binding interpretation).
5001 2011-08-29 Robert Dewar <dewar@adacore.com>
5003 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5004 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5006 2011-08-29 Thomas Quinot <quinot@adacore.com>
5008 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5009 the scope name, do not report a missing label as a style violation (it
5010 will be diagnosed as an illegality).
5011 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5012 variant records: Get_Enum_Lit_From_Pos already returns a usage
5013 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5014 on Expr in Integer_Literal case so that it can be used by
5017 2011-08-29 Tristan Gingold <gingold@adacore.com>
5019 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5021 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5022 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5024 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5025 Build_Abort_Block_Handler to build the exception handler. Do not
5026 undefer aborts for the Abort_Signal exception handler if back-end
5027 exception mechanism.
5028 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5029 back_end exceptions for all others and abort_signal.
5030 * s-except.ads (ZCX_By_Default): New constant.
5031 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5032 (Raise_Exception_Always): Ditto.
5033 (Raise_From_Signal_Handler): Ditto.
5034 (Raise_With_Location_And_Msg): Ditto.
5035 (Raise_With_Msg): Ditto.
5037 (Reraise_Occurence): Ditto.
5038 (Reraise_Occurrence_Always): Ditto.
5039 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5040 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5042 2011-08-29 Thomas Quinot <quinot@adacore.com>
5044 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5046 2011-08-29 Robert Dewar <dewar@adacore.com>
5048 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5049 Minor code reorganization.
5051 2011-08-29 Bob Duff <duff@adacore.com>
5053 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5054 2012, not just Ada 2005.
5056 2011-08-29 Vincent Celier <celier@adacore.com>
5058 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5059 with a project file or with gprbuid, if -gnatep= is specified, the
5060 builder may need to be invoked with -x.
5062 2011-08-29 Tristan Gingold <gingold@adacore.com>
5064 * a-exexpr-gcc.adb: Minor comment fix.
5066 2011-08-29 Robert Dewar <dewar@adacore.com>
5068 * sem_ch8.adb: Minor reformatting.
5070 2011-08-29 Bob Duff <duff@adacore.com>
5072 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5073 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5074 treating "some" as unreserved in earlier Ada versions. This is now
5075 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5076 rather than Name_Some, since Tok_Some is now recognized as reserved.
5077 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5079 * scans.ads: Minor comment fixes.
5080 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5081 for other language versions.
5082 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5083 treating "some" as unreserved in earlier Ada versions. This is now
5084 handled in Snames.Is_Keyword_Name.
5085 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5087 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5088 unreserved in earlier Ada versions. This is now handled in
5089 Snames.Is_Keyword_Name.
5090 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5091 words as for other language versions.
5092 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5093 Ada 2012, not just Ada 2005.
5095 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5097 * sem_ch13.adb: Additional semantic checks for aspects involved in
5100 2011-08-29 Matthew Heaney <heaney@adacore.com>
5102 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5103 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5104 Container parameter.
5105 (Ancestor_Find): ditto.
5107 2011-08-29 Thomas Quinot <quinot@adacore.com>
5109 * par-endh.adb: Minor reformatting.
5111 2011-08-29 Tristan Gingold <gingold@adacore.com>
5113 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5114 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5115 (Adjust_N_CLeanups_For): Remove.
5116 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5118 (Propgate_Exception): Adjust.
5119 * raise-gcc.c: Add a few static/const.
5120 (Adjust_N_Cleanups_For): Remove declaration.
5121 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5123 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5125 * sem_ch8.adb: Use type of function return when rewriting as object
5128 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5130 * sem_type.adb: Minor reformatting.
5132 2011-08-29 Robert Dewar <dewar@adacore.com>
5134 * makeutl.adb: Minor reformatting.
5136 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5138 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5139 function call of a limited type, the expansion of the renaming is
5140 complicated by the presence of various temporaries and subtypes that
5141 capture constraints of the renamed object.
5142 Rewrite node as an object declaration, whose expansion is simpler.
5143 Given that the object is limited there is no copy involved and no
5146 2011-08-29 Robert Dewar <dewar@adacore.com>
5148 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5149 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5151 2011-08-29 Tristan Gingold <gingold@adacore.com>
5153 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5154 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5155 system-linux-hppa.ads, system-linux-s390.ads,
5156 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5157 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5158 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5159 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5160 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5161 system-solaris-sparc.ads, system-lynxos-x86.ads,
5162 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5163 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5164 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5165 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5166 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5167 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5168 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5169 * opt.ads: Adjust comment.
5170 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5171 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5172 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5174 2011-08-29 Emmanuel Briot <briot@adacore.com>
5176 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5177 file name is specified on the gnatmake or gprbuild command line, and
5178 before we search for that file in the project.
5180 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5182 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5183 used to determine whether a possible interpretation for an overloadable
5184 entity is declared within the current instantiation and should be
5185 included in the candidate set.
5187 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5189 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5191 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5193 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5194 access subtype is access_to_subprogram, when applying checks for
5197 2011-08-29 Matthew Heaney <heaney@adacore.com>
5199 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5200 for sibling when common parent.
5202 2011-08-29 Thomas Quinot <quinot@adacore.com>
5204 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5207 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5209 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5210 for the return type when in ASIS mode.
5212 2011-08-29 Vincent Celier <celier@adacore.com>
5214 * make.adb (Gnatmake): Get the default search dirs, then the target
5215 parameters after getting the Builder switches, as the Builder switches
5216 may include --RTS= and that could change the default search dirs.
5218 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5220 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5221 Make_Final_Call. Move the processing for class-wide types before the
5222 processing for derivations from [Limited_]Controlled.
5223 (Make_Final_Call): Move the processing for class-wide types before the
5224 processing for derivations from [Limited_]Controlled.
5225 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5226 Add code to account for alignments larger than the list header. Add a
5227 comment illustrating the structure of the allocated object + padding +
5229 (Deallocate_Any_Controlled): Add code to account for alignments larger
5230 than the list header.
5232 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5234 * sinfo.ads, sinfo.adb: New node kind
5235 N_Formal_Incomplete_Type_Definition, related flags.
5236 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5237 Parse formal incomplete types.
5238 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5240 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5241 Formal incomplete types do not need completion.
5242 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5243 Validate_Incomplete_Type_Instance): New procedures to handle formal
5245 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5246 that corresponds to a formal incomplete type.
5247 * sprint.adb: Handle formal incomplete type declarations.
5248 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5251 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5253 * a-fihema.ads, a-fihema.adb: Unit removed.
5254 * a-undesu.ads, a-undesu.adb: New unit implementing
5255 Ada.Unchecked_Deallocate_Subpool.
5256 * einfo.adb: Remove Associated_Collection from the node usage.
5257 Add Finalization_Master to the node usage.
5258 (Associated_Collection): Removed.
5259 (Finalization_Master): New routine.
5260 (Set_Associated_Collection): Removed.
5261 (Set_Finalization_Master): New routine.
5262 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5263 Finalization_Master to the output.
5264 * einfo.ads: Remove attribute Associated_Collection and its uses in
5266 Add new attribute Finalization_Master along with its uses in entitites.
5267 (Associated_Collection): Removed along with its pragma import.
5268 (Finalization_Master): New routine along with a pragma import.
5269 (Set_Associated_Collection): Removed along with its pragma import.
5270 (Set_Finalization_Master): New routine along with a pragma import.
5271 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5272 Build_Finalization_Collection with Build_Finalization_Master.
5273 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5274 before the bodies of the predefined routines. Add comment explaining
5275 this. Replace call to Build_Finalization_Collection with
5276 Build_Finalization_Master.
5277 (Freeze_Type): Replace call to Build_Finalization_Collection with
5278 Build_Finalization_Master.
5279 (Make_Finalize_Address_Body): Comment reformatting.
5280 (Make_Predefined_Primitive_Specs): Code reformatting.
5281 (Stream_Operation_OK): Update comment mentioning finalization
5282 collections. Replace RE_Finalization_Collection with
5283 RE_Finalization_Master.
5284 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5285 Associated_Collection with Finalization_Master. Replace call to
5286 Build_Finalization_Collection with Build_Finalization_Master.
5287 (Expand_Allocator_Expression): Replace call to Associated_Collection
5288 with Finalization_Master. Replace call to Set_Associated_Collection with
5289 Set_Finalization_Master. Remove the generation of
5290 Set_Finalize_Address_Ptr.
5291 (Expand_N_Allocator): Replace call to Associated_Collection with
5292 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5293 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5294 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5295 comment on usage. Replace call to Needs_BIP_Collection with
5296 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5297 BIP_Finalization_Master. Update all comments which mention finalization
5298 collections. Replace Associated_Collection with
5299 Finalization_Master. Replace Build_Finalization_Collection with
5300 Build_Finalization_Master.
5301 (BIP_Formal_Suffix): Update BIP_Collection's case.
5302 (Build_Heap_Allocator): Update the related comment. Rename local
5303 variable Collect to Fin_Mas_Id and update its occurrences. Update
5304 comments which mention finalization collections. Replace
5305 Set_Associated_Collection with Set_Finalization_Master.
5306 (Expand_Call): Update the code which detects a special piece of library
5308 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5309 Add_Collection_Actual_To_Build_In_Place_Call with
5310 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5311 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5312 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5313 Add_Collection_Actual_To_Build_In_Place_Call with
5314 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5315 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5316 Add_Collection_Actual_To_Build_In_Place_Call with
5317 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5318 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5319 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5320 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5321 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5322 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5323 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5324 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5325 Replace the call to Associated_Collection with Finalization_Master.
5326 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5327 Update the way finalization master names are generated. Update the
5328 retrieval of the correct access type which will carry the pool and
5330 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5331 (Make_Finalize_Address_Body): Abstract types do not need
5332 Finalize_Address. Code reformatting.
5333 (Make_Finalize_Address_Stmts): Update comment on usage.
5334 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5335 (Process_Declarations): Update comments.
5336 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5337 Build_Finalization_Master. Update associated comment.
5338 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5339 * exp_ch13.adb: Update comments which mention finalization collections.
5340 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5341 with Finalization_Master.
5342 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5343 create calls to routines Allocate_Any_Controlled and
5344 Deallocate_Any_Controlled.
5345 (Find_Finalize_Address): New routine.
5346 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5348 (Requires_Cleanup_Actions): Update the comment on freeze node
5350 * exp_util.ads: Remove comment on generated code for
5351 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5352 is better to simply look in the body.
5353 * freeze.adb (Freeze_All): Update the comment of finalization
5354 collections. Replace the call to Associated_Collection with
5355 Finalization_Master. Replace the call to Build_Finalization_Collection
5356 with Build_Finalization_Master.
5357 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5358 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5360 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5361 Ada.Finalization. Add processing for children of System.Storage_Pools.
5362 * rtsfind.ads: Remove the naming of second level children of
5364 Remove Ada_Finalization_Heap_Management from the list of units.
5365 Remove subtype Ada_Finalization_Child.
5366 Remove the following subprogram entities:
5370 RE_Finalization_Collection
5371 RE_Finalization_Collection_Ptr
5372 RE_Set_Finalize_Address_Ptr
5374 Add the naming of second level children of System.Storage_Pools.
5375 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5377 Add subtype System_Storage_Pools_Child.
5378 Add the following subprogram entities to System.Finalization_Masters:
5380 RE_Finalization_Master
5381 RE_Finalization_Master_Ptr
5383 Add the following subprogram entities to System.Storage_Pools.Subpools:
5385 RE_Allocate_Any_Controlled
5386 RE_Deallocate_Any_Controlled
5387 RE_Root_Storage_Pool_With_Subpools
5391 Move the following subprogram entities from
5392 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5394 RE_Add_Offset_To_Address
5399 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5400 Set_Associated_Collection with Set_Finalization_Master.
5401 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5402 BIP_Finalization_Master is created.
5403 * s-finmas.adb: New unit System.Finalization_Masters.
5404 * s-finmas.ads: New unit System.Finalization_Masters.
5405 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5406 * s-stposu.ads, s-stposu.adb: New unit implementing
5407 System.Storage_Pools.Subpools.
5409 2011-08-29 Bob Duff <duff@adacore.com>
5411 * tbuild.adb: Add assertion.
5413 2011-08-29 Thomas Quinot <quinot@adacore.com>
5415 * s-pooglo.adb: Minor reformatting.
5417 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5419 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5420 an indexed component of a packed array whose element type is a record
5421 with a representation clause different from that of the right-hand
5422 side, generate a temporary to minimuze the number of bit-field
5423 operations generated.
5425 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5427 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5428 declarations, and thus are likely insertion points for actions.
5430 2011-08-29 Bob Duff <duff@adacore.com>
5432 * einfo.ads: Minor comment fix.
5434 2011-08-29 Robert Dewar <dewar@adacore.com>
5436 * frontend.adb, gnat1drv.adb: Minor reformatting.
5438 2011-08-29 Tristan Gingold <gingold@adacore.com>
5440 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5441 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5442 space in front of the header.
5444 2011-08-29 Johannes Kanig <kanig@adacore.com>
5446 * frontend.adb (Frontend): Exit after creating Standard package when
5447 -gnatd.H is present.
5448 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5451 2011-08-29 Robert Dewar <dewar@adacore.com>
5453 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5454 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5455 snames.ads-tmpl: Minor reformatting.
5457 2011-08-29 Philippe Gil <gil@adacore.com>
5459 * prj.adb (Reset_Units_In_Table): New procedure.
5460 Reset units to avoid access to freed memory.
5462 2011-08-29 Thomas Quinot <quinot@adacore.com>
5464 * get_scos.adb: When reading a P statement SCO without a pragma name
5465 (from an older ALI file), ensure that the Pragma_Name component is set
5466 to Unknown_Pragma (not left uninitialized).
5468 2011-08-29 Vincent Celier <celier@adacore.com>
5470 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5471 modified to compute correctly the object path of a SAL project that is
5472 extending another library project.
5473 (Write_Path_File): New procedure.
5474 * makeutl.ads (Directories): New table moved from Buildgpr
5475 (Get_Directories): New procedure moved from Buildgpr
5476 (Write_Path_File): New procedure
5477 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5478 paths before binding SALs, instead of Set_Ada_Paths.
5479 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5481 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5482 (Current_Source_Path_File_Of): New function
5483 (Set_Current_Object_Path_File_Of): New procedure
5484 (Current_Source_Object_File_Of): New function
5485 (Set_Current_Object_Path_File_Of): New procedure
5486 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5487 (Current_Source_Path_File_Of): New function
5488 (Set_Current_Object_Path_File_Of): New procedure
5489 (Current_Source_Object_File_Of): New function
5490 (Set_Current_Object_Path_File_Of): New procedure
5492 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5494 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5495 packed entity, use a bit-field assignment only if there is no change of
5498 2011-08-29 Thomas Quinot <quinot@adacore.com>
5500 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5501 Is_RTU instead of using Chars comparisons.
5503 2011-08-29 Thomas Quinot <quinot@adacore.com>
5505 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5506 temporary object if the actual is constrained, and the discriminants
5507 read from the stream don't match.
5509 2011-08-29 Tristan Gingold <gingold@adacore.com>
5511 * sem_attr.adb, exp_attr.adb: Add handling of
5512 Attribute_System_Allocator_Alignment
5513 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5514 Attribute_System_Allocator_Alignment.
5515 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5516 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5517 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5518 get_target_system_allocator_alignment.
5520 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5522 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5525 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5527 * exp_ch3.adb (In_Runtime): Fix typo.
5529 2011-08-29 Bob Duff <duff@adacore.com>
5531 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5533 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5535 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5536 and a separate tag assignment is generated, ensure that the tag
5537 assignment is analyzed.
5539 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5541 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5542 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5543 of statement lists that may contain local declarations.
5544 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5545 duplicate the triggering statements needed for the expansion of this
5546 construct, when the trigger is a dispatching call to a synchronized
5549 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5551 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5552 * bindgen.adb: Add comments.
5553 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5556 2011-08-29 Robert Dewar <dewar@adacore.com>
5558 * exp_attr.adb: Minor reformatting.
5559 Minor code reorganization and commenting.
5560 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5563 2011-08-29 Thomas Quinot <quinot@adacore.com>
5565 * get_scos.adb: Ignore chaining indicators not currently supported
5568 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5570 * system.ads: Minor editing.
5572 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5574 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5576 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5577 Attribute_Elab_Subp_Body.
5578 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5579 * sem_util.adb: Update comments.
5581 2011-08-29 Thomas Quinot <quinot@adacore.com>
5583 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5584 pragma name for each SCO statement corresponding to a pragma.
5586 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5588 * opt.ads: Minor editing.
5590 2011-08-29 Yannick Moy <moy@adacore.com>
5592 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5593 that only made sense for CodePeer mode.
5595 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5597 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5598 which is no longer used.
5599 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5600 handling of the 64-bit division check.
5601 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5603 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5606 2011-08-29 Thomas Quinot <quinot@adacore.com>
5608 * get_scos.adb: Minor reformatting.
5610 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5612 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5613 statement list is wrapped in a block, the block is explicitly analyzed
5614 in order to properly redecorate the entities and create a servicing
5617 2011-08-29 Tristan Gingold <gingold@adacore.com>
5619 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5620 (Set_Zero_Cost_Handling): Remove.
5622 2011-08-29 Thomas Quinot <quinot@adacore.com>
5624 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5626 2011-08-29 Geert Bosch <bosch@adacore.com>
5628 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5629 instruction, as the latter may produce -0.0, which is not a valid VAX
5631 (Neg_G): Likewise for VAX F float.
5633 2011-08-29 Robert Dewar <dewar@adacore.com>
5635 * exp_util.adb: Minor reformatting.
5637 2011-08-29 Yannick Moy <moy@adacore.com>
5639 * sem_ch3.adb: Minor comment update.
5641 2011-08-29 Thomas Quinot <quinot@adacore.com>
5643 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5646 2011-08-29 Thomas Quinot <quinot@adacore.com>
5648 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5649 current statement sequence on a generic instantiation or a subprogram
5652 2011-08-29 Robert Dewar <dewar@adacore.com>
5654 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5657 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5659 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5660 Correct the check which involves the freeze node of a controlled or
5661 access-to-controlled type.
5663 2011-08-29 Geert Bosch <bosch@adacore.com>
5665 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5667 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5670 2011-08-29 Yannick Moy <moy@adacore.com>
5672 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5673 for every index type and component type that is not a subtype_mark.
5674 (Process_Subtype): Set Etype of subtype.
5676 2011-08-29 Robert Dewar <dewar@adacore.com>
5678 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5679 reorganization. Minor reformatting.
5681 2011-08-29 Steve Baird <baird@adacore.com>
5683 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5684 for CodePeer and ALFA modes.
5686 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5688 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5689 that comes from an enclosing scope if it is not the renaming of an
5690 actual, to handle properly a spurious ambiguity in an instance.
5692 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5694 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5695 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5696 use it instead of the Esize of the first parameter.
5697 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5699 <Size>: Likewise. Call it for composite types on the RM size.
5701 2011-08-29 Yannick Moy <moy@adacore.com>
5703 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5704 * sem_util.adb (Unique_Name): Correct behaviour for names of
5707 2011-08-29 Yannick Moy <moy@adacore.com>
5709 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5710 verification mode, analyze pragma expression for correctness, for
5711 pre/post on library-level subprogram, as it is not expanded later.
5713 2011-08-29 Yannick Moy <moy@adacore.com>
5715 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5716 in formal verification.
5718 2011-08-29 Thomas Quinot <quinot@adacore.com>
5720 * sem_util.adb: Minor reformatting.
5721 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5723 * par_sco.ads, par_sco.adb: Update comments.
5725 2011-08-29 Yannick Moy <moy@adacore.com>
5727 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5728 associated getter/setter.
5729 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5731 2011-08-29 Vincent Celier <celier@adacore.com>
5733 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5734 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5735 with declarations for Language_Kind and Dependency_Kind for Ada.
5736 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5737 (Process_Compiler): Take into account the new attributes Dependency_Kind
5739 (Check_Configuration): Check if language kind is unit based, not if the
5740 language name is Ada.
5741 (Process_Exceptions_Unit_Based): Ditto
5742 (Add_Language): Remove default additions of language and dependency kind
5743 * prj.ads: Minor comment change
5744 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5746 2011-08-29 Johannes Kanig <kanig@adacore.com>
5748 * debug.adb: Update comments.
5750 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5752 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5753 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5754 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5755 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5756 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5758 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5760 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5761 (GNATLIBCFLAGS_FOR_C): Replace
5762 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5763 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5764 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5765 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5767 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5769 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5771 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5773 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5775 2011-08-05 Nicolas Roche <roche@adacore.com>
5777 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5778 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5780 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5782 2011-08-05 Matthew Heaney <heaney@adacore.com>
5784 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5785 subprogram bodies declared out-of-order.
5787 2011-08-05 Yannick Moy <moy@adacore.com>
5789 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5790 entities directly in package Standard, otherwise skip the standard
5793 2011-08-05 Robert Dewar <dewar@adacore.com>
5795 * a-cbmutr.adb: Minor reformatting
5796 (Allocate_Node): refactor node allocation algorithm
5798 2011-08-05 Robert Dewar <dewar@adacore.com>
5800 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5801 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5803 (Analyze_Pragma, case Check_Policy): Ditto.
5804 * sem_prag.ads (Check_Disabled): New function
5805 * snames.ads-tmpl: Add Name_Disable.
5807 2011-08-05 Robert Dewar <dewar@adacore.com>
5809 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5810 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5812 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5814 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5815 that appears in a generic formal part and applies to a formal
5818 2011-08-05 Robert Dewar <dewar@adacore.com>
5820 * a-cbmutr.ads: Minor reformatting.
5822 2011-08-05 Matthew Heaney <heaney@adacore.com>
5824 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5825 to check count, check sign of value instead.
5826 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5827 (Copy_Subtree): allocate copy of source element
5828 (Equal_Subtree): compare elements, not access objects
5830 2011-08-05 Vincent Celier <celier@adacore.com>
5832 * gnat_ugn.texi: Fix VMS alternative.
5834 2011-08-05 Thomas Quinot <quinot@adacore.com>
5836 * sem_ch11.adb: Add comment.
5838 2011-08-05 Robert Dewar <dewar@adacore.com>
5840 * exp_util.adb: Minor comment fix.
5842 2011-08-05 Robert Dewar <dewar@adacore.com>
5844 * scng.adb (Error_Unterminated_String): Improve flag position when
5847 2011-08-05 Matthew Heaney <heaney@adacore.com>
5849 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5851 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5852 multiway tree containers.
5854 2011-08-05 Robert Dewar <dewar@adacore.com>
5856 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5857 * stylesw.adb: Implement -gnatyC to control comment spacing
5858 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5860 * usage.adb: Add line for -gnatyC.
5862 2011-08-05 Robert Dewar <dewar@adacore.com>
5864 * gnat_ugn.texi: Document -gnatyC.
5865 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5866 synonym for COMMENTS2).
5868 2011-08-05 Robert Dewar <dewar@adacore.com>
5870 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5871 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5872 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5873 a-comutr.ads, lib-xref.adb: Minor reformatting.
5875 2011-08-05 Robert Dewar <dewar@adacore.com>
5877 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5878 warning if there is an exception handler present.
5880 2011-08-05 Pascal Obry <obry@adacore.com>
5882 * a-iteint.ads: Fix copyright year.
5884 2011-08-05 Thomas Quinot <quinot@adacore.com>
5886 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5887 statement SCO for a USE clause or a representation clause.
5889 2011-08-05 Yannick Moy <moy@adacore.com>
5891 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5892 between body and spec for stub.
5893 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5894 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5895 pragma precondition or postcondition, for which the enclosing
5896 subprogram or package in the AST is not the desired one, return empty.
5898 2011-08-05 Thomas Quinot <quinot@adacore.com>
5900 * g-expect.adb: Minor reformatting.
5902 2011-08-05 Bob Duff <duff@adacore.com>
5904 * a-fihema.adb: Comment out OS_Lib.
5906 2011-08-05 Matthew Heaney <heaney@adacore.com>
5908 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5909 (unbounded multiway tree containers) and a-iteint.ads.
5910 * a-comutr.ads, a-comutr.adb:
5911 This is the new Ada 2012 unit for unbounded multiway tree containers
5912 * a-cimutr.ads, a-cimutr.adb
5913 This is the new Ada 2012 unit for indefinite multiway tree containers
5914 * a-iteint.ads: New file.
5916 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5918 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5920 2011-08-05 Bob Duff <duff@adacore.com>
5922 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5924 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5926 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5928 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5929 general indexing aspects of Ada2012. Called when analyzing indexed
5930 components when other interpretations fail.
5931 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5932 in an expression context where overloading is meaningful. This excludes
5933 the occurrence in an aspect specification (efficiency only).
5934 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5935 related to iterators can be set by an attribute specification, but
5937 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5938 Constant_Indexing and Variable_Indexing.
5939 (Check_Indexing_Functions): New procedure to perform legality checks.
5940 Additional semantic checks at end of declarations.
5942 2011-08-05 Sergey Rybin <rybin@adacore.com>
5944 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5945 order of calling Tree_Write/Tree_Read routines made for aspects.
5947 2011-08-05 Bob Duff <duff@adacore.com>
5949 * a-fihema.adb (Finalize): Fix race condition.
5951 2011-08-05 Yannick Moy <moy@adacore.com>
5953 * sem_ch12.adb (Analyze_Package_Instantiation,
5954 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5957 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5959 * sem_type.adb (Specific_Type): in an instance, the type-specific
5960 operand of an equality check that involves null may have a private
5961 type. Use full view to determine legality of construct.
5963 2011-08-05 Vincent Celier <celier@adacore.com>
5965 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5966 delete or close the file when the call to gnatmake was successful.
5968 2011-08-05 Yannick Moy <moy@adacore.com>
5970 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5971 Global_Discard_Names.
5973 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5975 * sinfo.ads: comments on use of entity field for aspect specifications.
5977 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5979 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5980 node is not itself an entity but a selected component, it is a
5981 rewritten parameterless call to an en enclosing synchronized operation,
5982 and this expansion will be performed again in the instance, so there is
5983 no global information to preserve.
5985 2011-08-05 Javier Miranda <miranda@adacore.com>
5987 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5988 for renamings of predefined primitives.
5989 (In_Predef_Prims_DT): New subprogram.
5991 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5993 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5994 possible interpretation of name is a reference type, add an
5995 interpretation that is the designated type of the reference
5996 discriminant of that type.
5997 * sem_res.adb (resolve): If the interpretation imposed by context is an
5998 implicit dereference, rewrite the node as the deference of the
5999 reference discriminant.
6000 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6001 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6002 parent type or base type.
6003 * sem_ch4.adb (Process_Indexed_Component,
6004 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6005 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6006 Check for implicit dereference.
6007 (List_Operand_Interps): Indicate when an implicit dereference is
6009 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6011 2011-08-05 Thomas Quinot <quinot@adacore.com>
6013 * scos.ads: Update documentation of SCO table. Pragma statements can now
6014 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6015 * par_sco.ads, par_sco.adb: Implement the above change.
6016 (Process_Decisions_Defer): Generate a P decision for the first parameter
6017 of a dyadic pragma Debug.
6018 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6020 * put_scos.adb: Code simplification based on above change.
6022 2011-08-05 Robert Dewar <dewar@adacore.com>
6024 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6025 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6026 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6027 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6029 2011-08-05 Bob Duff <duff@adacore.com>
6031 * a-stunau.ads, g-spipat.adb: Update comments.
6033 2011-08-05 Bob Duff <duff@adacore.com>
6035 * a-fihema.ads: Minor comment fix.
6036 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6038 (Attach, Detach): Remove some unnecessary code.
6039 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6041 2011-08-05 Bob Duff <duff@adacore.com>
6043 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6044 allocation for Objects component. This simplifies the code somewhat. It
6045 is also a little more efficient in the not-so-unusual case where there
6046 are no controlled objects allocated.
6047 Make Finalization_Started flag atomic.
6048 (Finalize): Avoid unnecessary detachment of items from the list.
6049 (pcol): Minor cleanup.
6051 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6053 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6054 package whose name is the same as that of the generic unit, or its
6057 2011-08-05 Bob Duff <duff@adacore.com>
6059 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6060 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6061 Minor comment fixes.
6063 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6065 * make.adb (Linking_Phase): No longer need to set source search path
6066 before calling gnatlink in CodePeer mode.
6067 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6068 gcc in CodePeer mode, since the binder generated file no longer has a
6070 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6071 * switch-c.adb: Update comment.
6073 2011-08-05 Thomas Quinot <quinot@adacore.com>
6075 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6077 2011-08-05 Nicolas Roche <roche@adacore.com>
6079 * gnat_ugn.texi: Fix minor syntax error issue.
6081 2011-08-05 Vincent Celier <celier@adacore.com>
6083 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6084 delete or close the file when the call to gnatmake returns a non
6085 successful return code.
6087 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6089 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6090 check, indicate that the copy of the original node does not come from
6091 source, to prevent an infinite recursion of the expansion.
6093 2011-08-05 Johannes Kanig <kanig@adacore.com>
6095 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6096 VC generation for subprogram bodies.
6098 2011-08-05 Yannick Moy <moy@adacore.com>
6101 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6102 the base type with the smallest allowed base type.
6104 2011-08-05 Sergey Rybin <rybin@adacore.com>
6106 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6109 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6111 * sem_ch12.ads: minor comment updates.
6113 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6115 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6116 instantiation and a formal package the compiler generates a package
6117 renaming declaration so that the generic name within the declaration
6118 is interpreted as a renaming of the instance. At the end of a formal
6119 package declaration, this renaming must become invisible.
6121 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6123 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6124 comparison and rely on concrete entities instead.
6126 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6128 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6129 and discriminants, to indicate that the type has an access discriminant
6130 that supports implicit dereference.
6131 * snames.ads-tmpl: Add names of aspects and attributes related to
6132 Ada2012 iterators: constant_indexing, default_iterator,
6133 iterator_element, implicit_dereference, variable_indexing.
6134 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6135 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6136 iterator-related aspects.
6137 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6139 2011-08-05 Sergey Rybin <rybin@adacore.com>
6141 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6142 metrics in gnatmetric to cover new kinds of coupling mentrics.
6144 2011-08-05 Steve Baird <baird@adacore.com>
6146 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6147 of calling the user-defined main subprogram.
6148 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6149 is set) Call_Main_Subprogram ahead of, as opposed to
6151 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6152 generation of a "with" of the user-defined main subprogram.
6153 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6154 (which is now called from Gen_Main instead).
6156 2011-08-05 Emmanuel Briot <briot@adacore.com>
6158 * projects.texi: Added reference to the Makefile package.
6160 2011-08-05 Thomas Quinot <quinot@adacore.com>
6162 * exp_ch7.adb: Minor comment rewording.
6164 2011-08-05 Ed Falis <falis@adacore.com>
6166 * env.c: Fix comment.
6168 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6170 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6171 character comparison and rely on concrete entities instead.
6173 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6175 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6176 suggested by AI95-0068.
6178 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6180 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6181 the two potential initialization calls. This accounts for any
6182 access-before-elaboration checks which may precede the initialization
6184 (Next_Suitable_Statement): New routine. Returns the next real statement
6185 after the input node while skipping generated checks.
6186 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6187 with comment on usage.
6188 Do not generate Elaborate_All when the trigger is a finalization call
6189 coming from a type init proc.
6190 (Check_Elab_Call): Propagate the initialization procedure context to
6191 subsequent calls to Check_A_Call.
6192 (Check_Internal_Call_Continue): Propagate the initialization procedure
6193 context to subsequent calls to Check_Elab_Call.
6194 (Is_Finalization_Procedure): New routine. Returns True if the input
6195 entity denotes a [Deep_]Finalize routine.
6196 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6197 along with comment on usage.
6199 2011-08-05 Vadim Godunko <godunko@adacore.com>
6201 * s-atocou.ads: Add list of supported platforms.
6203 2011-08-05 Yannick Moy <moy@adacore.com>
6205 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6207 * opt.ads (Disable_ALI_File): new Boolean flag
6208 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6210 2011-08-05 Ed Falis <falis@adacore.com>
6212 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6213 environ is properly defined.
6215 2011-08-05 Vincent Celier <celier@adacore.com>
6217 * make.adb (Compilation_Phase): Exit immediately when all objects have
6218 been found up to date, to avoid multiple exit messages.
6219 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6220 same project for languages with no compiler.
6221 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6223 2011-08-05 Robert Dewar <dewar@adacore.com>
6225 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6226 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6227 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6228 s-atocou-builtin.adb: Minor reformatting.
6230 2011-08-05 Yannick Moy <moy@adacore.com>
6232 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6233 if the node to wrap is a pragma check, this node and enclosed
6234 expression are not expanded, so do not apply any transformations here.
6235 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6236 introducing transient scopes.
6238 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6240 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6241 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6242 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6243 routine is available, so we use the default implementation of these
6245 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6246 support for copying attributes on VxWorks 6.
6248 2011-08-05 Yannick Moy <moy@adacore.com>
6250 * debug.adb: Remove use of -gnatd.D.
6251 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6252 * opt.ads: Simplify variables for ALFA mode, to keep one only
6253 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6256 2011-08-05 Vincent Celier <celier@adacore.com>
6258 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6259 Builder'Default_Switches.
6261 2011-08-05 Vincent Celier <celier@adacore.com>
6263 * makeusg.adb: Add lines for --create-map-file switches.
6265 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6267 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6268 profile is incomplete and the full view is available, replace it with
6270 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6271 incomplete, freezing the subprogram is delayed until the full view is
6273 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6274 fixed-point multiplication operator and the predefined operator is
6275 resolved in favor of the user-defined one.
6277 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6279 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6282 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6284 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6285 whether a type lacks user-defined Read or Write operations, or has a
6286 component that lacks them.
6287 * sem_attr.adb (Check_Stream_Attribute): if restriction
6288 No_Default_Stream_Attributes is active, verify that all subcomponent
6289 types of the target have user-defined stream operations, and report
6291 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6292 * exp_strm.adb: Build_Elementary_Input_Call,
6293 Build_Elementary_Write_Call): remove checks for restriction
6294 No_Default_Stream_Attributes, now checked in semantics.
6296 2011-08-04 Vincent Celier <celier@adacore.com>
6298 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6299 switches on the command line, look for all valid --RTS switches in the
6300 Builder switches and for each language use the first runtime name found
6301 to invoke gprconfig.
6302 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6303 command line and there is no auto-configuration.
6304 (Runtime_Name_Set_For): New function.
6306 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6308 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6309 elaborate initialization expression for variable Abort when processing
6310 a package body or a declaration.
6311 (Create_Finalizer): Propagate the package context when creating the
6312 exception-related variables.
6313 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6314 For_Package along with usage comment.
6316 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6318 * gcc-interface/Makefile.in: Clean up targets.
6319 Enable new package for atomic counters and copy-on-write implementation
6320 of unbounded strings on x86 platforms.
6321 * gcc-interface/Make-lang.in: Update dependencies.
6323 2011-08-04 Robert Dewar <dewar@adacore.com>
6325 * exp_ch7.adb: Minor reformatting.
6327 2011-08-04 Robert Dewar <dewar@adacore.com>
6329 * exp_strm.adb: Minor reformatting.
6331 2011-08-04 Vadim Godunko <godunko@adacore.com>
6333 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6334 operations are not supported.
6335 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6336 * s-atocou-x86.adb: New file.
6337 * Makefile.rtl: Add s-atocou.o file
6339 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6341 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6342 (Compilation_Phase): ... here.
6343 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6345 2011-08-04 Thomas Quinot <quinot@adacore.com>
6347 * Make-generated.in: Fix minor typo in comment.
6349 2011-08-04 Thomas Quinot <quinot@adacore.com>
6351 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6354 2011-08-04 Robert Dewar <dewar@adacore.com>
6356 * a-coinho.adb: Minor reformatting.
6358 2011-08-04 Robert Dewar <dewar@adacore.com>
6360 * a-coinho.ads: Minor reformatting.
6362 2011-08-04 Vadim Godunko <godunko@adacore.com>
6364 * s-atocou.ads, s-atocou.adb: New files.
6365 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6366 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6367 direct use of GCC's atomic builtins and replace them by use of new
6368 atomic counter package.
6370 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6372 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6374 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6376 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6377 with a call to Get_External_Tag.
6378 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6379 subprogram usage. Remove the guard against package declarations and
6380 bodies since Build_Cleanup_Statements is no longer invoked in that
6382 (Build_Components): Initialize Tagged_Type_Stmts when the context
6383 contains at least one library-level tagged type.
6384 (Build_Finalizer): New local variables Has_Tagged_Types and
6385 Tagged_Type_Stmts along with associated comments on usage. Update the
6386 logic to include tagged type processing.
6387 (Create_Finalizer): Insert all library-level tagged type unregistration
6388 code before the jump block circuitry.
6389 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6390 (Expand_N_Package_Declaration): Remove the call to
6391 Build_Cleanup_Statements.
6392 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6393 unregister the external tag of a tagged type.
6394 (Processing_Actions): Reimplemented to handle tagged types.
6395 (Process_Declarations): Detect the declaration of a library-level
6396 tagged type and carry out the appropriate actions.
6397 (Unregister_Tagged_Types): Removed. The machinery has been directly
6398 merged with Build_Finalizer.
6400 2011-08-04 Robert Dewar <dewar@adacore.com>
6402 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6403 gnatls.adb, exp_ch3.adb: Minor reformatting.
6405 2011-08-04 Marc Sango <sango@adacore.com>
6407 * sem_attr.adb (Analyze_Attribute): Replace the message
6408 "invisible attribute of}" of the spark restriction violation in
6409 attribute reference by the simple message "invisible attribute of type".
6410 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6411 two insertion characters: '&' and '}'.
6413 2011-08-04 Vadim Godunko <godunko@adacore.com>
6415 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6416 * a-coinho.ads, a-coinho.adb: New file.
6417 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6419 2011-08-04 Nicolas Roche <roche@adacore.com>
6421 * alfa_test.adb: Not all ali files are containing alfa information even
6422 if compiled with -gnatd.F. So suppress warning about missing ALFA
6425 2011-08-04 Yannick Moy <moy@adacore.com>
6427 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6429 * put_alfa.adb: Check that scope name is not empty.
6431 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6433 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6434 Needs_Elementary_Stream_Operation, to determine whether user-defined
6435 Read and Write attributes are available for the elementary components
6436 of the given type. If only the predefined attributes are available,
6437 then when restriction No_Default_Stream_Attributes is active the
6438 predefined stream attributes for the composite type cannot be created.
6440 2011-08-04 Robert Dewar <dewar@adacore.com>
6442 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6443 Put routines in alpha order
6445 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6447 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6448 * gcc-interface/Make-lang.in: Update dependencies.
6450 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6452 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6453 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6456 2011-08-04 Robert Dewar <dewar@adacore.com>
6458 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6459 lib-xref-alfa.adb: Minor reformatting.
6461 2011-08-04 Marc Sango <sango@adacore.com>
6463 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6464 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6465 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6468 2011-08-04 Tristan Gingold <gingold@adacore.com>
6470 * bindgen.adb (Gen_Adainit_C): Remove.
6471 (Gen_Adafinal_C): Ditto.
6472 (Gen_Elab_Externals_C): Ditto.
6473 (Gen_Elab_Calls_C): Ditto.
6474 (Gen_Elab_Order_C): Ditto.
6475 (Gen_Elab_Defs_C): Ditto.
6476 (Gen_Finalize_Library_C): Ditto.
6477 (Gen_Finalize_Library_Defs_C): Ditto.
6478 (Gen_Main_C): Ditto.
6479 (Gen_Output_File_C): Ditto.
6480 (Gen_Restrictions_C): Ditto.
6481 (Gen_Versions_C): Ditto.
6482 (Write_Info_Ada_C): Ditto.
6483 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6484 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6485 Always call Gen_Output_File_Ada.
6486 * gnatlink.adb (Begin_Info): Now a constant.
6488 (Ada_Bind_File): Remove
6489 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6490 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6491 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6492 * opt.ads (Ada_Bind_File): Remove.
6494 2011-08-04 Thomas Quinot <quinot@adacore.com>
6496 * projects.texi: Document target-specific directory in default project
6499 2011-08-04 Thomas Quinot <quinot@adacore.com>
6501 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6504 2011-08-04 Yannick Moy <moy@adacore.com>
6506 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6507 opt.ads, lib-xref.ads: Code clean up.
6509 2011-08-04 Yannick Moy <moy@adacore.com>
6511 * gnat_rm.texi: Update description of Test_Case
6512 * gnat_ugn.texi: Typo.
6514 2011-08-04 Ed Falis <falis@adacore.com>
6516 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6518 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6520 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6521 it is of type Root_Controlled. This action eliminates fields Prev and
6522 Next from type equality.
6524 2011-08-04 Yannick Moy <moy@adacore.com>
6526 * lib-xref-alfa.adb: Correct typo.
6528 2011-08-04 Matthew Heaney <heaney@adacore.com>
6530 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6533 2011-08-04 Yannick Moy <moy@adacore.com>
6535 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6536 (Analyze_Pragma): allow static string expression for name of Test_Case,
6537 instead of simply string literals.
6538 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6541 2011-08-04 Vincent Celier <celier@adacore.com>
6543 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6544 case suffixes to find truncated main sources.
6546 2011-08-04 Tristan Gingold <gingold@adacore.com>
6548 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6549 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6550 (Compute_Current_Task): Ditto.
6552 2011-08-04 Tristan Gingold <gingold@adacore.com>
6554 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6556 2011-08-04 Yannick Moy <moy@adacore.com>
6558 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6559 library-level constant.
6560 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6561 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6562 used as selector of parameter association, in ALFA mode.
6564 2011-08-04 Robert Dewar <dewar@adacore.com>
6566 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6567 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6570 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6572 * make.adb (Linking_Phase): Set source search path before calling
6573 gnatlink in CodePeer mode.
6575 2011-08-04 Javier Miranda <miranda@adacore.com>
6577 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6578 Remove code which takes care of building TSDs.
6579 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6580 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6581 the accessibility check in VM targets.
6582 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6583 (Building_Static_DT): Now returns false for VM targets.
6584 (Build_VM_TSDs): Removed.
6585 (Expand_Interface_Conversion): Generate missing runtime check for
6586 conversions to interface types whose target type is unknown at compile
6588 (Make_VM_TSD): Add missing code to disable the generation of calls to
6589 Check_TSD if the tagged type is not defined at library level, or not
6590 has a representation clause specifying its external tag, or -gnatdQ is
6592 * exp_disp.ads (Build_VM_TSDs): Removed.
6593 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6594 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6595 register primitives in the dispatch tables in VM targets.
6596 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6597 initialization of class-wide interface objects in VM targets.
6598 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6601 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6603 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6604 when dotnet-ld cannot be found.
6606 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6608 * bindgen.adb: Simplify significantly generation of binder body file in
6610 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6611 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6614 2011-08-04 Yannick Moy <moy@adacore.com>
6616 * sem_prag.adb, sem.ads: Code cleanup.
6618 2011-08-04 Tristan Gingold <gingold@adacore.com>
6620 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6621 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6622 results if possible.
6623 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6624 * gnat_ugn.texi: Update dynamic stack usage section.
6626 2011-08-04 Steve Baird <baird@adacore.com>
6628 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6629 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6630 contains only a call to the user-defined main subprogram.
6631 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6632 call the "wrapper" subprogram instead of directly
6633 calling the user-defined main subprogram.
6635 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6637 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6638 alternatives of a case statement for controlled objects. Rename local
6639 variable A to Dead_Alt.
6640 (Expand_N_If_Statement): Check the then and else statements of an if
6641 statement for controlled objects. Check the then statements of all
6642 elsif parts of an if statement for controlled objects.
6643 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6645 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6646 detects a loop associated with the expansion of an array object.
6647 Augment the processing of the loop statements to account for a possible
6648 wrap done by Process_Statements_For_Controlled_Objects.
6649 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6650 statements and abortable part of an asynchronous select for controlled
6652 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6653 conditional entry call for controlled objects.
6654 (Expand_N_Selective_Accept): Check the alternatives of a selective
6655 accept for controlled objects.
6656 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6657 alternatives of a timed entry call for controlled objects.
6658 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6659 exception handler for controlled objects.
6660 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6661 Add formal parameter Nested_Constructs along with its associated
6663 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6664 Requires_Cleanup_Actions.
6665 (Process_Statements_For_Controlled_Objects): New routine.
6666 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6667 routine. Inspect a node which contains a non-handled sequence of
6668 statements for controlled objects. If such an object is found, the
6669 statements are wrapped in a block.
6671 2011-08-04 Bob Duff <duff@adacore.com>
6673 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6674 need to compare with Class_Wide_Type (T2), in order to get at the
6675 original class-wide type node.
6676 * sem_type.ads (Covers): Improve the comment.
6677 * einfo.ads (Class_Wide_Type): Improve the comment.
6678 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6679 the type of the Deref.
6681 2011-08-04 Yannick Moy <moy@adacore.com>
6683 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6684 separate declarations.
6685 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6686 check identifier of pragma argument.
6687 (Chain_TC): check that no other test case associated to the same entity
6688 share the same name.
6689 (Check_Test_Case): disallow test case inside subprogram body
6690 (Analyze_Pragma): correct call to check identifier and not argument
6691 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6692 function gets name from test case pragma.
6694 2011-08-04 Yannick Moy <moy@adacore.com>
6696 * gnat_rm.texi: Document new pragma and aspect.
6697 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6698 (No_Duplicates_Allowed): new constant array defining whether duplicates
6699 aspects of each kind can appear on the same declaration.
6700 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6701 field, which points to a node holding the previous Spec_PPC_List.
6702 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6703 through the indirection with Contract.
6704 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6705 * par-prag.adb (Prag): do nothing on Test_Case pragma
6706 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6708 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6709 component Ensures of Test_Case.
6710 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6711 (Analyze_Generic_Subprogram_Declaration,
6712 Analyze_Subprogram_Instantiation,
6713 Analyze_Abstract_Subprogram_Declaration,
6714 Analyze_Subprogram_Body_Helper,
6715 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6716 insert contract in subprogram node at point of definition
6718 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6719 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6720 corresponding pragma
6721 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6722 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6723 similar to the analysis of pre/post
6724 (Derive_Subprogram): insert contract in subprogram node at point of
6726 * sem_prag.adb, sem_prag.ads
6727 (Check_Arg_Is_String_Literal, Check_Identifier):
6728 new checking procedures to be called in treatment of pragmas
6729 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6730 pragma is well-formed. This does not check currently that 'Result is
6731 used only in the Ensures component of a Test_Case.
6732 (Analyze_Pragma): add case for Test_Case
6733 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6734 components of a Test_Case.
6735 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6736 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6737 pragma, treated as spec expressions.
6738 (Sig_Flags): add value -1 for Test_Case.
6739 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6740 Get_Requires_From_Test_Case_Pragma): getters for both expression
6741 components of a Test_Case.
6742 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6743 indirection between an entry or [generic] subprogram entity and its
6744 pre/post + test-cases.
6745 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6746 get/set for fields of an N_Contract node.
6747 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6748 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6749 names and pragma for Test_Case.
6750 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6752 2011-08-04 Vincent Celier <celier@adacore.com>
6754 * gnat_ugn.texi: Improve documentation of gnatmake switch
6755 --source-info-file=.
6757 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6759 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6760 type). Initialize Atyp to the appropriate type which is later checked
6761 for completion. Rewrite the assertion associated with private type
6764 2011-08-04 Ed Falis <falis@adacore.com>
6766 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6767 initialize the number of CPUs.
6769 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6771 * sem_type.adb (Disambiguate): New subsidiary routine
6772 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6773 equality on an anonymous access type whose designated type is private
6774 does not lead to an ambiguity with the universal access equality
6775 operator in the body or child units of the defining package. The same
6776 is true for a multiplication operator on a private type completed with
6779 2011-08-04 Javier Miranda <miranda@adacore.com>
6781 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6782 (Normalize_Scalars_Config): Removed.
6784 (Register_Opt_Config_Switches): Remove registering config values of
6785 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6786 (Restore_Opt_Config_Switches): Remove code which restores the values of
6787 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6788 Init_Or_Norm_Scalars.
6789 (Save_Opt_Config_Switches): Remove code which saves values of
6790 Init_Or_Norm_Scalars and Normalize_Scalars.
6791 (Set_Opt_Config_Switches): Remove code which restores config values of
6792 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6793 Init_Or_Norm_Scalars.
6795 2011-08-04 Yannick Moy <moy@adacore.com>
6797 * frontend.adb (Frontend): remove previous patch to avoid full
6798 qualification in ALFA mode.
6799 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6800 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6801 unique name for an entity, which could be used to identify the entity
6802 across compilation units.
6804 2011-08-04 Thomas Quinot <quinot@adacore.com>
6807 (Initialize_Default_Project_Path): Add target specific directory
6808 ($prefix/$target/lib/gnat) in front of project path in all cases
6809 (making gnatmake's behaviour consistent with gprbuild).
6810 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6811 Pass target name from Sdefault to project subsystem.
6812 * gnatls.adb: Show new target specific default project directory.
6814 2011-08-04 Johannes Kanig <kanig@adacore.com>
6816 * cstand.adb: Add Information to Identifier in Standard
6817 (Identifer_For): Set Entity to the corresponding entity
6819 2011-08-04 Sergey Rybin <rybin@adacore.com>
6821 * gnat_ugn.texi: Update doc on gnatcheck.
6823 2011-08-04 Yannick Moy <moy@adacore.com>
6825 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6828 2011-08-04 Yannick Moy <moy@adacore.com>
6830 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6831 performing expansion.
6832 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6833 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6834 it is not called in ALFA mode.
6836 2011-08-04 Emmanuel Briot <briot@adacore.com>
6838 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6839 after all, so removed.
6841 2011-08-04 Sergey Rybin <rybin@adacore.com>
6843 * vms_data.ads: Add missing VMS qualifiers.
6845 2011-08-04 Emmanuel Briot <briot@adacore.com>
6847 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6848 the list of files on the command line after processing it through
6851 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6853 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6854 processing for .NET/JVM. These targets can now benefit from
6855 Raise_From_Controlled_Operation and they share the same processing with
6857 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6858 These targets need transient scopes in order to properly finalize short
6859 lived controlled objects.
6860 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6861 NET/JVM. These targets can now benefit from
6862 Raise_From_Controlled_Operation and they share the same processing with
6865 2011-08-04 Geert Bosch <bosch@adacore.com>
6867 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6869 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6871 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6872 Expand_Record_Aggregate, to determine whether aggregate must be
6873 expanded into assignments. This is the case if the ancestor part is
6874 private, regarless of the setting of the flag Has_Private_Ancestor.
6876 2011-08-04 Ed Falis <falis@adacore.com>
6878 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6880 2011-08-04 Bob Duff <duff@adacore.com>
6882 * sinfo.ads: Fix comment.
6884 2011-08-04 Steve Baird <baird@adacore.com>
6886 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6887 choose a package name in much the same way as is
6888 done for JGNAT when VM_Target /= No_VM, except that
6889 a slightly more distinctive prefix string is used.
6891 2011-08-04 Emmanuel Briot <briot@adacore.com>
6893 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6894 gnatmake command line.
6895 This behavior was never documented (and was supported only because of
6896 an early bug in the code). This case might lead to ambiguous cases
6897 (between unit names and truncated base names without suffixes).
6899 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6901 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6902 Remove the external tag of a tagged type from the internal hash table.
6903 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6904 expanded usage of the routine. Strenghten the check for Is_Master. Add
6905 processing for tagged types.
6906 (Build_Finalizer): Create all the necessary lists used in finalizer
6907 creation when the processed context is a package that may contain
6909 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6910 Requires_Cleanup_Actions.
6911 (Expand_N_Package_Body): Package bodies may need clean up code
6912 depending on whether they contain tagged types.
6913 (Expand_N_Package_Declaration): Package declarations may need clean up
6914 code depending on whether they contain tagged types.
6915 (Unregister_Tagged_Types): New routine. Search through a list of
6916 declarations or statements, looking for non-abstract Ada tagged types.
6917 For each such type, generate code to unregister the external tag.
6918 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6919 Requires_Cleanup_Actions.
6920 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6921 through a list of declarations or statements looking for non-abstract
6922 Ada tagged types or controlled objects.
6923 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6924 Requires_Cleanup_Actions.
6925 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6926 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6929 2011-08-04 Vincent Celier <celier@adacore.com>
6931 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6932 has Ada sources, not project Project, because if the root project
6933 Project has no sources of its own, all projects will be deemed without
6936 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6938 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6939 of the No_Param_Proc acc-to-subp type used for initialization of
6940 __gnat_finalize_library_objects so that it's declared at library level
6941 rather than nested inside of the adainit routine.
6943 2011-08-04 Javier Miranda <miranda@adacore.com>
6945 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6946 if the tagged type has a representation clause which specifies its
6949 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6951 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6952 Remove previous procedure with that name.
6953 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6955 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6956 subtype mark, the ancestor cannot have unknown discriminants.
6957 (Resolve_Record_Aggregate): if the type has invisible components
6958 because of a private ancestor, the aggregate is illegal.
6960 2011-08-04 Vincent Celier <celier@adacore.com>
6962 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6963 account switches -gnat2005, -gnat12 and -gnat2012.
6965 2011-08-04 Bob Duff <duff@adacore.com>
6967 * s-tasdeb.ads: Minor comment fix.
6969 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6971 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6973 * switch.ads, switch.adb (Is_Language_Switch): New function.
6975 2011-08-04 Vincent Celier <celier@adacore.com>
6977 * switch-c.adb: Minor comment addition.
6979 2011-08-04 Vincent Celier <celier@adacore.com>
6981 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6982 ending with '=' is followed by a space (missing file name).
6984 2011-08-04 Pascal Obry <obry@adacore.com>
6986 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6988 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6990 * sem_ch12.adb (Analyze_Associations): New routine
6991 Check_Overloaded_Formal_Subprogram to reject a formal package when
6992 there is a named association or a box initialisation for an overloaded
6993 formal subprogram of the corresponding generic.
6995 2011-08-04 Yannick Moy <moy@adacore.com>
6997 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6998 * get_alfa.adb, put_alfa.adb: Read and write new component of
7000 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7002 2011-08-04 Pascal Obry <obry@adacore.com>
7004 * urealp.adb: Minor reformatting.
7006 2011-08-04 Tristan Gingold <gingold@adacore.com>
7008 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7009 Handle the case when Cleanup_Protected_Object returns Empty.
7011 2011-08-04 Yannick Moy <moy@adacore.com>
7013 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7015 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7017 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7018 call, ignore functions.
7020 2011-08-04 Geert Bosch <bosch@adacore.com>
7022 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7025 2011-08-04 Emmanuel Briot <briot@adacore.com>
7027 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7028 as an index for Builder'Switches. This conforms to the documentation.
7029 * make.adb (Insert_Project_Sources): avoid duplicate code
7031 2011-08-04 Emmanuel Briot <briot@adacore.com>
7033 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7034 name on the command line (for instance "../dummy"), never assume it can
7037 2011-08-04 Tristan Gingold <gingold@adacore.com>
7039 * bindgen.adb: Remove code the reference or create the
7040 Break_Start/__gnat_break_start procedure.
7041 * s-stalib.adb (Break_Start): Removed.
7043 2011-08-04 Emmanuel Briot <briot@adacore.com>
7045 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7046 shared with gprbuild.
7048 2011-08-04 Yannick Moy <moy@adacore.com>
7050 * par-ch4.adb (P_Primary): preferentially issue an error message about
7051 a missing parenthesis arount a conditional or case expression in Ada
7052 2012 mode, if we detect that the alignment is not correct for a
7055 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7057 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7058 tag-to-class-wide conversion as needing finalization actions.
7059 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7060 a tag-to-class-wide conversion as needing finalization actions.
7061 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7062 conversion does not need finalization actions.
7063 (Is_Tag_To_CW_Conversion): New routine.
7064 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7065 whether an object is the result of a tag-to-class-wide conversion.
7067 2011-08-04 Yannick Moy <moy@adacore.com>
7069 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7070 the left-hand-side and right-hand-side of a conjunct are inserted when
7071 translating a pre- or postcondition
7072 * sem_ch6.adb: Correct typo in comment
7074 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7076 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7077 Unchecked_Conversion and Unchecked_Deallocation.
7079 2011-08-04 Thomas Quinot <quinot@adacore.com>
7081 * make.adb: Minor reformatting.
7083 2011-08-04 Emmanuel Briot <briot@adacore.com>
7085 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7086 sources in the project and its imported projects, but not in the whole
7089 2011-08-04 Emmanuel Briot <briot@adacore.com>
7091 * make.adb: Remove debug trace.
7093 2011-08-04 Vincent Celier <celier@adacore.com>
7095 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7096 path in canonical form, to be able to compare path names on platforms
7097 such as Windows or Darwin.
7099 2011-08-04 Thomas Quinot <quinot@adacore.com>
7101 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7102 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7103 * scos.ads: Update documentation accordingly.
7104 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7107 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7109 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7110 attribute only if prefix type is scalar.
7112 2011-08-04 Emmanuel Briot <briot@adacore.com>
7114 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7115 in gnatmake for specifying mains on the command line that do not belong
7116 to the main project. These mains must currently all belong to the same
7118 (Ultimate_Extension_Of): removed, since duplicated
7119 Ultimate_Extending_Project.
7121 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7123 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7125 (CodePeer_Mode_String): New.
7126 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7128 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7129 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7130 mode, since no useful elaboration subprogram is needed by CodePeer.
7131 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7132 In this mode, compile binder file with -gnatC and do stop after this
7135 2011-08-04 Vincent Celier <celier@adacore.com>
7137 * exp_ch7.adb: Minor comment fix.
7139 2011-08-04 Robert Dewar <dewar@adacore.com>
7141 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7142 exp_ch4.adb, makeutl.adb: Minor reformatting.
7144 2011-08-04 Emmanuel Briot <briot@adacore.com>
7146 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7147 Create several new subprograms to move code out of Make. This makes the
7148 code more readable, removes code duplication, and is a preparation work
7149 for adding support for aggregate projects.
7151 2011-08-04 Tristan Gingold <gingold@adacore.com>
7153 * s-po32gl.ads, s-po32gl.adb: New files.
7154 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7155 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7156 (Build_Finalization_Collection): Use it.
7157 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7158 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7160 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7161 * gcc-interface/Make-lang.in: Update dependencies.
7163 2011-08-04 Emmanuel Briot <briot@adacore.com>
7165 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7168 2011-08-04 Emmanuel Briot <briot@adacore.com>
7170 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7171 command line is not a file name, also check whether it could be a unit
7174 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7176 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7177 the header of the finalization routine.
7178 If the unit has no finalizer but is a body whose spec has one, then
7179 generate the decrement of the elaboration entity only.
7180 If the unit has a finalizer and is a spec, then do not generate the
7181 decrement of the elaboration entity.
7182 (Gen_Finalize_Library_C): Likewise.
7184 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7186 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7187 (Bounds_Size_Expression): Removed.
7188 (Double_Alignment_Of): New subsidiary routine.
7189 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7190 for a hole in the dope vector of unconstrained arrays due to different
7191 index and element alignments.
7193 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7195 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7196 raise program_error because body has not been seen yet.
7198 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7200 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7203 2011-08-04 Vincent Celier <celier@adacore.com>
7205 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7207 2011-08-04 Yannick Moy <moy@adacore.com>
7209 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7210 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7212 2011-08-04 Thomas Quinot <quinot@adacore.com>
7214 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7215 instantiation in RCI.
7217 2011-08-04 Emmanuel Briot <briot@adacore.com>
7219 * make.adb: Share more code with gprbuild
7221 2011-08-04 Emmanuel Briot <briot@adacore.com>
7223 * projects.texi: Added documentation for the IDE'Gnat project file
7226 2011-08-04 Nicolas Roche <roche@adacore.com>
7228 * gnat_rm.texi: Minor editing.
7230 2011-08-04 Javier Miranda <miranda@adacore.com>
7232 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7233 and the library case for VM targets.
7234 (Gen_Adainit_Ada): Likewise.
7236 2011-08-04 Robert Dewar <dewar@adacore.com>
7238 * g-altive.ads: Minor comment updates.
7239 * prj-nmsc.adb: Minor reformatting.
7241 2011-08-04 Javier Miranda <miranda@adacore.com>
7244 (Normalize_Scalars_Config): Value of the configuration switch set by
7245 pragma Normalize_Scalars when it appears in the gnat.adc file.
7246 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7247 to save and restore settings of this pragma.
7249 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7250 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7252 2011-08-04 Vincent Celier <celier@adacore.com>
7254 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7256 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7258 * makeutl.adb: Minor reformatting.
7260 2011-08-04 Olivier Hainque <hainque@adacore.com>
7262 * g-altive.ads: Update comments to reflect that only the soft
7263 binding is available today.
7265 2011-08-04 Robert Dewar <dewar@adacore.com>
7267 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7268 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7269 * gcc-interface/Make-lang.in: Update dependencies.
7271 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7273 * prj-env.adb: Remove local debug traces.
7275 2011-08-04 Yannick Moy <moy@adacore.com>
7277 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7278 was used instead of Hi_OK, which could cause a read of an uninitialized
7279 value later on. Detected while working on the new warning.
7280 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7282 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7283 in more cases, in order to detect more unreferenced values.
7284 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7285 object for expression, if any.
7287 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7289 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7290 the operand types instead of the Esize.
7292 2011-08-04 Steve Baird <baird@adacore.com>
7294 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7295 enable CodePeer_Mode.
7296 * bindusg.adb (Display): Add help message describing -P binder switch.
7297 * gnat_ugn.texi: Document -P binder switch.
7298 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7299 user-defined main program directly.
7300 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7301 user-defined main program in the context clause of the package body.
7303 2011-08-04 Yannick Moy <moy@adacore.com>
7305 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7306 duplicate of Defining_Entity
7307 (Get_Unique_Entity_For_Decl): rename function into
7308 Unique_Defining_Entity
7309 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7310 (Formal_Proof_On): remove synthesized flag
7311 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7312 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7313 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7314 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7315 Annotate (Formal_Proof)
7317 2011-08-04 Emmanuel Briot <briot@adacore.com>
7319 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7320 source files with non-standard naming schemes, in imported projects
7322 2011-08-04 Emmanuel Briot <briot@adacore.com>
7324 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7325 specified on the gprbuild command line, we need to compile all units
7326 within that file, not just the first one we find
7327 Fix error message for mains that are not found.
7329 2011-08-04 Thomas Quinot <quinot@adacore.com>
7331 * sem_ch6.adb: Update comment.
7332 * sem_ch12.adb: Minor reformatting.
7334 2011-08-04 Bob Duff <duff@adacore.com>
7336 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7337 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7338 race condition whose symptom is to fail to lock Parent. That, in turn,
7339 causes Parent.Awake_Count to be accessed without locking Parent, which
7340 causes another race condition whose symptom is that Parent.Awake_Count
7341 can be off by 1 (either too high or too low). The solution is to lock
7342 Parent unconditionally, and then lock Acceptor, before reading
7343 Acceptor.Terminate_Alternative.
7345 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7347 * debug.adb: Update comment.
7349 2011-08-04 Robert Dewar <dewar@adacore.com>
7351 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7352 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7353 exp_ch6.adb: Minor reformatting.
7355 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7357 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7360 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7362 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7364 2011-08-04 Thomas Quinot <quinot@adacore.com>
7366 * sinfo.ads: Minor reformatting.
7368 2011-08-04 Emmanuel Briot <briot@adacore.com>
7370 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7371 even if there is no location.
7373 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7375 * sem_res.adb, sem_ch4.adb: move check for restriction
7376 No_Task_Hierarchy to resolve_allocator.
7378 2011-08-04 Thomas Quinot <quinot@adacore.com>
7380 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7381 This flag of N_Pragma nodes is not used, remove it as well as all of
7382 the associated circuitry.
7384 2011-08-04 Javier Miranda <miranda@adacore.com>
7386 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7387 runtime check on duplicated externa tags
7388 * debug.adb Document switch -gnatdQ.
7390 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7392 * a-fihema.ads: Minor typo fix.
7394 2011-08-04 Yannick Moy <moy@adacore.com>
7396 * sem_ch10.adb: Minor comment update.
7398 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7400 * einfo.adb: Update the node field usage to reflect the renaming of
7401 Return_Flag to Return_ Flag_Or_Transient_Decl.
7402 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7403 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7404 (Write_Field15_Name): Change Return_Flag to
7405 Return_Flag_Or_Transient_Decl.
7406 * einfo.ads: Rename node field Return_Flag to
7407 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7408 occurrences in entities.
7409 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7410 associated Inline pragma.
7411 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7412 associated Inline pragma.
7413 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7415 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7416 Return_Flag and Set_Return_Flag.
7417 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7418 objects generated for controlled transients declared inside an
7419 Exception_With_Actions. Update the calls to Return_Flag.
7420 (Process_Object_Declaration): Add code to add a null guard for hook
7421 objects generated for controlled transients declared inside an
7422 Exception_With_Actions. Update related comment.
7423 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7424 objects generated for controlled transients declared inside an
7425 Exception_With_Actions. Update the calls to Return_Flag.
7426 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7428 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7430 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7431 positional aggregate.
7433 2011-08-04 Vincent Celier <celier@adacore.com>
7435 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7436 SLOC only for pragmas.
7438 2011-08-04 Emmanuel Briot <briot@adacore.com>
7440 * projects.texi: Minor typo fix.
7442 2011-08-04 Emmanuel Briot <briot@adacore.com>
7444 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7445 on case-sensitive file systems.
7447 2011-08-04 Thomas Quinot <quinot@adacore.com>
7449 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7450 nested in a disabled pragma.
7451 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7452 enclosing pragma, if any, for X decisions.
7454 2011-08-04 Thomas Quinot <quinot@adacore.com>
7456 * sem_prag.adb: Minor reformatting.
7458 2011-08-04 Vincent Celier <celier@adacore.com>
7460 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7461 allowed in no run time mode.
7463 2011-08-04 Vincent Celier <celier@adacore.com>
7465 * make.adb (Check): When -gnatc is used, check for the source file
7466 inside the ALI file with a canonical case file name.
7468 2011-08-04 Emmanuel Briot <briot@adacore.com>
7470 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7471 overriding the separator.
7473 2011-08-04 Robert Dewar <dewar@adacore.com>
7475 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7476 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7478 2011-08-04 Robert Dewar <dewar@adacore.com>
7480 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7482 2011-08-04 Yannick Moy <moy@adacore.com>
7484 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7485 'Result only appears in postcondition of function.
7487 2011-08-04 Thomas Quinot <quinot@adacore.com>
7489 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7490 external tag, include the value of the external tag in the exception
7493 2011-08-04 Yannick Moy <moy@adacore.com>
7495 * sem_attr.adb (Result): modify error message for misplaced 'Result
7497 2011-08-04 Sergey Rybin <rybin@adacore.com>
7499 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7500 clear that the second argument must be an identifier.
7502 2011-08-04 Thomas Quinot <quinot@adacore.com>
7504 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7505 -fpreserve-control-flow, insert an IF statement on the barrier
7506 condition to ensure that a conditional branch instruction is generated.
7508 2011-08-04 Emmanuel Briot <briot@adacore.com>
7510 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7511 (Processing_Flags.Ignore_Missing_With): new flag.
7513 2011-08-04 Emmanuel Briot <briot@adacore.com>
7515 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7516 Source_List_File on case-insensitive systems where the file is actually
7517 on a case-sensitive file system (NFS,...).
7519 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7521 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7522 function return contains a controlled [extension] aggregate and the
7523 return statement is not part of a handled sequence of statements, wrap
7524 the return in a block. This ensures that all controlled temporaries
7525 generated during aggregate resolution will be picked up by the
7526 finalization machinery.
7528 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7530 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7531 components, freeze type before resolution, to ensure that default
7532 initializations are present for all components.
7533 * sem_res.adb (Resolve_Actuals): the designated object of an
7534 accces-to-constant type is a legal actual in a call to an
7535 initialization procedure.
7537 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7539 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7540 N_Unchecked_Type_Conversion to the possible containers of a renamed
7543 2011-08-04 Yannick Moy <moy@adacore.com>
7545 * par-ch13.adb (Aspect_Specifications_Present): recognize
7546 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7547 is issued in Strict mode.
7548 * par.adb: Fix typos in comments.
7550 2011-08-04 Yannick Moy <moy@adacore.com>
7552 * sem_attr.adb (Result): modify error message to take into account Post
7553 aspect when compiling Ada 2012 (or newer) code.
7555 2011-08-04 Nicolas Roche <roche@adacore.com>
7557 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7558 remove need for GCC exceptions.
7560 2011-08-04 Vincent Celier <celier@adacore.com>
7562 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7563 project, not the source file name.
7564 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7565 excluded, continue looking. This excluded source will only be returned
7566 if there is no other source with the same base name that is not locally
7569 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7571 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7572 private and one of the operands is a real literal, use a qualified
7573 expression rather than a conversion which is not meaningful to the
7576 2011-08-04 Yannick Moy <moy@adacore.com>
7578 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7579 corresponding aspect X'Class are allowed, proceed with analysis of the
7580 aspect instead of skipping it.
7582 2011-08-04 Tristan Gingold <gingold@adacore.com>
7584 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7585 This will allow to have an Ada implementation for the subprogram.
7587 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7589 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7590 completion and aspects are present, apply them to the entity for the
7591 type which is currently the partial view, but which is the one that
7593 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7594 applies to a partial view, indicate that the full view has predicates
7595 and delayed aspects.
7596 (Replace_Type_Reference): Handle properly predicates that apply to the
7597 full view of a private completion.
7599 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7601 * layout.adb (Layout_Type): For composite types, do not set Esize.
7602 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7604 (Size_Known): Look at the RM size of components instead of the Esize.
7605 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7606 issue warning and activate Implicit_Packing.
7607 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7608 if the Esize is not known.
7609 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7610 for elementary types only.
7611 (Analyze_Record_Representation_Clause): Look at the RM size instead
7612 of the Esize to issue errors.
7613 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7615 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7617 Look at the RM size instead of the Esize for types if the latter is
7619 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7621 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7623 * sem_type.adb: proper handling of equality not involving anonymous
7626 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7628 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7629 Vis_Decls. When creating a library-level finalizer for a package spec,
7630 both the declaration and body of the finalizer are inserted either in
7631 the visible or private declarations of the package spec.
7633 2011-08-04 Javier Miranda <miranda@adacore.com>
7635 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7636 use of the full-view of a type when invoking Is_Ancestor.
7637 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7638 the full-view of private parents is requested, then use also the
7639 full-view of the parent of the first derivation.
7641 2011-08-04 Tristan Gingold <gingold@adacore.com>
7643 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7644 instead of the locally imported procedure.
7645 * s-taprop-mingw.adb (Enter_Task): Ditto.
7646 * s-valrea.adb (Scan_Real): Ditto.
7647 * s-imgrea.adb (Set_Image_Real): Ditto.
7648 * s-flocon.ads: Make the package pure.
7650 2011-08-04 Thomas Quinot <quinot@adacore.com>
7652 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7653 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7654 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7655 New subprogram, moved here from...
7656 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7657 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7658 rewriting of the last argument into a procedure call statement here...
7659 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7662 2011-08-04 Thomas Quinot <quinot@adacore.com>
7664 * par_sco.adb: Minor reformatting.
7666 2011-08-04 Robert Dewar <dewar@adacore.com>
7668 * erroutc.adb: Minor reformatting.
7670 2011-08-04 Thomas Quinot <quinot@adacore.com>
7672 * par_sco.adb: Comment update.
7674 2011-08-04 Tristan Gingold <gingold@adacore.com>
7676 * s-flocon.ads: New file.
7677 * g-flocon.ads: Now a renaming of s-flocon.
7678 * Makefile.rtl: Add s-flocon.o
7680 2011-08-04 Javier Miranda <miranda@adacore.com>
7682 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7683 constrained, do not attempt to build a subtype of it.
7685 2011-08-04 Yannick Moy <moy@adacore.com>
7687 * errout.ads Change comments: remove 'R'M as an example where quotes
7688 are needed; add ALFA as another case where quotes are not needed
7689 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7690 case where quotes are not needed.
7691 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7692 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7693 Remove all occurrences of 'A'L'F'A
7695 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7697 * sem_ch13.adb: check legality of invariant pragma.
7699 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7701 * bindgen.adb: Add comments.
7703 2011-08-04 Yannick Moy <moy@adacore.com>
7705 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7707 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7708 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7710 2011-08-04 Robert Dewar <dewar@adacore.com>
7712 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7713 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7714 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7716 2011-08-04 Thomas Quinot <quinot@adacore.com>
7718 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7720 2011-08-04 Thomas Quinot <quinot@adacore.com>
7723 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7726 2011-08-04 Robert Dewar <dewar@adacore.com>
7728 * einfo.ads, exp_ch4.adb: Minor reformatting.
7730 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7732 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7734 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7736 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7737 type in all cases to compute list of primitive operations, because full
7738 view may be an itype that is not attached to the list of declarations.
7740 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7742 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7743 library has already been finalized.
7744 (Gen_Adafinal_C): Likewise.
7745 (Gen_Adainit_Ada): Generate an early return if the library has
7746 already been elaborated.
7747 (Gen_Adainit_C): Likewise.
7748 (Gen_Output_File_Ada): Generate an elaboration flag.
7749 (Gen_Output_File_C): Likewise.
7751 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7753 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7754 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7755 built in the first place.
7756 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7757 for CodePeer because Finalize_Address was not built to begin with.
7758 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7760 2011-08-04 Pascal Obry <obry@adacore.com>
7762 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7763 filenames, this ensures unicity of filenames across processes.
7765 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7767 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7768 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7769 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7770 Add False as the actual to From_Abort in the generated call to
7771 Raise_From_Controlled_Operation.
7773 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7775 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7776 so that the ali file name can be retrieved from outside of this package.
7777 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7778 doing nothing in the general case, but used to update the object file
7779 timestamp if directly generated by the backend.
7780 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7781 to a later time than the ali file one.
7783 2011-08-04 Yannick Moy <moy@adacore.com>
7785 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7786 entities whose body contains an Annotate pragma which forces formal
7788 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7789 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7790 Mark_Non_ALFA_Subprogram to pass in a message and node.
7791 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7792 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7793 surrounding subprogram.
7794 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7795 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7796 as not in ALFA is annotated with Formal_Proof being On, then an error
7797 is issued based on the additional parameters for message and node.
7798 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7799 * gcc-interface/Make-lang.in: Update dependencies.
7801 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7803 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7804 Finalize_Address when CodePeer is enabled.
7806 2011-08-04 Pascal Obry <obry@adacore.com>
7808 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7809 the latter returns a pointer to a static buffer which is deallocated
7810 at the end of the routine.
7812 2011-08-04 Yannick Moy <moy@adacore.com>
7814 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7815 after index creation; mark unconstrained base array type generated as
7816 being in/not in ALFA as well
7817 (Make_Index): mark subtype created as in/not in ALFA
7818 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7819 over a loop as in/not in ALFA, depending on its type and form of loop
7822 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7824 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7825 directly to False on .NET and JVM.
7827 2011-08-04 Yannick Moy <moy@adacore.com>
7829 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7830 constraint that subtype must come from source code to be in ALFA, so
7831 that anonymous subtypes can be in ALFA too.
7833 2011-08-04 Yannick Moy <moy@adacore.com>
7835 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7836 reference for ALFA mode.
7837 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7838 procedure public so as to use it from formal verification back-end.
7840 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7842 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7843 invalid checks of the Parameter, making Remove_Switch not working
7846 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7848 * targparm.ads: Update header: no run-time exception is needed on this
7851 2011-08-04 Vincent Celier <celier@adacore.com>
7853 * a-fihema.adb: Use System.IO instead of GNAT.IO
7855 2011-08-04 Thomas Quinot <quinot@adacore.com>
7857 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7858 are forbidden in Compiler_Unit mode.
7860 2011-08-04 Robert Dewar <dewar@adacore.com>
7862 * sem_util.adb: Minor reformatting.
7864 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7866 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7867 library-level finalizers.
7868 (Gen_Finalize_Library_C): Update the import string for library-level
7870 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7871 library-level finalizer.
7872 * exp_ch7.adb: Remove with and use clauses for Stringt.
7873 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7874 Spec_Decl. Add local variable Body_Id. The names of library-level
7875 finalizers are now manually fully qualified and are no longer external.
7876 A single name is now capable of servicing .NET, JVM and non-VM targets.
7877 Pragma Export is no longer required to provide visibility for the name.
7878 (Create_Finalizer_String): Removed.
7879 (New_Finalizer_Name): New routine which mimics New_..._Name.
7881 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7883 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7884 elaboration counter to Standard_Short_Integer.
7885 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7886 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7887 (Gen_Elab_Externals_C): Likewise.
7889 2011-08-04 Ed Falis <falis@adacore.com>
7891 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7892 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7893 system-vxworks-mips.ads, system-vxworks-x86.ads
7894 (Always_Compatible_Rep): set to False for all VxWorks targets.
7896 2011-08-04 Robert Dewar <dewar@adacore.com>
7898 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7899 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7900 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7901 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7902 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7903 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7904 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7905 Minor reformatting and code reorganization.
7907 2011-08-04 Emmanuel Briot <briot@adacore.com>
7909 * projects.texi: Added doc for aggregate projects.
7911 2011-08-04 Emmanuel Briot <briot@adacore.com>
7913 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7914 Add support for overriding the Project_Path in aggregate projects.
7916 2011-08-04 Robert Dewar <dewar@adacore.com>
7918 * a-cofove.ads: Minor reformatting.
7920 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7922 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7923 on the generated code.
7924 (Build_Finalize_Statements): Update the comment on the generated code.
7925 (Build_Initialize_Statements): Update the comment on the generated code.
7926 (Build_Object_Declarations): Add local variable Result. The object
7927 declarations are now built in sequence.
7928 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7931 2011-08-04 Robert Dewar <dewar@adacore.com>
7933 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7935 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7937 * einfo.ads (Elaboration_Entity): Document new definition and use.
7938 (Elaboration_Entity_Required): Adjust to above change.
7939 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7940 * exp_ch12.adb: And with and use for Snames.
7941 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7942 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7943 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7944 <Check_Unit_Name>: Deal with N_Expanded_Name.
7945 <Attribute_Elaborated>: Extend to all unit names.
7946 * sem_elab.adb: And with and use for Uintp.
7947 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7948 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7949 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7950 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7951 from Gen_Adainit_Ada.
7952 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7953 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7954 case, do not call System.Standard_Library.Adafinal; instead call
7955 finalize_library if needed.
7956 (Gen_Adafinal_C): Likewise.
7957 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7958 non-main program case.
7959 (Gen_Adainit_C): Generate a couple of external declarations here.
7960 In the main program case, set SSL.Finalize_Library_Objects.
7961 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7962 (Gen_Elab_Calls_C): Likewise.
7963 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7964 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7965 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7967 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7968 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7970 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7971 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7972 of external declarations. Call Gen_Finalize_Library_C.
7974 2011-08-04 Emmanuel Briot <briot@adacore.com>
7976 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7977 Compute_Compilation_Phases): new subprogram.
7978 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7979 The number of mains as well as the various compilation phases that
7980 need to be run are now project tree specific, since various
7981 aggregated trees might have different requirements. In particular,
7982 they do not all require bind or link phases.
7984 2011-08-04 Emmanuel Briot <briot@adacore.com>
7986 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7987 (Project_Tree_Appdata): New type.
7988 It is now possible to associate application-specific data to a project
7989 tree. In particular, this is used in the gprbuild builder to avoid a
7990 number of global tables and htables, especially now that there can be
7991 several project trees loaded at once because of aggregate projects.
7992 (Debug_Name): new procedure.
7993 * projects.texi: Clarify syntax of "**" for Source_Dirs
7995 2011-08-03 Emmanuel Briot <briot@adacore.com>
7997 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7998 the "roots" for a main.
7999 (Fill_From_Project): add support for aggregate projects. Main units
8000 in aggregated projects are now automatically added in the list of
8001 files to build (although this fails later on in gprbuild, because
8002 these files are not using the root proejct tree, so this needs
8004 * gcc-interface/Make-lang.in: Update dependencies.
8006 2011-08-03 Yannick Moy <moy@adacore.com>
8008 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8009 conditional expression in ALFA.
8010 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8011 expressions as not in ALFA.
8013 2011-08-03 Robert Dewar <dewar@adacore.com>
8015 * a-cofove.adb: Minor reformatting.
8017 2011-08-03 Emmanuel Briot <briot@adacore.com>
8019 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8020 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8022 These packages are more logically placed in the Queue package, since
8023 they manipulate the queue. It is also likely that they can be adapted
8024 for gnatmake, thus sharing more code.
8025 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8026 that we could move the above.
8028 2011-08-03 Emmanuel Briot <briot@adacore.com>
8030 * errutil.adb (Finalize): clean up the list of error messages on exit.
8031 Calling this subprogram multiple times will no longer show duplicate
8032 error messages on stderr.
8034 2011-08-03 Emmanuel Briot <briot@adacore.com>
8036 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8037 Getopt_Switches when we have already define a command line
8040 2011-08-03 Yannick Moy <moy@adacore.com>
8042 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8043 in ALFA. Instead, they are considered as assertions to prove.
8044 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8045 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8046 if they have no ELSE part, or if they occur in pre- and postconditions,
8047 where the Condition cannot have side-effects in ALFA
8048 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8049 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8050 Instead, include type conversion between scalar types in ALFA.
8051 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8052 if-and-only-if its type is in ALFA.
8054 2011-08-03 Thomas Quinot <quinot@adacore.com>
8056 * scos.adb, get_scos.adb, put_scos.adb
8057 New code letter for decisions: G (entry guard)
8059 (Traverse_Subprogram_Body): Rename to...
8060 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8061 (Traverse_Protected_Body): New subprogram
8062 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8063 protected bodies and entry bodies.
8065 2011-08-03 Yannick Moy <moy@adacore.com>
8067 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8068 entities with get/set subprograms, which is set on procedure entities
8069 generated by the compiler for a postcondition.
8070 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8071 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8072 entity for a declaration
8073 (Get_Unique_Entity_For_Decl): new function returning an entity which
8074 represents a declaration, so that matching spec and body have the same
8077 2011-08-03 Robert Dewar <dewar@adacore.com>
8079 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8080 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8082 2011-08-03 Yannick Moy <moy@adacore.com>
8084 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8085 library-level because retriction No_Implicit_Dynamic_Code in the
8086 front-end prevents its definition as a local subprogram
8087 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8088 for reuse in other contexts
8089 (Traverse_Declarations_Or_Statements,
8090 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8091 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8092 procedures take a callback parameter to be called on all declarations
8094 (Traverse_All_Compilation_Units): new generic function to traverse a
8095 compilation unit and call a callback parameter on all declarations
8097 2011-08-03 Javier Miranda <miranda@adacore.com>
8099 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8100 in Java since they are always enclosed in a namespace that
8101 differentiates them, and overloaded entities are supported by the VM.
8103 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8105 * checks.adb (Determine_Range): If a computed bound of an operation is
8106 outside the range of the base type of the expression, and overflow
8107 checks are enabled, the result is unknown and cannot be used for any
8108 subsequent constant folding.
8109 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8110 unknown, so is the result of the comparison.
8112 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8114 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8115 From_Abort. When finalization was triggered by an abort, propagate
8116 Standard'Abort_Signal rather than Program_Error.
8117 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8119 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8120 From_Abort. When finalization was triggered by an abort, propagate
8121 Standard'Abort_Signal rather than Program_Error.
8122 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8124 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8125 Abort_Id. Update the calls to Build_Object_Declarations and
8126 Build_Raise_Statement to include Abort_Id.
8127 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8128 calls to Build_Object_Declarations and Build_Raise_Statement to include
8130 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8131 calls to Build_Object_Declarations and Build_Raise_Statement to include
8133 (Build_Components): Create an entity for Abort_Id when exceptions are
8134 allowed on the target.
8135 (Build_Finalizer): New local variable Abort_Id.
8136 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8137 calls to Build_Object_Declarations and Build_Raise_Statement to include
8139 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8140 declaration of flag Abort_Id to preserve the original abort status
8141 before finalization code is executed.
8142 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8143 runtime routine Raise_From_Controlled_Operation.
8144 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8145 Abort_Id. Update the call to Build_Object_Declarations to include
8146 Abort_Id. Update the layout of the finalizer body.
8147 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8148 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8149 clunky code to create all flags and objects related to
8150 exception propagation and replace it with a call to
8151 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8153 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8154 Add new formal Abort_Id and associated comment on its use.
8155 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8157 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8158 Remove the clunky code to create all flags and objects related to
8159 exception propagation and replace it with a call to
8160 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8162 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8164 * s-tassta.adb: Fix minor typos.
8166 2011-08-03 Robert Dewar <dewar@adacore.com>
8168 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8169 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8171 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8173 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8174 to packages. This ensures that the finalizer body will not end up
8175 inside the freeze node.
8176 (Process_Declarations): Add code to detect whether a freeze node has a
8177 nested finalization collection.
8179 2011-08-03 Pascal Obry <obry@adacore.com>
8181 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8182 (Current_Session): Return a not null access to Session_Type.
8183 (Default_Session): Likewise.
8185 2011-08-03 Robert Dewar <dewar@adacore.com>
8187 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8188 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8190 2011-08-03 Pascal Obry <obry@adacore.com>
8192 * g-awk.ads: Minor comment fix.
8194 2011-08-03 Sergey Rybin <rybin@adacore.com>
8196 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8197 the tree structure related to discriminant constraints.
8198 Original_Discriminant cannot be used any more for computing the
8199 defining name for the reference to a discriminant.
8201 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8203 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8204 function is not visibly tagged, this is not a dispatching call and
8205 therfore is not Tag_Indeterminate, even if the function is marked as
8206 dispatching on result.
8208 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8210 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8211 (Expand_N_Free_Statement): Add a guard to protect against run-times
8212 which do not support controlled types.
8213 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8214 against run-times which do not support controlled types.
8215 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8216 against run-times which do not support controlled types.
8217 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8218 against run-times which do not support controlled types.
8219 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8220 protect against run-times which do not support controlled types.
8222 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8224 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8225 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8227 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8229 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8230 modified in the source, to prevent spurious warnings when compiling
8233 2011-08-03 Thomas Quinot <quinot@adacore.com>
8235 * a-except-2005.adb: Minor reformatting.
8237 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8239 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8240 is a renaming declaration in the private part of a package, do not emit
8241 a warning that the with_clause could be moved because the renaming may
8242 be used in the body or in a child unit.
8244 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8246 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8247 Propagate the Comes_From_Source attribute from the original return
8248 object to the renaming.
8250 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8252 * exp_ch7.adb (Build_Raise_Statement): Do not call
8253 Raise_From_Controlled_Operation when this routine is not present in
8254 the run-time library.
8255 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8256 libraries (Ravenscar), tasks are non-terminating, and protected objects
8257 and tasks can only appear at library level, so we do not want
8258 finalization of protected objects nor tasks.
8259 * exp_intr.adb: Minor clarification in comment.
8260 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8261 Gen_Output_File_C): Remove references to finalization of library-level
8262 objects when using restricted run-time libraries.
8264 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8266 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8267 Original_Discriminant only if the parent type is a generic formal.
8269 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8271 * exp_ch13.adb: Add with and use clause for Targparm;
8272 (Expand_N_Free_Statement): Prevent the generation of a custom
8273 Deallocate on .NET/JVM targets since this requires pools and address
8275 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8276 .NET/JVM targets, attach the newly allocated object to the access
8277 type's finalization collection. Do not generate a call to
8278 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8279 exist in the runtime.
8280 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8281 create a custom Allocate for object that do not require initialization.
8282 Attach a newly allocated object to the access type's finalization
8283 collection on .NET/JVM.
8284 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8285 assignment of controlled types on .NET/JVM. The two hidden pointers
8286 Prev and Next and stored and later restored after the assignment takes
8288 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8289 kludge for .NET/JVM to recognize a particular piece of code coming from
8290 Heap_Management and change the call to Finalize into Deep_Finalize.
8291 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8292 finalization collections on .NET/JVM only for types derived from
8293 Controlled. Separate the association of storage pools with a collection
8294 and only allow it on non-.NET/JVM targets.
8295 (Make_Attach_Call): New routine.
8296 (Make_Detach_Call): New routine.
8297 (Process_Object_Declarations): Suppress the generation of
8298 build-in-place return object clean up code on .NET/JVM since it uses
8300 * exp_ch7.ads (Make_Attach_Call): New routine.
8301 (Make_Detach_Call): New routine.
8302 * exp_intr.adb Add with and use clause for Targparm.
8303 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8304 on .NET/JVM targets.
8305 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8306 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8307 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8308 names used in finalization.
8310 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8312 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8313 (Attach, Detach): Lock the current task when chaining an object onto a
8316 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8318 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8319 Rewritten to create the message strings when the exception is not
8320 raised by an abort during finalization.
8321 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8322 Raise_From_Controlled_Operation and update its associated comment.
8323 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8324 Ada.Finalization.Heap_Management provides key functionality
8325 associated with controlled objects on the heap, their creation,
8326 finalization and reclamation. Type Finalization_Collection is
8327 effectively a wrapper which sits ontop of a storage pool and performs
8328 all necessary bookkeeping for all the objects it contains. Each
8329 access-to-controlled or access-to-class-wide type receives a collection
8330 as part of its expansion. The compiler generates buffer code and
8331 invokes Allocate / Deallocate to create and destroy allocated
8333 * a-finali.adb ("="): Removed.
8334 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8335 fields Prev and Next.
8336 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8337 A library unit with at least one controlled object on the library level
8338 has a special finalizer which is invoked by the binder. To signal this,
8339 ali files carry field PF.
8340 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8341 associated comment on field usage.
8342 * a-tags.adb (Get_RC_Offset): Removed.
8343 (Needs_Finalization): New routine.
8344 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8345 Dispatch tables now carry field Needs_Finalization which provides
8346 runtime indication whether a type is controlled or has controlled
8347 components or both. Remove field RC_Offset.
8348 (Get_RC_Offset): Removed along with its associated pragma Export.
8349 Since tagged types with controlled components no longer carry hidden
8350 field _controller, the special mechanism to retrieve its location is no
8352 (Needs_Finalization): New routine.
8353 * atree.ads, atree.adb (Elist24): New routine.
8354 (Set_Elist24): New routine.
8355 * atree.h: Add a define clause for Elist24.
8356 * bindgen.adb New library-level variable Lib_Final_Built.
8357 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8358 presence of a VM target, the routine generates calls to the proper
8359 library finalization routine.
8360 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8361 targets. Set the correct library finalization routine depending on
8362 whether the library has controlled objects or this is a VM compilation.
8363 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8364 to library-level finalizers of compiled units in reverse order of
8365 elaboration. It also produces exception management code and reraises a
8366 potential exception after all units have been finalized.
8367 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8368 library-level finalizers of compiled units in reverse order of
8370 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8371 definitions of all library-level finalizers available to the compilation
8372 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8374 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8375 System.Standard_Library.Adafinal directly. If the library needs
8376 finalization actions, create the sequence of finalization calls.
8377 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8378 Generate a with clause for System.Soft_Links when compiling for a VM.
8379 Remove the code which imports System.Standard_Library.Adafinal as
8380 Do_Finalize. Generate the library finalization routine.
8381 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8382 If the library needs finalization actions, create all the definitions
8383 of library- level finalizers.
8384 (Has_Finalizer): New routine. Determines whether at least one compiled
8385 unit has a library-level finalizer.
8386 Add type Qualification_Mode.
8387 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8388 * einfo.adb: New usage of field 15 as Return_Flag.
8389 Remove Finalization_Chain_Entity from the usages of field 19.
8390 Remove Associated_Final_Chain from the usages of field 23.
8391 New usage of field 23 as Associated_Collection.
8392 New usage of field 24 as Finalizer.
8393 New usage of flag 252 as Is_Processed_Transient.
8394 (Associated_Final_Chain): Removed.
8395 (Associated_Collection): New routine.
8396 (Finalization_Chain_Entity): Removed.
8397 (Finalizer): New routine.
8398 (Is_Finalizer): New routine.
8399 (Is_Processed_Transient): New routine.
8400 (Return_Flag): New routine.
8401 (Set_Associated_Final_Chain): Removed.
8402 (Set_Associated_Collection): New routine.
8403 (Set_Finalization_Chain_Entity): Removed.
8404 (Set_Finalizer): New routine.
8405 (Set_Is_Processed_Transient): New routine.
8406 (Set_Return_Flag): New routine.
8407 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8409 (Write_Field8_Name): Alphabetize the output.
8410 (Write_Field11_Name): Alphabetize the output.
8411 (Write_Field12_Name): Alphabetize the output.
8412 (Write_Field13_Name): Alphabetize the output.
8413 (Write_Field14_Name): Alphabetize the output.
8414 (Write_Field15_Name): Alphabetize the output.
8415 (Write_Field16_Name): Alphabetize the output.
8416 (Write_Field17_Name): Alphabetize the output.
8417 (Write_Field18_Name): Alphabetize the output.
8418 (Write_Field19_Name): Alphabetize the output. Remove the output of
8419 Finalization_Chain_Entity.
8420 (Write_Field20_Name): Alphabetize the output.
8421 (Write_Field21_Name): Alphabetize the output.
8422 (Write_Field22_Name): Alphabetize the output.
8423 (Write_Field23_Name): Alphabetize the output. Remove the output of
8424 Associated_Final_Chain. Add output for Associated_Collection.
8425 (Write_Field24_Name): Alphabetize the output.
8426 (Write_Field25_Name): Add output for Finalizer.
8427 (Write_Field26_Name): Alphabetize the output.
8428 (Write_Field27_Name): Alphabetize the output.
8429 (Write_Field28_Name): Alphabetize the output.
8430 * einfo.ads: Add new field description for Associated_Collection and
8432 Remove Associated_Final_Chain and its uses in nodes.
8433 Remove Finalization_Chain_Entity and its uses in nodes.
8434 Add new field description for Finalizer and its uses in nodes.
8435 Add new synthesized attribute Is_Finalizer.
8436 Add new flag description for Is_Processed_Transient and its uses in
8438 Add new field description for Return_Flag and its uses in nodes.
8439 (Associated_Final_Chain): Removed along with its pragma Inline.
8440 (Associated_Collection): New routine and pragma Inline.
8441 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8442 (Finalizer): New routine and pragma Inline.
8443 (Is_Finalizer): New routine and pragma Inline.
8444 (Is_Processed_Transient): New routine and pragma Inline.
8445 (Return_Flag): New routine and pragma Inline.
8446 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8447 (Set_Associated_Collection): New routine and pragma Inline.
8448 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8449 (Set_Finalizer): New routine and pragma Inline.
8450 (Set_Is_Processed_Transient): New routine and pragma Inline.
8451 (Set_Return_Flag): New routine and pragma Inline.
8452 * exp_aggr.adb: Alphabetize subprograms.
8453 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8454 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8455 associated comments. Remove local variables External_Final_List and
8457 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8458 Ancestor. Remove the retrieval of finalization lists. Update the call to
8460 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8461 lists. Update the call to Late_Expansion.
8462 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8463 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8464 (Gen_Assign): Remove the retrieval of the finalization list used to
8465 build the assignment. Update the calls to Make_Init_Call and
8467 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8468 Remove the mechanism to determine attachment levels and finalization
8469 list retrieval. Remove the processing for coextensions.
8470 (Init_Controller): Removed. Controllers no longer exist.
8471 (Late_Expansion): Remove formals Flist and Obj along with their
8472 associated comments. Update the calls to Build_Record_Aggr_Code and
8473 Build_Array_Aggr_Code.
8474 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8475 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8476 appear in entry bodies, protected subprograms and task bodies.
8477 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8478 * exp_ch3.adb (Add_Final_Chain): Removed.
8479 (Build_Array_Init_Proc): Alphabetize local variables.
8480 (Build_Assignment): Alphabetize local variables. Update the call to
8482 (Build_Class_Wide_Master): Rename local variables to better reflect
8484 (Build_Discriminant_Assignments): Code reformatting.
8485 (Build_Init_Call_Thru): Code reformatting.
8486 (Build_Init_Procedure): Code reformatting. Generate a special version
8487 of Deep_Finalize which is capable of finalizing all initialized
8488 components and ignore the rest.
8489 (Build_Init_Statements): Rename local variables to better reflect their
8491 Reimplement the mechanism to include the creation and update of an index
8492 variable called a "counter". It is used as a bookmark for tracing
8493 initialized and non-initialized components.
8494 (Build_Initialization_Call): Remove local variable Controller_Typ.
8495 Alphabetize all local variables. Remove the initialization of the
8496 record controller and update the call to Make_Init_Call.
8497 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8498 New local variable Counter.
8499 (Constrain_Array): Alphabetize.
8500 (Expand_Freeze_Array_Type): Create a collection instead of a
8502 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8503 Finalize_Address which is used in conjunction with allocated controlled
8505 (Expand_N_Object_Declaration): Remove the creation of a finalization
8506 list for anonymous access types. Update the calls to Make_Init_Call and
8508 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8509 retrieval of finalization lists. Remove the expansion of the record
8510 controller. Create TSS primitive Finalize_Address used in conjunction
8511 with controlled objects on the heap. Create finalization collections
8512 for access-to-controlled record components.
8513 (Expand_Record_Controller): Removed.
8514 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8515 class-wide types now requires additional processing. Create
8516 finalization collections for access-to-controlled types.
8517 (Increment_Counter): New routine.
8518 (Make_Counter): New routine.
8519 (Make_Eq_If): Remove the mention of Name_uController.
8520 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8521 types coming from System.Finalization_Root.
8522 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8523 (Predefined_Primitive_Bodies): There is no longer need to skip types
8524 coming from System.Finalization_Root.
8525 (Stream_Operation_OK): Do not generate stream routines for
8526 type Ada.Finalization.Heap_Management.Finalization_Collection.
8527 * exp_ch3.ads: Alphabetize subprograms.
8528 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8529 Add with and use clause for Lib.
8530 (Complete_Coextension_Finalization): Removed.
8531 (Complete_Controlled_Allocation): New routine. Create a finalization
8532 collection for anonymous access-to-controlled types. Create a custom
8533 Allocate which interfaces with the back end and the machinery in
8535 (Expand_Allocator_Expression): Add necessary calls to
8536 Complete_Controlled_Allocation. Remove the retrieval of finalization
8537 lists. Update the calls to Make_Adjust_Call. Generate a call to
8538 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8539 the associated collection.
8540 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8541 Code clean up. Remove the retrieval of finalization lists and
8543 Update the call to Make_Init_Call. Generate a call to
8544 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8545 the associated collection.
8546 (Get_Allocator_Final_List): Removed. Finalization lists are not
8548 (Suitable_Element): Remove the mention of Name_uController.
8549 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8550 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8551 the left hand side, carry out the assignment and adjust the left hand
8553 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8554 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8555 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8556 BIP_Collection and BIPcollection.
8557 (Build_Heap_Allocator): New routine used to allocate the return object
8558 of a build-in-place function onto a collection.
8559 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8560 (Expand_Call): Do not replace direct calls to Deep routines with their
8562 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8563 and update their occurrences. Add a special return flag to monitor the
8564 [ab]normal execution of the function. The flag is set right before the
8566 Rewrite the mechanism used to allocate a build-in-place return object
8567 on the heap or on a storage pool.
8568 (Is_Direct_Deep_Call): New routine.
8569 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8570 build-in-place function call instead of a final list. Build a call to
8571 Set_Finalize_Address_Ptr to decorate the associated collection.
8572 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8573 order to name the build-in-place function call's result for later
8574 finalization. Add a collection to a build-in-place function call
8575 instead of a final list.
8576 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8577 build-in-place function call instead of a final list. Remove the code
8578 which moves one final list and transforms it into the actual in a
8579 nested build-in-place call.
8580 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8581 build-in-place function call instead of a final list.
8582 (Move_Final_List): Removed.
8583 (Needs_BIP_Collection): New routine.
8584 (Needs_BIP_Final_List): Removed.
8585 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8586 enumeration type BIP_Formal_Kind.
8587 Update the related comment.
8588 (Needs_BIP_Collection): New routine.
8589 (Needs_BIP_Final_List): Removed.
8590 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8591 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8592 majority of subprograms in this unit. Add Name_Finalize_Address to
8593 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8594 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8595 statements for an array type.
8596 (Build_Adjust_Statements): Create the adjust statements for a record
8598 (Build_Cleanup_Statements): New routine. A procedure which given any
8599 construct containing asynchronous calls, references to _master, or is a
8600 task body, a task allocation or a protected body produces the necessary
8601 runtime calls to clean up these constructs.
8602 (Build_Exception_Handler): New routine.
8603 (Build_Final_List): Removed.
8604 (Build_Finalization_Collection): New routine. A core procedure which
8605 creates a collection to service heap allocated controlled objects
8606 associated with an access-to-controlled type.
8607 (Build_Finalize_Statements): Create the finalization statements for a
8609 (Build_Finalizer): New routine. A core procedure which given any
8610 construct with declarations and/or statements detects all objects which
8611 need any type of clean up (controlled objects, protected objects) and
8612 generates all necessary code to clean up the said objects in the proper
8614 (Build_Finalizer_Call): New routine.
8615 (Build_Initialize_Statements): Create the initialization statements for
8616 an array type. The generated routine contains code to finalize partially
8618 (Build_Object_Declarations): New routine.
8619 (Build_Raise_Statement): New routine.
8620 (Clean_Simple_Protected_Objects): Removed.
8621 (Controller_Component): Removed.
8622 (Enclosing_Function): New routine.
8623 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8624 either declarations or statements or both.
8625 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8626 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8628 (Find_Final_List): Removed.
8629 (Global_Flist_Ref): Removed.
8630 (In_Finalization_Root): Removed.
8631 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8632 scope in terms of tree nodes. Process all transient variables within
8634 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8635 generated after the adjust.
8636 (Make_Attach_Call): Removed.
8637 (Make_Call): New routine.
8638 (Make_Clean): Removed.
8639 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8641 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8643 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8645 (Make_Final_Call): Modified to simply create a call to either
8646 Deep_Finalize or Finalize.
8647 (Make_Finalize_Address_Body): New routine.
8648 (Make_Finalize_Address_Stmts): New routine. A function which produces
8649 TSS primitive Finalize_Address used in conjunction with heap allocated
8651 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8652 (Make_Init_Call): Rewritten. There is no longer an attach call
8653 generated after initialization.
8654 (Make_Local_Deep_Finalize): New routine.
8655 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8656 (Make_Transient_Block): Remove the finalization list retrieval and
8658 (Needs_Finalization): Moved to Exp_Util.
8659 (Parent_Field_Type): New routine.
8660 (Preprocess_Components): New routine.
8661 (Process_Transient_Objects): New routine.
8662 (Wrap_HSS_In_Block): New routine.
8663 (Wrap_Transient_Declaration): Remove finalization list management and
8664 controller insertion.
8665 (Wrap_Transient_Expression): Code reformatting.
8666 (Wrap_Transient_Statement): Code reformatting.
8667 * exp_ch7.ads (Build_Final_List): Removed.
8668 (Build_Finalization_Collection): New routine.
8669 (Build_Raise_Statement): New routine.
8670 (Controller_Component): Removed.
8671 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8672 (Find_Final_List): Removed.
8673 (In_Finalization_Root): Removed.
8674 (Is_Simple_Protected_Type): Update related comment.
8675 (Make_Adjust_Call): New parameter profile and associated comments.
8676 (Make_Attach_Call): Removed.
8677 (Make_Final_Call): New parameter profile and associated comments.
8678 (Make_Finalize_Address_Body): New routine.
8679 (Make_Init_Call): New parameter profile and associated comments.
8680 (Make_Local_Deep_Finalize): New routine.
8681 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8682 (Needs_Finalization): Moved to Exp_Util.
8683 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8684 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8685 (Find_Protection_Type): Moved to Exp_Util.
8686 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8687 (Make_DT): Update sequence of dispatch table initialization. Remove the
8688 initialization of field RC_Offset. Add initialization of field Needs_
8690 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8691 Reimplement how an object is first finalized, then deallocated.
8692 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8694 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8695 Register TSS_Finalize_Address with type TSS_Names.
8696 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8697 procedure provides the interface between an allocation / deallocation
8698 and the support machinery in Ada.Finalization.Heap_Management.
8699 (Find_Init_Call): Code reformatting.
8700 (Find_Init_Call_In_List): Code reformatting.
8701 (Find_Protection_Type): Moved from Exp_Ch9.
8702 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8703 (Has_Controlled_Coextensions): Removed.
8704 (Has_Controlled_Objects): New routine.
8705 (In_Library_Level_Package_Body): New routine.
8706 (Insert_Action_After): New routine.
8707 (Is_Finalizable_Transient): New routine. This predicate determines
8708 whether an object declaration is one of the many variants of controlled
8710 (Is_Null_Access_BIP_Func_Call): New routine.
8711 (Is_Non_BIP_Func_Call): New routine.
8712 (Is_Related_To_Func_Return): New routine.
8713 (Needs_Finalization): Moved from Exp_Ch7.
8714 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8715 (Find_Protection_Type): Moved from Exp_Ch9.
8716 (Has_Controlled_Coextensions): Removed.
8717 (Has_Controlled_Objects): New routine.
8718 (In_Library_Level_Package_Body): New routine.
8719 (Insert_Action_After): New routine.
8720 (Is_Finalizable_Transient): New routine.
8721 (Is_Null_Access_BIP_Func_Call): New routine.
8722 (Is_Non_BIP_Func_Call): New routine.
8723 (Is_Related_To_Func_Return): New routine.
8724 (Needs_Finalization): Moved from Exp_ch7.
8725 * expander.adb (Expand): Add a case for N_Free_Statement.
8726 * freeze.adb (Freeze_All): Replace the generation of a finalization
8727 list with a collection for access-to-controlled types.
8728 (Freeze_Entity): Code reformatting.
8729 (Freeze_Record_Type): Remove the freezing of a record controller
8731 (Freeze_Subprogram): Code reformatting.
8732 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8734 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8735 has a library-level finalizer.
8736 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8737 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8738 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8739 files. Add a-fihema to the list of object files.
8741 Alphabetize the associations in type Is_Parameterless_Attribute.
8742 * rtsfind.ads: Ada.Finalization_List.Controller and
8743 System.Finalization_Implementation are no longer a GNAT unit.
8744 Update the range of type Ada_Finalization_Child. Remove the following
8745 recoverable entities:
8747 RE_Attach_To_Final_List
8751 RE_Finalizable_Ptr_Ptr
8752 RE_Global_Final_List
8753 RE_Limited_Record_Controller
8756 RE_Record_Controller
8757 RE_Simple_List_Controller
8759 Add the following recoverable entities:
8761 RE_Add_Offset_To_Address
8765 RE_Exception_Identity
8766 RE_Finalization_Collection
8767 RE_Finalization_Collection_Ptr
8768 RE_Needs_Finalization
8769 RE_Save_Library_Occurrence
8770 RE_Set_Finalize_Address_Ptr
8771 RE_Set_Storage_Pool_Ptr
8773 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8775 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8776 (First_Stored_Discriminant): Remove the mention of Name_uController.
8777 * sem_aux.ads: Comment reformatting.
8778 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8779 to redecorate an already existing class-wide type.
8780 (Decorate_Tagged_Type): New parameter profile and associated comment.
8781 Create a "shadow class-wide type" for a shadow entity.
8782 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8783 of the final chain along with the associated comment.
8784 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8785 Full_Desig and set it to the full view of the designated type.
8786 Initialize the finalization collection to empty.
8787 (Build_Derived_Record_Type): Alphabetize local variables. Code
8789 (Collect_Fixed_Components): Remove the mention of Name_uController.
8790 (Create_Constrained_Components): Remove the mention of Name_uController.
8791 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8792 class-wide type of a shadow entity.
8793 (Process_Full_View): Update the machinery which marks type
8794 Limited_Controlled's entity as limited.
8795 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8796 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8797 list, instead make a collection build-in-place formal.
8798 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8799 a designated type in order to establish a match between the renaming
8800 and the renamed entity.
8801 (Find_Selected_Component): Add guard to prevent spurious exceptions
8802 from being raised on .NET/JVM.
8803 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8804 to the list of primitive that need special processing. Update arrays
8805 C_Names and D_Names.
8806 (Replace_Types): Handle class-wide types.
8807 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8808 different parameter profile, look at the first formal.
8809 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8810 use clauses for Exp_Util.
8811 * sem_res.adb: Remove with and use clauses for Elists.
8812 (Propagate_Coextensions): Removed.
8813 (Resolve_Allocator): Do not propagate the list of coextensions from one
8814 allocator to another.
8815 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8816 Deaccessed_T to Desig_Typ.
8817 (Enter_Name): Remove the mention of Name_uController.
8818 (Gather_Components): Remove the mention of Name_uController.
8819 (Incomplete_Or_Private_View): New routine.
8820 (Is_Coextension_Root): Removed.
8821 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8822 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8823 (Is_Coextension_Root): Removed.
8824 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8825 Controlled types are now derived from a null tagged record. Remove
8826 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8827 * sinfo.adb (Coextensions): Removed.
8828 (Set_Coextensions): Removed.
8829 * sinfo.ads: Remove Coextensions from the explanation of node fields
8830 and its uses in nodes.
8831 Update the field usage of N_Allocator.
8832 (Coextensions): Removed along with its pragma Inline.
8833 (Set_Coextensions): Removed along with its pragma Inline.
8834 * snames.ads-tmpl: Remove names
8839 Name_uLocal_Final_List
8840 Name_Finalization_Root
8847 Name_Finalize_Address
8848 * s-pooglo.adb (Allocate): Add overriding indicator.
8849 (Deallocate): Add overriding indicator.
8850 (Storage_Size): Add overriding indicator.
8851 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8852 than Finalize_Global_List.
8853 (Null_Finalize_Global_List): Removed.
8854 (Save_Library_Occurrence): New routine.
8855 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8856 initialization. Add variable Finalize_Library_Objects along with its
8857 pragma Export. Add variables Library_Exception and
8858 Library_Exception_Set along with their pragma Export.
8859 (Null_Finalize_Global_List): Removed.
8860 (Save_Library_Occurrence): New routine.
8861 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8862 rather than Finalize_Global_List.
8863 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8864 of the constructed node.
8866 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8868 * link.c: Include "auto-host.h" before system headers.
8870 2011-08-03 Vincent Celier <celier@adacore.com>
8872 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8873 that are not extended. Do not check if a library project that is
8874 extended should be regenerated. Do not add to table Library_Paths the
8875 libraries that are in extended projects. Link only with libraries that
8876 are in libray projects that are not extended.
8877 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8878 for a library project that is extended.
8880 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8882 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8883 conforming subprogram renamings that appear to be completions if they
8884 are not fully conformant.
8885 Such renamings are homographs but not completions.
8886 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8887 names in a subprogram renaming that appears in an instance.
8889 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8891 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8892 not immutably limited, build actual subtype from expression to provide
8893 proper bounds to caller.
8895 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8897 * sem_ch8.adb: Minor comment correction.
8899 2011-08-03 Thomas Quinot <quinot@adacore.com>
8901 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8902 returning a limited array, use an extended return statement.
8904 2011-08-03 Vincent Celier <celier@adacore.com>
8906 * make.adb (Initialize): If --subdirs= is used, but no project file is
8907 specified, attempt to create the specify subdir if it does not already
8908 exist and use it as the object directory as if -D had been specified.
8910 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8912 * s-tpopsp-vms.adb: New file.
8913 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8914 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8916 2011-08-03 Emmanuel Briot <briot@adacore.com>
8918 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8921 2011-08-03 Yannick Moy <moy@adacore.com>
8923 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8924 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8925 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8926 detect that an array has static bounds.
8928 2011-08-03 Thomas Quinot <quinot@adacore.com>
8930 * exp_dist.adb: Minor reformatting.
8932 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8934 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8935 (ATCB_Key): Removed, not always used.
8937 2011-08-03 Emmanuel Briot <briot@adacore.com>
8939 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8940 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8941 most remaining global variables.
8943 2011-08-03 Robert Dewar <dewar@adacore.com>
8945 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8946 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8949 2011-08-03 Javier Miranda <miranda@adacore.com>
8951 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8952 that must be passed by copy in VM targets.
8954 2011-08-03 Emmanuel Briot <briot@adacore.com>
8956 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8957 duplicates a similar htable now in the project tree.
8959 2011-08-03 Claire Dross <dross@adacore.com>
8961 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8962 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8963 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8964 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8965 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8966 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8967 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8970 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8972 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8973 (ATCB_Key): Removed, not always used.
8974 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8976 * s-tpopsp-tls.adb: New file.
8977 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8978 x86/x64/ia64/powerpc/sparc Linux.
8980 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8982 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8983 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8985 2011-08-03 Thomas Quinot <quinot@adacore.com>
8987 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8988 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8989 Fix type selection for mapping integer types to PolyORB types.
8991 2011-08-03 Bob Duff <duff@adacore.com>
8993 * sem_ch7.adb: Minor comment clarification.
8995 2011-08-03 Bob Duff <duff@adacore.com>
8997 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8998 an error analyzing a choice, skip further processing. Further
8999 processing could cause a crash or cascade errors.
9001 2011-08-03 Emmanuel Briot <briot@adacore.com>
9003 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9004 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9005 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9006 prj-env.ads (Shared_Project_Tree_Data): new type
9007 An aggregate project and its aggregated trees need to share the common
9008 data structures used for lists of strings, packages,... This makes the
9009 code simpler since otherwise we have to pass the root tree (also used
9010 for the configuration file data) in addition to the current project
9011 tree. This also avoids ambiguities as to which tree should be used.
9012 And finally this saves a bit of memory.
9013 (For_Every_Project_Imported): new parameter Tree.
9014 Since aggregated projects are using a different tree, we need to let
9015 the caller know which tree to use to manipulate the returned project.
9017 2011-08-03 Robert Dewar <dewar@adacore.com>
9019 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9020 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9021 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9022 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9024 2011-08-03 Javier Miranda <miranda@adacore.com>
9026 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9027 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9029 2011-08-03 Bob Duff <duff@adacore.com>
9031 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9034 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9036 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9037 g-sehash.ads: Fix typo. Update header.
9039 2011-08-03 Thomas Quinot <quinot@adacore.com>
9041 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9044 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9046 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9047 prefixes of private types along with records, since the selector may be
9049 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9050 private types along with records, since the selector may be a
9053 2011-08-03 Emmanuel Briot <briot@adacore.com>
9055 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9057 2011-08-03 Javier Miranda <miranda@adacore.com>
9059 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9060 Tagged_Type_Expansion.
9062 2011-08-03 Yannick Moy <moy@adacore.com>
9064 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9065 violation when the argument of concatenation is the name of a
9068 2011-08-03 Emmanuel Briot <briot@adacore.com>
9070 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9071 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9072 (Process_Declarative_Items): new parameter Child_Env.
9074 2011-08-03 Yannick Moy <moy@adacore.com>
9076 * alfa.ads: Update format of ALFA section in ALI file in order to
9077 add a mapping from bodies to specs when both are present.
9078 (ALFA_Scope_Record): Add components for spec file/scope.
9079 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9081 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9082 collected, fill in the spec information when relevant.
9083 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9086 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9088 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9089 code unit to decide whether to add internally generated subprograms.
9091 2011-08-03 Javier Miranda <miranda@adacore.com>
9093 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9094 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9095 be handled by copy in VM targets.
9097 2011-08-03 Emmanuel Briot <briot@adacore.com>
9099 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9100 code with Makeutl.Get_Switches.
9101 * prj-tree.adb: Update comment.
9103 2011-08-03 Thomas Quinot <quinot@adacore.com>
9105 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9106 subprogram with a limited formal that does not support external
9109 2011-08-03 Yannick Moy <moy@adacore.com>
9111 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9113 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9114 not from current unit in two phases, because it is not possible to
9115 change the table while iterating over its content.
9116 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9118 2011-08-03 Sergey Rybin <rybin@adacore.com>
9120 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9121 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9123 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9125 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9126 and the component type is composite, this is ambiguous for predefined
9127 concatenation, but if the node is not overloaded and the entity is a use
9128 -defined function its profile can be used to resolve that aggregate.
9130 2011-08-03 Robert Dewar <dewar@adacore.com>
9132 * exp_ch4.adb: Minor code cleanup.
9134 2011-08-03 Thomas Quinot <quinot@adacore.com>
9136 * exp_dist.adb: Do not generate distribution stubs if serious errors
9137 have been diagnosed.
9139 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9141 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9142 the first formal of a primitive operation, go to the base type to
9143 handle properly an access to a derived type with constrained
9145 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9146 user-defined function that is only use-visible.
9148 2011-08-03 Robert Dewar <dewar@adacore.com>
9150 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9151 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9152 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9153 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9154 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9155 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9156 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9157 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9159 2011-08-03 Robert Dewar <dewar@adacore.com>
9161 * repinfo.adb (List_Mechanism): Add handling of
9162 Convention_Ada_Pass_By_XXX.
9163 * sem_mech.adb (Set_Mechanism): Ditto.
9164 * sem_prag.adb (Process_Convention): Add entries for
9165 Convention_Ada_Pass_By_XXX.
9166 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9168 2011-08-03 Pascal Obry <obry@adacore.com>
9170 * makeutl.adb: Minor reformatting.
9172 2011-08-03 Vincent Celier <celier@adacore.com>
9175 (Get_File_Name) If the file cannot be found when there are no config
9176 pragmas file and May_Fail is True, return No_File instead of the file
9177 name, to be consistent.
9179 2011-08-03 Pascal Obry <obry@adacore.com>
9181 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9184 2011-08-03 Javier Miranda <miranda@adacore.com>
9187 (Same_Representation): In VM targets the representation of arrays with
9188 aliased components differs from arrays with non-aliased components.
9190 2011-08-03 Emmanuel Briot <briot@adacore.com>
9192 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9193 not systematically lower case attribute indexes that contain no "."
9194 Fix definition of several Naming attributes, which take
9195 a unit name as index and therefore should be case insensitive.
9196 Minor refactoring (reduce length of variable names).
9198 2011-08-03 Emmanuel Briot <briot@adacore.com>
9200 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9202 2011-08-03 Emmanuel Briot <briot@adacore.com>
9204 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9205 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9206 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9207 prj-tree.ads (Prj.Tree.Environment): new type.
9209 2011-08-03 Emmanuel Briot <briot@adacore.com>
9211 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9212 prj-tree.adb, prj-tree.ads (Environment): new type.
9214 2011-08-03 Emmanuel Briot <briot@adacore.com>
9216 * prj-tree.ads: Remove unused variable.
9218 2011-08-03 Yannick Moy <moy@adacore.com>
9220 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9221 issuing messages related to SPARK restriction violation.
9223 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9225 * sem_ch6.adb: guard against error nodes in return statements.
9227 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9229 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9230 a warning can only appear on a configuration file, so emit warning
9231 without further checks.
9233 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9235 * s-interr.ads: add overriding keyword.
9237 2011-08-03 Geert Bosch <bosch@adacore.com>
9239 * exp_attr.adb: Fix minor typo.
9241 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9243 * par-ch4.adb: improve error recovery.
9245 2011-08-03 Emmanuel Briot <briot@adacore.com>
9247 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9248 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9251 2011-08-03 Emmanuel Briot <briot@adacore.com>
9253 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9254 "external" as an attribute name in aggregate projects.
9256 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9258 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9259 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9260 from 0, so we need to adjust.
9262 2011-08-03 Emmanuel Briot <briot@adacore.com>
9264 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9265 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9267 2011-08-03 Yannick Moy <moy@adacore.com>
9269 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9270 restriction on overloaded entity if the entity is not an operator.
9272 2011-08-03 Yannick Moy <moy@adacore.com>
9274 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9275 restrict.ads: Rename remaining Check_Formal_Restriction* into
9276 Check_SPARK_Restriction*.
9278 2011-08-03 Emmanuel Briot <briot@adacore.com>
9280 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9281 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9283 (Project_Empty): removed
9284 (Empty_Project): new parameter Qualifier
9285 This is used to have fields specific to aggregate projects, cleaner
9286 New field to store the list of aggregated projects.
9287 (Check_Aggregate_Project): removed
9288 (Process_Aggregated_Projects, Free): new subprograms.
9290 2011-08-03 Olivier Hainque <hainque@adacore.com>
9292 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9294 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9296 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9297 explicit dereference of an unconstrained type, create a constrained
9298 subtype for it, as is done for function calls that return an
9301 2011-08-03 Thomas Quinot <quinot@adacore.com>
9303 * g-pehage.adb (Finalize): Avoid possible double-free.
9305 2011-08-03 Steve Baird <baird@adacore.com>
9307 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9308 Elab_Spec/Body attrs in CodePeer_Mode.
9310 2011-08-03 Javier Miranda <miranda@adacore.com>
9312 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9313 low bound is not known at compile time but they have no others choice.
9314 Done because in this case the bounds can be obtained directly from the
9317 2011-08-03 Ed Falis <falis@adacore.com>
9319 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9320 on VxWorks SMP. Remove unusable constant ANY_CPU.
9322 2011-08-03 Emmanuel Briot <briot@adacore.com>
9324 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9325 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9326 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9327 Prj.Env.Initialize_Empty): new subprograms
9328 (Get_Env, Find_Project): remove parameter Target_Name.
9330 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9332 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9333 as a condition for the delayed call to Derived_Subprograms done for the
9334 case of the rewriting of a derived type that constrains the
9335 discriminants of its parent type.
9336 Avoids redundant subprogram derivations for private subtype derivations.
9338 2011-08-03 Javier Miranda <miranda@adacore.com>
9340 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9341 Build_Record_Aggr_Code.
9342 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9343 discriminants in extension aggregates.
9345 2011-08-03 Emmanuel Briot <briot@adacore.com>
9347 * prj-pp.adb (Print): also output project qualifiers, since in
9348 particular "aggregate" is mandatory in an aggregate project.
9350 2011-08-03 Emmanuel Briot <briot@adacore.com>
9352 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9353 (Debug_Output): new function.
9355 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9357 * gnat_ugn.texi: Document -Wstack-usage.
9358 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9360 2011-08-03 Thomas Quinot <quinot@adacore.com>
9362 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9363 have keyword LIMITED.
9365 2011-08-03 Yannick Moy <moy@adacore.com>
9367 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9368 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9369 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9370 section (does not happen in compiler, only if code directly calls
9372 * get_alfa.adb, get_alfa.ads: New files.
9373 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9375 * lib-xref-alfa.adb: New file.
9376 * lib-xref.adb, lib-xref.ads
9377 (Xref_Entry): redefine information needed in cross-references for ALFA.
9378 Push ALFA treatments in separated local package.
9379 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9380 identifiers. Return entity of package body instead of spec. Return
9381 Empty for a scope with no location.
9382 (Generate_Reference): adapt to new components for ALFA information.
9383 Remove the need for D references on definitions.
9384 (Is_Local_Reference): moved to ALFA local package
9385 (Output_References): extract subfunction as Extract_Source_Name
9386 (Output_Local_References): remove procedure, replaced by filtering of
9387 cross-references in package ALFA and printing in Put_ALFA.
9388 (Write_Entity_Name): remove procedure
9389 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9390 print exact name of entity as it appears in source file
9391 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9392 * put_alfa.adb, put_alfa.ads: New files.
9393 * xref_lib.adb (Search_Xref): protect read of cross-references against
9394 reading other sections of the ALI file, in gnatxref
9395 (Search): protect read of cross-references against reading other
9396 sections of the ALI file, in gnatfind.
9397 * gcc-interface/Make-lang.in: Update dependencies.
9399 2011-08-03 Thomas Quinot <quinot@adacore.com>
9401 * sem_ch3.adb: Minor reformatting.
9403 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9405 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9406 raising an exception.
9408 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9410 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9411 type, always use 1 as the lower bound or string, even if lower bound of
9412 context is not static, to handle properly null strings in a non-static
9415 2011-08-03 Bob Duff <duff@adacore.com>
9417 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9418 always legal on the right-hand side of an assignment statement; there
9419 is always an applicable index constraint in this case. Therefore, the
9420 check for Pkind = N_Assignment_Statement is now unconditional -- it
9421 doesn't depend on whether Is_Constrained (Typ).
9423 2011-08-03 Robert Dewar <dewar@adacore.com>
9425 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9427 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9429 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9430 for an itype created within a generic unit.
9432 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9434 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9435 suppresses all inlining.
9437 2011-08-03 Robert Dewar <dewar@adacore.com>
9439 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9440 exp_aggr.adb: Minor reformatting.
9442 2011-08-03 Thomas Quinot <quinot@adacore.com>
9444 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9445 tagged assignment when discriminant checks are suppressed. This is
9446 useless and extremely costly in terms of static stack usage.
9448 2011-08-03 Bob Duff <duff@adacore.com>
9450 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9451 of generics, because this leads to the wrong entity in the wrong scope,
9452 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9454 (Process_Interface_Name): Follow Alias for instances of generics, to
9455 correct for the above change.
9457 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9459 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9460 is an integer literal it is always safe to replace the reference. In
9461 addition, if the reference appears in the generated code for an object
9462 declaration it is necessary to copy because otherwise the reference
9463 might be to the uninitilized value of the discriminant of the object
9466 2011-08-03 Pascal Obry <obry@adacore.com>
9468 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9469 ACL used, in this case we want to check for ending .exe, not .exe
9470 anywhere in the path.
9472 2011-08-03 Sergey Rybin <rybin@adacore.com>
9474 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9475 the tree structure (semantic decoration of references to record
9478 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9480 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9481 choices of a named array aggregate, bail out when any choices are
9482 marked as Errors_Posted.
9484 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9486 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9487 in which entity is frozen, to handle properly loop variables in
9490 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9492 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9493 subtype is not static, compute the upper bound using attributes, to
9494 handle properly index types that are not integer types.
9496 2011-08-03 Bob Duff <duff@adacore.com>
9498 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9499 Update copyright notice.
9501 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9503 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9504 Original_Discriminant if within an instance.
9505 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9507 2011-08-03 Thomas Quinot <quinot@adacore.com>
9509 * einfo.ads: Minor reformatting.
9511 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9513 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9514 composite type with an unfrozen subcomponent, in the profile of a
9515 primitive operation.
9517 2011-08-03 Robert Dewar <dewar@adacore.com>
9519 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9521 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9523 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9524 unconstrained type with discriminants is initialized with an aggregate,
9525 use the constrained subtype of the aggregate as the type of the object,
9526 because it is immutable, and this allows the back-end to generate no
9527 code for the object declaration.
9529 2011-08-03 Robert Dewar <dewar@adacore.com>
9531 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9532 comparison operand is variable, and turns out to be zero or negative.
9534 2011-08-03 Javier Miranda <miranda@adacore.com>
9537 (Expand_Dispatching_Constructor_Call): Disable expansion of
9538 code required for native targets. Done to avoid generating
9539 references to unavailable runtime entities in VM targets.
9541 (Expand_N_Object_Declaration): Add missing support to handle
9542 the explicit initialization of class-wide interface objects.
9545 2011-08-03 Matthew Heaney <heaney@adacore.com>
9547 * a-cobove.adb (Merge): Move source onto target, instead of using
9550 2011-08-03 Matthew Heaney <heaney@adacore.com>
9552 * a-cbdlli.adb (Splice): Move source items from first to last.
9554 2011-08-03 Yannick Moy <moy@adacore.com>
9556 * sem_util.ads: Add comment.
9558 2011-08-03 Javier Miranda <miranda@adacore.com>
9561 (Expand_Record_Aggregate): In VM targets disable the expansion into
9562 assignments of aggregates whose type is not known at compile time.
9564 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9566 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9567 protected entries and task entries, to build the proper renaming
9568 declaration for entry formals, used in debugging.
9569 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9570 parameters in the same way.
9572 2011-08-02 Robert Dewar <dewar@adacore.com>
9574 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9575 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9576 code reorganization.
9578 2011-08-02 Robert Dewar <dewar@adacore.com>
9580 * debug.adb: Debug flag d.P to suppress length comparison optimization
9581 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9582 comparison of Length by comparing First/Last instead.
9584 2011-08-02 Matthew Heaney <heaney@adacore.com>
9586 * a-cobove.ads: Code clean up.
9588 2011-08-02 Vincent Celier <celier@adacore.com>
9590 * adaint.c (file_names_case_sensitive_cache): New static int.
9591 (__gnat_get_file_names_case_sensitive): Cache the return value in
9592 file_names_case_sensitive_cache at the first invocation, to avoid
9593 multiple calls to getenv.
9595 2011-08-02 Bob Duff <duff@adacore.com>
9597 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9599 2011-08-02 Yannick Moy <moy@adacore.com>
9601 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9602 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9603 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9604 indicate that we are in a precondition or postcondition. This is used in
9605 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9606 decide whether to flag the spec or body of the current subprogram as
9609 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9611 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9613 * a-extiin.ads: New file.
9615 2011-08-02 Bob Duff <duff@adacore.com>
9617 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9618 now raises Name_Error instead of Use_Error in certain cases. The other
9619 parts of this AI were already implemented properly.
9621 2011-08-02 Vincent Celier <celier@adacore.com>
9623 * link.c: Only import "auto-host.h" when building the gnattools.
9625 2011-08-02 Yannick Moy <moy@adacore.com>
9627 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9628 which calls a local subprogram, so extract subprogram
9629 from Mark_Non_ALFA_Subprogram_Body.
9631 2011-08-02 Javier Miranda <miranda@adacore.com>
9634 (Extract_Dispatching_Call): If the type of the dispatching object is an
9635 access type then return an explicit dereference in the Object out-mode
9638 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9640 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9641 compatibility checks for all indexes of an array subtype, not just the
9642 first. Reset Has_Dynamic_Range_Check on the subtype before each
9643 potential check to ensure that Insert_Range_Checks will not elide any
9644 of the dynamic checks.
9646 2011-08-02 Yannick Moy <moy@adacore.com>
9648 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9649 SPARK restriction at parsing time.
9650 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9651 directive only if the SPARK restriction is set for this unit.
9653 2011-08-02 Yannick Moy <moy@adacore.com>
9655 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9656 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9657 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9658 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9659 Mark_Non_ALFA_Subprogram_Body.
9660 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9663 2011-08-02 Yannick Moy <moy@adacore.com>
9665 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9668 2011-08-02 Robert Dewar <dewar@adacore.com>
9670 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9671 exp_ch3.adb: Minor reformatting.
9673 2011-08-02 Emmanuel Briot <briot@adacore.com>
9675 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9676 files, not any regular file.
9677 (__gnat_locate_file_with_predicate): new subprogram.
9679 2011-08-02 Yannick Moy <moy@adacore.com>
9681 * sinfo.adb, sinfo.ads: Restrict the use of flags
9682 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9683 nodes, plus N_Subtype_Declaration for the 2nd one.
9685 2011-08-02 Sergey Rybin <rybin@adacore.com>
9687 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9688 - fix bugs in the description of Source_Trace;
9689 - get rid of UNIT_NAME;
9691 2011-08-02 Javier Miranda <miranda@adacore.com>
9694 (Build_Dispatching_Requeue): Adding support for VM targets
9695 since we cannot directly reference the Tag entity.
9696 * exp_sel.adb (Build_K): Adding support for VM targets.
9697 (Build_S_Assignment): Adding support for VM targets.
9699 (Default_Prim_Op_Position): In VM targets do not restrict availability
9700 of predefined interface primitives to compiling in Ada 2005 mode.
9701 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9702 restricted to compiling in Ada 2005 mode.
9703 (Make_VM_TSD): Generate code that declares and initializes the OSD
9704 record. Needed to support dispatching calls through synchronized
9707 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9708 primitives associated with synchronized interfaces.
9709 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9710 primitives associated with synchronized interfaces.
9712 2011-08-02 Yannick Moy <moy@adacore.com>
9714 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9715 statements hidden in SPARK if preceded by the HIDE directive
9716 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9717 exception handlers as hidden in SPARK if preceded by the HIDE directive
9718 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9719 if starting with the HIDE directive
9720 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9721 starting with the HIDE directive; mark the declarations in a private
9722 part as hidden in SPARK if the private part starts with the HIDE
9724 * restrict.adb, restrict.ads
9725 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9726 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9727 argument node belongs to a part which is hidden in SPARK
9728 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9729 parts in SPARK; protect the possibly costly call to
9730 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9731 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9732 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9733 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9735 (Scan): recognize special comment starting with '#' and followed by
9736 SPARK keyword "hide" as a HIDE directive.
9738 2011-08-02 Yannick Moy <moy@adacore.com>
9740 * types.ads, erroutc.ads: Minor reformatting.
9742 2011-08-02 Vincent Celier <celier@adacore.com>
9744 * link.c: Add response file support for cross platforms.
9746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9748 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9749 in an association, set parent field of copy before partial analysis.
9750 * sem_res.adb (Resolve_Slice): create reference to itype only when
9751 expansion is enabled.
9753 2011-08-02 Yannick Moy <moy@adacore.com>
9755 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9756 for new flag denoting which subprogram bodies are in ALFA
9757 * restrict.adb, sem_ch7.adb: Update comment
9758 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9759 sem_ch9.adb, sem_res.adb: Add calls to
9760 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9761 * sem_ch6.adb (Analyze_Function_Return): add calls to
9762 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9763 middle of the body, and extended return.
9764 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9765 False when missing return.
9766 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9767 to True for subprograms whose spec is in ALFA. Remove later on the flag
9768 on the entity used for a subprogram body when there exists a separate
9770 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9771 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9772 False, otherwise do nothing.
9774 2011-08-02 Robert Dewar <dewar@adacore.com>
9776 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9778 2011-08-02 Yannick Moy <moy@adacore.com>
9780 * sem_ch4.ads: minor formatting.
9782 2011-08-02 Yannick Moy <moy@adacore.com>
9784 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9785 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9786 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9787 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9788 opt.ads: cleanup of SPARK mode
9790 2011-08-02 Yannick Moy <moy@adacore.com>
9792 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9794 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9795 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9797 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9798 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9799 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9800 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9802 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9804 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9805 functions whose return type is not in ALFA.
9806 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9808 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9809 parameter's type is not in ALFA.
9810 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9815 * sem_ch6 (Analyze_Expression_Function): treat the function as
9816 Inline_Always, and introduce a subprogram declaration for it when it is
9818 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9819 expression functions, so that the back-end can determine whether they
9820 can in fact be inlined.
9821 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9822 a function body comes from an expression function.
9824 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9826 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9827 null exclusions to test Can_Never_Be_Null on the anonymous access types
9828 of the formals rather than testing the formals themselves. Exclude this
9829 check in cases where the Old_Formal is marked as a controlling formal,
9830 to avoid issuing spurious errors for bodies completing dispatching
9831 operations (due to the flag not getting set on controlling access
9832 formals in body specs).
9833 (Find_Corresponding_Spec): When checking full and subtype conformance of
9834 subprogram bodies in instances, pass Designated and E in that order, for
9835 consistency with the expected order of the formals (New_Id followed by
9838 2011-08-02 Robert Dewar <dewar@adacore.com>
9840 * sem_ch8.adb: Minor reformatting.
9842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9844 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9845 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9846 primitive operations of class-wide actuals.
9848 2011-08-02 Javier Miranda <miranda@adacore.com>
9850 * exp_atag.ads, exp_atag.adb
9851 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9852 since its value is implicitly passed in argument Typ.
9853 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9854 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9855 Build_Common_Dispatching_Select_Statements.
9857 2011-08-02 Robert Dewar <dewar@adacore.com>
9859 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9860 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9863 2011-08-02 Robert Dewar <dewar@adacore.com>
9865 * sem_res.adb: Minor reformatting.
9866 * sem_prag.adb: Minor reformatting.
9868 2011-08-02 Javier Miranda <miranda@adacore.com>
9870 * exp_atag.adb, exp_atags.ads
9871 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9872 by the tagged type Entity. Required to use this routine in the VM
9873 targets since we do not have available the Tag entity in the VM
9876 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9877 Ada.Tags has not been previously loaded.
9879 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9880 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9882 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9883 view of enclosing scopes. Required to handle enclosing scopes that
9884 are synchronized types whose full view is a task type.
9886 (Build_VM_TSDs): Minor code improvement to avoid generating and
9887 analyzing lists with empty nodes.
9888 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9889 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9890 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9891 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9892 (Make_Select_Specific_Data_Table): Add support for VM targets.
9893 (Make_VM_TSD): Generate code to initialize the SSD structure of
9896 2011-08-02 Yannick Moy <moy@adacore.com>
9898 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9899 cross-references section in ALI.
9900 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9901 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9903 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9904 subprogram or package entity of a node
9905 (Is_Local_Reference_Type): new function returns True for references
9906 selected in local cross-references.
9907 (Lt): function extracted from Lt in Output_References
9908 (Write_Entity_Name): function extracted from Output_References
9909 (Generate_Definition): generate reference with type 'D' for definition
9910 of objects (object declaration and parameter specification), with
9911 appropriate locations and units, for use in local cross-references.
9912 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9913 references of type 'I' for initialization in object definition.
9914 (Output_References): move part of function Lt and procedure
9915 Write_Entity_Name outside of the body. Ignore references of types 'D'
9916 and 'I' introduced for local cross-references.
9917 (Output_Local_References): new procedure to output the local
9918 cross-references sections.
9919 (Lref_Entity_Status): new array defining whether an entity is a local
9920 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9921 with 'I' type when initialization expression is present.
9922 * get_scos.adb, get_scos.ads: Correct comments and typos
9924 2011-08-02 Javier Miranda <miranda@adacore.com>
9926 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9928 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9930 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9933 2011-08-02 Vincent Celier <celier@adacore.com>
9935 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9936 (No_Space_Img): New function
9937 (Find_Excluded_Sources): When reading from a file, record the file name
9938 and the line number for each excluded source.
9939 (Mark_Excluded_Sources): When reporting an error, if the excluded
9940 sources were read from a file, include file name and line number in
9943 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9945 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9947 2011-08-02 Robert Dewar <dewar@adacore.com>
9949 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9951 2011-08-02 Javier Miranda <miranda@adacore.com>
9953 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9954 generation of TSDs to the DOTNET compiler.
9955 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9956 generation of TSDs to the DOTNET compiler.
9958 2011-08-02 Javier Miranda <miranda@adacore.com>
9960 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9961 record of all the tagged types declared inside library level package
9962 declarations, library level package bodies or library level subprograms.
9963 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9964 associated with a given tagged type.
9965 (Build_VM_TSDs): New subprogram.
9966 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9967 compilation units that are subprograms.
9968 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9969 compilation units that are package bodies.
9970 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9971 units that are a package declaration or a package instantiation.
9972 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9973 reorganization to improve the error generated by the frontend when the
9974 function Ada.Tags.Secondary_Tag is not available.
9975 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9976 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9978 2011-08-02 Javier Miranda <miranda@adacore.com>
9980 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9982 2011-08-02 Robert Dewar <dewar@adacore.com>
9984 * s-imenne.ads: Minor reformatting.
9986 2011-08-02 Robert Dewar <dewar@adacore.com>
9988 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9989 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9990 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9992 2011-08-02 Robert Dewar <dewar@adacore.com>
9994 * einfo.ads (Materialize_Entity): Document this is only for renamings
9995 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9996 required debug information in the case where we transform the object
9997 declaration into a renaming declaration.
9998 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10000 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10001 Materialize_Entity.
10003 2011-08-02 Robert Dewar <dewar@adacore.com>
10005 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10006 Suppress_Init_Procs.
10007 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10008 Suppress_Initialization/Initialization_Suppressed.
10009 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10010 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10011 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10012 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10014 2011-08-02 Robert Dewar <dewar@adacore.com>
10016 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10017 Minor reformatting.
10019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10021 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10022 only have inheritable classwide pre/postconditions.
10024 2011-08-02 Javier Miranda <miranda@adacore.com>
10026 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10027 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10028 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10029 checks if the external tag of a type is the same as the external tag
10030 of some other declaration.
10032 2011-08-02 Thomas Quinot <quinot@adacore.com>
10034 * s-taskin.ads: Minor reformatting.
10036 2011-08-02 Emmanuel Briot <briot@adacore.com>
10038 * g-comlin.adb (Display_Help): swap the order in which it prints the
10039 short help and the general usage.
10041 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10043 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10044 the aspect declarations and attach them to the generic copy for
10045 subsequent analysis.
10046 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10047 declarations of the generic tree to the new subprogram declarations.
10048 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10049 conditions that apply to a subprogram instance.
10051 2011-08-02 Robert Dewar <dewar@adacore.com>
10053 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10057 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10058 private type with a tagged full view is not derived in the immediate
10059 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10061 2011-08-02 Robert Dewar <dewar@adacore.com>
10063 * exp_ch4.adb: Minor reformatting.
10065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10067 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10068 Ada2012 iterator, the loop will be rewritten during expansion into a
10069 while loop with a cursor and an element declaration. Do not analyze the
10070 body in this case, because if the container is for indefinite types the
10071 actual subtype of the elements will only be determined when the cursor
10072 declaration is analyzed.
10074 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10076 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10077 size/alignment related attributes in CodePeer_Mode.
10079 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10081 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10082 Prepend_Element, since this can result in the operation getting the
10083 wrong slot in the full type's dispatch table if the full type has
10084 inherited operations. The incomplete type's operation will get added
10085 to the proper position in the full type's primitives
10086 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10087 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10088 dispatching operations, since there are cases where nonprimitive
10089 subprograms can get added to the list of incomplete dependents (such
10090 as subprograms in nested packages).
10091 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10092 private part when determining whether to add a primitive with a
10093 parameter of a tagged incomplete type to the Private_Dependents list.
10094 Such primitives can also occur in the visible part, and should not have
10095 been excluded from being private dependents.
10096 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10097 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10098 list of a Taft-amendment incomplete type is a primitive before issuing
10099 an error that the full type must appear in the same unit. There are
10100 cases where nonprimitives can be in the list (such as subprograms in
10102 * sem_disp.adb (Derives_From): Use correct condition for checking that
10103 a formal's type is derived from the type of the corresponding formal in
10104 the parent subprogram (the condition was completely wrong). Add
10105 checking that was missing for controlling result types being derived
10106 from the result type of the parent operation.
10108 2011-08-02 Yannick Moy <moy@adacore.com>
10110 * errout.adb (First_Node): minor renaming
10111 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10114 2011-08-02 Yannick Moy <moy@adacore.com>
10116 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10117 before accessing operands.
10118 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10119 decide whether an initialization expression respects SPARK rules, as
10120 the plain node is the expanded one. This allows for more valid warnings
10122 * gnat_rm.texi: Minor update.
10124 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10126 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10129 2011-08-02 Robert Dewar <dewar@adacore.com>
10131 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10133 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10135 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10136 loop statements and the element renaming declaration with a block when
10137 the element type is controlled.
10139 2011-08-02 Yannick Moy <moy@adacore.com>
10141 * sinfo.ads: Minor formatting.
10143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10145 * sem_aggr.adb (Add_Association): if the association has a box and no
10146 expression, use the Sloc of the aggregate itself for the new
10148 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10151 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10153 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10154 When a container is provided via a function call, generate a renaming
10155 of the function result. This avoids the creation of a transient scope
10156 and the premature finalization of the container.
10157 * exp_ch7.adb (Is_Container_Cursor): Removed.
10158 (Wrap_Transient_Declaration): Remove the supression of the finalization
10159 of the list controller when the declaration denotes a container cursor,
10162 2011-08-02 Yannick Moy <moy@adacore.com>
10164 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10165 node is from source, instead of the original node being from source.
10167 (Resolve_Array_Aggregate): refine the check for a static expression, to
10168 recognize also static ranges
10169 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10170 Array_Type_Declaration): postpone the test for the type being a subtype
10171 mark after the type has been resolved, so that component-selection and
10172 expanded-name are discriminated.
10173 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10174 to distinguish the case of an iteration scheme, so that an error is
10175 issed on a non-static range in SPARK except in an iteration scheme.
10176 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10177 In_Iter_Schm = True.
10178 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10179 user-defined operators so that they are allowed in renaming
10181 (Find_Selected_Component): refine the check for prefixing of operators
10182 so that they are allowed in renaming. Move the checks for restrictions
10183 on selector name after analysis discriminated between
10184 component-selection and expanded-name.
10185 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10186 concatenation argument of string type if it is static.
10187 * sem_util.adb, sem_util.ads
10188 (Check_Later_Vs_Basic_Declarations): add a new function
10189 Is_Later_Declarative_Item to decice which declarations are allowed as
10190 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10191 mode, add that renamings are considered as later items.
10192 (Enclosing_Package): new function to return the enclosing package
10193 (Enter_Name): correct the rule for homonyms in SPARK
10194 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10195 from source (result of expansion) to avoid issuing wrong warnings.
10197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10199 * errout.adb: On anything but an expression First_Node returns its
10202 2011-08-02 Pascal Obry <obry@adacore.com>
10204 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10206 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10208 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10209 Set the associated loop as the related expression of internally
10211 * exp_ch7.adb (Is_Container_Cursor): New routine.
10212 (Wrap_Transient_Declaration): Supress the finalization of the list
10213 controller when the declaration denotes a container cursor.
10215 2011-08-02 Yannick Moy <moy@adacore.com>
10217 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10219 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10220 expression is a simple expression. This check cannot be performed in
10221 the semantics, so just drop it.
10222 (P_Index_Or_Discriminant_Constraint): move check that the index or
10223 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10224 semantics. Other cases were previously checked in the semantics.
10225 * par-ch4.adb (P_Name): move checks that a selector name is not
10226 character literal or an operator symbol to Find_Selected_Component in
10228 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10229 declarations are not placed after later declarations in a separate
10230 procedure in Sem_Util (possibly not the best choice?), to be used both
10231 during parsing, for Ada 83 mode, and during semantic analysis, for
10233 * par-endh.adb (Check_End): move check that end label is not missing
10234 to Process_End_Label in the semantics
10235 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10236 the special case for SPARK restriction
10237 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10238 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10239 parameter Force to issue the error message even on internal node (used
10240 for generated end label). Call Check_Restriction to check when an error
10241 must be issued. In SPARK mode, issue an error message even if the
10242 restriction is not set.
10243 (Check_Restriction): new procedure with an additional out parameter to
10244 inform the caller that a message has been issued
10245 * sem_aggr.adb: Minor modification of message
10246 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10247 instead of issuing an error message directly
10248 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10249 declarations are not placed after later declarations, by calling
10250 Check_Later_Vs_Basic_Declarations
10251 (Analyze_Subtype_Declaration): move here the check that an index or
10252 discriminant constraint must be a subtype mark. Change the check that
10253 a subtype of String must start at one so that it works on subtype marks.
10254 * sem_ch4.adb (Analyze_Call): move here the check that a named
10255 association cannot follow a positional one in a call
10256 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10257 instead of issuing an error message directly
10258 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10259 selector name is not a character literal or an operator symbol. Move
10260 here the check that the prefix of an expanded name cannot be a
10261 subprogram or a loop statement.
10262 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10263 procedure called from parsing and semantics to check that basic
10264 declarations are not placed after later declarations
10265 (Process_End_Label): move here the check that end label is not missing
10267 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10269 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10270 representation clause in codepeer mode, since it confuses CodePeer and
10271 does not bring useful info.
10273 2011-08-02 Ed Falis <falis@adacore.com>
10275 * init.c: initialize fp hw on MILS.
10277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10279 * errout.adb (First_Node): for bodies, return the node itself (small
10280 optimization). For other nodes, do not check source_unit if the node
10281 comes from Standard.
10283 2011-08-02 Robert Dewar <dewar@adacore.com>
10285 * exp_ch3.adb: Minor comment additions.
10286 * sem_ch13.adb: Minor reformatting.
10288 2011-08-02 Pascal Obry <obry@adacore.com>
10290 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10292 2011-08-02 Robert Dewar <dewar@adacore.com>
10294 * sem_attr.adb: Minor reformatting.
10296 2011-08-02 Robert Dewar <dewar@adacore.com>
10298 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10299 (Has_Default_Component_Value): Removed
10300 * einfo.ads Comment updates
10301 (Has_Default_Aspect): Replaces Has_Default_Value
10302 (Has_Default_Component_Value): Removed
10304 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10306 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10307 (Get_Simple_Init_Val): Handle Default_Value aspect
10308 (Needs_Simple_Initialization): Handle Default_Value aspect
10309 * exp_ch3.ads: Needs_Simple_Initialization
10310 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10311 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10313 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10314 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10315 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10319 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10320 package containing iteration primitives.
10321 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10325 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10326 "of", pre-analyze expression in case it is a function call with
10327 finalization actions that must be placed ahead of the loop.
10328 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10329 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10331 2011-08-02 Geert Bosch <bosch@adacore.com>
10333 * cstand.adb (Create_Float_Types): Only consider C's long double for
10334 Long_Long_Float, in addition to double.
10336 2011-08-02 Robert Dewar <dewar@adacore.com>
10338 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10339 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10340 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10341 Minor reformatting.
10343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10345 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10348 2011-08-02 Javier Miranda <miranda@adacore.com>
10350 * einfo.ads, einfo.adb
10351 (Original_Access_Type): Move this attribute to Node26 since there was
10352 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10353 which causes conflicts and breaks the generation of the .NET compiler.
10354 (Interface_Name): Add missing documentation on JGNAT only uses of
10357 2011-08-02 Geert Bosch <bosch@adacore.com>
10359 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10360 (Find_Back_End_Float_Type): Likewise
10361 (Create_Back_End_Float_Types): Likewise
10362 (Create_Float_Types): Likewise
10363 (Register_Float_Type): Likewise
10364 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10365 Nlist and split out type selection in new local Find_Base_Type function.
10366 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10368 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10370 2011-08-02 Robert Dewar <dewar@adacore.com>
10372 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10374 * opt.ads: Minor comment change.
10375 * sem_ch12.adb: Minor code reorganization.
10377 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10379 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10380 subtype's list of rep items to the list on the full subtype in the case
10381 where the lists are the same.
10383 2011-08-02 Geert Bosch <bosch@adacore.com>
10385 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10386 using the one from System.Strings, which also deallocates all strings.
10388 2011-08-02 Geert Bosch <bosch@adacore.com>
10390 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10392 * gcc-interface/Make-lang.in: Update dependencies.
10394 2011-08-02 Olivier Hainque <hainque@adacore.com>
10396 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10399 2011-08-02 Javier Miranda <miranda@adacore.com>
10401 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10402 associated with anonymous access to subprograms.
10404 2011-08-02 Geert Bosch <bosch@adacore.com>
10407 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10408 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10409 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10410 (Add_Symbol_Definition): Move to switch-c.adb
10411 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10412 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10413 (Add_Symbol_Definition): Move to switch-c.adb.
10414 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10416 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10417 Move to warnsw.adb.
10418 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10419 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10420 Move to warnsw.adb.
10421 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10422 (Add_Symbol_Definition): Moved from Prepcomp.
10423 * switch-c.ads: Update copyright notice. Use String_List instead of
10424 Argument_List, removing dependency on System.OS_Lib.
10426 2011-08-02 Yannick Moy <moy@adacore.com>
10428 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10429 mode on initialization expression which does not respect SPARK
10431 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10432 if the tree referenced by its argument represents an initialization
10433 expression in SPARK, suitable for initializing an object in an object
10436 2011-08-02 Javier Miranda <miranda@adacore.com>
10438 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10439 internally generated access to subprogram with its associated protected
10441 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10443 2011-08-02 Geert Bosch <bosch@adacore.com>
10445 * cstand.adb (Register_Float_Type): Print information about type to
10446 register, if the Debug_Flag_Dot_B is set.
10447 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10448 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10449 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10450 with a requested precision of more than Max_Digits digits and no more
10451 than Max_Base_Digits digits, if a range specification is present and the
10452 Predefined_Float_Types list has a suitable type to derive from.
10453 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10454 case of type completion with pragma Import
10456 (Process_Import_Predefined_Type): Processing to complete a type
10457 with pragma Import. Currently supports floating point types only.
10458 (Set_Convention_From_Pragma): Do nothing without underlying type.
10459 (Process_Convention): Guard against absence of underlying type,
10460 which may happen when importing incomplete types.
10461 (Process_Import_Or_Interface): Handle case of importing predefined
10462 types. Tweak error message.
10464 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10466 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10467 functions to previous change. Reorganize code slightly.
10469 2011-08-02 Geert Bosch <bosch@adacore.com>
10471 * back_end.ads (Register_Type_Proc): New call back procedure type for
10472 allowing the back end to provide information about available types.
10473 (Register_Back_End_Types): New procedure to register back end types.
10474 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10476 * cstand.adb (Back_End_Float_Types): New list for floating point types
10477 supported by the back end.
10478 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10479 (Copy_Float_Type): New procedure to make new copies of predefined types.
10480 (Register_Float_Type): New call back procedure to populate the BEFT list
10481 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10482 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10483 (Create_Float_Types): New procedure to create entities for floating
10484 point types predefined in Standard, and put these and any remaining
10485 BEFTs on the Predefined_Float_Types list.
10486 * stand.ads (Predefined_Float_Types): New list for predefined floating
10487 point types that do not have declarations in package Standard.
10489 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10491 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10492 entity node for the unit containing the parameter.
10493 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10494 (Add_Inlined_Subprogram): Likewise.
10495 * gcc-interface/Make-lang.in: Update dependencies.
10497 2011-08-02 Thomas Quinot <quinot@adacore.com>
10499 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10502 2011-08-02 Geert Bosch <bosch@adacore.com>
10504 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10506 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10508 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10509 computed value of Base_Type.
10511 2011-08-02 Yannick Moy <moy@adacore.com>
10513 * restrict.adb (Check_Restriction): issue an error for any use of
10514 class-wide, even if the No_Dispatch restriction is not set.
10515 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10516 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10517 when completing a private extension, the type named in the private part
10518 is not the same as that named in the visible part.
10519 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10520 of an inherited primitive operations of a tagged type or type extension
10521 that returns the tagged type.
10522 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10523 function which returns True for an implicit operation inherited by the
10524 derived type declaration for the argument type.
10525 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10528 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10530 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10531 Process_Bounds, to perform analysis with expansion of a range or an
10532 expression that is the iteration scheme for a loop.
10533 (Analyze_Iterator_Specification): If domain of iteration is given by a
10534 function call with a controlled result, as is the case if call returns
10535 a predefined container, ensure that finalization actions are properly
10537 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10539 2011-08-02 Javier Miranda <miranda@adacore.com>
10541 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10542 * gcc-interface/Make-lang.in: Update dependencies.
10544 2011-08-02 Javier Miranda <miranda@adacore.com>
10546 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10547 determine if the analysis is performed using N or Original_Node (N).
10548 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10549 functionality of routine Is_Variable avoids code duplication.
10550 * checks.adb (Determine_Range): Handle temporaries generated by
10551 Remove_Side_Effects.
10553 2011-08-02 Javier Miranda <miranda@adacore.com>
10555 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10556 expansion of the condition. Required since the previous analysis was
10557 done with expansion disabled (see Resolve_Quantified_Expression) and
10558 hence checks were not inserted and record comparisons have not been
10561 2011-08-02 Ed Falis <falis@adacore.com>
10563 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10566 2011-08-02 Bob Duff <duff@adacore.com>
10568 * opt.ads: Minor comment fix.
10570 2011-08-02 Bob Duff <duff@adacore.com>
10572 * sem_ch12.adb (Analyze_Package_Instantiation,
10573 Analyze_Subprogram_Instantiation): Turn off style checking while
10574 analyzing an instance. Whatever style checks that apply to the generic
10575 unit should apply, so it makes no sense to apply them in an instance.
10576 This was causing trouble when compiling an instance of a runtime
10577 unit that violates the -gnatyO switch.
10578 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10579 one of the two case statements, causing spurious errors.
10581 2011-08-02 Robert Dewar <dewar@adacore.com>
10583 * uname.adb: Minor reformatting.
10584 * gnatcmd.adb: Minor reformatting.
10585 * exp_attr.adb: Minor reformatting.
10587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10589 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10590 No_Dispatching_Calls, do not look for the Assign primitive, because
10591 predefined primitives are not created in this case.
10593 2011-08-02 Bob Duff <duff@adacore.com>
10595 * stylesw.ads: Minor comment fixes.
10597 2011-08-02 Robert Dewar <dewar@adacore.com>
10599 * freeze.adb (Add_To_Result): New procedure.
10601 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10603 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10604 time, if the specific run-time routines for handling streams of strings
10605 are not available, use the default mechanism.
10607 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10609 * s-regpat.ads: Fix typo.
10611 2011-08-02 Vincent Celier <celier@adacore.com>
10613 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10614 not null, call it to create the in memory config project file without
10615 parsing an existing default config project file.
10617 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10619 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10621 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10623 * sem_elim.adb: an abstract subprogram does not need an eliminate
10624 pragma for its descendant to be eliminable.
10626 2011-08-02 Ed Falis <falis@adacore.com>
10628 * init.c: revert to handling before previous checkin for VxWorks
10629 * s-intman-vxworks.adb: delete unnecessary declarations related to
10630 using Ada interrupt facilities for handling signals.
10631 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10632 * s-intman-vxworks.ads: Import __gnat_install_handler as
10633 Initialize_Interrupts.
10634 * s-taprop-vxworks.adb: Delete Signal_Mask.
10635 (Abort_Handler): change construction of mask to unblock exception
10638 2011-08-02 Jerome Guitton <guitton@adacore.com>
10640 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10641 Debug_Raise_Exception before propagation starts.
10643 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10645 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10646 to Restriction_Check_Required.
10647 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10648 * sem_res.adb (Resolve_Call): Likewise.
10649 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10651 2011-08-02 Bob Duff <duff@adacore.com>
10653 * stylesw.ads: Update comment.
10654 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10655 * errout.ads: Remove obsolete comment.
10657 2011-08-02 Javier Miranda <miranda@adacore.com>
10659 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10660 (Set_Is_Safe_To_Reevaluate): new procedure.
10661 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10662 assignment is allowed on safe-to-reevaluate variables.
10663 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10664 temporary created to remove side effects in expressions that use
10665 the secondary stack as safe-to-reevaluate.
10666 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10667 variables that are not true constants.
10669 2011-08-02 Robert Dewar <dewar@adacore.com>
10671 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10672 sem_res.adb, sem_ch6.adb: Minor reformatting.
10674 2011-08-02 Jerome Guitton <guitton@adacore.com>
10676 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10678 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10680 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10681 not set Overridden_Operation if subprogram is an initialization
10684 2011-08-02 Yannick Moy <moy@adacore.com>
10686 * par-ch6.adb: Correct obsolete name in comments
10687 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10688 which takes two message arguments (existing function takes one), with
10689 second message used for continuation.
10690 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10691 block statements that originate from a source block statement, not
10692 generated block statements
10693 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10694 symmetry with procedure case
10695 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10696 function to issue an error in formal mode if a package specification
10697 contains more than one tagged type or type extension.
10698 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10699 parameters matching formals of tagged types are objects (or ancestor
10700 type conversions of objects), not general expressions. Issue an error
10701 on view conversions that are not involving ancestor conversion of an
10703 (Resolve_Type_Conversion): in formal mode, issue an error on the
10704 operand of an ancestor type conversion which is not an object
10705 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10706 procedure so that it works also for actuals of function calls
10707 (Is_Actual_Tagged_Parameter): new function which determines if its
10708 argument is an actual parameter of a formal of tagged type in a
10710 (Is_SPARK_Object_Reference): new function which determines if the tree
10711 referenced by its argument represents an object in SPARK
10713 2011-08-02 Robert Dewar <dewar@adacore.com>
10715 * sem_ch3.adb: Minor reformatting
10716 Minor comment addition
10717 Minor error msg text change
10719 2011-08-02 Javier Miranda <miranda@adacore.com>
10721 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10722 function. Used to be more precise when we generate a variable plus one
10723 assignment to remove side effects in the evaluation of the Bound
10725 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10726 of the bound expression to force its re-analysis and thus expand the
10727 associated transient scope (if required). Code cleanup replacing the
10728 previous code that declared the constant entity by an invocation to
10729 routine Force_Evaluation which centralizes this work in the frontend.
10731 2011-08-02 Robert Dewar <dewar@adacore.com>
10733 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10734 (Base_Type): Now uses improved Is_Base_Type function
10735 * einfo.ads (Base_Type): Inline this function
10737 2011-08-02 Robert Dewar <dewar@adacore.com>
10739 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10740 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10742 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10744 * gcc-interface/Make-lang.in: Update dependencies.
10745 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10748 2011-08-02 Yannick Moy <moy@adacore.com>
10750 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10751 non-simple expression used in delta constraint
10752 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10753 index constraint which is not a subtype mark
10754 * par.adb: With and use Restrict
10755 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10756 mode on component type which is not a subtype mark and default
10757 expression on component
10758 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10759 of string which does not have a lower index bound equal to 1
10760 (Array_Type_Declaration): issue an error in formal mode on index or
10761 component type which is not a subtype mark, and on aliased keyword on
10763 (Derived_Type_Declaration): issue an error in formal mode on interface,
10764 limited or abstract type
10765 (Record_Type_Declaration): issue an error in formal mode on interface
10766 (Record_Type_Definition): issue an error in formal mode on tagged types
10767 and type extensions not declared in the specification of a library unit
10768 package; on null non-tagged record; on variant part
10770 2011-08-02 Vincent Celier <celier@adacore.com>
10772 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10773 not declared for qualified library project when Library_Name is not
10774 declared, but Library_Dir is.
10776 2011-08-02 Robert Dewar <dewar@adacore.com>
10778 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10779 pragmas (affects aspects [Component_]Default_Value
10780 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10781 component type for the resolution
10783 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10785 * einfo.adb (Base_Type): Tune implementation for speed.
10787 2011-08-02 Robert Dewar <dewar@adacore.com>
10789 * freeze.adb: Minor reformatting.
10791 2011-08-02 Thomas Quinot <quinot@adacore.com>
10793 * scos.ads: Update comments.
10795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10797 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10798 base type, because the parent may be a subtype of a private type whose
10799 convention is established in a private part.
10801 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10803 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10804 statement in a block when the expansion of the return expression has
10805 created a finalization chain.
10806 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10807 with the parent node.
10808 Add N_Extended_Return_Statement to handle the case where a transient
10809 object declaration appears in the Return_Object_Declarations list of
10810 an extended return statement.
10812 2011-08-02 Matthew Gingell <gingell@adacore.com>
10814 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10815 unused parameter 'name'.
10817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10819 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10820 inherited operation, check whether its alias, which is the source
10821 operastion that it renames, has been marked eliminated.
10823 2011-08-02 Javier Miranda <miranda@adacore.com>
10825 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10826 in-mode parameter whose type is an access type since it can be used to
10827 modify its designated object. Enforce code that handles as safe an
10828 access type that is not access-to-constant but it is the result of a
10829 previous removal of side-effects.
10830 (Remove_Side_Effects): Minor code reorganization of cases which require
10831 no action. Done to incorporate documentation on new cases uncovered
10832 working in this ticket: no action needed if this routine was invoked
10833 too early and the nodes are not yet decorated.
10834 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10835 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10836 were issued with actuals that are implicitly provided by
10839 2011-08-02 Robert Dewar <dewar@adacore.com>
10841 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10843 2011-08-02 Yannick Moy <moy@adacore.com>
10845 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10846 to issue an error in formal mode on attribute not supported in this mode
10847 (Analyze_Attribute): issue errors on standard attributes not supported
10849 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10850 comment, and issue error in formal mode on modulus which is not a power
10852 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10854 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10856 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10857 operator on modular type (except 'not').
10859 2011-08-02 Robert Dewar <dewar@adacore.com>
10861 * gnat_rm.texi: Minor reformatting.
10863 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10865 * s-osinte-linux.ads: Minor comment update and reformatting.
10866 * i-cexten.ads: Make this unit pure, as for its parent.
10867 Will allow its usage in more contexts if needed.
10869 2011-08-02 Robert Dewar <dewar@adacore.com>
10871 * s-utf_32.ads: Minor comment fix.
10873 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10875 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10876 operation of a tagged synchronized type, handle the case where the
10877 controlling argument is overloaded.
10879 2011-08-02 Yannick Moy <moy@adacore.com>
10881 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10882 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10883 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10884 SPARK mode and formal verification mode on processing SPARK restriction
10885 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10886 requiring consistency checking.
10888 2011-08-02 Robert Dewar <dewar@adacore.com>
10890 * sem_res.adb: Minor reformatting.
10892 2011-08-02 Robert Dewar <dewar@adacore.com>
10894 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10895 a-cforse.ads: Remove unneeded with of Ada.Containers
10896 Remove commented out pragma Inline's
10897 Move specifications of new subprograms to the actual specs
10899 2011-08-02 Yannick Moy <moy@adacore.com>
10901 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10902 a-cforse.ads: Update comments.
10904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10906 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10908 2011-08-02 Robert Dewar <dewar@adacore.com>
10910 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10911 a-cforse.ads, a-cofove.ads: Minor reformatting.
10913 2011-08-02 Claire Dross <dross@adacore.com>
10915 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10916 a-cofove.ads: Add comments.
10918 2011-08-02 Yannick Moy <moy@adacore.com>
10920 * gnat_rm.texi: Document formal containers.
10922 2011-08-02 Emmanuel Briot <briot@adacore.com>
10924 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10925 are empty sections.
10927 2011-08-02 Robert Dewar <dewar@adacore.com>
10929 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10932 2011-08-02 Robert Dewar <dewar@adacore.com>
10934 * aspects.adb: New aspects Default_Value and Default_Component_Value
10935 New format of Aspect_Names table checks for omitted entries
10936 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10937 handling of boolean aspects for derived types.
10938 New aspects Default_Value and Default_Component_Value
10939 New format of Aspect_Names table checks for omitted entries
10940 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10941 (Has_Default_Value): New flag
10942 (Has_Default_Component_Value): New flag
10943 (Has_Default_Value): New flag
10944 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10946 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10947 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10948 Default_Value and Default_Component_Value
10949 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10950 New aspects Default_Value and Default_Component_Value
10951 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10952 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10954 2011-08-02 Vincent Celier <celier@adacore.com>
10956 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10957 inherit library kind.
10959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10961 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10962 Minor reformatting.
10964 2011-08-02 Robert Dewar <dewar@adacore.com>
10966 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10968 2011-08-02 Yannick Moy <moy@adacore.com>
10970 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10972 2011-08-02 Robert Dewar <dewar@adacore.com>
10974 * impunit.adb: Add comment.
10976 2011-08-02 Yannick Moy <moy@adacore.com>
10978 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10979 qualification of aggregates in formal mode
10980 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10982 (Resolve_Aggregate): complete the test that an aggregate is adequately
10983 qualified in formal mode
10985 2011-08-02 Pascal Obry <obry@adacore.com>
10987 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10988 * mlib-prj.adb: Supress warning when compiling binder generated file.
10989 (Build_Library): Supress all warnings when compiling the binder
10992 2011-08-02 Yannick Moy <moy@adacore.com>
10994 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10996 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10997 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10998 Add with/use clauses to make Check_Formal_Restriction visible
11000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11002 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11003 in-parameters when type of the generic formal is private in the generic
11004 spec and non-private in the body.
11006 2011-08-02 Claire Dross <dross@adacore.com>
11008 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11009 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11010 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11011 * impunit.adb, Makefile.rtl: Take new files into account.
11013 2011-08-02 Robert Dewar <dewar@adacore.com>
11015 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11016 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11018 2011-08-02 Yannick Moy <moy@adacore.com>
11020 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11022 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11023 matching static array bounds, taking into account the special case of
11025 * sem_ch3.adb: Typo in comment.
11027 2011-08-02 Yannick Moy <moy@adacore.com>
11029 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11030 which issues an error in formal mode if its argument node is originally
11032 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11033 has a discriminant specification so that it does not include the case
11035 (Derived_Type_Declaration): move here the test that a derived type has a
11036 discriminant specification
11037 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11038 first element of a component association before accessing its choices
11039 (presence of component association is not enough)
11040 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11041 declaration is a library item before accessing the next element in a
11042 list, as library items are not member of lists
11043 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11044 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11045 Check_Formal_Restriction whenever possible.
11047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11049 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11050 reference when needed.
11052 2011-08-02 Bob Duff <duff@adacore.com>
11054 * gnat_ugn.texi: Fix typo.
11056 2011-08-02 Vincent Celier <celier@adacore.com>
11058 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11059 archive file name. Do not use the full path name of archives for Open
11062 2011-08-02 Robert Dewar <dewar@adacore.com>
11064 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11065 Analyze_Aspect_Specifications
11067 (Analyze_Aspect_Specifications): New handling for boolean aspects
11068 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11069 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11070 sequence for Analyze_Aspect_Specifications
11071 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11072 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11074 2011-08-02 Robert Dewar <dewar@adacore.com>
11076 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11077 aspects, since these no longer exist.
11079 2011-08-02 Robert Dewar <dewar@adacore.com>
11081 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11082 semicolon, do not try to see if there are aspects following it.
11083 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11086 2011-08-02 Robert Dewar <dewar@adacore.com>
11088 * sem_ch8.adb, aspects.ads: Minor reformatting.
11090 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11092 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11093 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11095 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11097 2011-08-02 Yannick Moy <moy@adacore.com>
11099 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11100 mode on subprogram declaration outside of package specification, unless
11101 it is followed by a pragma Import
11102 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11103 Access_Type_Declaration): issue error in formal mode on access type
11104 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11106 (Analyze_Object_Declaration): issue error in formal mode on object
11107 declaration which does not respect SPARK restrictions
11108 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11109 declaration which does not respect SPARK restrictions
11110 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11111 error in formal mode on digits or delta constraint
11112 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11113 decimal fixed point type
11114 (Derived_Type_Declaration): issue error in formal mode on derived type
11115 other than type extensions of tagged record types
11116 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11117 with check on access definition
11118 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11119 mode on protected definition.
11120 (Analyze_Task_Definition): issue error in formal mode on task definition
11122 2011-08-02 Robert Dewar <dewar@adacore.com>
11124 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11126 2011-08-02 Javier Miranda <miranda@adacore.com>
11128 * sem_ch6.adb (Can_Override_Operator): New function.
11129 (Verify_Overriding_Indicator): Add missing code to check overriding
11130 indicator in operators. Fixes regression.
11131 (Check_Overriding_Indicator): Minor reformating after replacing the
11132 code that evaluates if the subprogram can override an operator by
11133 invocations to the above new function.
11135 (Write_Field26_Name): Add missing code to ensure that, following
11136 the documentation in einfo.ads, this field is not shown as attribute
11137 "Static_Initialization" on non-dispatching functions.
11139 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11141 * sem_res.adb (Resolve_Call): A call to
11142 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11143 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11144 i.e., when the second parameter is of type Time_Span.
11146 2011-08-02 Vincent Celier <celier@adacore.com>
11148 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11149 with an archive instead of -L<library dir> -l<library name>.
11151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11153 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11154 mark the base types In_Use in addition to making the operations
11157 2011-08-02 Ed Falis <falis@adacore.com>
11159 * init.c: add and setup __gnat_signal_mask for the exception signals
11160 * s-inmaop-vxworks.adb: new file.
11161 * s-intman-vxworks.adb: remove unnecessary initializations and
11163 * s-intman-vxworks.ads: remove unnecessary variable
11164 * s-taprop-vxworks.adb: simplify signal initialization
11166 2011-08-02 Robert Dewar <dewar@adacore.com>
11168 * sem_ch8.adb: Minor code reorganization, comment updates.
11170 2011-08-02 Robert Dewar <dewar@adacore.com>
11172 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11173 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11175 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11176 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11180 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11181 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11182 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11183 use_type_clauses, to handle more efficiently use_type and use_all_type
11185 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11186 Ada2012 Use_All_Type clause.
11187 (Use_Class_Wide_Operations): new procedure.
11189 2011-08-02 Robert Dewar <dewar@adacore.com>
11191 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11192 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11193 expression to expression function.
11195 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11197 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11198 if types are compatible.
11200 2011-08-02 Yannick Moy <moy@adacore.com>
11202 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11203 returns True if its argument array types have same dimension and same
11204 static bounds at each index.
11205 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11206 OUT or IN OUT paramaters which are not view conversions in SPARK.
11207 (Resolve_Arithmetic_Op): issue an error in formal mode on
11208 multiplication or division with operands of fixed point types which are
11209 not qualified or explicitly converted.
11210 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11211 Boolean or array type (except String) operands.
11212 (Resolve_Equality_Op): issue an error in formal mode on equality
11213 operators for array types other than String with non-matching static
11215 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11216 for array types with non-matching static bounds. Factorize the code in
11217 Matching_Static_Array_Bounds.
11218 (Resolve_Qualified_Expression): issue an error in formal mode on
11219 qualified expressions for array types with non-matching static bounds.
11220 (Resolve_Type_Conversion): issue an error in formal mode on type
11221 conversion for array types with non-matching static bounds
11223 2011-08-02 Robert Dewar <dewar@adacore.com>
11225 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11229 * par-ch9.adb: save location of entry for proper error message.
11231 2011-08-02 Javier Miranda <miranda@adacore.com>
11233 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11234 (Use_Full_View) which permits this routine to climb through the
11235 ancestors using the full-view of private parents.
11236 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11237 Use_Full_View to true in calls to Is_Ancestor.
11238 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11239 true in call to Is_Ancestor.
11240 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11241 Use_Full_View to true in call to Is_Ancestor.
11242 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11243 call to Is_Ancestor.
11244 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11245 Use_Full_View to true in calls to Is_Ancestor.
11246 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11247 Make_Select_Specific_Data_Table, Register_Primitive,
11248 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11249 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11250 to true in call to Is_Ancestor.
11251 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11252 Use_Full_View to true in calls to Is_Ancestor.
11254 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11255 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11257 2011-08-02 Robert Dewar <dewar@adacore.com>
11259 * gnat_rm.texi: Minor reformatting.
11260 * sem_prag.adb: Minor reformatting.
11262 2011-08-02 Tristan Gingold <gingold@adacore.com>
11264 * vms_data.ads: Add VMS qualifier for -gnateP.
11266 2011-08-02 Robert Dewar <dewar@adacore.com>
11268 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11269 * par-ch7.adb (P_Package): Proper placement of aspects for package
11270 decl/instantiation.
11271 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11272 (End_Statements): Add Is_Sloc parameterr
11273 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11274 (Check_End): Ad Is_Sloc parameter
11275 (End_Statements): Add Is_Sloc parameterr
11277 2011-08-02 Vincent Celier <celier@adacore.com>
11279 * ug_words: Add VMS qualifier equivalent to -gnateP:
11280 /SYMBOL_PREPROCESSING.
11282 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11284 * gnat-style.texi: For hexadecimal numeric literals the typical
11285 grouping of digits is 4 to represent 2 bytes.
11286 A procedure spec which is split into several lines is indented two
11289 2011-08-02 Yannick Moy <moy@adacore.com>
11291 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11292 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11293 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11295 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11296 choice in array aggregate
11297 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11299 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11300 positional and named aggregate for record, or others in record
11301 aggregate, or multiple choice in record aggregate
11302 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11303 array operands to logical operations AND, OR and XOR do not have the
11304 same static lower and higher bounds
11305 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11307 2011-08-01 Robert Dewar <dewar@adacore.com>
11309 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11310 Replaces Last_Source_Node_In_Sequence.
11311 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11312 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11313 parens and blank in string (this was inconsistently implemented).
11315 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11316 blank in string (this was inconsistently implemented).
11318 (Set_Global_Switches): Set formal mode switches appropriately
11319 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11321 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11322 call Set_Error_Msg_Lang to set "spark" as language name.
11323 * par.adb: Remove unnecessary call to set formal language for errout
11324 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11325 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11327 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11328 calls to it, moved after resolution so that types are known
11329 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11330 result of concatenation is not of type String
11331 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11332 concatenation is not properly restricted
11333 * gnat_rm.texi: Add doc on pragma Spark_95.
11334 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11335 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11336 * gcc-interface/Make-lang.in: Update dependencies.
11338 2011-08-01 Javier Miranda <miranda@adacore.com>
11340 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11341 condition that detects if the overridden operation must replace an
11344 2011-08-01 Javier Miranda <miranda@adacore.com>
11346 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11347 code declarations inserted by Insert_Actions in each alternative of the
11348 N_Case_Expression node.
11350 2011-08-01 Robert Dewar <dewar@adacore.com>
11352 * sem_ch6.adb: Minor code reorganization.
11353 * sem_util.adb: Minor reformatting.
11355 2011-08-01 Pascal Obry <obry@adacore.com>
11357 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11358 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11360 2011-08-01 Yannick Moy <moy@adacore.com>
11362 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11363 literal or operator symbol which is prefixed
11364 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11365 mode on access attributes.
11366 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11367 that concatenation operands are properly restricted in formal mode
11368 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11369 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11370 result of the concatenation has a type different from String.
11371 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11372 Analyze_Quantified_Expression, Analyze_Slice,
11373 Analyze_Null): issue an error in formal mode on unsupported constructs
11375 (Analyze_Block_Statement): only issue error on source block statement
11376 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11377 function which returns the last node in a list of nodes for which
11378 Comes_From_Source returns True, if any
11379 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11380 Last_Source_Node_In_Sequence
11381 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11382 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11383 mode on unsupported constructs
11384 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11385 rest of the actions may be needed later on since the error is marked as
11387 * sinfo.ads: Typos in comments.
11389 2011-08-01 Pascal Obry <obry@adacore.com>
11391 * projects.texi: Minor editing.
11393 2011-08-01 Yannick Moy <moy@adacore.com>
11395 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11396 insertion character ~~
11397 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11398 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11399 with insertion character ~~
11400 (Set_Msg_Text): treat insertion character ~~
11401 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11402 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11403 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11404 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11405 errors related to the formal language restriction not serious
11406 (insertion character |).
11407 * par.adb (Par): set formal language for error messages if needed
11408 * sem_ch6.adb (Check_Missing_Return): take into account possible
11409 generated statements at the end of the function
11410 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11411 enumeration value to define a new pragma SPARK_95
11412 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11413 SPARK_Version): new type and variables to store the SPARK version
11415 (SPARK_Mode): return True when SPARK_Version is set
11416 * par-prag.adb: Correct indentation
11417 (Prag): take Pragma_SPARK_95 into account
11418 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11421 2011-08-01 Robert Dewar <dewar@adacore.com>
11423 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11424 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11425 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11427 2011-08-01 Pascal Obry <obry@adacore.com>
11429 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11430 Target_Name to Get_Path call.
11431 (Parse_Single_Project): Likewise.
11432 (Post_Parse_Context_Clause): Likewise.
11433 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11434 Call Initialise_Project_Path with the proper Target_Name.
11435 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11437 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11438 with the proper Target_Name.
11439 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11440 Part.Parse routine.
11441 (Parse_Project_And_Apply_Config): Likewise.
11442 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11443 This is fine as this part of the code is supporting only native
11445 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11446 is fine as this part of the code is supporting only native compilation.
11448 2011-08-01 Yannick Moy <moy@adacore.com>
11450 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11451 of homonym, unless the homonym is one of the cases allowed in SPARK
11452 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11453 package declaration occurring after a body.
11455 2011-08-01 Robert Dewar <dewar@adacore.com>
11457 * checks.adb, exp_ch4.adb: Minor reformatting.
11459 2011-08-01 Javier Miranda <miranda@adacore.com>
11461 * einfo.ads (Access_Disp_Table): Fix documentation.
11462 (Dispatch_Table_Wrappers): Fix documentation.
11464 2011-08-01 Pascal Obry <obry@adacore.com>
11466 * prj-env.adb, prj-env.ads: Minor reformatting.
11468 2011-08-01 Yannick Moy <moy@adacore.com>
11470 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11471 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11472 procedures out of these packages.
11473 * errout.ads, errout.adb
11474 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11475 procedures in of this package
11476 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11477 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11478 on misplaced later vs initial declarations, like in Ada 83
11479 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11480 formal mode on attribute of private type whose full type declaration
11482 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11483 package declaration inside a package specification
11484 (Analyze_Full_Type_Declaration): issue error in formal mode on
11485 controlled type or discriminant type
11486 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11487 user-defined operator means that it should come from the source
11488 (New_Overloaded_Entity): issue error in formal mode on overloaded
11490 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11492 2011-08-01 Thomas Quinot <quinot@adacore.com>
11494 * atree.adb: Minor reformatting.
11495 * checks.adb: Minor reformatting.
11497 2011-08-01 Vincent Celier <celier@adacore.com>
11499 * s-parame-vms-ia64.ads: Fix typo in comment
11501 * s-parame-vms-restrict.ads: Removed, unused.
11503 2011-08-01 Javier Miranda <miranda@adacore.com>
11506 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11508 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11509 * sem_ch3.ads, sem_ch3.adb
11510 (Is_Constant_Bound): New extended version of the subprogram that was
11511 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11512 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11513 * sem_aux.ads (Constant_Value): Fix typo in comment.
11514 * checks.adb (Generate_Index_Checks): New implementation which, for
11515 array objects with constant bounds, generates the runtime check
11516 referencing the bounds of the array type. For other cases this routine
11517 provides its previous behavior obtaining such values from the array
11519 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11521 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11522 we cannot have semantic interpretations of the new node.
11524 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11526 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11529 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11531 * sem_ch8.adb: Minor code editing.
11532 * s-vxwext.adb: Remove trailing space.
11533 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11534 consistency with other files.
11536 2011-08-01 Thomas Quinot <quinot@adacore.com>
11538 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11540 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11542 * par-ch10.adb: reject parameterized expressions as compilation unit.
11543 * sem_ch4.adb: handle properly conditional expression with overloaded
11544 then_clause and no else_clause.
11546 2011-08-01 Tristan Gingold <gingold@adacore.com>
11548 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11549 like done by System.Aux_DEC.
11550 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11552 2011-08-01 Yannick Moy <moy@adacore.com>
11554 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11555 missing label at end of declaration (subprogram or package)
11556 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11557 of positional and named parameter association
11558 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11559 Error_Msg_SP which adds a prefix to the error message giving the name
11560 of the formal language analyzed
11561 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11562 access result type in subprogram, unconstrained array as result type,.
11563 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11565 * sem_ch8.adb: Code clean up.
11567 2011-08-01 Javier Miranda <miranda@adacore.com>
11569 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11570 * einfo.ads (Access_Disp_Table): Fix documentation.
11571 (Dispatch_Table_Wrappers): Fix documentation.
11572 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11573 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11574 to enforce the documentation of this attribute.
11575 (Set_Is_Interface): Cleanup the assertion.
11576 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11577 the Underlying_Type entity before reading attribute Access_Disp_Table.
11578 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11579 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11580 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11581 the Underlying_Type entity before reading attribute Access_Disp_Table.
11582 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11583 Locate the Underlying_Type entity before reading attribute
11586 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11588 * s-poosiz.ads: Additional overriding indicators.
11590 2011-08-01 Yannick Moy <moy@adacore.com>
11592 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11594 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11595 parameter specification does not include a subtype mark.
11596 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11597 formal mode on abstract subprogram.
11598 (Analyze_Subprogram_Specification): issue error in formal mode on
11599 user-defined operator.
11600 (Process_Formals): issue error in formal mode on access parameter and
11601 default expression.
11602 * sem_ch9.adb (Analyze_Abort_Statement,
11603 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11604 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11605 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11606 Analyze_Requeue, Analyze_Selective_Accept,
11607 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11608 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11609 issue error in formal mode on user-defined raise statement.
11611 2011-08-01 Thomas Quinot <quinot@adacore.com>
11613 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11614 declaration being hidden when overriding an implicit inherited
11616 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11617 (-gnats), do not complain about a source file that contains only a
11620 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11622 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11623 variable if already set.
11625 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11627 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11628 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11629 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11630 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11631 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11632 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11633 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11634 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11635 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11636 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11637 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11638 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11639 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11640 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11641 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11642 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11643 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11644 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11645 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11646 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11647 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11648 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11649 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11650 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11651 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11652 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11653 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11654 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11655 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11656 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11657 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11658 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11659 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11660 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11661 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11662 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11663 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11664 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11665 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11666 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11667 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11668 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11669 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11670 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11671 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11672 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11673 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11674 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11675 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11676 Use GNAT instead of GNARL.
11678 2011-08-01 Bob Duff <duff@adacore.com>
11680 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11681 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11682 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11685 2011-08-01 Yannick Moy <moy@adacore.com>
11687 * debug.adb (d.D) reverve flag for the SPARK mode
11688 (d.E) reverve flag for SPARK generation mode
11689 (d.F) reverve flag for Why generation mode
11690 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11691 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11692 functions which return True when the corresponding modes are set
11693 (Formal_Language): return "spark" or "alfa" when in formal verification
11695 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11696 Error_Msg to prefix the error message with a tag giving the formal
11698 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11699 message with a tag giving the formal language
11700 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11702 (Analyze_Case_Statement): issue error in formal mode on case statement
11703 with a single "others" case alternative
11704 (Analyze_Exit_Statement): issue errors in formal mode on exit
11705 statements which do not respect SPARK restrictions
11706 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11707 (Check_Unreachable_Code): always issue an error (not a warning) in
11708 formal mode on unreachable code (concerns both code after an infinite
11709 loop and after an unconditional jump, both not allowed in SPARK)
11710 * sem_ch6.adb (Analyze_Return_Statement): add call to
11711 Set_Return_Present for a procedure containing a return statement
11712 (already done for functions in Analyze_Function_Return)
11713 (Analyze_Function_Return): issue error in formal mode on extended
11714 return or if return is not last statement in function
11715 (Check_Missing_Return): issue error in formal mode if function does
11716 not end with return or if procedure contains a return
11717 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11718 function to detect if there is an inner scope of its parameter S which
11721 2011-08-01 Thomas Quinot <quinot@adacore.com>
11723 * sem_ch6.ads: Minor reformatting.
11725 2011-08-01 Javier Miranda <miranda@adacore.com>
11727 * sem_util.adb (Abstract_Interface_List): Complete condition when
11728 processing private type declarations to avoid reading unavailable
11730 (Is_Synchronized_Tagged_Type): Complete condition when processing
11731 private extension declaration nodes to avoid reading unavailable
11734 2011-08-01 Thomas Quinot <quinot@adacore.com>
11736 * sem_ch3.adb: Minor reformatting.
11738 2011-08-01 Thomas Quinot <quinot@adacore.com>
11740 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11741 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11742 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11743 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11744 for VMS, instead parametrize the common implementation with
11745 System.Parameters declarations.
11747 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11749 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11751 2011-08-01 Tristan Gingold <gingold@adacore.com>
11753 * seh_init.c: Fix SEH handler installation on win64.
11755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11757 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11758 double analysis of an anonymous access to subprogram, because it can
11759 lead to improper sharing of profiles and a back-end crash.
11761 2011-08-01 Robert Dewar <dewar@adacore.com>
11763 * make.adb, sem_ch4.adb: Minor reformatting.
11764 * gcc-interface/Make-lang.in: Update dependencies.
11765 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11767 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11769 * gnat_rm.texi: Fix definition of Long_Integer.
11771 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11773 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11774 to prevent storage exhaustion.
11775 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11776 finalized is a function body, insert the cleanup code before the final
11777 return statement, to prevent spurious warnings.
11778 * s-pooglo.ads: add overriding indicator.
11780 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11782 * sem_ch4.adb (Operator_Check): improve error message when both a
11783 with_clause and a use_clause are needed to make operator usage legal.
11784 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11785 determine whether a compilation unit is visible within an other,
11786 either through a with_clause in the current unit, or a with_clause in
11787 its library unit or one one of its parents.
11789 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11791 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11792 over an arbitrary expression of an array or container type.
11793 * lib-xref.adb: clarify comment.
11795 2011-08-01 Bob Duff <duff@adacore.com>
11797 * einfo.ads: Minor reformatting.
11798 * debug.adb: Minor comment improvement.
11800 2011-08-01 Javier Miranda <miranda@adacore.com>
11802 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11803 consider hidden subprograms as valid candidates.
11805 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11807 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11809 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11811 * gnat_ugn.texi: Fix typo.
11813 2011-08-01 Robert Dewar <dewar@adacore.com>
11815 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11816 lib-xref.adb: Minor reformatting
11818 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11820 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11821 when to generate a call to Move_Final_List.
11822 (Has_Controlled_Parts): Remove this function.
11824 2011-08-01 Geert Bosch <bosch@adacore.com>
11826 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11827 "," in choice list.
11829 2011-08-01 Thomas Quinot <quinot@adacore.com>
11831 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11832 explicit raise of a predefined exception as Comes_From_Source if the
11833 original N_Raise_Statement comes from source.
11835 2011-08-01 Robert Dewar <dewar@adacore.com>
11837 * sinfo.ads: Add comment.
11838 * sem_ch6.adb: Minor reformatting.
11840 2011-08-01 Robert Dewar <dewar@adacore.com>
11842 * freeze.adb (Freeze_Entity): Refine check for bad component size
11843 clause to avoid rejecting confirming clause when atomic/aliased present.
11845 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11847 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11848 better determine whether an entity reference is a write.
11849 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11851 * lib-xref.adb (Output_References): Do no suppress a read reference at
11852 the same location as an immediately preceeding modify-reference, to
11853 handle properly in-out actuals.
11855 2011-08-01 Tristan Gingold <gingold@adacore.com>
11857 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11859 2011-08-01 Quentin Ochem <ochem@adacore.com>
11861 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11862 heap to compute the result.
11864 2011-08-01 Robert Dewar <dewar@adacore.com>
11866 * atree.ads: Minor reformatting.
11868 2011-08-01 Emmanuel Briot <briot@adacore.com>
11870 * g-expect.adb (Get_Command_Output): Fix memory leak.
11872 2011-08-01 Geert Bosch <bosch@adacore.com>
11874 * cstand.adb (P_Float_Type): New procedure to print the definition of
11875 predefined fpt types.
11876 (P_Mixed_Name): New procedure to print a name using mixed case
11877 (Print_Standard): Use P_Float_Type for printing floating point types
11878 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11879 precision IEEE float.
11881 2011-08-01 Thomas Quinot <quinot@adacore.com>
11883 * sem_ch3.adb: Minor reformatting.
11885 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11887 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11888 the completion of a generic function, insert the new body rather than
11889 rewriting the original.
11891 2011-08-01 Yannick Moy <moy@adacore.com>
11893 * sinfo.ads, errout.ads: Typos in comments.
11895 2011-08-01 Robert Dewar <dewar@adacore.com>
11897 * par-endh.adb: Minor reformatting.
11899 2011-08-01 Robert Dewar <dewar@adacore.com>
11901 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11902 (Pre_Post_Aspects): New subtype.
11903 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11904 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11905 * par-ch7.adb (P_Package): Remove Decl parameter
11906 (P_Package): Handle new syntax for aspects (before IS)
11907 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11909 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11910 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11911 (P_Package): Remove Decl parameter
11912 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11914 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11916 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11917 * sinfo.ads: Document new syntax for aspects in packages etc.
11918 * sprint.adb: Handle new syntax of aspects before IS in package
11920 2011-08-01 Thomas Quinot <quinot@adacore.com>
11922 * atree.ads: Minor reformatting.
11923 * sem_prag.adb: Minor reformatting.
11925 2011-08-01 Robert Dewar <dewar@adacore.com>
11927 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11928 case expr alternative.
11930 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11932 * sem_ch12.adb: Fix typo.
11934 2011-08-01 Geert Bosch <bosch@adacore.com>
11936 * sem_prag.adb (Check_No_Link_Name): New procedure.
11937 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11938 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11939 instead of Standard_Long_Long_Float_Size global. Preparation for
11940 eventual removal of per type constants.
11941 * exp_util.ads (Get_Stream_Size): New function returning the stream
11942 size value of subtype E.
11943 * exp_util.adb (Get_Stream_Size): Implement new function.
11944 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11946 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11948 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11950 2011-08-01 Geert Bosch <bosch@adacore.com>
11952 * cstand.adb: Fix comments.
11953 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11954 count of arguments.
11956 2011-08-01 Robert Dewar <dewar@adacore.com>
11958 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11960 2011-08-01 Geert Bosch <bosch@adacore.com>
11962 * atree.ads: Fix comment.
11964 2011-08-01 Robert Dewar <dewar@adacore.com>
11966 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11967 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11968 * par.adb: Add with for Namet.Sp.
11969 * par-tchk.adb: Minor reformatting.
11971 2011-08-01 Vincent Celier <celier@adacore.com>
11973 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11974 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11975 of the init procedure of a SAL.
11976 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11979 2011-08-01 Thomas Quinot <quinot@adacore.com>
11981 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11984 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11986 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11988 2011-08-01 Thomas Quinot <quinot@adacore.com>
11990 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11991 conformant with its spec (return True only for types that have
11992 an overriding Initialize primitive operation that prevents them from
11993 having preelaborable initialization).
11994 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11995 initialization for controlled types in Ada 2005 or later mode.
11997 2011-08-01 Robert Dewar <dewar@adacore.com>
11999 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12001 (Same_Aspect): New function.
12002 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12003 Type_Invariant, Precondition, Postcondition.
12004 * snames.ads-tmpl: Add Name_Type_Invariant.
12006 2011-08-01 Robert Dewar <dewar@adacore.com>
12008 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12010 (Freeze_All_Ent): Fix error in handling inherited aspects.
12011 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12012 already analyzed, but don't skip entire processing of a declaration,
12013 that's wrong in some cases of declarations being rewritten.
12014 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12015 Don't delay for integer, string literals
12016 Treat predicates in usual manner for delay, remove special case code,
12018 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12019 (Build_Predicate_Function): Update saved expression in aspect
12020 (Build_Invariant_Procedure): Update saved expression in aspect
12021 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12022 of replacement of discriminant references if the reference is simple.
12024 2011-08-01 Robert Dewar <dewar@adacore.com>
12026 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12027 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12028 Static_Predicate and Dynamic_Predicate.
12029 (Build_Predicate_Function): Add processing for Static_Predicate
12030 and Dynamic_Predicate.
12031 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12032 (From_Static_Predicate): New flag
12033 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12035 2011-08-01 Robert Dewar <dewar@adacore.com>
12037 * usage.adb: Documentation cleanup for Ada version modes in usage.
12038 * expander.adb: Minor reformatting.
12040 2011-08-01 Robert Dewar <dewar@adacore.com>
12042 * atree.ads: Minor comment fix.
12043 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12044 a-witeio.ads, sem_prag.adb: Minor reformatting.
12046 2011-08-01 Doug Rupp <rupp@adacore.com>
12048 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12049 pointers. Use descrip.h header file for convenience. Add some
12052 2011-08-01 Robert Dewar <dewar@adacore.com>
12054 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12055 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12056 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12058 (Check_Aspect_At_End_Of_Declarations): New procedure
12059 (Analye_Aspect_Specification): Minor changes for above procedures
12060 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12061 specification node as well.
12063 2011-08-01 Pascal Obry <obry@adacore.com>
12065 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12066 Windows files. Use GetFilesAttributes() in this case to check for file
12067 existence instead of returning with an error code.
12069 2011-08-01 Vincent Celier <celier@adacore.com>
12071 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12072 High is above Source length.
12074 2011-08-01 Robert Dewar <dewar@adacore.com>
12076 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12078 2011-08-01 Robert Dewar <dewar@adacore.com>
12080 * aspects.ads (Boolean_Aspects): New subtype.
12081 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12082 for derived types in cases where the parent type and derived type have
12084 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12085 with aspects when parent type also has aspects.
12086 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12087 boolean expression at this point).
12088 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12089 accordance with final decision on the Ada 2012 feature.
12090 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12092 2011-08-01 Matthew Heaney <heaney@adacore.com>
12094 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12096 2011-08-01 Pascal Obry <obry@adacore.com>
12098 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12099 Fix Replace_Slice when High is above current string size.
12100 (Replace_Slice): Fix DL computation when High is above current
12103 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12105 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12107 2011-08-01 Matthew Heaney <heaney@adacore.com>
12109 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12112 2011-08-01 Pascal Obry <obry@adacore.com>
12114 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12117 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12119 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12120 access to protected subprograms in generic bodies.
12121 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12122 protected type, indicate that the convention of the subprogram is
12123 Convention_Protected, because it may be used in subsequent declarations
12124 within the protected declaration.
12126 2011-08-01 Vincent Celier <celier@adacore.com>
12128 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12129 and "final" procedures when the name of the library is "ada", to avoid
12130 duplicate symbols "adainit" and "adafinal" in executables.
12132 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12134 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12135 quantified expression that appears within a postcondition and uses the
12136 Ada2012 'Result attribute.
12138 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12140 * init.c (__gnat_error_handler): Cast reason to int.
12141 (__gnat_install_handler): Explain sa_sigaction use.
12143 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12145 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12146 subprogram has copy-in copy-out parameters, try to promote the mode of
12147 the return type if it is passed in registers.
12149 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12151 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12152 left operand as addressable.
12154 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12156 * gcc-interface/gigi.h (build_function_stub): Remove.
12157 (build_return_expr): Likewise.
12158 (convert_vms_descriptor): Declare.
12159 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12160 (build_function_stub): Move to...
12161 * gcc-interface/utils2.c (build_return_expr): Move to...
12162 * gcc-interface/trans.c (build_function_stub): ...here.
12163 (build_return_expr): ...here.
12164 (Subprogram_Body_to_gnu): Add local variable for language_function.
12165 Disconnect the parameter attributes cache, if any, once done with it.
12166 Call end_subprog_body only after setting the end_locus.
12167 Build the stub associated with the function, if any, at the very end.
12168 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12169 variables and streamline control flow.
12171 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12174 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12175 g-trasym-dwarf.adb.
12177 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12180 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12181 Assign to act.sa_sigaction.
12182 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12183 current->return_address to char * before arithmetic.
12185 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12187 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12188 Correct argument types.
12189 Extract code from reason.
12190 (__gnat_install_handler): Assign to act.sa_sigaction.
12192 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12194 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12195 (GNAT1_OBJS): ...here.
12197 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12200 * g-socthi-mingw.adb (Fill): Fix formatting.
12202 * gcc-interface/gigi.h: Move around comment.
12204 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12207 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12209 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12212 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12214 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12216 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12217 range comparison if Pmode is SImode.
12219 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12220 Eric Botcazou <ebotcazou@adacore.com>
12222 * adadecode.c: Wrap up in extern "C" block.
12223 * adadecode.h: Likewise.
12224 * adaint.c: Likewise. Remove 'const' keyword.
12225 * adaint.h: Likewise.
12226 * argv.c: Likewise.
12227 * atree.h: Likewise.
12229 * cstreams.c: Likewise.
12231 * exit.c: Likewise.
12233 * final.c: Likewise.
12234 * init.c: Likewise.
12235 * initialize.c: Likewise.
12236 * link.c: Likewise.
12237 * namet.h: Likewise.
12238 * nlists.h: Likewise.
12239 * raise.c: Likewise.
12240 * raise.h: Likewise.
12241 * repinfo.h: Likewise.
12242 * seh_init.c: Likewise.
12243 * targext.c: Likewise.
12244 * tracebak.c: Likewise.
12245 * uintp.h: Likewise.
12246 * urealp.h: Likewise.
12247 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12248 * xsinfo.adb: Likewise.
12249 * xsnamest.adb: Likewise.
12250 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12251 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12252 * gcc-interface/misc.c: Likewise.
12253 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12254 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12255 ada/targext.o here...
12256 (GNAT_ADA_OBJS): ...and not here.
12257 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12258 (GNATBIND_OBJS): Reorder.
12260 2011-07-07 Richard Henderson <rth@redhat.com>
12262 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12263 dwarf2out_frame_init.
12265 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12267 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12269 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12272 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12274 2011-07-06 Richard Guenther <rguenther@suse.de>
12276 * gcc-interface/misc.c (gnat_init): Merge calls to
12277 build_common_tree_nodes and build_common_tree_nodes_2.
12278 Re-initialize boolean_false_node.
12280 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12281 Olivier Hainque <hainque@adacore.com>
12282 Nicolas Setton <setton@adacore.com>
12284 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12285 the type according to the ARTIFICIAL_P parameter.
12286 (create_type_decl): Likewise.
12287 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12289 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12291 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12292 (gnatbind): Likewise.
12294 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12296 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12298 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12300 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12301 local variable throughout. Remove useless call to Base_Type.
12302 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12303 Take it also into account for the volatileness of the field. Set the
12304 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12306 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12308 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12309 on a dereference built for a by-ref object if it has an address clause.
12311 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12313 * einfo.ads (Address_Taken): Document use for the second argument of
12314 Asm_Input and Asm_Output attributes.
12315 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12316 argument is an entity name, then set Address_Taken on it.
12317 <Attribute_Asm_Output>: Likewise.
12318 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12319 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12320 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12321 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12323 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12325 PR middle-end/46500
12326 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12328 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12330 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12331 (ada/utils.o): Update dependencies.
12332 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12333 ../../../libcpp/libcpp.a.
12334 * gcc-interface/utils.c: Include common/common-target.h.
12335 (process_attributes): Use targetm_common.have_named_sections.
12337 2011-06-07 Richard Guenther <rguenther@suse.de>
12339 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12342 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12344 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12345 TREE_THIS_NOTRAP flag.
12347 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12349 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12352 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12354 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12355 constants whose full view has discriminants specially.
12357 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12359 * gcc-interface/utils.c: Include diagnostic.h.
12360 (gnat_write_global_declarations): Output debug information for all
12361 global type declarations before finalizing the compilation unit.
12362 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12364 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12366 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12368 2011-05-25 Kai Tietz <ktietz@redhat.com>
12370 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12371 initialization instead of const/none-const pointer assignment.
12373 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12375 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12376 $(EXTRA_GNAT1_OBJS).
12377 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12378 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12379 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12380 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12381 libcommon-target.a instead of prefix.o.
12383 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12386 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12388 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12390 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12391 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12392 instead of version.o.
12394 2011-05-18 Kai Tietz <ktietz@redhat.com>
12396 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12397 boolean_false_node instead of integer_zero_node.
12398 (convert_with_check): Likewise.
12399 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12401 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12403 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12404 type of the parameter is an unconstrained array, convert the actual to
12405 the type of the formal in the In Out and Out cases as well.
12407 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12409 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12410 call build_function_type_array or build_varargs_function_type_array
12412 (create_subprog_type): Don't call build_function_type; call
12413 build_function_type_vec instead.
12415 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12417 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12418 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12419 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12421 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12423 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12425 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12426 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12428 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12430 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12432 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12434 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12435 instead of accessing TYPE_ARG_TYPES directly.
12436 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12438 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12441 * gcc-interface/gigi.h (get_variant_part): Declare.
12442 * gcc-interface/decl.c (get_variant_part): Make global.
12443 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12444 types have the same constant size, are record types and T1 has a
12445 variant part while T2 doesn't.
12447 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12449 * gcc-interface/utils.c (begin_subprog_body): Do not call
12451 (end_subprog_body): Likewise.
12453 2011-05-04 Richard Guenther <rguenther@suse.de>
12455 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12457 (pos_to_constructor): Likewise.
12459 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12460 Eric Botcazou <ebotcazou@adacore.com>
12462 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12463 of build_function_type. Adjust calls to...
12464 (build_raise_check): ...this. Do not take a void_tree parameter.
12465 Call build_function_type_list instead of build_function_type.
12466 Fix head comment and swap couple of conditional blocks.
12468 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12470 * gnatvsn.ads (Library_Version): Bump to 4.7.
12471 (Current_Year): Bump to 2011.
12473 2011-04-29 Michael Matz <matz@suse.de>
12475 * gcc-interface/misc.c (gnat_handle_option): Set
12476 warn_maybe_uninitialized.
12478 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12480 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12481 the Watson/McCabe paper.
12483 2011-04-23 Jim Meyering <meyering@redhat.com>
12485 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12487 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12489 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12492 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12494 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12496 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12497 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12498 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12499 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12500 <all>: Do not set flags on the reused DECL node coming from an alias.
12501 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12502 don't need debug info here...
12503 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12504 (gigi): Adjust calls to create_subprog_decl.
12505 (build_raise_check): Likewise.
12506 (establish_gnat_vms_condition_handler): Likewise.
12507 (Compilation_Unit_to_gnu): Likewise.
12508 (gnat_to_gnu): Likewise.
12510 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12512 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12513 (NO_REORDER_ADAFLAGS): New variable.
12514 (EXTRA_GNATTOOLS): Always define.
12515 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12516 Clean up and adjust list of files compiled with special options.
12517 * gcc-interface/Make-lang.in: Likewise.
12518 (ada/decl.o): Cosmetical change.
12519 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12521 2011-04-20 Jim Meyering <meyering@redhat.com>
12523 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12525 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12527 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12528 $(CFLAGS) on the link line.
12530 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12532 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12533 padded type built for the return type if it is unconstrained.
12535 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12537 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12539 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12541 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12542 before calling TREE_CHAIN.
12543 * gcc-interface/misc.c (gnat_init_ts): New function.
12544 (LANG_HOOKS_INIT_TS): Define.
12546 2011-04-12 Martin Jambor <mjambor@suse.cz>
12548 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12549 instead of cgraph_node.
12551 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12553 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12554 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12557 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12559 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12560 of aggregate types that contain a placeholder.
12562 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12564 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12566 (handle_type_generic_attribute): Likewise.
12568 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12571 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12573 2011-04-04 Kai Tietz <ktietz@redhat.com>
12576 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12579 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12581 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12582 type case, do not strip a padding type around the array type.
12584 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12586 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12589 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12591 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12592 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12593 code for -feliminate-unused-debug-types.
12594 (gnat_post_options): Likewise.
12596 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12598 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12599 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12602 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12604 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12605 DECL_ARTIFICIAL flag on enumeration types.
12607 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12609 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12610 fat pointer types artificial unconditionally.
12611 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12614 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12616 * gcc-interface/gigi.h (get_dummy_type): Declare.
12617 (build_dummy_unc_pointer_types): Likewise.
12618 (finish_fat_pointer_type): Likewise.
12619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12620 fat pointer type has been built, complete it in place.
12621 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12622 and thin pointers. Remove useless variable.
12623 (finish_fat_pointer_type): Make global and move to...
12624 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12625 (get_dummy_type): New function.
12626 (build_dummy_unc_pointer_types): Likewise.
12627 (gnat_pushdecl): Propage the name to the anonymous variants only.
12628 (update_pointer_to): Only adjust the pointer types in the unconstrained
12631 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12633 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12634 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12635 if this is a Taft amendment type and the full declaration is available.
12636 * gcc-interface/trans.c (process_type): Likewise.
12637 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12638 (process_freeze_entity): Likewise.
12639 * gcc-interface/utils.c (dummy_global): New static variable.
12640 (gnat_write_global_declarations): If there are types declared as used
12641 at the global level, insert them in the global hash table.
12643 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12645 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12646 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12647 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12649 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12650 flag of the type accordingly.
12651 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12653 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12655 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12656 finalizing types when updating the pointers to the designated type.
12657 <all>: Finalize the deferred types even if we didn't defer processing
12658 of incomplete types in this invocation.
12660 2011-04-01 Olivier Hainque <hainque@adacore.com>
12661 Nicolas Setton <setton@adacore.com>
12662 Eric Botcazou <ebotcazou@adacore.com>
12664 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12665 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12667 2011-03-28 Kai Tietz <ktietz@redhat.com>
12669 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12671 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12672 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12674 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12676 2011-03-28 Tristan Gingold <gingold@adacore.com>
12679 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12680 Use ada output of gnatbind.
12681 (ada/b_gnatb.adb): Ditto.
12682 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12683 (ada.mostlyclean, ada.stage1)
12684 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12685 (ada.stagefeedback): Adjust.
12686 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12687 Use ada output of gnatbind.
12688 (b_gnatm.adb): Ditto.
12689 (b_gnatl.o, b_gnatm.o): New rules.
12691 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12693 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12694 for the padded type built to support a specified size or alignment.
12696 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12698 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12699 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12700 unconditionally to the end of the unit when the designated type is
12702 <all>: Rename local variable. Attempt to un-defer types only and do it
12703 for limited_with'ed types as well.
12704 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12705 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12706 consistently and remove redundant call to finalize_from_with_types.
12708 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12710 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12711 subprograms without a previous spec declared in the same unit.
12712 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12713 subprograms at the end of the unit instead of at the beginning.
12714 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12715 isn't public for the special handling of non-inline functions nested
12716 inside inline external functions.
12718 2011-03-25 Jeff Law <law@redhat.com>
12720 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12722 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12724 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12725 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12726 to compute Set_Size_Depends_On_Discriminant.
12727 (Layout_Type): Call it on array types in back-end layout mode.
12728 * sem_util.adb (Requires_Transient_Scope): Return true for array
12729 types only if the size depends on the value of discriminants.
12730 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12731 type if the RHS is a call to a function that returns an unconstrained
12732 type with default discriminant.
12734 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12736 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12737 non-conversion to the nominal result type at the end.
12739 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12741 * gcc-interface/trans.c (create_temporary): New function taken from...
12742 (create_init_temporary): ...here. Call it.
12743 (call_to_gnu): Create the temporary for the return value early, if any.
12744 Create it for a function with copy-in/copy-out parameters if there is
12745 no target; in other cases of copy-in/copy-out, use another temporary.
12746 Push the new binding level lazily. Add and rename local variables.
12748 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12750 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12752 (set_rm_size): Likewise.
12754 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12756 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12757 for the padded type built in order to support a specified alignment.
12758 Fix incorrect formatting.
12760 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12763 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12765 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12767 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12768 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12769 to the end of the list. Adjust recursive call. Rename local variable.
12770 If REORDER is true, reorder components of the record type.
12771 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12772 components_to_record and adjust the parameter list.
12774 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12776 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12777 disabled, use the variable for bounds of loop iteration scheme.
12779 2011-03-21 Kai Tietz <ktietz@redhat.com>
12782 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12784 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12786 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12787 out whether the expression is read-only. Short-circuit placeholder
12788 case and rename a couple of local variables.
12790 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12792 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12793 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12794 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12795 (convert): Deal with conversions from a smaller form type specially.
12797 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12799 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12800 its argument, except for the special -I- switch.
12802 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12804 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12807 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12809 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12811 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12813 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12815 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12816 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12817 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12818 Do not generate the check directly, instead instantiate the template
12819 check present in the descriptor.
12820 (make_descriptor_field): Move around.
12821 (build_vms_descriptor32): Build a template check in the POINTER field.
12822 (build_vms_descriptor): Remove useless suffixes.
12823 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12825 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12828 * targext.c: Include target files if IN_RTS is defined.
12830 2011-01-26 Richard Guenther <rguenther@suse.de>
12833 * targext.c: Include config.h.
12834 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12837 2011-01-04 Pascal Obry <obry@adacore.com>
12838 Eric Botcazou <ebotcazou@adacore.com>
12840 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12842 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12844 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12845 end-of-case on the end label and its associated gotos, if any.
12847 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12849 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12850 expressions of the parameter cache within the statement group of
12851 the CICO mechanism.
12853 2011-01-04 Olivier Hainque <hainque@adacore.com>
12854 Eric Botcazou <ebotcazou@adacore.com>
12856 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12857 (set_end_locus_from_node): New function.
12858 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12859 make and the function end_locus.
12860 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12861 for the elaboration subprogram.
12862 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12863 set the end_locus of the expression as well.
12865 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12868 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12869 variables that are referenced in exception handlers volatile.
12873 Copyright (C) 2011 Free Software Foundation, Inc.
12875 Copying and distribution of this file, with or without modification,
12876 are permitted in any medium without royalty provided the copyright
12877 notice and this notice are preserved.
12879 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12880 - fix bugs in the description of Source_Trace;
12881 - get rid of UNIT_NAME;
12883 2011-08-02 Javier Miranda <miranda@adacore.com>
12886 (Build_Dispatching_Requeue): Adding support for VM targets
12887 since we cannot directly reference the Tag entity.
12888 * exp_sel.adb (Build_K): Adding support for VM targets.
12889 (Build_S_Assignment): Adding support for VM targets.
12891 (Default_Prim_Op_Position): In VM targets do not restrict availability
12892 of predefined interface primitives to compiling in Ada 2005 mode.
12893 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12894 restricted to compiling in Ada 2005 mode.
12895 (Make_VM_TSD): Generate code that declares and initializes the OSD
12896 record. Needed to support dispatching calls through synchronized
12899 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12900 primitives associated with synchronized interfaces.
12901 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12902 primitives associated with synchronized interfaces.
12904 2011-08-02 Yannick Moy <moy@adacore.com>
12906 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12907 statements hidden in SPARK if preceded by the HIDE directive
12908 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12909 exception handlers as hidden in SPARK if preceded by the HIDE directive
12910 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12911 if starting with the HIDE directive
12912 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12913 starting with the HIDE directive; mark the declarations in a private
12914 part as hidden in SPARK if the private part starts with the HIDE
12916 * restrict.adb, restrict.ads
12917 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12918 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12919 argument node belongs to a part which is hidden in SPARK
12920 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12921 parts in SPARK; protect the possibly costly call to
12922 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12923 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12924 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12925 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12927 (Scan): recognize special comment starting with '#' and followed by
12928 SPARK keyword "hide" as a HIDE directive.
12930 2011-08-02 Yannick Moy <moy@adacore.com>
12932 * types.ads, erroutc.ads: Minor reformatting.
12934 2011-08-02 Vincent Celier <celier@adacore.com>
12936 * link.c: Add response file support for cross platforms.
12938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12940 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12941 in an association, set parent field of copy before partial analysis.
12942 * sem_res.adb (Resolve_Slice): create reference to itype only when
12943 expansion is enabled.
12945 2011-08-02 Yannick Moy <moy@adacore.com>
12947 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12948 for new flag denoting which subprogram bodies are in ALFA
12949 * restrict.adb, sem_ch7.adb: Update comment
12950 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12951 sem_ch9.adb, sem_res.adb: Add calls to
12952 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12953 * sem_ch6.adb (Analyze_Function_Return): add calls to
12954 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12955 middle of the body, and extended return.
12956 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12957 False when missing return.
12958 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12959 to True for subprograms whose spec is in ALFA. Remove later on the flag
12960 on the entity used for a subprogram body when there exists a separate
12962 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12963 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12964 False, otherwise do nothing.
12966 2011-08-02 Robert Dewar <dewar@adacore.com>
12968 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12970 2011-08-02 Yannick Moy <moy@adacore.com>
12972 * sem_ch4.ads: minor formatting.
12974 2011-08-02 Yannick Moy <moy@adacore.com>
12976 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12977 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12978 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12979 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12980 opt.ads: cleanup of SPARK mode
12982 2011-08-02 Yannick Moy <moy@adacore.com>
12984 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12986 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12987 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12989 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12990 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12991 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12992 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12994 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12996 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12997 functions whose return type is not in ALFA.
12998 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13000 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13001 parameter's type is not in ALFA.
13002 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13007 * sem_ch6 (Analyze_Expression_Function): treat the function as
13008 Inline_Always, and introduce a subprogram declaration for it when it is
13010 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13011 expression functions, so that the back-end can determine whether they
13012 can in fact be inlined.
13013 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13014 a function body comes from an expression function.
13016 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13018 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13019 null exclusions to test Can_Never_Be_Null on the anonymous access types
13020 of the formals rather than testing the formals themselves. Exclude this
13021 check in cases where the Old_Formal is marked as a controlling formal,
13022 to avoid issuing spurious errors for bodies completing dispatching
13023 operations (due to the flag not getting set on controlling access
13024 formals in body specs).
13025 (Find_Corresponding_Spec): When checking full and subtype conformance of
13026 subprogram bodies in instances, pass Designated and E in that order, for
13027 consistency with the expected order of the formals (New_Id followed by
13030 2011-08-02 Robert Dewar <dewar@adacore.com>
13032 * sem_ch8.adb: Minor reformatting.
13034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13036 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13037 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13038 primitive operations of class-wide actuals.
13040 2011-08-02 Javier Miranda <miranda@adacore.com>
13042 * exp_atag.ads, exp_atag.adb
13043 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13044 since its value is implicitly passed in argument Typ.
13045 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13046 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13047 Build_Common_Dispatching_Select_Statements.
13049 2011-08-02 Robert Dewar <dewar@adacore.com>
13051 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13052 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13053 Minor reformatting.
13055 2011-08-02 Robert Dewar <dewar@adacore.com>
13057 * sem_res.adb: Minor reformatting.
13058 * sem_prag.adb: Minor reformatting.
13060 2011-08-02 Javier Miranda <miranda@adacore.com>
13062 * exp_atag.adb, exp_atags.ads
13063 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13064 by the tagged type Entity. Required to use this routine in the VM
13065 targets since we do not have available the Tag entity in the VM
13068 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13069 Ada.Tags has not been previously loaded.
13071 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13072 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13074 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13075 view of enclosing scopes. Required to handle enclosing scopes that
13076 are synchronized types whose full view is a task type.
13078 (Build_VM_TSDs): Minor code improvement to avoid generating and
13079 analyzing lists with empty nodes.
13080 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13081 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13082 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13083 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13084 (Make_Select_Specific_Data_Table): Add support for VM targets.
13085 (Make_VM_TSD): Generate code to initialize the SSD structure of
13088 2011-08-02 Yannick Moy <moy@adacore.com>
13090 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13091 cross-references section in ALI.
13092 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13093 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13095 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13096 subprogram or package entity of a node
13097 (Is_Local_Reference_Type): new function returns True for references
13098 selected in local cross-references.
13099 (Lt): function extracted from Lt in Output_References
13100 (Write_Entity_Name): function extracted from Output_References
13101 (Generate_Definition): generate reference with type 'D' for definition
13102 of objects (object declaration and parameter specification), with
13103 appropriate locations and units, for use in local cross-references.
13104 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13105 references of type 'I' for initialization in object definition.
13106 (Output_References): move part of function Lt and procedure
13107 Write_Entity_Name outside of the body. Ignore references of types 'D'
13108 and 'I' introduced for local cross-references.
13109 (Output_Local_References): new procedure to output the local
13110 cross-references sections.
13111 (Lref_Entity_Status): new array defining whether an entity is a local
13112 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13113 with 'I' type when initialization expression is present.
13114 * get_scos.adb, get_scos.ads: Correct comments and typos
13116 2011-08-02 Javier Miranda <miranda@adacore.com>
13118 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13120 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13122 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13125 2011-08-02 Vincent Celier <celier@adacore.com>
13127 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13128 (No_Space_Img): New function
13129 (Find_Excluded_Sources): When reading from a file, record the file name
13130 and the line number for each excluded source.
13131 (Mark_Excluded_Sources): When reporting an error, if the excluded
13132 sources were read from a file, include file name and line number in
13135 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13137 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13139 2011-08-02 Robert Dewar <dewar@adacore.com>
13141 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13143 2011-08-02 Javier Miranda <miranda@adacore.com>
13145 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13146 generation of TSDs to the DOTNET compiler.
13147 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13148 generation of TSDs to the DOTNET compiler.
13150 2011-08-02 Javier Miranda <miranda@adacore.com>
13152 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13153 record of all the tagged types declared inside library level package
13154 declarations, library level package bodies or library level subprograms.
13155 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13156 associated with a given tagged type.
13157 (Build_VM_TSDs): New subprogram.
13158 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13159 compilation units that are subprograms.
13160 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13161 compilation units that are package bodies.
13162 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13163 units that are a package declaration or a package instantiation.
13164 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13165 reorganization to improve the error generated by the frontend when the
13166 function Ada.Tags.Secondary_Tag is not available.
13167 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13168 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13170 2011-08-02 Javier Miranda <miranda@adacore.com>
13172 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13174 2011-08-02 Robert Dewar <dewar@adacore.com>
13176 * s-imenne.ads: Minor reformatting.
13178 2011-08-02 Robert Dewar <dewar@adacore.com>
13180 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13181 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13182 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13184 2011-08-02 Robert Dewar <dewar@adacore.com>
13186 * einfo.ads (Materialize_Entity): Document this is only for renamings
13187 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13188 required debug information in the case where we transform the object
13189 declaration into a renaming declaration.
13190 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13192 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13193 Materialize_Entity.
13195 2011-08-02 Robert Dewar <dewar@adacore.com>
13197 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13198 Suppress_Init_Procs.
13199 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13200 Suppress_Initialization/Initialization_Suppressed.
13201 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13202 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13203 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13204 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13206 2011-08-02 Robert Dewar <dewar@adacore.com>
13208 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13209 Minor reformatting.
13211 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13213 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13214 only have inheritable classwide pre/postconditions.
13216 2011-08-02 Javier Miranda <miranda@adacore.com>
13218 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13219 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13220 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13221 checks if the external tag of a type is the same as the external tag
13222 of some other declaration.
13224 2011-08-02 Thomas Quinot <quinot@adacore.com>
13226 * s-taskin.ads: Minor reformatting.
13228 2011-08-02 Emmanuel Briot <briot@adacore.com>
13230 * g-comlin.adb (Display_Help): swap the order in which it prints the
13231 short help and the general usage.
13233 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13235 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13236 the aspect declarations and attach them to the generic copy for
13237 subsequent analysis.
13238 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13239 declarations of the generic tree to the new subprogram declarations.
13240 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13241 conditions that apply to a subprogram instance.
13243 2011-08-02 Robert Dewar <dewar@adacore.com>
13245 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13249 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13250 private type with a tagged full view is not derived in the immediate
13251 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13253 2011-08-02 Robert Dewar <dewar@adacore.com>
13255 * exp_ch4.adb: Minor reformatting.
13257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13259 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13260 Ada2012 iterator, the loop will be rewritten during expansion into a
13261 while loop with a cursor and an element declaration. Do not analyze the
13262 body in this case, because if the container is for indefinite types the
13263 actual subtype of the elements will only be determined when the cursor
13264 declaration is analyzed.
13266 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13268 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13269 size/alignment related attributes in CodePeer_Mode.
13271 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13273 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13274 Prepend_Element, since this can result in the operation getting the
13275 wrong slot in the full type's dispatch table if the full type has
13276 inherited operations. The incomplete type's operation will get added
13277 to the proper position in the full type's primitives
13278 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13279 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13280 dispatching operations, since there are cases where nonprimitive
13281 subprograms can get added to the list of incomplete dependents (such
13282 as subprograms in nested packages).
13283 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13284 private part when determining whether to add a primitive with a
13285 parameter of a tagged incomplete type to the Private_Dependents list.
13286 Such primitives can also occur in the visible part, and should not have
13287 been excluded from being private dependents.
13288 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13289 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13290 list of a Taft-amendment incomplete type is a primitive before issuing
13291 an error that the full type must appear in the same unit. There are
13292 cases where nonprimitives can be in the list (such as subprograms in
13294 * sem_disp.adb (Derives_From): Use correct condition for checking that
13295 a formal's type is derived from the type of the corresponding formal in
13296 the parent subprogram (the condition was completely wrong). Add
13297 checking that was missing for controlling result types being derived
13298 from the result type of the parent operation.
13300 2011-08-02 Yannick Moy <moy@adacore.com>
13302 * errout.adb (First_Node): minor renaming
13303 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13306 2011-08-02 Yannick Moy <moy@adacore.com>
13308 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13309 before accessing operands.
13310 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13311 decide whether an initialization expression respects SPARK rules, as
13312 the plain node is the expanded one. This allows for more valid warnings
13314 * gnat_rm.texi: Minor update.
13316 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13318 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13321 2011-08-02 Robert Dewar <dewar@adacore.com>
13323 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13325 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13327 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13328 loop statements and the element renaming declaration with a block when
13329 the element type is controlled.
13331 2011-08-02 Yannick Moy <moy@adacore.com>
13333 * sinfo.ads: Minor formatting.
13335 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13337 * sem_aggr.adb (Add_Association): if the association has a box and no
13338 expression, use the Sloc of the aggregate itself for the new
13340 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13343 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13345 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13346 When a container is provided via a function call, generate a renaming
13347 of the function result. This avoids the creation of a transient scope
13348 and the premature finalization of the container.
13349 * exp_ch7.adb (Is_Container_Cursor): Removed.
13350 (Wrap_Transient_Declaration): Remove the supression of the finalization
13351 of the list controller when the declaration denotes a container cursor,
13354 2011-08-02 Yannick Moy <moy@adacore.com>
13356 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13357 node is from source, instead of the original node being from source.
13359 (Resolve_Array_Aggregate): refine the check for a static expression, to
13360 recognize also static ranges
13361 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13362 Array_Type_Declaration): postpone the test for the type being a subtype
13363 mark after the type has been resolved, so that component-selection and
13364 expanded-name are discriminated.
13365 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13366 to distinguish the case of an iteration scheme, so that an error is
13367 issed on a non-static range in SPARK except in an iteration scheme.
13368 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13369 In_Iter_Schm = True.
13370 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13371 user-defined operators so that they are allowed in renaming
13373 (Find_Selected_Component): refine the check for prefixing of operators
13374 so that they are allowed in renaming. Move the checks for restrictions
13375 on selector name after analysis discriminated between
13376 component-selection and expanded-name.
13377 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13378 concatenation argument of string type if it is static.
13379 * sem_util.adb, sem_util.ads
13380 (Check_Later_Vs_Basic_Declarations): add a new function
13381 Is_Later_Declarative_Item to decice which declarations are allowed as
13382 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13383 mode, add that renamings are considered as later items.
13384 (Enclosing_Package): new function to return the enclosing package
13385 (Enter_Name): correct the rule for homonyms in SPARK
13386 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13387 from source (result of expansion) to avoid issuing wrong warnings.
13389 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13391 * errout.adb: On anything but an expression First_Node returns its
13394 2011-08-02 Pascal Obry <obry@adacore.com>
13396 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13398 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13400 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13401 Set the associated loop as the related expression of internally
13403 * exp_ch7.adb (Is_Container_Cursor): New routine.
13404 (Wrap_Transient_Declaration): Supress the finalization of the list
13405 controller when the declaration denotes a container cursor.
13407 2011-08-02 Yannick Moy <moy@adacore.com>
13409 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13411 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13412 expression is a simple expression. This check cannot be performed in
13413 the semantics, so just drop it.
13414 (P_Index_Or_Discriminant_Constraint): move check that the index or
13415 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13416 semantics. Other cases were previously checked in the semantics.
13417 * par-ch4.adb (P_Name): move checks that a selector name is not
13418 character literal or an operator symbol to Find_Selected_Component in
13420 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13421 declarations are not placed after later declarations in a separate
13422 procedure in Sem_Util (possibly not the best choice?), to be used both
13423 during parsing, for Ada 83 mode, and during semantic analysis, for
13425 * par-endh.adb (Check_End): move check that end label is not missing
13426 to Process_End_Label in the semantics
13427 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13428 the special case for SPARK restriction
13429 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13430 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13431 parameter Force to issue the error message even on internal node (used
13432 for generated end label). Call Check_Restriction to check when an error
13433 must be issued. In SPARK mode, issue an error message even if the
13434 restriction is not set.
13435 (Check_Restriction): new procedure with an additional out parameter to
13436 inform the caller that a message has been issued
13437 * sem_aggr.adb: Minor modification of message
13438 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13439 instead of issuing an error message directly
13440 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13441 declarations are not placed after later declarations, by calling
13442 Check_Later_Vs_Basic_Declarations
13443 (Analyze_Subtype_Declaration): move here the check that an index or
13444 discriminant constraint must be a subtype mark. Change the check that
13445 a subtype of String must start at one so that it works on subtype marks.
13446 * sem_ch4.adb (Analyze_Call): move here the check that a named
13447 association cannot follow a positional one in a call
13448 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13449 instead of issuing an error message directly
13450 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13451 selector name is not a character literal or an operator symbol. Move
13452 here the check that the prefix of an expanded name cannot be a
13453 subprogram or a loop statement.
13454 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13455 procedure called from parsing and semantics to check that basic
13456 declarations are not placed after later declarations
13457 (Process_End_Label): move here the check that end label is not missing
13459 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13461 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13462 representation clause in codepeer mode, since it confuses CodePeer and
13463 does not bring useful info.
13465 2011-08-02 Ed Falis <falis@adacore.com>
13467 * init.c: initialize fp hw on MILS.
13469 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13471 * errout.adb (First_Node): for bodies, return the node itself (small
13472 optimization). For other nodes, do not check source_unit if the node
13473 comes from Standard.
13475 2011-08-02 Robert Dewar <dewar@adacore.com>
13477 * exp_ch3.adb: Minor comment additions.
13478 * sem_ch13.adb: Minor reformatting.
13480 2011-08-02 Pascal Obry <obry@adacore.com>
13482 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13484 2011-08-02 Robert Dewar <dewar@adacore.com>
13486 * sem_attr.adb: Minor reformatting.
13488 2011-08-02 Robert Dewar <dewar@adacore.com>
13490 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13491 (Has_Default_Component_Value): Removed
13492 * einfo.ads Comment updates
13493 (Has_Default_Aspect): Replaces Has_Default_Value
13494 (Has_Default_Component_Value): Removed
13496 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13498 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13499 (Get_Simple_Init_Val): Handle Default_Value aspect
13500 (Needs_Simple_Initialization): Handle Default_Value aspect
13501 * exp_ch3.ads: Needs_Simple_Initialization
13502 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13503 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13505 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13506 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13507 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13511 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13512 package containing iteration primitives.
13513 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13517 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13518 "of", pre-analyze expression in case it is a function call with
13519 finalization actions that must be placed ahead of the loop.
13520 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13521 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13523 2011-08-02 Geert Bosch <bosch@adacore.com>
13525 * cstand.adb (Create_Float_Types): Only consider C's long double for
13526 Long_Long_Float, in addition to double.
13528 2011-08-02 Robert Dewar <dewar@adacore.com>
13530 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13531 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13532 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13533 Minor reformatting.
13535 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13537 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13540 2011-08-02 Javier Miranda <miranda@adacore.com>
13542 * einfo.ads, einfo.adb
13543 (Original_Access_Type): Move this attribute to Node26 since there was
13544 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13545 which causes conflicts and breaks the generation of the .NET compiler.
13546 (Interface_Name): Add missing documentation on JGNAT only uses of
13549 2011-08-02 Geert Bosch <bosch@adacore.com>
13551 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13552 (Find_Back_End_Float_Type): Likewise
13553 (Create_Back_End_Float_Types): Likewise
13554 (Create_Float_Types): Likewise
13555 (Register_Float_Type): Likewise
13556 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13557 Nlist and split out type selection in new local Find_Base_Type function.
13558 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13560 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13562 2011-08-02 Robert Dewar <dewar@adacore.com>
13564 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13566 * opt.ads: Minor comment change.
13567 * sem_ch12.adb: Minor code reorganization.
13569 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13571 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13572 subtype's list of rep items to the list on the full subtype in the case
13573 where the lists are the same.
13575 2011-08-02 Geert Bosch <bosch@adacore.com>
13577 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13578 using the one from System.Strings, which also deallocates all strings.
13580 2011-08-02 Geert Bosch <bosch@adacore.com>
13582 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13584 * gcc-interface/Make-lang.in: Update dependencies.
13586 2011-08-02 Olivier Hainque <hainque@adacore.com>
13588 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13591 2011-08-02 Javier Miranda <miranda@adacore.com>
13593 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13594 associated with anonymous access to subprograms.
13596 2011-08-02 Geert Bosch <bosch@adacore.com>
13599 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13600 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13601 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13602 (Add_Symbol_Definition): Move to switch-c.adb
13603 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13604 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13605 (Add_Symbol_Definition): Move to switch-c.adb.
13606 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13608 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13609 Move to warnsw.adb.
13610 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13611 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13612 Move to warnsw.adb.
13613 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13614 (Add_Symbol_Definition): Moved from Prepcomp.
13615 * switch-c.ads: Update copyright notice. Use String_List instead of
13616 Argument_List, removing dependency on System.OS_Lib.
13618 2011-08-02 Yannick Moy <moy@adacore.com>
13620 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13621 mode on initialization expression which does not respect SPARK
13623 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13624 if the tree referenced by its argument represents an initialization
13625 expression in SPARK, suitable for initializing an object in an object
13628 2011-08-02 Javier Miranda <miranda@adacore.com>
13630 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13631 internally generated access to subprogram with its associated protected
13633 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13635 2011-08-02 Geert Bosch <bosch@adacore.com>
13637 * cstand.adb (Register_Float_Type): Print information about type to
13638 register, if the Debug_Flag_Dot_B is set.
13639 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13640 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13641 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13642 with a requested precision of more than Max_Digits digits and no more
13643 than Max_Base_Digits digits, if a range specification is present and the
13644 Predefined_Float_Types list has a suitable type to derive from.
13645 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13646 case of type completion with pragma Import
13648 (Process_Import_Predefined_Type): Processing to complete a type
13649 with pragma Import. Currently supports floating point types only.
13650 (Set_Convention_From_Pragma): Do nothing without underlying type.
13651 (Process_Convention): Guard against absence of underlying type,
13652 which may happen when importing incomplete types.
13653 (Process_Import_Or_Interface): Handle case of importing predefined
13654 types. Tweak error message.
13656 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13658 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13659 functions to previous change. Reorganize code slightly.
13661 2011-08-02 Geert Bosch <bosch@adacore.com>
13663 * back_end.ads (Register_Type_Proc): New call back procedure type for
13664 allowing the back end to provide information about available types.
13665 (Register_Back_End_Types): New procedure to register back end types.
13666 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13668 * cstand.adb (Back_End_Float_Types): New list for floating point types
13669 supported by the back end.
13670 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13671 (Copy_Float_Type): New procedure to make new copies of predefined types.
13672 (Register_Float_Type): New call back procedure to populate the BEFT list
13673 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13674 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13675 (Create_Float_Types): New procedure to create entities for floating
13676 point types predefined in Standard, and put these and any remaining
13677 BEFTs on the Predefined_Float_Types list.
13678 * stand.ads (Predefined_Float_Types): New list for predefined floating
13679 point types that do not have declarations in package Standard.
13681 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13683 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13684 entity node for the unit containing the parameter.
13685 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13686 (Add_Inlined_Subprogram): Likewise.
13687 * gcc-interface/Make-lang.in: Update dependencies.
13689 2011-08-02 Thomas Quinot <quinot@adacore.com>
13691 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13694 2011-08-02 Geert Bosch <bosch@adacore.com>
13696 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13698 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13700 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13701 computed value of Base_Type.
13703 2011-08-02 Yannick Moy <moy@adacore.com>
13705 * restrict.adb (Check_Restriction): issue an error for any use of
13706 class-wide, even if the No_Dispatch restriction is not set.
13707 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13708 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13709 when completing a private extension, the type named in the private part
13710 is not the same as that named in the visible part.
13711 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13712 of an inherited primitive operations of a tagged type or type extension
13713 that returns the tagged type.
13714 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13715 function which returns True for an implicit operation inherited by the
13716 derived type declaration for the argument type.
13717 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13720 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13722 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13723 Process_Bounds, to perform analysis with expansion of a range or an
13724 expression that is the iteration scheme for a loop.
13725 (Analyze_Iterator_Specification): If domain of iteration is given by a
13726 function call with a controlled result, as is the case if call returns
13727 a predefined container, ensure that finalization actions are properly
13729 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13731 2011-08-02 Javier Miranda <miranda@adacore.com>
13733 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13734 * gcc-interface/Make-lang.in: Update dependencies.
13736 2011-08-02 Javier Miranda <miranda@adacore.com>
13738 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13739 determine if the analysis is performed using N or Original_Node (N).
13740 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13741 functionality of routine Is_Variable avoids code duplication.
13742 * checks.adb (Determine_Range): Handle temporaries generated by
13743 Remove_Side_Effects.
13745 2011-08-02 Javier Miranda <miranda@adacore.com>
13747 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13748 expansion of the condition. Required since the previous analysis was
13749 done with expansion disabled (see Resolve_Quantified_Expression) and
13750 hence checks were not inserted and record comparisons have not been
13753 2011-08-02 Ed Falis <falis@adacore.com>
13755 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13758 2011-08-02 Bob Duff <duff@adacore.com>
13760 * opt.ads: Minor comment fix.
13762 2011-08-02 Bob Duff <duff@adacore.com>
13764 * sem_ch12.adb (Analyze_Package_Instantiation,
13765 Analyze_Subprogram_Instantiation): Turn off style checking while
13766 analyzing an instance. Whatever style checks that apply to the generic
13767 unit should apply, so it makes no sense to apply them in an instance.
13768 This was causing trouble when compiling an instance of a runtime
13769 unit that violates the -gnatyO switch.
13770 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13771 one of the two case statements, causing spurious errors.
13773 2011-08-02 Robert Dewar <dewar@adacore.com>
13775 * uname.adb: Minor reformatting.
13776 * gnatcmd.adb: Minor reformatting.
13777 * exp_attr.adb: Minor reformatting.
13779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13781 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13782 No_Dispatching_Calls, do not look for the Assign primitive, because
13783 predefined primitives are not created in this case.
13785 2011-08-02 Bob Duff <duff@adacore.com>
13787 * stylesw.ads: Minor comment fixes.
13789 2011-08-02 Robert Dewar <dewar@adacore.com>
13791 * freeze.adb (Add_To_Result): New procedure.
13793 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13795 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13796 time, if the specific run-time routines for handling streams of strings
13797 are not available, use the default mechanism.
13799 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13801 * s-regpat.ads: Fix typo.
13803 2011-08-02 Vincent Celier <celier@adacore.com>
13805 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13806 not null, call it to create the in memory config project file without
13807 parsing an existing default config project file.
13809 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13811 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13815 * sem_elim.adb: an abstract subprogram does not need an eliminate
13816 pragma for its descendant to be eliminable.
13818 2011-08-02 Ed Falis <falis@adacore.com>
13820 * init.c: revert to handling before previous checkin for VxWorks
13821 * s-intman-vxworks.adb: delete unnecessary declarations related to
13822 using Ada interrupt facilities for handling signals.
13823 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13824 * s-intman-vxworks.ads: Import __gnat_install_handler as
13825 Initialize_Interrupts.
13826 * s-taprop-vxworks.adb: Delete Signal_Mask.
13827 (Abort_Handler): change construction of mask to unblock exception
13830 2011-08-02 Jerome Guitton <guitton@adacore.com>
13832 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13833 Debug_Raise_Exception before propagation starts.
13835 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13837 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13838 to Restriction_Check_Required.
13839 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13840 * sem_res.adb (Resolve_Call): Likewise.
13841 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13843 2011-08-02 Bob Duff <duff@adacore.com>
13845 * stylesw.ads: Update comment.
13846 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13847 * errout.ads: Remove obsolete comment.
13849 2011-08-02 Javier Miranda <miranda@adacore.com>
13851 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13852 (Set_Is_Safe_To_Reevaluate): new procedure.
13853 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13854 assignment is allowed on safe-to-reevaluate variables.
13855 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13856 temporary created to remove side effects in expressions that use
13857 the secondary stack as safe-to-reevaluate.
13858 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13859 variables that are not true constants.
13861 2011-08-02 Robert Dewar <dewar@adacore.com>
13863 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13864 sem_res.adb, sem_ch6.adb: Minor reformatting.
13866 2011-08-02 Jerome Guitton <guitton@adacore.com>
13868 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13870 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13872 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13873 not set Overridden_Operation if subprogram is an initialization
13876 2011-08-02 Yannick Moy <moy@adacore.com>
13878 * par-ch6.adb: Correct obsolete name in comments
13879 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13880 which takes two message arguments (existing function takes one), with
13881 second message used for continuation.
13882 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13883 block statements that originate from a source block statement, not
13884 generated block statements
13885 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13886 symmetry with procedure case
13887 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13888 function to issue an error in formal mode if a package specification
13889 contains more than one tagged type or type extension.
13890 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13891 parameters matching formals of tagged types are objects (or ancestor
13892 type conversions of objects), not general expressions. Issue an error
13893 on view conversions that are not involving ancestor conversion of an
13895 (Resolve_Type_Conversion): in formal mode, issue an error on the
13896 operand of an ancestor type conversion which is not an object
13897 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13898 procedure so that it works also for actuals of function calls
13899 (Is_Actual_Tagged_Parameter): new function which determines if its
13900 argument is an actual parameter of a formal of tagged type in a
13902 (Is_SPARK_Object_Reference): new function which determines if the tree
13903 referenced by its argument represents an object in SPARK
13905 2011-08-02 Robert Dewar <dewar@adacore.com>
13907 * sem_ch3.adb: Minor reformatting
13908 Minor comment addition
13909 Minor error msg text change
13911 2011-08-02 Javier Miranda <miranda@adacore.com>
13913 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13914 function. Used to be more precise when we generate a variable plus one
13915 assignment to remove side effects in the evaluation of the Bound
13917 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13918 of the bound expression to force its re-analysis and thus expand the
13919 associated transient scope (if required). Code cleanup replacing the
13920 previous code that declared the constant entity by an invocation to
13921 routine Force_Evaluation which centralizes this work in the frontend.
13923 2011-08-02 Robert Dewar <dewar@adacore.com>
13925 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13926 (Base_Type): Now uses improved Is_Base_Type function
13927 * einfo.ads (Base_Type): Inline this function
13929 2011-08-02 Robert Dewar <dewar@adacore.com>
13931 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13932 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13934 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13936 * gcc-interface/Make-lang.in: Update dependencies.
13937 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13940 2011-08-02 Yannick Moy <moy@adacore.com>
13942 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13943 non-simple expression used in delta constraint
13944 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13945 index constraint which is not a subtype mark
13946 * par.adb: With and use Restrict
13947 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13948 mode on component type which is not a subtype mark and default
13949 expression on component
13950 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13951 of string which does not have a lower index bound equal to 1
13952 (Array_Type_Declaration): issue an error in formal mode on index or
13953 component type which is not a subtype mark, and on aliased keyword on
13955 (Derived_Type_Declaration): issue an error in formal mode on interface,
13956 limited or abstract type
13957 (Record_Type_Declaration): issue an error in formal mode on interface
13958 (Record_Type_Definition): issue an error in formal mode on tagged types
13959 and type extensions not declared in the specification of a library unit
13960 package; on null non-tagged record; on variant part
13962 2011-08-02 Vincent Celier <celier@adacore.com>
13964 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13965 not declared for qualified library project when Library_Name is not
13966 declared, but Library_Dir is.
13968 2011-08-02 Robert Dewar <dewar@adacore.com>
13970 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13971 pragmas (affects aspects [Component_]Default_Value
13972 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13973 component type for the resolution
13975 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13977 * einfo.adb (Base_Type): Tune implementation for speed.
13979 2011-08-02 Robert Dewar <dewar@adacore.com>
13981 * freeze.adb: Minor reformatting.
13983 2011-08-02 Thomas Quinot <quinot@adacore.com>
13985 * scos.ads: Update comments.
13987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13989 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13990 base type, because the parent may be a subtype of a private type whose
13991 convention is established in a private part.
13993 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13995 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13996 statement in a block when the expansion of the return expression has
13997 created a finalization chain.
13998 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13999 with the parent node.
14000 Add N_Extended_Return_Statement to handle the case where a transient
14001 object declaration appears in the Return_Object_Declarations list of
14002 an extended return statement.
14004 2011-08-02 Matthew Gingell <gingell@adacore.com>
14006 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14007 unused parameter 'name'.
14009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14011 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14012 inherited operation, check whether its alias, which is the source
14013 operastion that it renames, has been marked eliminated.
14015 2011-08-02 Javier Miranda <miranda@adacore.com>
14017 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14018 in-mode parameter whose type is an access type since it can be used to
14019 modify its designated object. Enforce code that handles as safe an
14020 access type that is not access-to-constant but it is the result of a
14021 previous removal of side-effects.
14022 (Remove_Side_Effects): Minor code reorganization of cases which require
14023 no action. Done to incorporate documentation on new cases uncovered
14024 working in this ticket: no action needed if this routine was invoked
14025 too early and the nodes are not yet decorated.
14026 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14027 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14028 were issued with actuals that are implicitly provided by
14031 2011-08-02 Robert Dewar <dewar@adacore.com>
14033 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14035 2011-08-02 Yannick Moy <moy@adacore.com>
14037 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14038 to issue an error in formal mode on attribute not supported in this mode
14039 (Analyze_Attribute): issue errors on standard attributes not supported
14041 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14042 comment, and issue error in formal mode on modulus which is not a power
14044 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14046 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14048 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14049 operator on modular type (except 'not').
14051 2011-08-02 Robert Dewar <dewar@adacore.com>
14053 * gnat_rm.texi: Minor reformatting.
14055 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14057 * s-osinte-linux.ads: Minor comment update and reformatting.
14058 * i-cexten.ads: Make this unit pure, as for its parent.
14059 Will allow its usage in more contexts if needed.
14061 2011-08-02 Robert Dewar <dewar@adacore.com>
14063 * s-utf_32.ads: Minor comment fix.
14065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14067 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14068 operation of a tagged synchronized type, handle the case where the
14069 controlling argument is overloaded.
14071 2011-08-02 Yannick Moy <moy@adacore.com>
14073 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14074 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14075 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14076 SPARK mode and formal verification mode on processing SPARK restriction
14077 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14078 requiring consistency checking.
14080 2011-08-02 Robert Dewar <dewar@adacore.com>
14082 * sem_res.adb: Minor reformatting.
14084 2011-08-02 Robert Dewar <dewar@adacore.com>
14086 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14087 a-cforse.ads: Remove unneeded with of Ada.Containers
14088 Remove commented out pragma Inline's
14089 Move specifications of new subprograms to the actual specs
14091 2011-08-02 Yannick Moy <moy@adacore.com>
14093 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14094 a-cforse.ads: Update comments.
14096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14098 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14100 2011-08-02 Robert Dewar <dewar@adacore.com>
14102 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14103 a-cforse.ads, a-cofove.ads: Minor reformatting.
14105 2011-08-02 Claire Dross <dross@adacore.com>
14107 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14108 a-cofove.ads: Add comments.
14110 2011-08-02 Yannick Moy <moy@adacore.com>
14112 * gnat_rm.texi: Document formal containers.
14114 2011-08-02 Emmanuel Briot <briot@adacore.com>
14116 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14117 are empty sections.
14119 2011-08-02 Robert Dewar <dewar@adacore.com>
14121 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14124 2011-08-02 Robert Dewar <dewar@adacore.com>
14126 * aspects.adb: New aspects Default_Value and Default_Component_Value
14127 New format of Aspect_Names table checks for omitted entries
14128 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14129 handling of boolean aspects for derived types.
14130 New aspects Default_Value and Default_Component_Value
14131 New format of Aspect_Names table checks for omitted entries
14132 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14133 (Has_Default_Value): New flag
14134 (Has_Default_Component_Value): New flag
14135 (Has_Default_Value): New flag
14136 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14138 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14139 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14140 Default_Value and Default_Component_Value
14141 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14142 New aspects Default_Value and Default_Component_Value
14143 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14144 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14146 2011-08-02 Vincent Celier <celier@adacore.com>
14148 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14149 inherit library kind.
14151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14153 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14154 Minor reformatting.
14156 2011-08-02 Robert Dewar <dewar@adacore.com>
14158 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14160 2011-08-02 Yannick Moy <moy@adacore.com>
14162 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14164 2011-08-02 Robert Dewar <dewar@adacore.com>
14166 * impunit.adb: Add comment.
14168 2011-08-02 Yannick Moy <moy@adacore.com>
14170 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14171 qualification of aggregates in formal mode
14172 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14174 (Resolve_Aggregate): complete the test that an aggregate is adequately
14175 qualified in formal mode
14177 2011-08-02 Pascal Obry <obry@adacore.com>
14179 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14180 * mlib-prj.adb: Supress warning when compiling binder generated file.
14181 (Build_Library): Supress all warnings when compiling the binder
14184 2011-08-02 Yannick Moy <moy@adacore.com>
14186 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14188 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14189 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14190 Add with/use clauses to make Check_Formal_Restriction visible
14192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14194 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14195 in-parameters when type of the generic formal is private in the generic
14196 spec and non-private in the body.
14198 2011-08-02 Claire Dross <dross@adacore.com>
14200 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14201 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14202 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14203 * impunit.adb, Makefile.rtl: Take new files into account.
14205 2011-08-02 Robert Dewar <dewar@adacore.com>
14207 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14208 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14210 2011-08-02 Yannick Moy <moy@adacore.com>
14212 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14214 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14215 matching static array bounds, taking into account the special case of
14217 * sem_ch3.adb: Typo in comment.
14219 2011-08-02 Yannick Moy <moy@adacore.com>
14221 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14222 which issues an error in formal mode if its argument node is originally
14224 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14225 has a discriminant specification so that it does not include the case
14227 (Derived_Type_Declaration): move here the test that a derived type has a
14228 discriminant specification
14229 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14230 first element of a component association before accessing its choices
14231 (presence of component association is not enough)
14232 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14233 declaration is a library item before accessing the next element in a
14234 list, as library items are not member of lists
14235 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14236 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14237 Check_Formal_Restriction whenever possible.
14239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14241 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14242 reference when needed.
14244 2011-08-02 Bob Duff <duff@adacore.com>
14246 * gnat_ugn.texi: Fix typo.
14248 2011-08-02 Vincent Celier <celier@adacore.com>
14250 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14251 archive file name. Do not use the full path name of archives for Open
14254 2011-08-02 Robert Dewar <dewar@adacore.com>
14256 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14257 Analyze_Aspect_Specifications
14259 (Analyze_Aspect_Specifications): New handling for boolean aspects
14260 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14261 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14262 sequence for Analyze_Aspect_Specifications
14263 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14264 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14266 2011-08-02 Robert Dewar <dewar@adacore.com>
14268 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14269 aspects, since these no longer exist.
14271 2011-08-02 Robert Dewar <dewar@adacore.com>
14273 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14274 semicolon, do not try to see if there are aspects following it.
14275 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14278 2011-08-02 Robert Dewar <dewar@adacore.com>
14280 * sem_ch8.adb, aspects.ads: Minor reformatting.
14282 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14284 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14285 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14287 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14289 2011-08-02 Yannick Moy <moy@adacore.com>
14291 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14292 mode on subprogram declaration outside of package specification, unless
14293 it is followed by a pragma Import
14294 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14295 Access_Type_Declaration): issue error in formal mode on access type
14296 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14298 (Analyze_Object_Declaration): issue error in formal mode on object
14299 declaration which does not respect SPARK restrictions
14300 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14301 declaration which does not respect SPARK restrictions
14302 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14303 error in formal mode on digits or delta constraint
14304 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14305 decimal fixed point type
14306 (Derived_Type_Declaration): issue error in formal mode on derived type
14307 other than type extensions of tagged record types
14308 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14309 with check on access definition
14310 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14311 mode on protected definition.
14312 (Analyze_Task_Definition): issue error in formal mode on task definition
14314 2011-08-02 Robert Dewar <dewar@adacore.com>
14316 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14318 2011-08-02 Javier Miranda <miranda@adacore.com>
14320 * sem_ch6.adb (Can_Override_Operator): New function.
14321 (Verify_Overriding_Indicator): Add missing code to check overriding
14322 indicator in operators. Fixes regression.
14323 (Check_Overriding_Indicator): Minor reformating after replacing the
14324 code that evaluates if the subprogram can override an operator by
14325 invocations to the above new function.
14327 (Write_Field26_Name): Add missing code to ensure that, following
14328 the documentation in einfo.ads, this field is not shown as attribute
14329 "Static_Initialization" on non-dispatching functions.
14331 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14333 * sem_res.adb (Resolve_Call): A call to
14334 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14335 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14336 i.e., when the second parameter is of type Time_Span.
14338 2011-08-02 Vincent Celier <celier@adacore.com>
14340 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14341 with an archive instead of -L<library dir> -l<library name>.
14343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14345 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14346 mark the base types In_Use in addition to making the operations
14349 2011-08-02 Ed Falis <falis@adacore.com>
14351 * init.c: add and setup __gnat_signal_mask for the exception signals
14352 * s-inmaop-vxworks.adb: new file.
14353 * s-intman-vxworks.adb: remove unnecessary initializations and
14355 * s-intman-vxworks.ads: remove unnecessary variable
14356 * s-taprop-vxworks.adb: simplify signal initialization
14358 2011-08-02 Robert Dewar <dewar@adacore.com>
14360 * sem_ch8.adb: Minor code reorganization, comment updates.
14362 2011-08-02 Robert Dewar <dewar@adacore.com>
14364 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14365 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14367 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14368 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14372 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14373 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14374 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14375 use_type_clauses, to handle more efficiently use_type and use_all_type
14377 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14378 Ada2012 Use_All_Type clause.
14379 (Use_Class_Wide_Operations): new procedure.
14381 2011-08-02 Robert Dewar <dewar@adacore.com>
14383 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14384 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14385 expression to expression function.
14387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14389 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14390 if types are compatible.
14392 2011-08-02 Yannick Moy <moy@adacore.com>
14394 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14395 returns True if its argument array types have same dimension and same
14396 static bounds at each index.
14397 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14398 OUT or IN OUT paramaters which are not view conversions in SPARK.
14399 (Resolve_Arithmetic_Op): issue an error in formal mode on
14400 multiplication or division with operands of fixed point types which are
14401 not qualified or explicitly converted.
14402 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14403 Boolean or array type (except String) operands.
14404 (Resolve_Equality_Op): issue an error in formal mode on equality
14405 operators for array types other than String with non-matching static
14407 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14408 for array types with non-matching static bounds. Factorize the code in
14409 Matching_Static_Array_Bounds.
14410 (Resolve_Qualified_Expression): issue an error in formal mode on
14411 qualified expressions for array types with non-matching static bounds.
14412 (Resolve_Type_Conversion): issue an error in formal mode on type
14413 conversion for array types with non-matching static bounds
14415 2011-08-02 Robert Dewar <dewar@adacore.com>
14417 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14421 * par-ch9.adb: save location of entry for proper error message.
14423 2011-08-02 Javier Miranda <miranda@adacore.com>
14425 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14426 (Use_Full_View) which permits this routine to climb through the
14427 ancestors using the full-view of private parents.
14428 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14429 Use_Full_View to true in calls to Is_Ancestor.
14430 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14431 true in call to Is_Ancestor.
14432 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14433 Use_Full_View to true in call to Is_Ancestor.
14434 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14435 call to Is_Ancestor.
14436 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14437 Use_Full_View to true in calls to Is_Ancestor.
14438 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14439 Make_Select_Specific_Data_Table, Register_Primitive,
14440 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14441 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14442 to true in call to Is_Ancestor.
14443 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14444 Use_Full_View to true in calls to Is_Ancestor.
14446 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14447 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14449 2011-08-02 Robert Dewar <dewar@adacore.com>
14451 * gnat_rm.texi: Minor reformatting.
14452 * sem_prag.adb: Minor reformatting.
14454 2011-08-02 Tristan Gingold <gingold@adacore.com>
14456 * vms_data.ads: Add VMS qualifier for -gnateP.
14458 2011-08-02 Robert Dewar <dewar@adacore.com>
14460 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14461 * par-ch7.adb (P_Package): Proper placement of aspects for package
14462 decl/instantiation.
14463 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14464 (End_Statements): Add Is_Sloc parameterr
14465 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14466 (Check_End): Ad Is_Sloc parameter
14467 (End_Statements): Add Is_Sloc parameterr
14469 2011-08-02 Vincent Celier <celier@adacore.com>
14471 * ug_words: Add VMS qualifier equivalent to -gnateP:
14472 /SYMBOL_PREPROCESSING.
14474 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14476 * gnat-style.texi: For hexadecimal numeric literals the typical
14477 grouping of digits is 4 to represent 2 bytes.
14478 A procedure spec which is split into several lines is indented two
14481 2011-08-02 Yannick Moy <moy@adacore.com>
14483 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14484 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14485 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14487 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14488 choice in array aggregate
14489 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14491 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14492 positional and named aggregate for record, or others in record
14493 aggregate, or multiple choice in record aggregate
14494 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14495 array operands to logical operations AND, OR and XOR do not have the
14496 same static lower and higher bounds
14497 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14499 2011-08-01 Robert Dewar <dewar@adacore.com>
14501 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14502 Replaces Last_Source_Node_In_Sequence.
14503 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14504 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14505 parens and blank in string (this was inconsistently implemented).
14507 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14508 blank in string (this was inconsistently implemented).
14510 (Set_Global_Switches): Set formal mode switches appropriately
14511 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14513 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14514 call Set_Error_Msg_Lang to set "spark" as language name.
14515 * par.adb: Remove unnecessary call to set formal language for errout
14516 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14517 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14519 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14520 calls to it, moved after resolution so that types are known
14521 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14522 result of concatenation is not of type String
14523 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14524 concatenation is not properly restricted
14525 * gnat_rm.texi: Add doc on pragma Spark_95.
14526 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14527 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14528 * gcc-interface/Make-lang.in: Update dependencies.
14530 2011-08-01 Javier Miranda <miranda@adacore.com>
14532 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14533 condition that detects if the overridden operation must replace an
14536 2011-08-01 Javier Miranda <miranda@adacore.com>
14538 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14539 code declarations inserted by Insert_Actions in each alternative of the
14540 N_Case_Expression node.
14542 2011-08-01 Robert Dewar <dewar@adacore.com>
14544 * sem_ch6.adb: Minor code reorganization.
14545 * sem_util.adb: Minor reformatting.
14547 2011-08-01 Pascal Obry <obry@adacore.com>
14549 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14550 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14552 2011-08-01 Yannick Moy <moy@adacore.com>
14554 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14555 literal or operator symbol which is prefixed
14556 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14557 mode on access attributes.
14558 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14559 that concatenation operands are properly restricted in formal mode
14560 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14561 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14562 result of the concatenation has a type different from String.
14563 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14564 Analyze_Quantified_Expression, Analyze_Slice,
14565 Analyze_Null): issue an error in formal mode on unsupported constructs
14567 (Analyze_Block_Statement): only issue error on source block statement
14568 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14569 function which returns the last node in a list of nodes for which
14570 Comes_From_Source returns True, if any
14571 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14572 Last_Source_Node_In_Sequence
14573 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14574 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14575 mode on unsupported constructs
14576 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14577 rest of the actions may be needed later on since the error is marked as
14579 * sinfo.ads: Typos in comments.
14581 2011-08-01 Pascal Obry <obry@adacore.com>
14583 * projects.texi: Minor editing.
14585 2011-08-01 Yannick Moy <moy@adacore.com>
14587 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14588 insertion character ~~
14589 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14590 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14591 with insertion character ~~
14592 (Set_Msg_Text): treat insertion character ~~
14593 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14594 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14595 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14596 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14597 errors related to the formal language restriction not serious
14598 (insertion character |).
14599 * par.adb (Par): set formal language for error messages if needed
14600 * sem_ch6.adb (Check_Missing_Return): take into account possible
14601 generated statements at the end of the function
14602 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14603 enumeration value to define a new pragma SPARK_95
14604 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14605 SPARK_Version): new type and variables to store the SPARK version
14607 (SPARK_Mode): return True when SPARK_Version is set
14608 * par-prag.adb: Correct indentation
14609 (Prag): take Pragma_SPARK_95 into account
14610 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14613 2011-08-01 Robert Dewar <dewar@adacore.com>
14615 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14616 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14617 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14619 2011-08-01 Pascal Obry <obry@adacore.com>
14621 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14622 Target_Name to Get_Path call.
14623 (Parse_Single_Project): Likewise.
14624 (Post_Parse_Context_Clause): Likewise.
14625 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14626 Call Initialise_Project_Path with the proper Target_Name.
14627 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14629 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14630 with the proper Target_Name.
14631 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14632 Part.Parse routine.
14633 (Parse_Project_And_Apply_Config): Likewise.
14634 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14635 This is fine as this part of the code is supporting only native
14637 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14638 is fine as this part of the code is supporting only native compilation.
14640 2011-08-01 Yannick Moy <moy@adacore.com>
14642 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14643 of homonym, unless the homonym is one of the cases allowed in SPARK
14644 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14645 package declaration occurring after a body.
14647 2011-08-01 Robert Dewar <dewar@adacore.com>
14649 * checks.adb, exp_ch4.adb: Minor reformatting.
14651 2011-08-01 Javier Miranda <miranda@adacore.com>
14653 * einfo.ads (Access_Disp_Table): Fix documentation.
14654 (Dispatch_Table_Wrappers): Fix documentation.
14656 2011-08-01 Pascal Obry <obry@adacore.com>
14658 * prj-env.adb, prj-env.ads: Minor reformatting.
14660 2011-08-01 Yannick Moy <moy@adacore.com>
14662 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14663 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14664 procedures out of these packages.
14665 * errout.ads, errout.adb
14666 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14667 procedures in of this package
14668 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14669 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14670 on misplaced later vs initial declarations, like in Ada 83
14671 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14672 formal mode on attribute of private type whose full type declaration
14674 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14675 package declaration inside a package specification
14676 (Analyze_Full_Type_Declaration): issue error in formal mode on
14677 controlled type or discriminant type
14678 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14679 user-defined operator means that it should come from the source
14680 (New_Overloaded_Entity): issue error in formal mode on overloaded
14682 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14684 2011-08-01 Thomas Quinot <quinot@adacore.com>
14686 * atree.adb: Minor reformatting.
14687 * checks.adb: Minor reformatting.
14689 2011-08-01 Vincent Celier <celier@adacore.com>
14691 * s-parame-vms-ia64.ads: Fix typo in comment
14693 * s-parame-vms-restrict.ads: Removed, unused.
14695 2011-08-01 Javier Miranda <miranda@adacore.com>
14698 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14700 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14701 * sem_ch3.ads, sem_ch3.adb
14702 (Is_Constant_Bound): New extended version of the subprogram that was
14703 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14704 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14705 * sem_aux.ads (Constant_Value): Fix typo in comment.
14706 * checks.adb (Generate_Index_Checks): New implementation which, for
14707 array objects with constant bounds, generates the runtime check
14708 referencing the bounds of the array type. For other cases this routine
14709 provides its previous behavior obtaining such values from the array
14711 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14713 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14714 we cannot have semantic interpretations of the new node.
14716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14718 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14721 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14723 * sem_ch8.adb: Minor code editing.
14724 * s-vxwext.adb: Remove trailing space.
14725 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14726 consistency with other files.
14728 2011-08-01 Thomas Quinot <quinot@adacore.com>
14730 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14732 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14734 * par-ch10.adb: reject parameterized expressions as compilation unit.
14735 * sem_ch4.adb: handle properly conditional expression with overloaded
14736 then_clause and no else_clause.
14738 2011-08-01 Tristan Gingold <gingold@adacore.com>
14740 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14741 like done by System.Aux_DEC.
14742 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14744 2011-08-01 Yannick Moy <moy@adacore.com>
14746 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14747 missing label at end of declaration (subprogram or package)
14748 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14749 of positional and named parameter association
14750 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14751 Error_Msg_SP which adds a prefix to the error message giving the name
14752 of the formal language analyzed
14753 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14754 access result type in subprogram, unconstrained array as result type,.
14755 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14757 * sem_ch8.adb: Code clean up.
14759 2011-08-01 Javier Miranda <miranda@adacore.com>
14761 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14762 * einfo.ads (Access_Disp_Table): Fix documentation.
14763 (Dispatch_Table_Wrappers): Fix documentation.
14764 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14765 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14766 to enforce the documentation of this attribute.
14767 (Set_Is_Interface): Cleanup the assertion.
14768 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14769 the Underlying_Type entity before reading attribute Access_Disp_Table.
14770 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14771 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14772 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14773 the Underlying_Type entity before reading attribute Access_Disp_Table.
14774 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14775 Locate the Underlying_Type entity before reading attribute
14778 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14780 * s-poosiz.ads: Additional overriding indicators.
14782 2011-08-01 Yannick Moy <moy@adacore.com>
14784 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14786 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14787 parameter specification does not include a subtype mark.
14788 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14789 formal mode on abstract subprogram.
14790 (Analyze_Subprogram_Specification): issue error in formal mode on
14791 user-defined operator.
14792 (Process_Formals): issue error in formal mode on access parameter and
14793 default expression.
14794 * sem_ch9.adb (Analyze_Abort_Statement,
14795 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14796 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14797 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14798 Analyze_Requeue, Analyze_Selective_Accept,
14799 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14800 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14801 issue error in formal mode on user-defined raise statement.
14803 2011-08-01 Thomas Quinot <quinot@adacore.com>
14805 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14806 declaration being hidden when overriding an implicit inherited
14808 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14809 (-gnats), do not complain about a source file that contains only a
14812 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14814 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14815 variable if already set.
14817 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14819 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14820 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14821 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14822 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14823 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14824 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14825 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14826 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14827 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14828 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14829 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14830 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14831 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14832 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14833 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14834 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14835 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14836 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14837 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14838 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14839 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14840 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14841 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14842 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14843 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14844 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14845 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14846 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14847 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14848 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14849 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14850 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14851 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14852 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14853 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14854 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14855 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14856 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14857 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14858 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14859 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14860 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14861 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14862 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14863 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14864 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14865 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14866 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14867 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14868 Use GNAT instead of GNARL.
14870 2011-08-01 Bob Duff <duff@adacore.com>
14872 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14873 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14874 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14877 2011-08-01 Yannick Moy <moy@adacore.com>
14879 * debug.adb (d.D) reverve flag for the SPARK mode
14880 (d.E) reverve flag for SPARK generation mode
14881 (d.F) reverve flag for Why generation mode
14882 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14883 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14884 functions which return True when the corresponding modes are set
14885 (Formal_Language): return "spark" or "alfa" when in formal verification
14887 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14888 Error_Msg to prefix the error message with a tag giving the formal
14890 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14891 message with a tag giving the formal language
14892 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14894 (Analyze_Case_Statement): issue error in formal mode on case statement
14895 with a single "others" case alternative
14896 (Analyze_Exit_Statement): issue errors in formal mode on exit
14897 statements which do not respect SPARK restrictions
14898 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14899 (Check_Unreachable_Code): always issue an error (not a warning) in
14900 formal mode on unreachable code (concerns both code after an infinite
14901 loop and after an unconditional jump, both not allowed in SPARK)
14902 * sem_ch6.adb (Analyze_Return_Statement): add call to
14903 Set_Return_Present for a procedure containing a return statement
14904 (already done for functions in Analyze_Function_Return)
14905 (Analyze_Function_Return): issue error in formal mode on extended
14906 return or if return is not last statement in function
14907 (Check_Missing_Return): issue error in formal mode if function does
14908 not end with return or if procedure contains a return
14909 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14910 function to detect if there is an inner scope of its parameter S which
14913 2011-08-01 Thomas Quinot <quinot@adacore.com>
14915 * sem_ch6.ads: Minor reformatting.
14917 2011-08-01 Javier Miranda <miranda@adacore.com>
14919 * sem_util.adb (Abstract_Interface_List): Complete condition when
14920 processing private type declarations to avoid reading unavailable
14922 (Is_Synchronized_Tagged_Type): Complete condition when processing
14923 private extension declaration nodes to avoid reading unavailable
14926 2011-08-01 Thomas Quinot <quinot@adacore.com>
14928 * sem_ch3.adb: Minor reformatting.
14930 2011-08-01 Thomas Quinot <quinot@adacore.com>
14932 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14933 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14934 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14935 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14936 for VMS, instead parametrize the common implementation with
14937 System.Parameters declarations.
14939 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14941 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14943 2011-08-01 Tristan Gingold <gingold@adacore.com>
14945 * seh_init.c: Fix SEH handler installation on win64.
14947 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14949 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14950 double analysis of an anonymous access to subprogram, because it can
14951 lead to improper sharing of profiles and a back-end crash.
14953 2011-08-01 Robert Dewar <dewar@adacore.com>
14955 * make.adb, sem_ch4.adb: Minor reformatting.
14956 * gcc-interface/Make-lang.in: Update dependencies.
14957 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14959 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14961 * gnat_rm.texi: Fix definition of Long_Integer.
14963 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14965 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14966 to prevent storage exhaustion.
14967 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14968 finalized is a function body, insert the cleanup code before the final
14969 return statement, to prevent spurious warnings.
14970 * s-pooglo.ads: add overriding indicator.
14972 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14974 * sem_ch4.adb (Operator_Check): improve error message when both a
14975 with_clause and a use_clause are needed to make operator usage legal.
14976 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14977 determine whether a compilation unit is visible within an other,
14978 either through a with_clause in the current unit, or a with_clause in
14979 its library unit or one one of its parents.
14981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14983 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14984 over an arbitrary expression of an array or container type.
14985 * lib-xref.adb: clarify comment.
14987 2011-08-01 Bob Duff <duff@adacore.com>
14989 * einfo.ads: Minor reformatting.
14990 * debug.adb: Minor comment improvement.
14992 2011-08-01 Javier Miranda <miranda@adacore.com>
14994 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14995 consider hidden subprograms as valid candidates.
14997 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14999 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15001 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15003 * gnat_ugn.texi: Fix typo.
15005 2011-08-01 Robert Dewar <dewar@adacore.com>
15007 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15008 lib-xref.adb: Minor reformatting
15010 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15012 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15013 when to generate a call to Move_Final_List.
15014 (Has_Controlled_Parts): Remove this function.
15016 2011-08-01 Geert Bosch <bosch@adacore.com>
15018 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15019 "," in choice list.
15021 2011-08-01 Thomas Quinot <quinot@adacore.com>
15023 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15024 explicit raise of a predefined exception as Comes_From_Source if the
15025 original N_Raise_Statement comes from source.
15027 2011-08-01 Robert Dewar <dewar@adacore.com>
15029 * sinfo.ads: Add comment.
15030 * sem_ch6.adb: Minor reformatting.
15032 2011-08-01 Robert Dewar <dewar@adacore.com>
15034 * freeze.adb (Freeze_Entity): Refine check for bad component size
15035 clause to avoid rejecting confirming clause when atomic/aliased present.
15037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15039 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15040 better determine whether an entity reference is a write.
15041 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15043 * lib-xref.adb (Output_References): Do no suppress a read reference at
15044 the same location as an immediately preceeding modify-reference, to
15045 handle properly in-out actuals.
15047 2011-08-01 Tristan Gingold <gingold@adacore.com>
15049 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15051 2011-08-01 Quentin Ochem <ochem@adacore.com>
15053 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15054 heap to compute the result.
15056 2011-08-01 Robert Dewar <dewar@adacore.com>
15058 * atree.ads: Minor reformatting.
15060 2011-08-01 Emmanuel Briot <briot@adacore.com>
15062 * g-expect.adb (Get_Command_Output): Fix memory leak.
15064 2011-08-01 Geert Bosch <bosch@adacore.com>
15066 * cstand.adb (P_Float_Type): New procedure to print the definition of
15067 predefined fpt types.
15068 (P_Mixed_Name): New procedure to print a name using mixed case
15069 (Print_Standard): Use P_Float_Type for printing floating point types
15070 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15071 precision IEEE float.
15073 2011-08-01 Thomas Quinot <quinot@adacore.com>
15075 * sem_ch3.adb: Minor reformatting.
15077 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15079 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15080 the completion of a generic function, insert the new body rather than
15081 rewriting the original.
15083 2011-08-01 Yannick Moy <moy@adacore.com>
15085 * sinfo.ads, errout.ads: Typos in comments.
15087 2011-08-01 Robert Dewar <dewar@adacore.com>
15089 * par-endh.adb: Minor reformatting.
15091 2011-08-01 Robert Dewar <dewar@adacore.com>
15093 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15094 (Pre_Post_Aspects): New subtype.
15095 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15096 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15097 * par-ch7.adb (P_Package): Remove Decl parameter
15098 (P_Package): Handle new syntax for aspects (before IS)
15099 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15101 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15102 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15103 (P_Package): Remove Decl parameter
15104 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15106 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15108 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15109 * sinfo.ads: Document new syntax for aspects in packages etc.
15110 * sprint.adb: Handle new syntax of aspects before IS in package
15112 2011-08-01 Thomas Quinot <quinot@adacore.com>
15114 * atree.ads: Minor reformatting.
15115 * sem_prag.adb: Minor reformatting.
15117 2011-08-01 Robert Dewar <dewar@adacore.com>
15119 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15120 case expr alternative.
15122 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15124 * sem_ch12.adb: Fix typo.
15126 2011-08-01 Geert Bosch <bosch@adacore.com>
15128 * sem_prag.adb (Check_No_Link_Name): New procedure.
15129 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15130 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15131 instead of Standard_Long_Long_Float_Size global. Preparation for
15132 eventual removal of per type constants.
15133 * exp_util.ads (Get_Stream_Size): New function returning the stream
15134 size value of subtype E.
15135 * exp_util.adb (Get_Stream_Size): Implement new function.
15136 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15138 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15140 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15142 2011-08-01 Geert Bosch <bosch@adacore.com>
15144 * cstand.adb: Fix comments.
15145 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15146 count of arguments.
15148 2011-08-01 Robert Dewar <dewar@adacore.com>
15150 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15152 2011-08-01 Geert Bosch <bosch@adacore.com>
15154 * atree.ads: Fix comment.
15156 2011-08-01 Robert Dewar <dewar@adacore.com>
15158 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15159 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15160 * par.adb: Add with for Namet.Sp.
15161 * par-tchk.adb: Minor reformatting.
15163 2011-08-01 Vincent Celier <celier@adacore.com>
15165 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15166 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15167 of the init procedure of a SAL.
15168 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15171 2011-08-01 Thomas Quinot <quinot@adacore.com>
15173 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15176 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15178 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15180 2011-08-01 Thomas Quinot <quinot@adacore.com>
15182 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15183 conformant with its spec (return True only for types that have
15184 an overriding Initialize primitive operation that prevents them from
15185 having preelaborable initialization).
15186 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15187 initialization for controlled types in Ada 2005 or later mode.
15189 2011-08-01 Robert Dewar <dewar@adacore.com>
15191 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15193 (Same_Aspect): New function.
15194 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15195 Type_Invariant, Precondition, Postcondition.
15196 * snames.ads-tmpl: Add Name_Type_Invariant.
15198 2011-08-01 Robert Dewar <dewar@adacore.com>
15200 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15202 (Freeze_All_Ent): Fix error in handling inherited aspects.
15203 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15204 already analyzed, but don't skip entire processing of a declaration,
15205 that's wrong in some cases of declarations being rewritten.
15206 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15207 Don't delay for integer, string literals
15208 Treat predicates in usual manner for delay, remove special case code,
15210 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15211 (Build_Predicate_Function): Update saved expression in aspect
15212 (Build_Invariant_Procedure): Update saved expression in aspect
15213 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15214 of replacement of discriminant references if the reference is simple.
15216 2011-08-01 Robert Dewar <dewar@adacore.com>
15218 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15219 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15220 Static_Predicate and Dynamic_Predicate.
15221 (Build_Predicate_Function): Add processing for Static_Predicate
15222 and Dynamic_Predicate.
15223 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15224 (From_Static_Predicate): New flag
15225 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15227 2011-08-01 Robert Dewar <dewar@adacore.com>
15229 * usage.adb: Documentation cleanup for Ada version modes in usage.
15230 * expander.adb: Minor reformatting.
15232 2011-08-01 Robert Dewar <dewar@adacore.com>
15234 * atree.ads: Minor comment fix.
15235 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15236 a-witeio.ads, sem_prag.adb: Minor reformatting.
15238 2011-08-01 Doug Rupp <rupp@adacore.com>
15240 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15241 pointers. Use descrip.h header file for convenience. Add some
15244 2011-08-01 Robert Dewar <dewar@adacore.com>
15246 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15247 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15248 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15250 (Check_Aspect_At_End_Of_Declarations): New procedure
15251 (Analye_Aspect_Specification): Minor changes for above procedures
15252 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15253 specification node as well.
15255 2011-08-01 Pascal Obry <obry@adacore.com>
15257 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15258 Windows files. Use GetFilesAttributes() in this case to check for file
15259 existence instead of returning with an error code.
15261 2011-08-01 Vincent Celier <celier@adacore.com>
15263 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15264 High is above Source length.
15266 2011-08-01 Robert Dewar <dewar@adacore.com>
15268 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15270 2011-08-01 Robert Dewar <dewar@adacore.com>
15272 * aspects.ads (Boolean_Aspects): New subtype.
15273 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15274 for derived types in cases where the parent type and derived type have
15276 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15277 with aspects when parent type also has aspects.
15278 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15279 boolean expression at this point).
15280 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15281 accordance with final decision on the Ada 2012 feature.
15282 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15284 2011-08-01 Matthew Heaney <heaney@adacore.com>
15286 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15288 2011-08-01 Pascal Obry <obry@adacore.com>
15290 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15291 Fix Replace_Slice when High is above current string size.
15292 (Replace_Slice): Fix DL computation when High is above current
15295 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15297 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15299 2011-08-01 Matthew Heaney <heaney@adacore.com>
15301 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15304 2011-08-01 Pascal Obry <obry@adacore.com>
15306 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15309 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15311 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15312 access to protected subprograms in generic bodies.
15313 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15314 protected type, indicate that the convention of the subprogram is
15315 Convention_Protected, because it may be used in subsequent declarations
15316 within the protected declaration.
15318 2011-08-01 Vincent Celier <celier@adacore.com>
15320 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15321 and "final" procedures when the name of the library is "ada", to avoid
15322 duplicate symbols "adainit" and "adafinal" in executables.
15324 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15326 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15327 quantified expression that appears within a postcondition and uses the
15328 Ada2012 'Result attribute.
15330 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15332 * init.c (__gnat_error_handler): Cast reason to int.
15333 (__gnat_install_handler): Explain sa_sigaction use.
15335 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15337 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15338 subprogram has copy-in copy-out parameters, try to promote the mode of
15339 the return type if it is passed in registers.
15341 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15343 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15344 left operand as addressable.
15346 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15348 * gcc-interface/gigi.h (build_function_stub): Remove.
15349 (build_return_expr): Likewise.
15350 (convert_vms_descriptor): Declare.
15351 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15352 (build_function_stub): Move to...
15353 * gcc-interface/utils2.c (build_return_expr): Move to...
15354 * gcc-interface/trans.c (build_function_stub): ...here.
15355 (build_return_expr): ...here.
15356 (Subprogram_Body_to_gnu): Add local variable for language_function.
15357 Disconnect the parameter attributes cache, if any, once done with it.
15358 Call end_subprog_body only after setting the end_locus.
15359 Build the stub associated with the function, if any, at the very end.
15360 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15361 variables and streamline control flow.
15363 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15366 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15367 g-trasym-dwarf.adb.
15369 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15372 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15373 Assign to act.sa_sigaction.
15374 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15375 current->return_address to char * before arithmetic.
15377 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15379 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15380 Correct argument types.
15381 Extract code from reason.
15382 (__gnat_install_handler): Assign to act.sa_sigaction.
15384 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15386 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15387 (GNAT1_OBJS): ...here.
15389 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15392 * g-socthi-mingw.adb (Fill): Fix formatting.
15394 * gcc-interface/gigi.h: Move around comment.
15396 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15399 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15401 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15404 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15406 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15408 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15409 range comparison if Pmode is SImode.
15411 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15412 Eric Botcazou <ebotcazou@adacore.com>
15414 * adadecode.c: Wrap up in extern "C" block.
15415 * adadecode.h: Likewise.
15416 * adaint.c: Likewise. Remove 'const' keyword.
15417 * adaint.h: Likewise.
15418 * argv.c: Likewise.
15419 * atree.h: Likewise.
15421 * cstreams.c: Likewise.
15423 * exit.c: Likewise.
15425 * final.c: Likewise.
15426 * init.c: Likewise.
15427 * initialize.c: Likewise.
15428 * link.c: Likewise.
15429 * namet.h: Likewise.
15430 * nlists.h: Likewise.
15431 * raise.c: Likewise.
15432 * raise.h: Likewise.
15433 * repinfo.h: Likewise.
15434 * seh_init.c: Likewise.
15435 * targext.c: Likewise.
15436 * tracebak.c: Likewise.
15437 * uintp.h: Likewise.
15438 * urealp.h: Likewise.
15439 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15440 * xsinfo.adb: Likewise.
15441 * xsnamest.adb: Likewise.
15442 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15443 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15444 * gcc-interface/misc.c: Likewise.
15445 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15446 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15447 ada/targext.o here...
15448 (GNAT_ADA_OBJS): ...and not here.
15449 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15450 (GNATBIND_OBJS): Reorder.
15452 2011-07-07 Richard Henderson <rth@redhat.com>
15454 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15455 dwarf2out_frame_init.
15457 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15459 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15461 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15464 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15466 2011-07-06 Richard Guenther <rguenther@suse.de>
15468 * gcc-interface/misc.c (gnat_init): Merge calls to
15469 build_common_tree_nodes and build_common_tree_nodes_2.
15470 Re-initialize boolean_false_node.
15472 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15473 Olivier Hainque <hainque@adacore.com>
15474 Nicolas Setton <setton@adacore.com>
15476 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15477 the type according to the ARTIFICIAL_P parameter.
15478 (create_type_decl): Likewise.
15479 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15481 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15483 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15484 (gnatbind): Likewise.
15486 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15488 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15490 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15492 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15493 local variable throughout. Remove useless call to Base_Type.
15494 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15495 Take it also into account for the volatileness of the field. Set the
15496 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15498 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15500 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15501 on a dereference built for a by-ref object if it has an address clause.
15503 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15505 * einfo.ads (Address_Taken): Document use for the second argument of
15506 Asm_Input and Asm_Output attributes.
15507 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15508 argument is an entity name, then set Address_Taken on it.
15509 <Attribute_Asm_Output>: Likewise.
15510 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15511 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15512 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15513 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15515 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15517 PR middle-end/46500
15518 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15520 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15522 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15523 (ada/utils.o): Update dependencies.
15524 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15525 ../../../libcpp/libcpp.a.
15526 * gcc-interface/utils.c: Include common/common-target.h.
15527 (process_attributes): Use targetm_common.have_named_sections.
15529 2011-06-07 Richard Guenther <rguenther@suse.de>
15531 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15534 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15536 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15537 TREE_THIS_NOTRAP flag.
15539 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15541 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15544 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15546 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15547 constants whose full view has discriminants specially.
15549 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15551 * gcc-interface/utils.c: Include diagnostic.h.
15552 (gnat_write_global_declarations): Output debug information for all
15553 global type declarations before finalizing the compilation unit.
15554 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15556 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15558 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15560 2011-05-25 Kai Tietz <ktietz@redhat.com>
15562 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15563 initialization instead of const/none-const pointer assignment.
15565 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15567 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15568 $(EXTRA_GNAT1_OBJS).
15569 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15570 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15571 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15572 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15573 libcommon-target.a instead of prefix.o.
15575 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15578 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15580 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15582 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15583 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15584 instead of version.o.
15586 2011-05-18 Kai Tietz <ktietz@redhat.com>
15588 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15589 boolean_false_node instead of integer_zero_node.
15590 (convert_with_check): Likewise.
15591 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15593 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15595 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15596 type of the parameter is an unconstrained array, convert the actual to
15597 the type of the formal in the In Out and Out cases as well.
15599 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15601 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15602 call build_function_type_array or build_varargs_function_type_array
15604 (create_subprog_type): Don't call build_function_type; call
15605 build_function_type_vec instead.
15607 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15609 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15610 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15611 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15613 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15615 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15617 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15618 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15620 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15622 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15624 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15626 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15627 instead of accessing TYPE_ARG_TYPES directly.
15628 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15630 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15633 * gcc-interface/gigi.h (get_variant_part): Declare.
15634 * gcc-interface/decl.c (get_variant_part): Make global.
15635 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15636 types have the same constant size, are record types and T1 has a
15637 variant part while T2 doesn't.
15639 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15641 * gcc-interface/utils.c (begin_subprog_body): Do not call
15643 (end_subprog_body): Likewise.
15645 2011-05-04 Richard Guenther <rguenther@suse.de>
15647 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15649 (pos_to_constructor): Likewise.
15651 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15652 Eric Botcazou <ebotcazou@adacore.com>
15654 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15655 of build_function_type. Adjust calls to...
15656 (build_raise_check): ...this. Do not take a void_tree parameter.
15657 Call build_function_type_list instead of build_function_type.
15658 Fix head comment and swap couple of conditional blocks.
15660 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15662 * gnatvsn.ads (Library_Version): Bump to 4.7.
15663 (Current_Year): Bump to 2011.
15665 2011-04-29 Michael Matz <matz@suse.de>
15667 * gcc-interface/misc.c (gnat_handle_option): Set
15668 warn_maybe_uninitialized.
15670 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15672 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15673 the Watson/McCabe paper.
15675 2011-04-23 Jim Meyering <meyering@redhat.com>
15677 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15679 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15681 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15684 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15686 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15688 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15689 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15690 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15691 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15692 <all>: Do not set flags on the reused DECL node coming from an alias.
15693 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15694 don't need debug info here...
15695 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15696 (gigi): Adjust calls to create_subprog_decl.
15697 (build_raise_check): Likewise.
15698 (establish_gnat_vms_condition_handler): Likewise.
15699 (Compilation_Unit_to_gnu): Likewise.
15700 (gnat_to_gnu): Likewise.
15702 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15704 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15705 (NO_REORDER_ADAFLAGS): New variable.
15706 (EXTRA_GNATTOOLS): Always define.
15707 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15708 Clean up and adjust list of files compiled with special options.
15709 * gcc-interface/Make-lang.in: Likewise.
15710 (ada/decl.o): Cosmetical change.
15711 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15713 2011-04-20 Jim Meyering <meyering@redhat.com>
15715 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15717 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15719 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15720 $(CFLAGS) on the link line.
15722 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15725 padded type built for the return type if it is unconstrained.
15727 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15729 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15731 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15733 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15734 before calling TREE_CHAIN.
15735 * gcc-interface/misc.c (gnat_init_ts): New function.
15736 (LANG_HOOKS_INIT_TS): Define.
15738 2011-04-12 Martin Jambor <mjambor@suse.cz>
15740 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15741 instead of cgraph_node.
15743 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15745 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15746 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15749 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15751 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15752 of aggregate types that contain a placeholder.
15754 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15756 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15758 (handle_type_generic_attribute): Likewise.
15760 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15763 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15765 2011-04-04 Kai Tietz <ktietz@redhat.com>
15768 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15771 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15773 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15774 type case, do not strip a padding type around the array type.
15776 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15778 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15781 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15783 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15784 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15785 code for -feliminate-unused-debug-types.
15786 (gnat_post_options): Likewise.
15788 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15790 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15791 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15794 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15796 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15797 DECL_ARTIFICIAL flag on enumeration types.
15799 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15801 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15802 fat pointer types artificial unconditionally.
15803 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15806 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15808 * gcc-interface/gigi.h (get_dummy_type): Declare.
15809 (build_dummy_unc_pointer_types): Likewise.
15810 (finish_fat_pointer_type): Likewise.
15811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15812 fat pointer type has been built, complete it in place.
15813 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15814 and thin pointers. Remove useless variable.
15815 (finish_fat_pointer_type): Make global and move to...
15816 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15817 (get_dummy_type): New function.
15818 (build_dummy_unc_pointer_types): Likewise.
15819 (gnat_pushdecl): Propage the name to the anonymous variants only.
15820 (update_pointer_to): Only adjust the pointer types in the unconstrained
15823 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15825 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15827 if this is a Taft amendment type and the full declaration is available.
15828 * gcc-interface/trans.c (process_type): Likewise.
15829 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15830 (process_freeze_entity): Likewise.
15831 * gcc-interface/utils.c (dummy_global): New static variable.
15832 (gnat_write_global_declarations): If there are types declared as used
15833 at the global level, insert them in the global hash table.
15835 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15837 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15838 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15839 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15841 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15842 flag of the type accordingly.
15843 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15845 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15847 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15848 finalizing types when updating the pointers to the designated type.
15849 <all>: Finalize the deferred types even if we didn't defer processing
15850 of incomplete types in this invocation.
15852 2011-04-01 Olivier Hainque <hainque@adacore.com>
15853 Nicolas Setton <setton@adacore.com>
15854 Eric Botcazou <ebotcazou@adacore.com>
15856 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15857 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15859 2011-03-28 Kai Tietz <ktietz@redhat.com>
15861 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15863 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15864 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15866 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15868 2011-03-28 Tristan Gingold <gingold@adacore.com>
15871 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15872 Use ada output of gnatbind.
15873 (ada/b_gnatb.adb): Ditto.
15874 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15875 (ada.mostlyclean, ada.stage1)
15876 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15877 (ada.stagefeedback): Adjust.
15878 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15879 Use ada output of gnatbind.
15880 (b_gnatm.adb): Ditto.
15881 (b_gnatl.o, b_gnatm.o): New rules.
15883 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15885 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15886 for the padded type built to support a specified size or alignment.
15888 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15890 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15891 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15892 unconditionally to the end of the unit when the designated type is
15894 <all>: Rename local variable. Attempt to un-defer types only and do it
15895 for limited_with'ed types as well.
15896 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15897 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15898 consistently and remove redundant call to finalize_from_with_types.
15900 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15902 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15903 subprograms without a previous spec declared in the same unit.
15904 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15905 subprograms at the end of the unit instead of at the beginning.
15906 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15907 isn't public for the special handling of non-inline functions nested
15908 inside inline external functions.
15910 2011-03-25 Jeff Law <law@redhat.com>
15912 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15914 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15916 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15917 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15918 to compute Set_Size_Depends_On_Discriminant.
15919 (Layout_Type): Call it on array types in back-end layout mode.
15920 * sem_util.adb (Requires_Transient_Scope): Return true for array
15921 types only if the size depends on the value of discriminants.
15922 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15923 type if the RHS is a call to a function that returns an unconstrained
15924 type with default discriminant.
15926 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15928 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15929 non-conversion to the nominal result type at the end.
15931 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15933 * gcc-interface/trans.c (create_temporary): New function taken from...
15934 (create_init_temporary): ...here. Call it.
15935 (call_to_gnu): Create the temporary for the return value early, if any.
15936 Create it for a function with copy-in/copy-out parameters if there is
15937 no target; in other cases of copy-in/copy-out, use another temporary.
15938 Push the new binding level lazily. Add and rename local variables.
15940 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15942 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15944 (set_rm_size): Likewise.
15946 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15948 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15949 for the padded type built in order to support a specified alignment.
15950 Fix incorrect formatting.
15952 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15955 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15957 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15959 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15960 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15961 to the end of the list. Adjust recursive call. Rename local variable.
15962 If REORDER is true, reorder components of the record type.
15963 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15964 components_to_record and adjust the parameter list.
15966 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15968 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15969 disabled, use the variable for bounds of loop iteration scheme.
15971 2011-03-21 Kai Tietz <ktietz@redhat.com>
15974 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15976 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15978 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15979 out whether the expression is read-only. Short-circuit placeholder
15980 case and rename a couple of local variables.
15982 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15984 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15985 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15986 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15987 (convert): Deal with conversions from a smaller form type specially.
15989 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15991 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15992 its argument, except for the special -I- switch.
15994 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15996 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15999 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16001 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16003 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16005 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16007 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16008 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16009 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16010 Do not generate the check directly, instead instantiate the template
16011 check present in the descriptor.
16012 (make_descriptor_field): Move around.
16013 (build_vms_descriptor32): Build a template check in the POINTER field.
16014 (build_vms_descriptor): Remove useless suffixes.
16015 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16017 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16020 * targext.c: Include target files if IN_RTS is defined.
16022 2011-01-26 Richard Guenther <rguenther@suse.de>
16025 * targext.c: Include config.h.
16026 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16029 2011-01-04 Pascal Obry <obry@adacore.com>
16030 Eric Botcazou <ebotcazou@adacore.com>
16032 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16034 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16036 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16037 end-of-case on the end label and its associated gotos, if any.
16039 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16041 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16042 expressions of the parameter cache within the statement group of
16043 the CICO mechanism.
16045 2011-01-04 Olivier Hainque <hainque@adacore.com>
16046 Eric Botcazou <ebotcazou@adacore.com>
16048 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16049 (set_end_locus_from_node): New function.
16050 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16051 make and the function end_locus.
16052 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16053 for the elaboration subprogram.
16054 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16055 set the end_locus of the expression as well.
16057 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16060 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16061 variables that are referenced in exception handlers volatile.
16065 Copyright (C) 2011 Free Software Foundation, Inc.
16067 Copying and distribution of this file, with or without modification,
16068 are permitted in any medium without royalty provided the copyright
16069 notice and this notice are preserved.