1 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
4 declared as atomic. Move around conditionally executed code.
6 2011-10-24 Robert Dewar <dewar@adacore.com>
8 * sem.adb (Initialize): Fix bug that blew up if called a second
11 2011-10-24 Robert Dewar <dewar@adacore.com>
13 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
14 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
16 2011-10-24 Robert Dewar <dewar@adacore.com>
18 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
21 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
23 * gnat_rm.texi Add an entry for restriction No_Finalization.
25 2011-10-24 Ed Schonberg <schonberg@adacore.com>
27 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
28 current instance is within the one that contains the generic,
29 the freeze node for the current one must appear in the current
30 declarative part. Ditto if the current instance is within another
31 package instance. In both of these cases the freeze node of the
32 previous instance is not relevant.
34 2011-10-24 Gary Dismukes <dismukes@adacore.com>
36 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
37 of AAMP-specific switches -univ and -aamp_target.
39 2011-10-24 Robert Dewar <dewar@adacore.com>
41 * a-tienau.adb (Put): Deal properly with limited line length.
43 2011-10-24 Robert Dewar <dewar@adacore.com>
45 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
47 2011-10-24 Tristan Gingold <gingold@adacore.com>
49 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
52 2011-10-24 Ed Schonberg <schonberg@adacore.com>
54 * sem_ch12.adb (Earlier): make available globally. If both
55 nodes have the same sloc, the freeze node that does not come
56 from source is the later one.
57 (True_Parent): Make available globally.
58 (Previous_Instance): Subsidiary of
59 Insert_Freeze_Node_For_Instance, to check whether the generic
60 parent of the current instance is declared within a previous
61 instance in the same unit or declarative part, in which case the
62 freeze nodes of both instances must appear in order to prevent
63 elaboration problems in gigi.
64 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
65 freeze point, and the freeze node of a preceding instantiation
66 must be inserted before it.
68 2011-10-24 Robert Dewar <dewar@adacore.com>
70 * checks.ads, checks.adb: Add handling of Synchronization_Check
71 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
73 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
74 flag Minor code reorganization.
75 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
76 * par-prag.adb: Add dummy entries for pragma
77 Disable/Enable_Atomic_Synchronization.
78 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
79 case of Atomic_Synchronization specially (not suppressed
80 by All_Checks, cannot be set from Source).
81 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
82 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
83 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
84 entry for pragma Disable/Enable_Atomic_Synchronization
85 * switch-c.adb: The -gnatp switch does not disable
86 Atomic_Synchronization Add -gnatep switch to disable
87 Atomic_Synchronization.
88 * types.ads: Add entry for Synchronization_Check
89 * usage.adb: Add line for -gnated switch
90 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
92 2011-10-24 Geert Bosch <bosch@adacore.com>
94 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix
95 bounds start at Integer'First.
97 2011-10-24 Robert Dewar <dewar@adacore.com>
99 * sem_ch12.adb, s-gearop.adb: Minor reformatting
101 2011-10-24 Robert Dewar <dewar@adacore.com>
103 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings
104 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings
106 2011-10-24 Emmanuel Briot <briot@adacore.com>
108 * prj-proc.adb (Process_Expression_Variable_Decl): No special
109 handling for Project_Path unless it is an attribute.
111 2011-10-24 Javier Miranda <miranda@adacore.com>
113 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
114 (Install_Hidden_Primitives): New subprogram.
115 (Restore_Hidden_Primitives): New subprogram.
116 (Analyze_Formal_Package_Declaration,
117 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
118 Invoke Check_Hidden_Primitives after every call to
119 Analyze_Associations, and invoke Restore_Hidden_Primitives to
120 restore their visibility after processing the instantiation.
121 (Instantiate_Package_Body): Install visible primitives before
122 analyzing the instantiation and uninstall them to restore their
123 visibility when the instantiation has been analyzed.
124 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
125 (Remove_Suffix): New subprogram
126 * sem_ch3.adb (Derive_Subprogram): When handling
127 a derived subprogram for the instantiation of a formal derived
128 tagged type, inherit the dispatching attributes from the actual
129 subprogram (not from the parent type).
131 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
133 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
135 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
137 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
139 (Build_Discriminant_Assignments): Add local variable D_Loc and update
141 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
142 Var_Loc and update their uses.
143 (Build_Record_Init_Proc): Code reformatting.
144 (Increment_Counter): Add formal parameter Loc.
145 (Make_Counter): Add formal parameter Loc.
147 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
149 * sem_disp.adb (Covers_Some_Interface): Fix typo.
151 2011-10-24 Matthew Heaney <heaney@adacore.com>
153 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority):
154 Predicate had wrong sense.
156 2011-10-24 Yannick Moy <moy@adacore.com>
158 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
159 Translate arguments in positional notation into pragma argument
160 association arguments for the generated pragma.
162 2011-10-24 Arnaud Charlet <charlet@adacore.com>
164 * exp_ch5.adb: Fix minor typo.
166 2011-10-24 Ed Schonberg <schonberg@adacore.com>
168 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
169 the case of a component reference in an instance body, when the
170 enclosing type is private.
172 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
174 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
175 driver for getting the project support into gnatelim section.
177 2011-10-24 Robert Dewar <dewar@adacore.com>
179 * gnat_rm.texi: Minor correction to documentation on address
182 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
184 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
185 (Attach_Unprotected): New routine.
186 (Delete_Finalize_Address): Removed.
187 (Delete_Finalize_Address_Unprotected): New routine.
188 (Detach): Synchronize and call the unprotected version.
189 (Detach_Unprotected): Remove locking.
190 (Finalize): Add various comment on synchronization. Lock the critical
191 region and call the unprotected versions of routines.
192 (Finalize_Address): Removed.
193 (Finalize_Address_Unprotected): New routine.
194 (Set_Finalize_Address): Synchronize and call
195 the unprotected version.
196 (Set_Finalize_Address_Unprotected): New routine.
197 (Set_Heterogeneous_Finalize_Address): Removed.
198 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
199 (Set_Is_Heterogeneous): Add comment on synchronization and
201 * s-finmas.ads: Flag Finalization_Started is no longer atomic
202 because synchronization uses task locking / unlocking.
203 (Attach): Add comment on usage.
204 (Attach_Unprotected): New routine.
205 (Delete_Finalize_Address): Renamed to
206 Delete_Finalize_Address_Unprotected.
207 (Detach): Add comment on usage.
208 (Detach_Unprotected): New routine.
209 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
210 (Set_Finalize_Address): Add comment on usage.
211 (Set_Finalize_Address_Unprotected): New routine.
212 (Set_Heterogeneous_Finalize_Address): Renamed to
213 Set_Heterogeneous_Finalize_Address_Unprotected.
214 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
215 Allocation_Locked. Add various comments on synchronization. Lock
216 the critical region and call the unprotected version of
218 (Deallocate_Any_Controlled): Add various comments on
219 synchronization. Lock the critical region and call the unprotected
222 2011-10-24 Ed Schonberg <schonberg@adacore.com>
224 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
225 are universal and must carry the corresponding type.
226 * sem_eval.adb (Check_Non_Static_Context): If the type of the
227 expression is universal real, as may be the case for a fixed point
228 expression with constant operands in the context of a conversion,
229 there is nothing to check.
230 * s-finmas.adb: Minor reformatting
232 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
234 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
236 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
238 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
240 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
241 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
243 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
245 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
246 (unchecked_conversion_nop): Use it.
247 (gnat_to_gnu): Likewise.
249 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
251 * back_end.adb (Call_Back_End): Pass the maximum logical line number
252 instead of the maximum physical line number to gigi.
253 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
255 2011-10-16 Tom Tromey <tromey@redhat.com>
256 Dodji Seketeli <dodji@redhat.com>
258 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the
259 new public ordinary map interface.
261 2011-10-16 Tristan Gingold <gingold@adacore.com>
263 * link.c (_AIX): Add support for GNU ld.
265 2011-10-16 Fedor Rybin <frybin@adacore.com>
267 * gnat_ugn.texi: Fixing gnattest example names in the doc.
268 Adding explanation to additional tests usage.
270 2011-10-16 Robert Dewar <dewar@adacore.com>
272 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
274 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
276 * a-convec.adb: Fix minor inconsistencies.
278 2011-10-16 Matthew Heaney <heaney@adacore.com>
280 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
281 Implementation): Specify pragma Implementation_Defined.
283 2011-10-15 Nicolas Roche <roche@adacore.com>
285 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
286 either rtp-smp or ravenscar-cert-rtp runtimes.
288 2011-10-15 Bob Duff <duff@adacore.com>
290 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
291 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
293 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
294 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
296 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
297 pool only if RE_Root_Storage_Pool_Ptr is available.
298 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
299 pool actual unless RE_Root_Storage_Pool_Ptr is available.
300 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
301 formal only if RE_Root_Storage_Pool_Ptr is available.
303 2011-10-15 Matthew Heaney <heaney@adacore.com>
305 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
306 type): Specify Priority aspect for protected type.
308 2011-10-14 Ed Schonberg <schonberg@adacore.com>
310 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
311 is a generic actual, it is a subtype of a type that was frozen
312 by the instantiation, and even if not marked frozen it does not
313 affect the construction of the dispatch table.
315 2011-10-14 Robert Dewar <dewar@adacore.com>
317 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
319 * s-rident.ads: Add missing Compiler_Unit pragma.
321 2011-10-14 Gary Dismukes <dismukes@adacore.com>
323 * sem_res.adb: Minor reformatting.
325 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
327 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
328 Code and comment reformatting. Use BIP_Task_Master
329 when creating a _master.
330 (BIP_Formal_Suffix): Code reformatting. Correct the case for
332 (Make_Build_In_Place_Call_In_Object_Declaration): Use
333 BIP_Task_Master when creating a reference to the enclosing
334 function's _master formal.
335 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
337 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
338 (Needs_BIP_Finalization_Master): Alphabetized.
339 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
342 2011-10-14 Ed Schonberg <schonberg@adacore.com>
344 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
345 reject an aliased keyword on the object declaration of an extended
346 return statement. In older versions of the language indicate
347 that this is illegal in the standard.
349 2011-10-14 Pascal Obry <obry@adacore.com>
351 * sem_util.adb, sem_ch4.adb: Minor reformatting.
353 2011-10-14 Ed Schonberg <schonberg@adacore.com>
355 * sem_ch13.adb: Recognize properly procedure calls that are
356 transformed into code statements.
358 2011-10-14 Vincent Celier <celier@adacore.com>
360 * projects.texi: Minor fix in project example.
362 2011-10-14 Ed Schonberg <schonberg@adacore.com>
364 * sem_util.adb: Return objects are aliased if their type is
365 immutably limited as per AI05-0053.
367 2011-10-14 Gary Dismukes <dismukes@adacore.com>
369 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
370 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
371 Short_Circuit_And_Or expansion code (moved to sem_res).
372 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
373 "and" and "or" operators as short-circuit "and then" and "or
374 else", when pragma Short_Circuit_And_Or is active.
376 2011-10-13 Robert Dewar <dewar@adacore.com>
378 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
379 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
381 2011-10-13 Arnaud Charlet <charlet@adacore.com>
383 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
385 2011-10-13 Jerome Guitton <guitton@adacore.com>
387 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
389 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
391 * a-convec.ads (Cursor): Minor reformatting.
392 * a-convec.adb (Next): Fix minor inconsistencies.
393 (Previous): Likewise.
395 2011-10-13 Ed Schonberg <schonberg@adacore.com>
397 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
398 New predicate to determine whether some operations on an array
399 type are available when the full view of its component may differ
400 from the view of the point of the array declaration.
401 * sem_ch4.adb (Find_Equality_Types): Use
402 Available_Full_View_Of_Component.
403 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
405 2011-10-13 Ed Schonberg <schonberg@adacore.com>
407 * sem_ch9.adb: Analyze aspects while discriminants of protected
410 2011-10-13 Geert Bosch <bosch@adacore.com>
412 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
413 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
414 longer depend on an external library.
415 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
416 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
418 * gcc-interface/Make-lang.in: Update dependencies.
420 2011-10-13 Cyrille Comar <comar@adacore.com>
422 * gnat_ugn.texi: Minor editing.
424 2011-10-13 Vincent Celier <celier@adacore.com>
426 * projects.texi: Add documentation on packages and attributes
427 that are inherited from a project being extended into the
430 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
432 * exp_ch3.adb (Build_Master): Rewritten.
433 (Expand_N_Full_Type_Declaration): Reformat the declarative
434 region. Update the call to Build_Master_Renaming.
435 (Expand_Previous_Access_Type): Rewritten.
436 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
437 Add local constant Result_Subt and update related usage.
438 (Expand_N_Extended_Return_Statement): Add local constant
439 Result_Subt and update related usage.
440 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
441 new context detection mechanism.
442 (Build_Class_Wide_Master):
443 Use Insert_Action to add the renaming into the tree.
444 (Build_Master_Entity): Rewritten to use the new context detection
446 (Build_Master_Renaming): Add formal parameter Ins_Nod
447 and related usage. Use Insert_Action to add the renaming into the
449 (Find_Enclosing_Context): New subsidiary routine. Rather
450 than relying on enclosing scopes, this routine looks at the
451 tree structure to figure out the proper context for a _master
452 or a _chain. This approach eliminates the issues with transient
453 scopes which have not been converted into blocks.
454 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
455 to better reflect the new usage. Update the related comment.
456 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
457 the comment on usage.
458 * sem_ch3.adb (Access_Definition): Update the calls to
459 Build_Master_Entity and Build_Master_Renaming.
460 * sem_ch6.adb (Create_Extra_Formals): Add local variable
461 Full_Subt. Code reformatting.
462 * sem_util.adb (Is_Iterator): Alphabetized.
463 (Is_LHS): Alphabetized.
464 (Is_Limited_Class_Wide_Type): New routine.
465 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
467 2011-10-13 Geert Bosch <bosch@adacore.com>
469 * a-ngrear.adb (Solve): Make generic and move to
470 System.Generic_Array_Operations.
471 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
472 New generic solvers to compute a vector resp. matrix Y such
473 that A * Y = X, approximately.
474 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
475 Implement using Forward_Eliminate and Back_Substitute
476 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
478 * a-ngcoar.ads ("abs"): Fix return type to be real.
480 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
483 * s-linux-alpha.ads: Do not "with" Interfaces.C.
484 * s-linux-sparc.ads: Likewise.
486 2011-10-13 Geert Bosch <bosch@adacore.com>
488 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
490 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
492 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
495 2011-10-13 Geert Bosch <bosch@adacore.com>
497 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
498 move to System.Generic_Array_Operations.
500 2011-10-13 Geert Bosch <bosch@adacore.com>
502 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
503 * s-gearop.ads (L2_Norm): Change profile to be suitable for
505 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
508 2011-10-13 Robert Dewar <dewar@adacore.com>
510 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
511 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
512 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
513 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
514 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
515 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
517 2011-10-13 Geert Bosch <bosch@adacore.com>
519 * s-gearop.adb: Minor comment additions.
521 2011-10-13 Fedor Rybin <frybin@adacore.com>
523 * gnat_ugn.texi: Add gnattest section.
525 2011-10-13 Ed Schonberg <schonberg@adacore.com>
527 * freeze.adb: Do not create body of renaming if declaration has
530 2011-10-13 Olivier Hainque <hainque@adacore.com>
532 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
533 further, to the ppc+kernel case only.
535 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
537 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
538 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
539 Do not create a pool formal on .NET/JVM.
540 (Expand_N_Extended_Return_Statement): Alphabetize local
541 variables. Do not create a renaming of the build-in-place pool
542 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
543 Add the user-defined pool only on non-VM targets.
544 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
545 local variables. Do not add a pool actual on .NET/JVM.
546 * sem_ch6.adb: Add with and use clause for Targparm.
547 (Create_Extra_Formals): Add build-in-place pool formal only on
549 * rtsfind.ads: Alphabetize entries.
551 2011-10-13 Sergey Rybin <rybin@adacore.com>
553 * gnat_ugn.texi: Minor correction.
555 2011-10-13 Ed Schonberg <schonberg@adacore.com>
557 * sem_ch8.adb: Minor error message improvement.
559 2011-10-13 Robert Dewar <dewar@adacore.com>
561 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
563 2011-10-13 Gary Dismukes <dismukes@adacore.com>
565 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
566 of a for loop for an enumeration type with an enumeration rep
567 clause, which involves moving the original loop parameter into
568 a nested block, the loop parameter's entity must be removed from
569 the entity list of the loop scope.
571 2011-10-13 Bob Duff <duff@adacore.com>
573 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
574 that gets passed in the same cases where BIP_Alloc_Form is passed
575 (caller-unknown-size results). BIP_Storage_Pool is used when
576 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
577 to the user-defined storage pool is passed at the call site,
578 and this pool is used in callee to allocate the result.
579 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
580 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
581 the additional BIP_Storage_Pool actual.
582 (Expand_N_Extended_Return_Statement): Allocate the function
583 result using the user-defined storage pool, if BIP_Alloc_Form =
585 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
586 * exp_ch4.adb: Don't overwrite storage pool set by
587 Expand_N_Extended_Return_Statement.
588 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
589 for use in build-in-place function calls within allocators
590 where the access type has a user-defined storage pool.
592 2011-10-13 Sergey Rybin <rybin@adacore.com>
594 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
597 2011-10-13 Nicolas Roche <roche@adacore.com>
599 * gnatlink.adb: Ensure that -mrtp is passed when
600 runtime name ends with 'rtp'.
602 2011-10-13 Ed Schonberg <schonberg@adacore.com>
604 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
605 unchecked union type can be limited.
607 2011-10-13 Olivier Hainque <hainque@adacore.com>
609 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
610 the use of the signal trampoline for PPC in the sjlj case as well.
611 Add legitimate casts, preventing compile time warnings on the
612 (sighandler *) profile.
614 2011-10-13 Yannick Moy <moy@adacore.com>
616 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
617 analysis in Alfa mode.
619 2011-10-13 Ed Schonberg <schonberg@adacore.com>
621 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
622 expressions are legal limited return values if each one of their
623 dependent expressions are legal.
625 2011-10-13 Ed Schonberg <schonberg@adacore.com>
627 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
628 if the prefix of the call is a qualified expression, rewrite as
630 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
631 code statement is legal if it is a rewriting of a procedure call.
633 2011-10-13 Ed Schonberg <schonberg@adacore.com>
635 * exp_aggr.adb (Flatten): If a component association has a box,
636 assume that aggregate is not static.
637 (Safe_Aggregate): If a component association in a non-limited
638 aggregate has a box, assume that it cannot be expanded in place.
640 2011-10-13 Vincent Celier <celier@adacore.com>
642 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
643 Process_Project_Tree_Phase_1 with Packages_To_Check.
644 (Process_Project_And_Apply_Config): Ditto
645 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
646 Remove default for argument Packages_To_Check.
647 * prj-proc.adb (Recursive_Process): New argument
650 (Process_Project_Tree_Phase_1): Ditto.
651 (Recursive_Project.Process_Aggregated_Projects): Call
652 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
654 * prj-proc.ads (Process): New argument Packages_To_Check
655 (Process_Project_Tree_Phase_1): Ditto
657 2011-10-13 Arnaud Charlet <charlet@adacore.com>
659 * gcc-interface/Makefile.in: Fix typo.
661 2011-10-13 Ed Schonberg <schonberg@adacore.com>
663 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
664 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
665 Use sloc of defining identifier of farmal type declaration,
666 as sloc of generated internal entity, to prevent misplaced
669 2011-10-13 Ed Schonberg <schonberg@adacore.com>
671 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
672 is fully defined before checking that it is a numeric type.
674 2011-10-13 Ed Schonberg <schonberg@adacore.com>
676 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
677 association for component X has a box, then X is covered in the
678 aggregate even if there is not default value for X in the type
679 declaration, and X has to be default-initialized.
681 2011-10-13 Ed Schonberg <schonberg@adacore.com>
683 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
684 'Value): Mark literals as referenced only if reference is in
687 2011-10-13 Matthew Heaney <heaney@adacore.com>
689 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
691 2011-10-13 Olivier Hainque <hainque@adacore.com>
693 * sigtramp.h: New file. Prototype and spec of the signal
694 trampoline to be called by an established handler to provide
695 dwarf call frame info before the real signal processing code.
696 * sigtramp-ppcvxw.c: New file. Implementation of the signal
697 trampoline for ppc-vxworks.
698 * init.c (vxworks section): Use it for ppc.
700 2011-10-13 Thomas Quinot <quinot@adacore.com>
702 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
703 (Check_Future_Identifier): New subprogram,
704 factors duplicated code from Par.Ch2.P_Identifier and
705 Par.Ch3.P_Defining_Identifier.
707 2011-10-13 Thomas Quinot <quinot@adacore.com>
709 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
710 if we fail to initialize CV attributes or CV.
712 2011-10-13 Thomas Quinot <quinot@adacore.com>
714 * s-tasren.adb (Timed_Selective_Wait, case
715 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
716 we know abortion is already deferred.
718 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
720 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
721 (Build_Master_Renaming (function)): Removed.
722 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
723 (Expand_Full_Type_Declaration): Alphabetize
724 variables. Reformatting of code and comments. Rewrite the
725 section on processing of anonymous access-to-task types in
727 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
728 (Build_Master_Renaming): Moved to exp_ch9.
729 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
730 (Build_Master_Entity): Add formal parameter
731 Use_Current. Reformatting of code and comments.
732 (Build_Master_Renaming): Moved from exp_ch3.
733 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
734 exp_ch3. Update comment on usage.
735 (Build_Master_Entity):
736 Add formal parameter Use_Current. Update comment on usage.
737 (Build_Master_Renaming): Moved from exp_ch3.
738 * sem_ch3.adb (Access_Definition): Remove redundant code to
739 create a _master and a renaming.
741 2011-10-13 Ed Schonberg <schonberg@adacore.com>
743 * lib-xref.adb: Do no emit reference to overridden operation,
744 if it is internally generated.
746 2011-10-13 Vincent Celier <celier@adacore.com>
748 * bindgen.adb: Remove any processing related to g-trasym
749 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
750 * mlib-prj.adb: Remove any processing related to g-trasym.
752 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
754 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
755 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
756 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
757 (ADA_FLAGS_TO_PASS): Likewise.
758 (COMMON_FLAGS_TO_PASS): New.
759 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
760 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
761 (gnatlib): Use COMMON_FLAGS_TO_PASS.
762 (ada.install-common): Likewise.
763 (install-gnatlib): Likewise.
764 (install-gnatlib-obj): Likewise.
765 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
766 (gnat-cross): Delete.
767 (gnatboot): Likewise.
768 (gnatboot2): Likewise.
769 (gnatboot3): Likewise.
770 (gnatstage1): Likewise.
771 (gnatstage2): Likewise.
772 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
773 (MOST_ADAFLAGS): Likewise.
774 (LOOSE_CFLAGS): Likewise.
775 (gnat-cross): Likewise.
776 (GNATLIBFLAGS): Add -W -Wall.
777 (GNATLIBCFLAGS_FOR_C): Likewise.
778 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
779 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
781 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
783 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
784 (push_range_check_info): Likewise.
785 (gnat_to_gnu) <N_Code_Statement>: Likewise.
786 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
787 (gnat_invariant_expr): Likewise.
788 * gcc-interface/utils.c (compute_related_constant): Likewise.
789 (max_size): Fix handling of SAVE_EXPR.
790 (remove_conversions): Fix formatting.
792 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
794 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
795 (DECL_INDUCTION_VAR): New macro.
796 (SET_DECL_INDUCTION_VAR): Likewise.
797 * gcc-interface/gigi.h (convert_to_index_type): Declare.
798 (gnat_invariant_expr): Likewise.
799 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
800 parameter, set DECL_LOOP_PARM_P on it.
801 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
802 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
803 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
804 (struct range_check_info_d): New type.
805 (struct loop_info_d): Likewise.
806 (gnu_loop_stack): New stack.
807 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
808 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
809 is set, do not test DECL_RENAMED_OBJECT.
810 (push_range_check_info): New function.
811 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
812 the label. Reference the label and the iteration variable from it.
813 Build the special induction variable in the unsigned version of the
814 size type, if it is larger than the base type. And attach it to the
815 iteration variable if the latter isn't by-ref. In the iteration scheme
816 case, initialize the invariant conditions in front of the loop if
817 deemed profitable. Use gnu_loop_stack.
818 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
819 <N_Raise_Constraint_Error>: Always process the reason. In the range
820 check and related cases, and if loop unswitching is enabled, compute
821 invariant conditions and push this information onto the stack.
822 Do not translate again the condition if it has been already translated.
823 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
824 DECL_LOOP_PARM_P isn't set.
825 (convert_to_index_type): New function.
826 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
827 to convert the index from the base index type to sizetype.
828 (gnat_invariant_expr): New function.
830 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
832 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
833 two parallel arrays to hold standard builtin declarations, and
834 replace it with a function based interface that can support
835 creating builtins on the fly in the future.
836 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
837 (gnat_to_gnu): Ditto.
839 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
842 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
843 * gcc-interface/utils.c (global_context): New variable.
844 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
845 that are either public external or at top level. Use "No" macro.
846 (end_subprog_body): Call decl_function_context.
847 (rest_of_subprog_body_compilation): Likewise.
849 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
851 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
852 (rest_of_subprog_body_compilation): Likewise.
853 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
854 test for useless conversions by means of gnat_useless_type_conversion.
855 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
856 (language_function): Add named_ret_val and other_ret_val.
857 (f_named_ret_val): New macro.
858 (f_other_ret_val): Likewise.
859 (gigi): Call rest_of_subprog_body_compilation.
860 (struct nrv_data): New structure.
861 (is_nrv_p): New predicate.
862 (prune_nrv_r): New helper function.
863 (prune_nrv_in_block): New function.
864 (finalize_nrv_r): New helper function.
865 (finalize_nrv): New function.
866 (return_value_ok_for_nrv_p): New predicate.
867 (build_return_expr): If optimization is enabled, record candidates for
868 the Named Return Value optimization.
869 (build_function_stub): Call rest_of_subprog_body_compilation.
870 (Subprogram_Body_to_gnu): If optimization is enabled and there are
871 candidates, finalize the Named Return Value optimization.
872 Call rest_of_subprog_body_compilation.
873 (call_to_gnu): At the end, if a return value is needed, simplify the
874 result before wrapping it up in a COMPOUND_EXPR.
875 * gcc-interface/utils.c (end_subprog_body): Split into...
876 (rest_of_subprog_body_compilation): ...this. New function.
877 (gnat_useless_type_conversion): Likewise.
879 2011-10-06 Thomas Quinot <quinot@adacore.com>
881 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
882 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
883 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
884 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
885 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
886 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
887 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
888 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
890 2011-10-06 Ed Schonberg <schonberg@adacore.com>
892 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
895 2011-10-06 Matthew Heaney <heaney@adacore.com>
897 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
898 (Dequeue_Only_High_Priority): Protected procedure now implemented.
900 2011-10-06 Vincent Celier <celier@adacore.com>
902 * g-trasym.adb: Replace old implementation with the default
903 implementation that returns list of addresses as "0x...".
904 * g-trasym.ads: Update the list of platforms with the full
905 capability. Indicate that there is a default implementation
907 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
908 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
909 is now a default implementation for all platforms without the full
912 2011-10-06 Robert Dewar <dewar@adacore.com>
914 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
915 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
916 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
917 reorganization (use conditional expressions).
919 2011-10-06 Robert Dewar <dewar@adacore.com>
921 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
922 floating divide by zero.
924 2011-10-06 Ed Schonberg <schonberg@adacore.com>
926 * sem_ch6.adb: Limited interfaces that are not immutably limited
927 are OK in return statements.
929 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
931 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
932 change to powerpc section.
934 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
936 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
939 2011-09-27 Ed Schonberg <schonberg@adacore.com>
941 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
942 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
943 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
945 * a-coorma.ads: Minor reformmating.
946 * einfo.ads: Improve the comment describing the
947 Directly_Designated_Type function.
948 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
950 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
953 2011-09-27 Robert Dewar <dewar@adacore.com>
955 * a-comutr.ads: Minor reformatting.
957 2011-09-27 Ed Schonberg <schonberg@adacore.com>
959 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
960 iterators to multiway trees.
962 2011-09-27 Yannick Moy <moy@adacore.com>
964 * debug.adb (d.D): New option for strict Alfa mode.
965 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
966 permissions as strictly as possible.
967 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
968 Alfa mode, now, interpret ranges of base types like GNAT does; in
969 strict mode, simply change the range of the implicit base Itype.
970 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
972 2011-09-27 Robert Dewar <dewar@adacore.com>
974 * exp_ch9.adb: Minor comment fixes.
976 2011-09-27 Ed Schonberg <schonberg@adacore.com>
978 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
981 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
983 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
984 instead of Directly_Designated_Type in the indirect array case.
986 2011-09-27 Robert Dewar <dewar@adacore.com>
988 * exp_util.adb, exp_aggr.adb: Minor reformatting.
990 2011-09-27 Ed Schonberg <schonberg@adacore.com>
992 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
993 on subtype declarations.
994 * exp_aggr.adb: Minor comment update.
996 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
998 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
999 test in the N_Explicit_Dereference case. Fold double logical
1000 negation in the special loop case and conditionalize it on
1001 Variable_Ref being true.
1003 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1005 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1006 single protected object and the selector is a discriminant or an
1007 entry family, this is a non-overloaded candidate interpretation,
1008 and possible primitive operations of the type must not be
1011 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1013 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1015 2011-09-27 Pascal Obry <obry@adacore.com>
1017 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1018 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1019 Add dummy definitions for pthread_rwlock_t
1020 and pthread_rwlockattr_t on all POSIX platforms.
1021 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1023 (Finalize_Lock): Likewise.
1024 (Write_Lock): Likewise.
1027 2011-09-27 Tristan Gingold <gingold@adacore.com>
1029 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1032 2011-09-27 Pascal Obry <obry@adacore.com>
1034 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1035 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1036 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1037 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1038 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1039 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1040 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1041 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1042 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1043 s-taprop-posix.adb: Revert previous changes.
1044 (Lock): Now a record containing the two possible lock
1045 (mutex and read/write) defined in OS_Interface.
1046 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1048 (Initialize_Protection): Likewise.
1050 (Lock_Read_Only): Likewise.
1053 2011-09-27 Pascal Obry <obry@adacore.com>
1055 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1056 OS_Interface.pthread_rwlock_t.
1058 2011-09-27 Robert Dewar <dewar@adacore.com>
1060 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1061 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1062 sem_ch5.adb, sem_util.adb: Minor reformatting.
1064 2011-09-27 Pascal Obry <obry@adacore.com>
1066 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1067 (Finalize_Lock)[RW_Lock]: Likewise.
1068 (Write_Lock)[RW_Lock]: Likewise.
1069 (Unlock)[RW_Lock]: Likewise.
1070 (Read_Lock): Define L as RW_Lock (instead of Lock).
1071 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1072 routine for r/w lock.
1073 (Finalize_Lock)[RW_Lock]: Likewise.
1074 (Write_Lock)[RW_Lock]: Likewise.
1075 (Unlock)[RW_Lock]: Likewise.
1076 (Read_Lock): Define L as RW_Lock (instead of Lock).
1078 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1079 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1080 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1081 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1082 routine for standard lock.
1083 (Finalize_Lock)[RW_Lock]: Likewise.
1084 (Write_Lock)[RW_Lock]: Likewise.
1085 (Unlock)[RW_Lock]: Likewise.
1086 (Read_Lock): Define L as RW_Lock (instead of Lock).
1087 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1088 in the record definition.
1089 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1090 lock for 'R' locking policy.
1091 (Initialize_Protection): Likewise.
1093 (Lock_Read_Only): Likewise.
1095 * s-taspri-posix.ads (RW_Lock): New type defined as
1096 OS_Interface.pthread_rwlock_t.
1098 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1099 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1100 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1101 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1103 2011-09-27 Pascal Obry <obry@adacore.com>
1105 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1107 2011-09-27 Pascal Obry <obry@adacore.com>
1109 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1110 s-osinte-hpux.ads, s-osinte-irix.ads,
1111 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1113 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1114 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1115 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1116 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1117 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1118 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1120 2011-09-27 Pascal Obry <obry@adacore.com>
1122 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1123 (RE_Id): Add RE_Lock_Read_Only.
1124 (RE_Unit_Table): Likewise.
1125 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1126 to lift restriction on first character. Handle now the
1127 Name_Concurrent_Readers_Locking where policy character is set to
1129 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1131 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1132 read only lock for function in protected object.
1133 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1134 this routine is now used.
1136 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1138 * s-atocou-x86.adb (Decrement): Use %;.
1139 (Increment): Likewise.
1141 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1143 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1144 dereference of the pointer to the storage area. Remove useless type
1145 conversions and factor out common code.
1147 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1149 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1150 variable and use it throughout.
1151 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1152 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1153 first step. Also convert to the unpadded type as a last step.
1155 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1157 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1158 DECL_CHAIN in comment.
1159 * gcc-interface/trans.c (gigi): Likewise.
1160 (Attribute_to_gnu): Likewise.
1161 (build_function_stub): Likewise.
1162 (gnat_to_gnu): Likewise.
1163 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1164 (convert_vms_descriptor64): Likewise.
1165 (convert_vms_descriptor32): Likewise.
1167 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1169 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1170 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1171 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1172 the type of the record is TYPE_READONLY.
1174 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1175 Robert Dewar <dewar@adacore.com>
1177 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1178 OUT formal parameter which is of an null-exclusion access subtype.
1180 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1182 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1183 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1184 (gnat_to_gnu_param): Likewise.
1185 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1186 maybe_unconstrained_array instead of doing the work manually.
1187 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1188 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1189 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1190 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1191 (gnat_stabilize_reference): Likewise.
1193 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1195 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1196 (SET_TYPE_NULL_BOUNDS): Likewise.
1197 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1198 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1199 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1201 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1202 check that the initializer is a valid constant expression for use in
1203 initializing a static variable. Add missing guard.
1204 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1205 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1206 pointer for the bounds.
1207 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1208 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1210 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1212 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1213 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1214 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1215 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1216 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1217 to the indirect case.
1218 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1219 the TREE_THIS_NOTRAP flag.
1221 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1223 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1224 iteration scheme, always generate the do-while form if optimization
1225 is enabled. Use more straightforward test at the end.
1227 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1229 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1230 XNEW instead of xmalloc. Do not build useless pointer type.
1231 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1232 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1233 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1235 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1237 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1238 the alignment if this doesn't prevent BLKmode access to the object.
1240 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1242 * gcc-interface/Makefile.in (darwin): Do not issue the
1243 '-flat_namespace' linker flag during Ada build.
1244 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1245 default shared library options.
1247 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1249 * gcc-interface/decl.c (annotate_value): Look up expression for
1250 insertion in the cache at the end.
1252 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1254 * gcc-interface/Make-lang.in: Update dependencies.
1256 2011-09-19 Steve Baird <baird@adacore.com>
1258 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1259 configuration pragma names so that Is_Configuration_Pragma_Name
1260 will return True for Name_Annotate. Make corresponding change in
1261 Pragma_Id enumeration type. This is needed to allow an Annotate
1262 pragma to occur in a configuration pragma file (typically,
1264 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1265 * gnat_rm.texi: Note that pragma Annotate may be used as a
1266 configuration pragma.
1268 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1270 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1271 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1273 2011-09-19 Yannick Moy <moy@adacore.com>
1275 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1276 for expansion of set membership.
1277 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1278 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1279 visible for use in Alfa expansion.
1280 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1281 variable in Alfa mode.
1283 2011-09-19 Thomas Quinot <quinot@adacore.com>
1285 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1287 2011-09-19 Thomas Quinot <quinot@adacore.com>
1289 * exp_ch9.adb: Minor reformatting.
1291 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1293 * freeze.adb (Build_Renamed_Body): Generic subprograms
1294 instantiations cannot be poperly inlined by the compiler, do
1295 not set the Body_To_Inline attribute in such cases.
1296 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1297 inlining-related flags from the generic subprogram declaration.
1299 2011-09-19 Thomas Quinot <quinot@adacore.com>
1301 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1302 (Build_Stub_Type): Remove, instead copy components from
1303 System.Partition_Interface.RACW_Stub_Type.
1304 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1305 (Copy_Component_List): New subprogram.
1307 2011-09-19 Yannick Moy <moy@adacore.com>
1309 * lib-xref.adb (Generate_Reference): Ignore references to
1310 constants in Standard.
1312 2011-09-19 Robert Dewar <dewar@adacore.com>
1314 * err_vars.ads, errout.ads: Minor reformatting.
1316 2011-09-19 Robert Dewar <dewar@adacore.com>
1318 * aspects.ads (Impl_Defined_Aspects): New array
1319 * lib-writ.adb (No_Dependences): New name for No_Dependence
1320 * restrict.adb (No_Dependences): New name for No_Dependence
1321 (Check_Restriction_No_Specification_Of_Aspect): New
1323 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1324 (Restricted_Profile_Result): New variable
1325 (No_Specification_Of_Aspects): New variable
1326 (No_Specification_Of_Aspect_Warning): New variable
1327 * restrict.ads (No_Dependences): New name for No_Dependence
1328 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1329 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1330 * s-rident.ads: Add restriction
1331 No_Implementation_Aspect_Specifications, this is also added to
1332 the No_Implementation_Extensions profile.
1333 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1334 No_Implementation_Defined_Aspects
1335 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1336 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1337 No_Implementation_Aspects
1338 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1339 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1341 2011-09-19 Yannick Moy <moy@adacore.com>
1343 * lib-xref.adb (Generate_Reference): Take into account multiple
1344 renamings for Alfa refs.
1346 2011-09-19 Thomas Quinot <quinot@adacore.com>
1348 * g-socthi-mingw.adb: Minor reformatting.
1350 2011-09-19 Yannick Moy <moy@adacore.com>
1352 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1353 expansion to False in mode Alfa
1355 2011-09-19 Pascal Obry <obry@adacore.com>
1357 * mingw32.h: Remove obsolete code needed for old versions
1360 2011-09-19 Robert Dewar <dewar@adacore.com>
1362 * errout.ads: Minor reformatting.
1364 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1366 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1367 function is transformed into a declaration and a body, insert
1368 body at the end of the declarative part, to prevent premature
1369 freeze actions, and preserve original specification in the
1370 subprogram declaration.
1372 2011-09-19 Vincent Celier <celier@adacore.com>
1374 * projects.texi: Minor editing.
1376 2011-09-19 Robert Dewar <dewar@adacore.com>
1378 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1379 exp_aggr.adb: Minor reformatting.
1381 2011-09-19 Yannick Moy <moy@adacore.com>
1383 * lib-xref.adb (Generate_Reference): Change entity referenced
1384 to underlying object if any, or else reference to the HEAP.
1386 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1388 * gcc-interface/Make-lang.in: Update dependencies.
1390 2011-09-15 Robert Dewar <dewar@adacore.com>
1392 * tree_io.ads: Minor reformatting.
1393 * a-intnam.ads: Fix bad header.
1395 2011-09-15 Thomas Quinot <quinot@adacore.com>
1397 * a-exexpr-gcc.adb: Minor reformatting.
1399 2011-09-15 Yannick Moy <moy@adacore.com>
1401 * sem_ch6.adb: Propagate information that an expression function comes
1402 from source (otherwise references to this entity are not stored).
1404 2011-09-15 Robert Dewar <dewar@adacore.com>
1406 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1407 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1408 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1410 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1412 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1413 if the expression function is not a completion, create a
1414 new specification for the generated declaration, and keep the
1415 original specification in the generated body. Shorter code also
1416 ensures that proper warnings are generated for unused formals
1419 2011-09-15 Sergey Rybin <rybin@adacore.com>
1421 * tree_io.ads: Update ASIS_Version_Number because of the changes
1422 in the tree structures for expression functions.
1424 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1426 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1427 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1428 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1429 (CLOCK_REALTIME): Fix wrong value on some OSes.
1430 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1432 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1434 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1435 to unconstrained array case, deal with each branch of a COND_EXPR.
1436 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1437 a COND_EXPR in the initializer, if present.
1439 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1441 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1442 of an addressable type.
1443 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1444 Deal with those cases for which creating a temporary is mandatory.
1446 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1448 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1449 this is a real formal parameter before testing whether it is by ref.
1451 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1453 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1454 (build_call_1_expr): Likewise.
1455 (build_call_2_expr): Likewise.
1456 (build_call_n_expr): New prototype.
1457 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1458 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1459 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1460 (Exception_Handler_to_gnu_zcx): Likewise.
1461 (gnat_to_gnu): Likewise.
1462 (build_binary_op_trapv): Likewise.
1463 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1464 (build_call_1_expr): Likewise.
1465 (build_call_2_expr): Likewise.
1466 (build_call_n_expr): New function.
1467 (build_call_raise): Use build_call_n_expr.
1468 (build_call_raise_range): Likewise.
1469 (build_call_raise_column): Likewise.
1470 (build_call_alloc_dealloc_proc): Likewise.
1471 (maybe_wrap_malloc): Likewise.
1472 (maybe_wrap_free): Likewise.
1474 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1476 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1478 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1479 the result type is null if ENABLE_CHECKING. Set operation_type at the
1480 end unconditionally if not set in the previous cases.
1481 Use build2 and void_type_node for MODIFY_EXPR.
1482 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1484 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1486 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1487 precision when converting to or from an integral type whose precision
1488 is not equal to its size.
1490 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1492 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1494 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1496 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1498 * system-darwin-ppc64.ads: New file.
1500 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1502 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1505 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1507 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1508 size switches to the link phase for shared libs.
1510 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1512 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1513 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1515 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1517 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1518 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1519 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1521 (TOOLS_FLAGS_TO_PASS): New.
1522 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1524 2011-09-06 Robert Dewar <dewar@adacore.com>
1526 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1527 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1529 2011-09-06 Robert Dewar <dewar@adacore.com>
1531 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1532 * s-rident.ads: New restriction No_Implementation_Units
1533 (this restriction is also part of the profile
1534 No_Implementation_Extensions)
1535 * sem_ch10.adb (Analyze_With_Clause): Add check for
1536 No_Implementation_Units restriction.
1538 2011-09-06 Jerome Guitton <guitton@adacore.com>
1540 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1543 2011-09-06 Thomas Quinot <quinot@adacore.com>
1545 * s-solita.adb: Minor reformatting.
1547 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1549 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1550 is a rewriting of an expression function does not freeze previous
1553 2011-09-06 Robert Dewar <dewar@adacore.com>
1555 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1557 2011-09-06 Tristan Gingold <gingold@adacore.com>
1559 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1560 powerpc-wrs-vxworksae.
1562 2011-09-06 Thomas Quinot <quinot@adacore.com>
1564 * s-os_lib.ads (Spawn): Minor documentation clarification,
1565 Success is True for a zero exit status.
1567 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1569 * sem_ch5.adb: Add message for common iterator error.
1571 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1573 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1574 selected component discriminated by a current instance, replace
1575 the constraint with a reference to the target object, regardless
1576 of whether the context is an init_proc.
1578 2011-09-06 Robert Dewar <dewar@adacore.com>
1580 * exp_attr.adb: Descriptor_Size is never static.
1582 2011-09-06 Robert Dewar <dewar@adacore.com>
1584 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1586 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1588 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1591 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1593 * sem_res.adb (Resolve): An expression that is the body of an
1594 expression function does not freeze.
1596 2011-09-06 Matthew Heaney <heaney@adacore.com>
1598 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1599 a-cuprqu.adb: Changed copyright notice to indicate current
1602 2011-09-06 Vincent Celier <celier@adacore.com>
1604 * prj.adb: Minor spelling error fix in comment
1605 * sem_res.adb: Minor reformatting
1607 2011-09-06 Pascal Obry <obry@adacore.com>
1609 * sysdep.c (winflush_nt): Removed as not needed anymore.
1610 (winflush_95): Likewise.
1611 (winflush_init): Likewise.
1612 (winflush_function): Likewise.
1613 (getc_immediate_common): Remove call to winflush_function.
1615 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1617 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1618 processing for Descriptor_Size.
1619 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1620 to account for its broader usage.
1621 * sem_attr.adb (Analyze_Attribute): Change the error detection
1622 circuitry for Descriptor_Size as the attribute is now applicable
1625 2011-09-06 Robert Dewar <dewar@adacore.com>
1627 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1629 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1631 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1632 in a parameter association must not set the Referenced flag on
1634 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1636 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1638 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1640 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1642 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1643 gnatlink-re): Speed up by using -j0.
1645 2011-09-06 Yannick Moy <moy@adacore.com>
1647 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1648 Set_Corresponding_Aspect when creating pragma from aspect.
1649 (Add_Predicates): Use new field Corresponding_Aspect.
1650 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1651 name when present, for the purpose of issuing error messages;
1652 remove local procedure Error_Pragma_Arg_Alternate_Name.
1653 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1655 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1658 2011-09-06 Robert Dewar <dewar@adacore.com>
1660 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1662 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1664 * exp_ch6.adb (Build_Heap_Allocator): Add new
1665 local variable Desig_Typ. Code and comment reformatting. Add
1666 machinery to ensure that the allocation uses a fat pointer when
1667 the type of the return object is a constrained array and the
1668 function return type is an unconstrained array.
1670 2011-09-06 Vincent Celier <celier@adacore.com>
1672 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1673 parameters in subprograms.
1675 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1677 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1679 2011-09-06 Thomas Quinot <quinot@adacore.com>
1681 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1682 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1684 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1685 is null, destroy task specific data, to make API consistent with
1686 other platforms, and thus compatible with the shared version
1688 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1689 Document the above assumption.
1691 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1693 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1694 variable for type of return value when return type is
1695 unconstrained and context is an assignment.
1697 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1699 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1700 class-wide operation if expansion is not enabled.
1702 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1704 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1707 2011-09-06 Yannick Moy <moy@adacore.com>
1709 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1710 Aspect_Invariant): Do not issue error at this point on illegal
1711 pragma placement, as this is checked later on when analyzing
1712 the corresponding pragma.
1713 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1714 similar to Error_Pragma_Arg, except the source name of the
1715 aspect/pragma to use in warnings may be equal to parameter
1716 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1717 message to distinguish source name of pragma/aspect, and whether
1718 the illegality resides in the type being public, or being private
1719 without a public declaration
1721 2011-09-06 Thomas Quinot <quinot@adacore.com>
1723 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1724 size check (fd_set is implemented differently on that platform).
1726 2011-09-06 Thomas Quinot <quinot@adacore.com>
1728 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1729 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1730 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1731 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1732 (ATCB_Allocation): New subpackage of
1733 System.Tasking.Primitive_Operations, shared across all targets
1734 with full tasking runtime.
1735 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1737 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1738 taking care of establishing a local temporary ATCB if the one
1739 being deallocated is Self, to avoid a reference to the freed
1740 ATCB in Abort_Undefer.
1742 2011-09-06 Thomas Quinot <quinot@adacore.com>
1744 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1745 terminated, mark it for deallocation upon termination.
1746 (Terminate_Task): Call Free_Task again if the task is marked
1747 for automatic deallocation upon termination.
1749 2011-09-06 Robert Dewar <dewar@adacore.com>
1751 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1752 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1753 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1754 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1755 a-intnam-solaris.ads, a-intnam-tru64.ads,
1756 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1757 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1758 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1759 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1760 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1761 Add new profile No_Implementation_Extensions
1762 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1763 profile No_Implementation_Extensions
1764 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1765 Check violation of restriction No_Implementation_Identifiers
1766 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1767 Add entry for Name_No_Implementation_Extensions
1769 2011-09-06 Robert Dewar <dewar@adacore.com>
1771 * impunit.ads: Minor reformatting.
1773 2011-09-06 Robert Dewar <dewar@adacore.com>
1775 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1777 2011-09-06 Pascal Obry <obry@adacore.com>
1779 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1782 2011-09-06 Robert Dewar <dewar@adacore.com>
1784 * g-socket.adb: Minor reformatting
1786 2011-09-06 Javier Miranda <miranda@adacore.com>
1788 * ali.adb (Scan_ALI): Add missing support to load references of
1789 entities imported from other languages.
1790 * ali.ads (Xref_Record): Adding new fields to store the language and
1791 name of an imported entity.
1792 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1795 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1797 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1798 is allowed on a full type declaration if it is the completion of
1799 a private declarations.
1800 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1801 aspect is allowed on a full type declaration in the private part
1804 2011-09-06 Robert Dewar <dewar@adacore.com>
1806 * sem_ch8.ads: Minor reformatting
1808 2011-09-06 Thomas Quinot <quinot@adacore.com>
1810 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1811 Guard against socket values that are not in [0;FD_SETSIZE[
1813 2011-09-06 Robert Dewar <dewar@adacore.com>
1815 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1818 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1820 * s-linux-alpha.ads: Minor reformatting
1821 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1822 Use sizeof instead of corresponding C defines in s-oscons template.
1824 2011-09-06 Vadim Godunko <godunko@adacore.com>
1826 * a-convec.ads, a-iteint.ads: Minor reformatting.
1828 2011-09-06 Vincent Celier <celier@adacore.com>
1830 * projects.texi: Add menus and @node lines.
1832 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1834 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1835 where the return type is an unconstrained array and the context
1836 is an assignment. Optimize the case when the target of the
1837 assignment is a selected component.
1839 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1841 * s-solita.adb: Update comments.
1843 2011-09-06 Pascal Obry <obry@adacore.com>
1845 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1846 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1847 * s-oscons-tmplt.c: Add support for generating pthread related
1848 types size on GNU/Linux as done for Darwin.
1849 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1851 2011-09-06 Robert Dewar <dewar@adacore.com>
1853 * exp_ch6.adb: Fix minor typo.
1855 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1857 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1858 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1859 (Double_Size_Of): Alphabetized. Update the comment on usage.
1860 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1861 (Nearest_Multiple_Rounded_Up): New routine.
1862 (Size_Of): Update comment on usage. The generated expression now
1863 accounts for alignment gaps by rounding the size of the type to the
1864 nearest multiple rounded up of the type's alignment.
1866 2011-09-06 Robert Dewar <dewar@adacore.com>
1868 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1870 2011-09-06 Steve Baird <baird@adacore.com>
1872 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1873 derived subprograms in checking for presence of an
1874 Extra_Accessibility_Of_Result formal parameter.
1875 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1876 checking for presence of an Extra_Accessibility_Of_Result formal
1878 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1879 case where the Parameter_Associatiations attribute is already set,
1880 but set to an empty list.
1881 (Needs_Result_Accessibility_Level):
1882 Unconditionally return False. This is a temporary
1883 change, disabling the Extra_Accessibility_Of_Result
1885 (Expand_Simple_Function_Return): Check for
1886 Extra_Accessibility_Of_Result parameter's presence instead of
1887 testing Ada_Version when generating a runtime accessibility
1888 check which makes use of the parameter.
1890 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1892 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1893 expression in a given case alternative must be attached to the
1894 statement list of the ccrresponding case statement alternative
1895 They cannot be propagated ahead of the case statement, because
1896 the validity of the expression that generated the action may
1897 hold only for that alternative.
1899 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1901 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1902 (Alignment_Of): Remove the code for strict alignment targets.
1903 (Double_Alignment_Of): Removed.
1904 (Double_Size_Of): New routine.
1905 (Make_Finalize_Address_Stmts): Change the
1906 calculation of the dope's size. Update relevant comments.
1907 (Size_Of): New routine.
1909 2011-09-06 Steve Baird <baird@adacore.com>
1911 * einfo.ads (Extra_Accessibility): Update associated comment to use
1912 the term "present" correctly ("present" just means that it is not
1913 an error to query the value of the attribute - it does not imply
1914 that the value must be non-null).
1915 (Extra_Constrained): Ditto.
1916 (Is_Visible_Formal): Ditto.
1917 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1918 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1919 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1920 * exp_ch6.adb (Expand_Call): The callee may require an
1921 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1922 < Ada_2012. This can occur if the callee is exported from a Gnat
1923 runtimes unit. Also improve a comment.
1925 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1927 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1928 (Alignment_Of): Rename formal parameter Some_Typ
1929 to Typ, update related comment. Use the allocator alignment on
1930 strict alignment targets such as SPARC.
1931 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1934 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1936 * sem_ch9.adb (Check_Interfaces): Test
1937 Is_Limited_Type rather than Is_Limited_Record when checking that
1938 the partial view of a synchronized full view must be limited.
1940 2011-09-06 Emmanuel Briot <briot@adacore.com>
1942 * g-comlin.adb (Free): Fix memory leak.
1944 2011-09-06 Robert Dewar <dewar@adacore.com>
1946 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1948 2011-09-06 Steve Baird <baird@adacore.com>
1950 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1951 (Ada2012) cases described in AI05-0234 where the accessibility
1952 level of a function result is "determined by the point of
1953 call", an implicit parameter representing that accessibility
1954 level is passed in. Extra_Accessibilty_Of_Result yields this
1955 additional formal parameter. Extra_Accessibility_Of_Result
1956 is analogous to the existing Extra_Accessibility
1957 function used in the implementation of access parameters.
1958 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1959 Extra_Accessibility_Of_Result attribute.
1960 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1961 (Set_Extra_Accessibility_Of_Result): New procedure.
1962 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1963 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1964 an accessibility level literal to Natural; introduce a nested
1965 function, Make_Level_Literal, to do this.
1966 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1967 determines whether a given function (or access-to-function
1968 type) needs to have an implicitly-declared accessibility-level
1969 parameter added to its profile.
1970 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1971 previously declared in the body of Exp_Ch6.
1972 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1974 (Has_Unconstrained_Access_Discriminants): New Function; a
1975 predicate on subtype entities which returns True if the given
1976 subtype is unconstrained and has one or more access discriminants.
1977 (Expand_Call): When expanding a call to a function which takes an
1978 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1979 actual parameter value. In the case of a function call which is
1980 used to initialize an allocator, this may not be possible because
1981 the Etype of the allocator may not have been set yet. In this
1982 case, we defer passing in the parameter and handle it later in
1983 Expand_Allocator_Expression.
1984 (Expand_Simple_Function_Return): When returning from a function which
1985 returns an unconstrained subtype having at least one access
1986 discriminant, generate the accessibility check needed to ensure that
1987 the function result will not outlive any objects designated by its
1989 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1991 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1992 is used to initialize an allocator, we may need to pass in "the
1993 accessibility level determined by the point of call" (AI05-0234)
1994 to the function. Expand_Call, where such actual parameters are
1995 usually generated, is too early in this case because the Etype of
1996 the allocator (which is used in determining the level to be passed
1997 in) may not have been set yet when Expand_Call executes. Instead,
1998 we generate code to pass in the appropriate actual parameter
1999 in Expand_Allocator_Expression.
2000 * sem_ch6.adb (Create_Extra_Formals): Create
2001 the new Extra_Accessibility_Of_Result formal if
2002 Needs_Result_Accessibility_Level returns True. This includes the
2003 introduction of a nested procedure, Check_Against_Result_Level.
2005 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2007 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2010 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2012 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2013 for the synchronization. Move the test for null from
2014 s-stposu.Allocate_Any_Controlled to this routine since the check
2015 needs to be protected too.
2016 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2017 synchronization code.
2018 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2019 explaining the context in which this routine is used.
2020 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2021 to s-finmas.Set_Finalize_Address.
2023 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2025 * einfo.ads: Document that itypes have no parent field.
2027 2011-09-05 Robert Dewar <dewar@adacore.com>
2029 * rtsfind.adb (Check_CRT): Check for overloaded entity
2030 * rtsfind.ads: Document that entities to be found by rtsfind
2031 cannot be overloaded
2032 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2033 (Lock_Entries_With_Status): New name for Lock_Entries with two
2034 arguments (changed to meet rtsfind no overloading rule).
2036 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2038 * s-finmas.adb (Set_Finalize_Address (Address,
2039 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2040 (Set_Finalize_Address (in out Finalization_Master,
2041 Finalize_Address_Ptr): Add synchronization code.
2042 * s-finmas.ads (Set_Finalize_Address (Address,
2043 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2044 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2045 Set_Finalize_Address for the heterogeneous case.
2047 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2049 * sem_ch3.adb: Undo previous change, not suitable after all.
2051 2011-09-05 Robert Dewar <dewar@adacore.com>
2053 * einfo.ads: Minor comment clarification.
2055 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2057 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2058 no longer needs to search through the entities of the return
2059 statement scope to find the _chain.
2060 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2061 (Analyze_Block_Statement): Add local variable
2062 Is_BIP_Return_Statement. Add machinery to install all entities
2063 produced by the expansion of the return object declaration.
2064 (Install_Return_Entities): New routine.
2065 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2067 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2069 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2070 of subunit is incomplete.
2071 (Analyze_Proper_Body): If parent spec is not available, do not
2074 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2076 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2077 interface type conversions, that are expanded into dereferences.
2079 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2081 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2082 Examine the parameter and return profile of a subprogram and swap
2083 any incomplete types coming from a limited context with their
2084 corresponding non-limited views.
2085 (Exchange_Limited_Views): New routine.
2087 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2089 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2090 of internal entity to the subtype declaration, so that when
2091 entities are subsequently exchanged in a package body, the tree
2092 remains properly formatted for ASIS.
2094 2011-09-05 Johannes Kanig <kanig@adacore.com>
2096 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2098 (Display_Help): display the user given help message, if available.
2100 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2102 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2103 is legal if the original node is an identifier that is a
2104 parameterless function call.
2106 2011-09-05 Pascal Obry <obry@adacore.com>
2108 * prj-nmsc.adb: Minor reformatting.
2109 Add support for standalone aggregate library.
2110 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2111 * projects.texi: Fix documentation for aggregate library projects.
2113 2011-09-05 Robert Dewar <dewar@adacore.com>
2115 * sem_ch6.adb: Minor reformatting.
2117 2011-09-05 Matthew Gingell <gingell@adacore.com>
2119 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2120 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2121 the bottom of the stack is not overwritten.
2123 2011-09-05 Thomas Quinot <quinot@adacore.com>
2125 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2127 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2129 * sem_ch3.adb (Access_Definition): If an access type declaration
2130 appears in a child unit, the scope of whatever anonymous type
2131 may be generated is the child unit itself.
2133 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2135 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2136 Comes_From_Source on rewritten body.
2137 (Analyze_Subprogram_Body_Helper): Check that the original node for
2138 the body comes from source, when determining whether expansion
2139 of a protected operation is needed.
2141 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2143 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2144 a selected component and the right-hand side is a self-referential
2145 access, the proper prefix of the rewritten attribute is a copy
2146 of the left-hand side, not of its prefix.
2148 2011-09-05 Robert Dewar <dewar@adacore.com>
2150 * sem_ch5.adb: Minor reformatting.
2151 * sem_ch3.adb: Minor code clean up.
2153 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2155 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2156 restriction No_Dynamic_Attachment is in effect or not should
2157 not influence the default priority associated to a protected
2158 object. With this change, when the restriction is in effect (as
2159 is the case for the Ravenscar profile) the default priority of
2160 a protected object with an interrupt handler is in the range of
2161 interrupt priorities (Default_Interrupt_Priority) as required
2164 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2166 * a-iteint.ads: Fix header.
2168 2011-09-05 Vincent Celier <celier@adacore.com>
2170 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2171 with a directory separator to avoid output such as:
2172 "/path/to/objauto.cgpr" has been deleted.
2174 2011-09-05 Robert Dewar <dewar@adacore.com>
2176 * sem_ch3.adb: Minor reformatting.
2178 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2180 * sem_ch5.adb: Better error message.
2182 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2184 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2185 (Expand_Array_Aggregate): Detect a special case of an aggregate
2186 which contains tasks in the context of an unexpanded return
2187 statement of a build-in-place function.
2188 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2189 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2190 which contains tasks and expand it now that the original simple
2191 return statement has been rewritten.
2192 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2193 reformatting. Do not create a chain for an extended return
2194 statement if one is already available.
2195 (Has_Activation_Chain): New routine.
2197 2011-09-05 Marc Sango <sango@adacore.com>
2199 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2200 the wrong test and add the correct test to detect the violation
2201 of illegal use of unconstrained string type in SPARK mode.
2203 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2205 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2206 message on an iterator over an array.
2208 2011-09-05 Robert Dewar <dewar@adacore.com>
2210 * lib-xref-alfa.adb: Minor reformatting.
2212 2011-09-05 Robert Dewar <dewar@adacore.com>
2214 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2215 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2217 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2219 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2221 2011-09-05 Johannes Kanig <kanig@adacore.com>
2223 * lib-xref-alfa.adb: Update comments.
2225 2011-09-05 Thomas Quinot <quinot@adacore.com>
2227 * sem_res.adb: Minor reformatting
2229 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2231 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2232 present, create them now. Needed in case the return type was
2233 a limited view in the function declaration.
2234 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2235 tasks, build the activation chain for it. Pass a reference to
2236 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2237 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2238 with build_in_place calls.
2239 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2240 incomplete, inatialize its Corresponding_Record_Type component.
2241 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2244 2011-09-05 Johannes Kanig <kanig@adacore.com>
2246 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2249 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2251 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2252 appears within a package specification and the token after "IS"
2253 is not a parenthesis, assume that this is an unparenthesized
2254 expression function, even if the token appears in a line by
2256 * par.adb: Clarify use of Labl field of scope stack in error
2259 2011-09-05 Bob Duff <duff@adacore.com>
2261 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2262 conversions instead of normal type conversions in all cases where a
2263 type conversion would be illegal. In particular, use unchecked
2264 conversions when the operand types are private.
2266 2011-09-05 Johannes Kanig <kanig@adacore.com>
2268 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2269 objects of task type or protected type.
2271 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2273 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2274 function comes from source, indicate that so does its rewriting,
2275 so it is compatible with any subsequent expansion of the
2276 subprogram body (e.g. when it is a protected operation).
2277 * sem_ch4.adb: minor reformatting
2279 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2281 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2282 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2283 may lead to wrong ancestor package in the case of instantiated subunit
2284 bodies. If a subunit is instantiated, follow the chain of instantiations
2285 rather than the stub structure.
2287 2011-09-02 Robert Dewar <dewar@adacore.com>
2289 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2290 * gcc-interface/Make-lang.in: Update dependencies.
2292 2011-09-02 Marc Sango <sango@adacore.com>
2294 * sem_ch3.adb (Analyze_Object_Declaration): Change
2295 comment and add additional check to differentiate constant of
2296 type string from others unconstrained type.
2298 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2300 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2301 present in incomplete type declarations to refine the error
2302 message the full declaration is in the same unit.
2303 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2304 an incomplete type, set the Premature_Use for additional message.
2305 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2306 and Premature_Use is set, place additional information at the
2307 point of premature use.
2309 2011-09-02 Bob Duff <duff@adacore.com>
2311 * sem_ch6.adb: (Check_Post_State): Suppress warning
2312 "postcondition refers only to pre-state" when the expression has not
2313 yet been analyzed, because it causes false alarms. This can happen when
2314 the postcondition contains a quantified expression, because those are
2315 analyzed later. This is a temporary/partial fix.
2316 (Process_Post_Conditions): Minor: change wording of warning.
2318 2011-09-02 Marc Sango <sango@adacore.com>
2320 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2321 illegal use of unconstrained string type in SPARK mode.
2322 * sem_res.adb (Analyze_Operator_Symbol): Set the
2323 right place where the string operand of concatenation should be
2324 violate in SPARK mode.
2326 2011-09-02 Robert Dewar <dewar@adacore.com>
2328 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2329 exp_ch3.adb: Minor reformatting.
2331 2011-09-02 Vincent Celier <celier@adacore.com>
2333 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2334 as the compiler driver so Is_Compilable returns True for sources.
2335 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2338 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2340 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2341 condition, a reference to a controlling formal must be interpreted
2342 as having the class-wide type (or an access to such) so that the
2343 inherited condition can be properly applied to any overriding
2344 operation (see ARM12 6.6.1 (7)).
2346 2011-09-02 Tristan Gingold <gingold@adacore.com>
2348 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2351 2011-09-02 Javier Miranda <miranda@adacore.com>
2353 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2354 initializing expression of a class-wide interface object declaration
2355 if its type is limited.
2357 2011-09-02 Johannes Kanig <kanig@adacore.com>
2359 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2360 literals, take into account the type name; the type is *not*
2361 the scope for an enumeration literal.
2363 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2365 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2366 to reject an overriding indicator on a user-defined Adjust
2367 subprogram for a limited controlled type.
2369 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2371 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2372 for an actual that is a function call returning an unconstrained
2373 limited controlled type.
2375 2011-09-02 Tristan Gingold <gingold@adacore.com>
2377 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2379 2011-09-02 Johannes Kanig <kanig@adacore.com>
2381 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2382 from "HEAP" to __HEAP Change comment that refers to that variable
2383 * put_alfa.adb: Change comment that refers to that variable
2385 2011-09-02 Robert Dewar <dewar@adacore.com>
2387 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2389 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2391 * exp_util.adb (Extract_Renamed_Object): Renamed to
2392 Find_Renamed_Object. This routine has been reimplemented and now uses
2393 tree traversal to locate a renamed object.
2394 (Is_Aliased): Replace call to Extract_Renamed_Object with
2395 Find_Renamed_Object.
2397 2011-09-02 Tristan Gingold <gingold@adacore.com>
2399 * init.c: (__gnat_is_vms_v7): New function.
2401 2011-09-02 Olivier Hainque <hainque@adacore.com>
2403 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2404 that have a misaligned backchain, necessarily bogus.
2406 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2408 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2409 TSS routine Finalize_Address when compiling in Alfa mode.
2410 (Expand_Freeze_Record_Type): Do not create TSS routine
2411 Finalize_Address when compiling in Alfa mode.
2412 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2413 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2415 (Expand_N_Allocator): Do not produce a call to
2416 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2417 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2418 produce a call to primitive Set_Finalize_Address in Alfa mode because
2419 Finalize_Address is not built.
2420 * exp_ch7.adb (Build_Finalization_Master): Do not create
2421 finalization masters in Afa mode since they are not needed.
2422 (Build_Finalizer): Do not create scope and library-level
2423 finalizers in Alfa mode since they are not needed.
2424 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2425 "new" and "free" when applied to controlled objects in Alfa mode since
2428 2011-09-02 Vincent Celier <celier@adacore.com>
2430 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2431 only library names with the syntax of Ada identifiers, to avoid errors
2432 when compiling the binder generated files.
2433 * projects.texi: Document restriction on SAL library names
2435 2011-09-02 Thomas Quinot <quinot@adacore.com>
2437 * a-chtgbo.adb: Minor comment fix.
2439 2011-09-02 Robert Dewar <dewar@adacore.com>
2441 * lib-xref.adb: Minor reformatting
2443 2011-09-02 Vincent Celier <celier@adacore.com>
2445 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2446 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2447 --version and --help in usage.
2448 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2450 2011-09-02 Bob Duff <duff@adacore.com>
2452 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2453 compilers don't understand it.
2455 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2457 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2458 underlying subtype rather than its base type on the call to
2459 Build_Record_Or_Elementary_Input_Function, so that any
2460 constraints on a discriminated subtype will be available for
2461 doing the check required by AI05-0192.
2462 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2463 If the prefix subtype of the 'Input attribute is a constrained
2464 discriminated subtype, then check each constrained discriminant value
2465 against the corresponding value read from the stream.
2467 2011-09-02 Yannick Moy <moy@adacore.com>
2469 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2470 warnings on suspicious contracts, and enable them with -gnatwa.
2472 2011-09-02 Robert Dewar <dewar@adacore.com>
2474 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2477 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2479 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2480 which ensure that restriction No_Dynamic_Attachment has not been
2482 (Make_Initialize_Protection): Protected types with attach or
2483 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2484 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2485 which ensures that restriction No_Dynamic_Attachment has not been
2487 * sem_attr.adb: (Eval_Attribute): Transform
2488 VAX_Float_Type'First and 'Last into references to
2489 the temporaries which store the corresponding bounds. The
2490 transformation is needed since the back end cannot evaluate
2491 'First and 'Last on VAX.
2492 (Is_VAX_Float): New routine.
2494 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2496 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2497 generic unit is not intrinsic and has an explicit convention,
2498 the instance inherits it.
2500 2011-09-02 Robert Dewar <dewar@adacore.com>
2502 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2503 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2505 2011-09-02 Thomas Quinot <quinot@adacore.com>
2507 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2508 Guard against a prefix that is an N_Has_Entity but has no
2511 2011-09-02 Yannick Moy <moy@adacore.com>
2513 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2516 2011-09-02 Yannick Moy <moy@adacore.com>
2518 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2519 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2521 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2522 procedure looking for suspicious postconditions.
2523 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2524 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2525 options -gnatw.t and -gnatw.T.
2527 2011-09-02 Pascal Obry <obry@adacore.com>
2529 * prj.adb: Minor code refactoring. Move check for null project in
2531 * projects.texi: Fix minor typos.
2533 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2535 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2536 of iteration is an expression, its value must be captured in a
2537 renaming declaration, so that modification of the elements is
2538 propagated to the original container.
2540 2011-09-02 Pascal Obry <obry@adacore.com>
2542 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2543 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2544 prj-tree.adb: Minor reformatting and style fixes.
2546 2011-09-02 Robert Dewar <dewar@adacore.com>
2548 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2549 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2550 No_Implicit_Aliasing
2551 (Analyze_Attribute, case Address): ditto
2552 (Analyze_Attribute, case Unrestricted_Access): ditto
2553 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2554 No_Implicit_Aliasing restriction.
2555 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2557 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2559 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2560 is an unchecked conversion, apply test to its expression.
2562 2011-09-02 Javier Miranda <miranda@adacore.com>
2564 * sem_ch3.adb (Check_Abstract_Overriding): When
2565 traversing the chain of aliased subprograms avoid reporting a
2566 redundant error on the current entity.
2568 2011-09-02 Sergey Rybin <rybin@adacore.com>
2570 * gnat_ugn.texi: Minor clean up.
2572 2011-09-02 Bob Duff <duff@adacore.com>
2574 * s-htable.adb (Set_If_Not_Present): Use renaming
2575 instead of ":=", because the type Key is limited in the generic (even
2576 if not in the instances).
2578 2011-09-02 Robert Dewar <dewar@adacore.com>
2580 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2581 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2584 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2586 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2587 inherited component with the enclosing derived type. Code reformatting.
2589 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2591 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2592 return done when overflow checks are enabled, since comparisons against
2593 Lor and Hir should not be done when OK1 is False.
2595 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2597 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2598 Add new formal Master_Exp. When present, add that expression to the
2599 call as an extra actual.
2600 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2601 Fmaster_Actual and in the case of a BIP call initializing a return
2602 object of an enclosing BIP function set it to a
2603 new reference to the implicit finalization master
2604 formal of the enclosing function. Fmaster_Actual is
2605 then passed to the new formal Master_Exp on the call to
2606 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2607 initializations of Enclosing_Func to its declaration.
2609 2011-09-02 Thomas Quinot <quinot@adacore.com>
2611 * csets.ads: Minor reformatting
2613 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2615 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2616 the full view of a private type coming from an instantiation.
2617 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2618 loop to iterate over the declarations rather than use the
2619 First_Entity / Next_Entity scheme.
2621 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2623 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2624 X'range (N) into X'First (N) .. X'Last (N), do not share the
2625 dimension indicator N, if present. Even though it is a static
2626 constant, its source location may be modified when printing
2627 expanded code under -gnatDL, and node sharing will lead to chaos
2628 in Sprint on large files, by generating a sloc value that does
2629 not correspond to any source file.
2631 2011-09-02 Bob Duff <duff@adacore.com>
2633 * einfo.adb: (Has_Xref_Entry): Do not call
2634 Implementation_Base_Type. Lib.Xref has been
2635 rewritten to avoid the need for it, and it was costly.
2636 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2637 functions in support of efficient xref.
2638 * lib-xref-alfa.adb: Misc changes related to Key component of
2640 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2641 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2642 no longer does. This is the one place where it is needed.
2644 2011-09-02 Johannes Kanig <kanig@adacore.com>
2646 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2647 similar interface as the other Getopt function.
2649 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2651 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2652 a call to Set_Finalize_Address if there is no allocator available.
2653 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2654 a case of allocator expansion where the allocator is not expanded but
2655 needs a custom allocate routine. Code reformatting.
2656 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2657 Ren_Obj. Code reformatting.
2658 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2659 through the use of 'reference.
2660 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2661 as part of build-in-place expansion. They are intentionally marked as
2662 coming from source, but their parents are not.
2664 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2666 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2667 is the generated subprogram declaration for a child unit body
2668 that acts as spec, use the original body in the with_clause,
2669 to prevent binding errors.
2671 2011-09-02 Vincent Celier <celier@adacore.com>
2673 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2674 qualifier /MULTI_UNIT_INDEX=
2676 2011-09-02 Johannes Kanig <kanig@adacore.com>
2678 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2679 instead of calling the callback function
2681 2011-09-02 Robert Dewar <dewar@adacore.com>
2683 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2684 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2686 2011-09-02 Vincent Celier <celier@adacore.com>
2688 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2689 explicitly declared in an extending project, do not warn if a source
2690 for an inherited naming exception is not found.
2692 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2694 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2695 expansion is inactive.
2697 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2699 * sem_util.adb (Note_Possible_Modification): If the entity
2700 being modified is the renaming generated for an Ada2012 iterator
2701 element, the enclosing container or array is modified as well.
2703 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2705 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2706 Initialize): Define and initialize the
2707 mutex attributes and condition variable attributes locally.
2709 2011-09-02 Vincent Celier <celier@adacore.com>
2711 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2712 exception replaced in an extending project.
2713 (Check_Object): No error when the other source is locally removed.
2715 2011-09-02 Yannick Moy <moy@adacore.com>
2717 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2720 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2722 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2724 * gcc-interface/Make-lang.in: Update dependencies.
2726 2011-09-01 Robert Dewar <dewar@adacore.com>
2728 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2730 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2732 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2733 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2734 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2735 specific for systems where their glibc version does not define the
2736 routines to handle dynamically allocated CPU sets.
2738 2011-09-01 Vincent Celier <celier@adacore.com>
2740 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2741 prj-env.adb: Implement inheritance of naming exceptions in extending
2744 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2746 * gnatls.adb: Display simple message instead of content of
2749 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2751 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2752 access discriminant and anonymous access component scopes.
2753 (Inherit_Component): Reuse the itype of an access discriminant
2754 or anonymous access component by copying it in order to set the proper
2755 scope. This is done only when the parent and the derived type
2756 are in different scopes.
2757 (Set_Anonymous_Etype): New routine.
2759 2011-09-01 Robert Dewar <dewar@adacore.com>
2761 * a-convec.adb: Minor reformatting throughout.
2763 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2765 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2766 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2767 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2768 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2769 CPU_SET_S respectively because we are now using dynamically allocated
2770 CPU sets which are more portable across different glibc versions.
2771 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2772 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2773 masks dynamically according to the number of processors in the target
2775 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2776 respectively, so we need to pass the size of the masks as
2778 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2779 created cpu_set_t masks
2780 with the number of processors available in the target platform,
2781 instead of static bit arrays. It enhances portability because
2782 it uses the information from the target platform.
2783 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2784 are using a restricted run-time library, use the flag
2785 Configurable_Run_Time_Mode instead of Restricted_Profile.
2787 2011-09-01 Vincent Celier <celier@adacore.com>
2789 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2790 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2792 2011-09-01 Nicolas Roche <roche@adacore.com>
2794 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2795 on VxWorks in kernel mode.
2797 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2799 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2800 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2801 directly the bit array.
2802 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2803 the linux macros with the same name.
2804 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2805 wrappers around the CPU_ZERO and CPU_SET linux macros.
2807 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2809 * exp_ch7.adb (Find_Insertion_List): Removed.
2810 (Process_Transient_Objects): Insert the declarations of the hook
2811 access type and the hook object before the associated transient object.
2813 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2815 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2816 package System.Aux_Dec when using restricted run-time libraries which
2817 do not have this package.
2819 2011-09-01 Tristan Gingold <gingold@adacore.com>
2821 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2823 2011-09-01 Bob Duff <duff@adacore.com>
2825 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2826 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2828 2011-09-01 Thomas Quinot <quinot@adacore.com>
2830 * exp_ch5.adb: Minor reformatting
2831 * gnat_ugn.texi: Fix minor typos.
2832 * gcc-interface/Make-lang.in: Update dependencies.
2834 2011-09-01 Robert Dewar <dewar@adacore.com>
2836 * inline.adb, sem_aggr.adb: Minor reformatting.
2838 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2840 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2842 2011-09-01 Robert Dewar <dewar@adacore.com>
2844 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2846 2011-09-01 Bob Duff <duff@adacore.com>
2848 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2849 body" the same as "in inlined body", because visibility shouldn't
2852 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2854 * inline.adb (Add_Inlined_Body): Refine previous change.
2856 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2858 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2859 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2860 Test for case where call
2861 initializes an object of a return statement before testing for
2862 a constrained call, to ensure that all such cases get handled
2863 by simply passing on the caller's parameters. Also, in that
2864 case call Needs_BIP_Alloc_Form to determine whether to pass on
2865 the BIP_Alloc_Form parameter of the enclosing function rather
2866 than testing Is_Constrained. Add similar tests for the return
2867 of a BIP call to later processing to ensure consistent handling.
2868 (Needs_BIP_Alloc_Form): New utility function.
2869 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2870 a BIP_Alloc_Form formal with call to new utility function
2871 Needs_BIP_Alloc_Form.
2873 2011-09-01 Pascal Obry <obry@adacore.com>
2875 * prj-part.adb: Minor reformatting.
2877 2011-09-01 Vincent Celier <celier@adacore.com>
2879 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2880 half character in the unit name.
2882 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2884 * exp_ch4.adb: Minor code and comment reformatting.
2886 2011-09-01 Thomas Quinot <quinot@adacore.com>
2888 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2889 for Is_Limited_Type and Is_Tagged_Type in condition checking
2890 for by-reference type.
2891 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2892 subprograms may have a completion because of a previous
2893 Inline_Always clause, but the enclosing package must be marked
2894 inlined for the subprogram body to become visible to the backend.
2896 2011-09-01 Thomas Quinot <quinot@adacore.com>
2898 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2900 2011-09-01 Pascal Obry <obry@adacore.com>
2902 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2904 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2906 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2907 the formals of a subprogram stub that acts as a spec.
2909 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2911 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2912 type, declare a renaming for it, not an object declaration.
2914 2011-09-01 Yannick Moy <moy@adacore.com>
2916 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2917 Ignore_Errors to ignore failures to read ALI files when True.
2919 2011-09-01 Javier Miranda <miranda@adacore.com>
2921 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2922 constructor calls associated with non-tagged record types.
2924 2011-09-01 Robert Dewar <dewar@adacore.com>
2926 * g-socthi-vms.adb: Minor reformatting.
2928 2011-09-01 Nicolas Roche <roche@adacore.com>
2930 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2931 in order to avoid impact of imcompatible changes.
2932 * cstreams.c: Likewise
2934 * aux-io.c: Likewise
2936 2011-09-01 Yannick Moy <moy@adacore.com>
2938 * lib-writ.adb (Write_With_Lines): Always output complete information
2939 on "with" line in Alfa mode, as this is required by formal verification
2942 2011-09-01 Tristan Gingold <gingold@adacore.com>
2944 * g-socthi-vms.adb: Add comments.
2946 2011-09-01 Pascal Obry <obry@adacore.com>
2948 * prj.ads: Minor reformatting.
2950 2011-09-01 Vincent Celier <celier@adacore.com>
2952 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2953 exceptions in the config pragmas file.
2955 2011-09-01 Tristan Gingold <gingold@adacore.com>
2957 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2959 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2961 * exp_ch7.adb (Find_Insertion_List): New routine.
2962 (Process_Transient_Objects): Add code to handle the abnormal
2963 finalization of a controlled transient associated with a subprogram
2964 call. Since transients are cleaned up right after the associated
2965 context, an exception raised during a subprogram call may bypass the
2968 2011-09-01 Robert Dewar <dewar@adacore.com>
2970 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2973 2011-09-01 Robert Dewar <dewar@adacore.com>
2975 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2977 2011-09-01 Robert Dewar <dewar@adacore.com>
2979 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2981 2011-09-01 Thomas Quinot <quinot@adacore.com>
2983 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2984 GNATRTL_NONTASKING_OBJS.
2986 2011-09-01 Robert Dewar <dewar@adacore.com>
2988 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2989 possibility of this flag being set for formals in Ada 2012 mode.
2990 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2992 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2994 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2996 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2999 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3001 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3002 insertion node in a tree of nested Expression_With_Actions nodes.
3003 (Process_Transient_Object): In the case where a complex if statement
3004 has been converted into nested Expression_With_Actions nodes, the
3005 "hook" object and the associated access type must be inserted before
3006 the top most Expression_With_Actions.
3008 2011-09-01 Robert Dewar <dewar@adacore.com>
3010 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3011 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3013 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3015 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3017 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3019 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3021 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3022 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3023 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3024 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3025 Dispatching_Domains_Frozen): Move this local data to package
3026 System.Tasking because with the CPU aspect we need to have access
3027 to this data when creating the task in System.Tasking.Stages.Create_Task
3028 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3029 Move these variables from the body of
3030 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3031 we need to have access to this data when creating the task in
3032 System.Tasking.Stages.Create_Task.
3033 * s-taskin.adb (Initialize): Signal the allocation of the environment
3034 task to a CPU, if any, so that we know whether the CPU can be
3035 transferred to a different dispatching domain.
3036 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3037 is being allocated belongs to the dispatching domain where the task
3038 lives. Signal the allocation of the task to a CPU, if any, so that we
3039 know whether the CPU can be transferred to a different dispatching
3042 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3044 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3045 attributes Same_Storage and Overlaps_Storage.
3047 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3049 * exp_strm.adb: Remove with and use clause for Opt.
3050 (Build_Array_Input_Function): Remove the version-dependent generation
3051 of the return statement. The Ada 2005 tree is now the default.
3053 2011-09-01 Yannick Moy <moy@adacore.com>
3055 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3056 it is never empty when compiling in Alfa mode.
3058 2011-09-01 Robert Dewar <dewar@adacore.com>
3060 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3061 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3062 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3063 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3065 2011-09-01 Matthew Heaney <heaney@adacore.com>
3067 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3068 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3069 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3070 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3071 unbounded queue container.
3072 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3073 bounded queue container.
3074 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3075 unbounded priority queue container.
3076 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3077 bounded priority queue container.
3079 2011-08-31 Pascal Obry <obry@adacore.com>
3081 * a-direct.adb: Do not try to create an UNC path on Windows.
3082 (Create_Path): Skip leading computer name in UNC path if any.
3084 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3086 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3087 version-dependent generation of the return statement. The Ada 2005 tree
3090 2011-08-31 Thomas Quinot <quinot@adacore.com>
3092 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3093 types Stream_Element_Offset and Storage_Offset have a different native
3094 type depending on whether the platform is 32 or 64 bits. When
3095 exchanging them, always convert to 64 bits.
3097 2011-08-31 Yannick Moy <moy@adacore.com>
3099 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3100 --force-alfa to gnat2why.
3102 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3104 * sem_ch12.adb (Save_References): If the node has aspects, save
3105 references within the corresponding expressions in a separate step,
3106 because the aspects are not directly in the tree for the declaration
3107 to which they belong.
3109 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3111 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3112 in CodePeer mode, since representation clauses are partially ignored.
3113 * gcc-interface/Make-lang.in: Update dependencies.
3115 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3117 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3118 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3119 to any dispatching domain.
3121 2011-08-31 Thomas Quinot <quinot@adacore.com>
3123 * exp_ch4.adb: Minor reformatting.
3125 2011-08-31 Bob Duff <duff@adacore.com>
3127 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3128 on nodes for which it is not defined.
3129 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3132 2011-08-31 Bob Duff <duff@adacore.com>
3134 * sem_ch3.adb (Process_Full_View): Disable legality check if
3135 In_Instance, to avoid spurious errors.
3136 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3137 if In_Instance, to avoid spurious errors.
3139 2011-08-31 Pascal Obry <obry@adacore.com>
3141 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3142 directory speparators.
3143 (Compose): Use Dir_Seps to handle both forms.
3144 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3146 (Extension): Use Dir_Seps to handle both forms.
3148 2011-08-31 Pascal Obry <obry@adacore.com>
3150 * prj-conf.adb: Minor reformatting.
3152 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3154 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3155 dispatching domain aspect.
3156 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3158 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3159 Dispatching_Domain aspect in a similar way as we do for the Priority
3161 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3162 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3164 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3165 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3166 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3167 Dispatching_Domain and add it to the task definition.
3168 (Sig_Flags): Add Pragma_Dispatching_Domain.
3169 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3170 support to find the types Dispatching_Domain and
3171 Dispatching_Domain_Access.
3172 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3173 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3174 query the availability of a pragma Dispatching_Domain.
3175 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3176 the expander to pass the Dispatching_Domain when creating a task.
3177 (Name_Dispatching_Domain): Add this new name for a pragma.
3178 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3179 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3180 task has been allocated at creation time.
3181 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3182 Ravenscar is always null.
3183 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3184 the task has been allocated at creation time.
3185 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3186 a specific dispatching domain.
3187 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3188 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3189 and CPU are specified for the task, and the CPU value is not contained
3190 within the range of processors for the domain.
3192 2011-08-31 Vincent Celier <celier@adacore.com>
3194 * make.adb (Original_Gcc) : New constant String_Access.
3195 (Gnatmake): For VM targets, do not use VM version of the compiler if
3196 --GCC= has been specified.
3198 2011-08-31 Thomas Quinot <quinot@adacore.com>
3200 * sem_ch5.adb: Minor reformatting.
3202 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3204 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3207 2011-08-31 Bob Duff <duff@adacore.com>
3209 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3210 the access type is private; we don't care about privacy in expansion.
3212 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3214 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3215 subcomponents tnat may be limited, because they originate in view
3216 conflicts. If the original aggregate is legal and the actuals are
3217 legal, the aggregate itself is legal.
3219 2011-08-31 Matthew Heaney <heaney@adacore.com>
3221 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3224 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3226 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3229 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3231 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3232 Interrupt_Priority aspects, force the analysis of the aspect expression
3233 (when building the equivalent pragma). Otherwise, its analysis is done
3234 too late, after the task or protected object has been created.
3235 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3236 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3237 to the object declaration because they are needed in the type
3240 2011-08-31 Robert Dewar <dewar@adacore.com>
3242 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3243 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3246 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3248 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3249 if the corresponding type is malformed due to restriction violations.
3251 2011-08-31 Robert Dewar <dewar@adacore.com>
3253 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3255 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3257 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3258 would cause the generation of Set_Finalize_Address if the target is a
3259 VM and the designated type is not derived from [Limited_]Controlled.
3261 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3263 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3265 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3266 case of a compilation error.
3268 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3270 * init.c (__gnat_error_handler): Standardize the stack overflow or
3271 erroneous memory access message.
3272 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3273 or erroneous memory access message.
3275 2011-08-31 Robert Dewar <dewar@adacore.com>
3277 * sem_ch4.adb: Minor reformatting.
3278 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3280 2011-08-31 Thomas Quinot <quinot@adacore.com>
3282 * scos.ads: Minor documentation clarification.
3283 * put_scos.adb: Do not generate SCO unit header line for a unit that
3286 2011-08-31 Robert Dewar <dewar@adacore.com>
3288 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3290 2011-08-31 Tristan Gingold <gingold@adacore.com>
3292 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3293 hold variables between these following subprograms.
3294 (Build_Exception_Handler, Build_Object_Declarations,
3295 Build_Raise_Statement): Use the above type as parameter.
3296 Make the above adjustments.
3297 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3299 2011-08-31 Pascal Obry <obry@adacore.com>
3301 * projects.texi: Minor reformatting.
3303 2011-08-31 Tristan Gingold <gingold@adacore.com>
3305 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3306 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3308 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3310 * exp_ch5.adb: Minor code cleanup.
3311 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3312 prevent cascaded errors.
3313 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3314 variable of an iterator specification in current scope.
3315 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3316 postconditions on the stack, as they contain no return statements.
3318 2011-08-31 Yannick Moy <moy@adacore.com>
3320 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3321 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3322 call Qualify_Entity_Names.
3323 (Expand_Alfa): call Qualify_Entity_Names in more cases
3324 * lib-xref-alfa.adb: Take into account system package.
3325 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3326 CodePeer mode in which we are interested in finding bugs even if
3327 compiler cannot compile source.
3328 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3331 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3333 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3334 denoted by the subtype mark to ensure getting the concurrent type in
3335 the case where the subtype mark denotes a private subtype of a
3336 concurrent type (needed when using -gnatc).
3337 (Process_Subtype): For the processing specific to type kinds, case on
3338 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3339 subtype denotes a private subtype whose base type is nonprivate (needed
3340 for subtypes of private fulfilled by task types when compiling with
3343 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3345 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3346 late primitives that override interface operations when the full
3347 expander is not active, to avoid blowups in Register_Primitive when
3348 types don't have associated secondary dispatch tables.
3350 2011-08-31 Yannick Moy <moy@adacore.com>
3352 * alfa_test.adb: Code clean up.
3354 2011-08-31 Marc Sango <sango@adacore.com>
3356 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3357 by Comes_From_Source (Original_Node (N)) in order to treat also the
3358 nodes which have been rewritten.
3359 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3360 explicit dereference and slice violation in spark mode on the nodes
3361 coming only from the source code.
3363 2011-08-31 Robert Dewar <dewar@adacore.com>
3365 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3366 lib-xref-alfa.adb: Minor reformatting.
3368 2011-08-31 Matthew Heaney <heaney@adacore.com>
3370 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3372 2011-08-31 Javier Miranda <miranda@adacore.com>
3374 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3375 only for class-wide subprograms conflicting with entities of concurrent
3378 2011-08-31 Matthew Heaney <heaney@adacore.com>
3380 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3383 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3385 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3386 general description of the routine.
3388 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3390 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3391 doubly-linked lists.
3393 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3395 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3396 check is needed for a left-hand side that is a dereference, and the
3397 base type is private without discriminants (whereas the full type does
3398 have discriminants), an extra retrieval of the underlying type may be
3399 needed in the case where the subtype is a record subtype whose base
3400 type is private. Update comments.
3402 2011-08-31 Javier Miranda <miranda@adacore.com>
3404 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3405 found check if there is a class-wide subprogram covering the primitive.
3407 2011-08-31 Yannick Moy <moy@adacore.com>
3409 * sem_res.adb: Further cases where full expansion test is needed,
3410 rather than expansion test.
3412 2011-08-31 Pascal Obry <obry@adacore.com>
3414 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3416 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3418 * exp_ch5.adb: Handle iterators over derived container types.
3420 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3422 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3423 (Has_Anonymous_Master): New routine.
3424 (Set_Has_Anonymous_Master): New routine.
3425 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3426 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3427 (Current_Anonymous_Master): New routine.
3428 (Current_Unit_First_Declaration): Removed.
3429 (Current_Unit_Scope): Removed.
3430 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3431 their objects on a per-unit heterogeneous finalization master.
3433 2011-08-31 Matthew Heaney <heaney@adacore.com>
3435 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3438 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3440 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3443 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3445 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3446 where the actual is an unexpanded call to 'Input.
3448 2011-08-31 Yannick Moy <moy@adacore.com>
3450 * sem_ch4.adb: Code clean up.
3452 2011-08-31 Yannick Moy <moy@adacore.com>
3454 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3456 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3458 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3459 and TSS primitive Finalize_Address if finalization is suppressed.
3460 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3461 primitive Finalize_Address if finalization is suppressed.
3463 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3465 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3466 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3467 sure that the underlying task has already been created before trying
3468 to change its affinity.
3469 (Set_CPU): Use the term processor instead of CPU, as we do in
3472 2011-08-31 Vincent Celier <celier@adacore.com>
3474 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3475 * prj-nmsc.adb (Process_Compiler): Process attribute
3476 Source_File_Switches.
3477 * prj.ads (Language_Config): New name list component
3478 Name_Source_File_Switches.
3479 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3481 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3483 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3484 discriminated component of an actual, expand at once to prevent
3485 ouf-of-order references with generated subtypes.
3487 2011-08-31 Yannick Moy <moy@adacore.com>
3489 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3490 reference to operator in Alfa xrefs.
3492 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3494 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3495 where the parent instance was frozen before the current instance due to
3496 the presence of a source body. Update calls to Insert_After_Last_Decl.
3497 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3498 Update the comment which illustrates the purpose of the routine.
3499 Package instances are now frozen by source bodies which appear after
3500 the instance. This ensures that entities coming from within the
3501 instance are available for use in the said bodies.
3502 (Install_Body): Add code to handle the case where the parent instance
3503 was frozen before the current instance due to the presence of a source
3504 body. Update calls to Insert_After_Last_Decl.
3506 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3508 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3510 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3512 2011-08-31 Yannick Moy <moy@adacore.com>
3514 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3516 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3517 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3518 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3519 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3520 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3521 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3522 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3523 ALFA in Alfa (we dropped acronym).
3524 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3525 operations in a case where it returned previously No_Elist.
3527 2011-08-31 Robert Dewar <dewar@adacore.com>
3529 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3530 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3531 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3532 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3533 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3534 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3537 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3539 * sem_ch12 (Check_Private_View): Revert previous change.
3540 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3541 conversion is in a generic instance.
3543 2011-08-31 Matthew Heaney <heaney@adacore.com>
3545 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3546 * a-chtgbo.adb (Free): Allow 0 as index value.
3548 2011-08-31 Matthew Heaney <heaney@adacore.com>
3550 * a-cborma.adb (Insert): Add comment to explain why no element
3553 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3555 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3556 spec discriminant is already a concurrent type, in which case just use
3557 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3559 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3561 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3562 system-linux-mips.ads, system-linux-mipsel.ads,
3563 system-linux-mips64el.ads, system-linux-ppc64.ads,
3564 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3566 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3568 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3569 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3570 (build_unary_op): Likewise.
3572 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3574 * raise-gcc.c: Do not include coretypes.h and tm.h.
3575 (setup_to_install): Remove test for compiler macro.
3576 * targext.c: Document use for the library.
3577 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3579 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3581 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3582 the expression to the nominal type if the latter is a record type with
3583 a variant part and the type of the former is a record type without one.
3585 2011-08-30 Yannick Moy <moy@adacore.com>
3587 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3588 expansion in Alfa mode.
3589 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3590 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3592 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3593 * sem_res.adb: Ditto.
3594 * gcc-interface/Make-lang.in: Update dependencies.
3596 2011-08-30 Thomas Quinot <quinot@adacore.com>
3598 * g-socket.ads: Minor documentation adjustment.
3600 2011-08-30 Robert Dewar <dewar@adacore.com>
3602 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3604 2011-08-30 Yannick Moy <moy@adacore.com>
3606 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3607 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3608 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3609 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3610 Revert change which introduced files for "light"
3611 expansion, to be replaced by a single file for Alfa expansion.
3613 2011-08-30 Robert Dewar <dewar@adacore.com>
3615 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3616 Minor code reorg/reformatting.
3618 2011-08-30 Yannick Moy <moy@adacore.com>
3620 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3621 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3622 used for testing full expansion, that is active expansion not in the
3623 reduced mode for Alfa
3624 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3625 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3626 of the verbose (Expander_Active and not ALFA_Mode)
3628 2011-08-30 Tristan Gingold <gingold@adacore.com>
3630 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3631 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3632 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3633 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3635 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3637 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3638 access conversions to check that the conversion is a rewritten node,
3639 rather than just having Comes_From_Source set to False, which wasn't
3642 2011-08-30 Robert Dewar <dewar@adacore.com>
3644 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3645 g-socket.ads: Minor reformatting.
3647 2011-08-30 Thomas Quinot <quinot@adacore.com>
3649 * sem_util.adb: Minor reformatting.
3651 2011-08-30 Tristan Gingold <gingold@adacore.com>
3653 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3654 to be compliant with the ABI.
3656 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3658 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3659 of a designated type when the related access type is an actual in an
3660 instance. This ensures that the full view of designated type is
3661 available when inside the body of the instance.
3663 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3665 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3666 in a position to be modified, a slice is treated like an indexed
3669 2011-08-30 Thomas Quinot <quinot@adacore.com>
3671 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3672 field tv_sec in struct timeval.
3674 2011-08-30 Yannick Moy <moy@adacore.com>
3676 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3677 blocks of code doing full expansion, previously only guarded by
3678 Expander_Active, by anding the test that ALFA_Mode is not set
3680 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3682 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3683 add the function to the list of private dependents, for subsequent
3684 legality check on Taft amendment types.
3685 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3686 Private_Dependents, as for other incomplete types.
3687 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3688 Taft-amendment type is used as the return type of a function.
3690 2011-08-30 Javier Miranda <miranda@adacore.com>
3692 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3693 which emits an error by a call to a new routine which report the error.
3694 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3695 entity does not cover an existing interface.
3696 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3698 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3699 protected procedures or entries whose mode is not conformant.
3700 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3701 an error by a call to a new routine which report the error.
3703 2011-08-30 Robert Dewar <dewar@adacore.com>
3705 * gnat_rm.texi: Minor change.
3706 * exp_attr_light.adb: Minor reformatting.
3708 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3710 * sem_ch3.adb: Patch inheritance of aspects in
3711 Complete_Private_Subtype, to avoid infinite loop.
3713 2011-08-30 Javier Miranda <miranda@adacore.com>
3715 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3716 been reported and a subprogram covering an interface primitive is not
3717 found then skip generating the internal entity. Done to avoid crashing
3719 (Check_Abstract_Overriding): Change text of error of wrong formal of
3720 protected subprogram or entry. Done for consistency to emit exactly the
3721 same error reported by Check_Synchronized_Overriding. In addition, the
3722 error is restricted to protected types (bug found working on AI05-0090)
3724 2011-08-30 Yannick Moy <moy@adacore.com>
3726 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3727 expansion in Alfa mode.
3728 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3729 * exp_light.adb, exp_light.ads: New package defining light expansion.
3730 * expander.adb (Expand): Call light expansion in Alfa mode
3731 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3733 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3735 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3736 * gnat1drv.adb (Adjust_Global_Switches): Comment
3738 2011-08-30 Yannick Moy <moy@adacore.com>
3740 * lib-xref-alfa.adb: Minor refactoring.
3742 2011-08-30 Yannick Moy <moy@adacore.com>
3744 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3746 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3747 expansion in Alfa mode.
3748 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3751 2011-08-30 Robert Dewar <dewar@adacore.com>
3753 * debug_a.adb: Update comment.
3755 2011-08-30 Robert Dewar <dewar@adacore.com>
3757 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3758 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3759 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3760 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3762 2011-08-30 Robert Dewar <dewar@adacore.com>
3764 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3767 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3769 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3770 Build_Finalization_Master by supplying an insertion node and enclosing
3771 scope. In its old version, the call did not generate a finalization
3773 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3774 recognize anonymous access-to-controlled components. Rewrite the
3775 machinery which creates finalization masters to service anonymous
3776 access-to-controlled components of a record type. In its current state,
3777 only one heterogeneous master is necessary to handle multiple anonymous
3779 (Freeze_Type): Comment reformatting.
3780 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3782 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3783 associates TSS primitive Finalize_Address with either the master itself
3784 or with the internal hash table depending on the mode of operation of
3787 2011-08-30 Javier Miranda <miranda@adacore.com>
3789 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3790 interface type then do not generate code to compare this component.
3791 Required since they have no components and their equality operator is
3794 2011-08-30 Steve Baird <baird@adacore.com>
3796 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3797 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3798 returns the (static) accessibility level of the object. Otherwise, the
3799 same as Type_Access_Level.
3800 (Dynamic_Accessibility_Level): New function; given an expression which
3801 could occur as the rhs of an assignment to a saooaaat (i.e., an
3802 expression of an access-to-object type), return the new value for the
3803 saooaaat's associated Extra_Accessibility object.
3804 (Effective_Extra_Accessibility): New function; same as
3805 Einfo.Extra_Accessibility except that object renames are looked through.
3807 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3808 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3810 (Effective_Extra_Accessibility): New function; see sem_util.ads
3812 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3813 (Extra_Accessibility): Update comments.
3814 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3815 except RM_Size field (which is only for types) is unaffected.
3817 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3818 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3820 (Init_Size): Add assertion that we are not trashing the
3821 Extra_Accessibility attribute of an object.
3822 (Init_Size_Align): Add assertion that we are not trashing the
3823 Extra_Accessibility attribute of an object.
3824 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3825 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3826 differently for the type of a (non-library-level) saooaaat depending
3827 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3828 is queried in this set of changes - everything else (in particular,
3829 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3830 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3831 The special treatment of library-level saooaaats is an optimization,
3832 not required for correctnesss. This is based on the observation that the
3833 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3834 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3836 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3837 false for the type of a saooaaat, declare and initialize its
3838 accessibility level object and set the Extra_Accessibility attribute
3839 of the saooaaat to refer to this object.
3840 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3841 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3842 calls to Effective_Extra_Accessibility in order to support
3843 renames of saooaaats.
3844 (Expand_N_Type_Conversion): Add new local function,
3845 Has_Extra_Accessibility, and call it when determining whether an
3846 accessibility check is needed.
3847 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3848 evaluate to True (without raising an exception).
3850 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3851 saooaaat, update its associated Extra_Accessibility object (if
3852 it has one). This includes an accessibility check.
3853 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3854 a saooaaat, update its Extra_Accessibility object too (if it
3856 (Expand_Call): Replace a couple of calls to Type_Access_Level
3857 with calls to Dynamic_Access_Level to handle cases where
3858 passing a literal (any literal) is incorrect.
3859 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3860 checks associated with "Saooaat := Some_Object'Access;"; this must
3861 be rejected if Some_Object is declared in a more nested scope
3863 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3864 assignment to a saooaaat even if Is_Local_Anonymous_Access
3865 returns False for its type (indicating a 2012-style saooaaat).
3867 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3868 (which is only appropriate for objects, not types) with a call
3869 of Init_Object_Size_Align in order to avoid trashing the
3870 Extra_Accessibility attribute of a rename (the two attributes
3873 (Valid_Conversion) Replace six calls to Type_Access_Level with
3874 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3875 Ada2012 non-library-level saooaaat, the former returns library level
3876 while the latter returns the (static) accessibility level of the
3877 saooaaat. A type conversion to the anonymous type of a saooaaat
3878 can only occur as part of an assignment to the saooaaat, so we
3879 know that such a conversion must be in a lhs context, so Deepest
3880 yields the result that we need. If such a conversion could occur,
3881 say, as the operand of an equality operator, then this might not
3882 be right. Also add a test so that static accessibilty checks are
3883 performed for converting to a saooaaat's type even if
3884 Is_Local_Anonymous_Access yields False for the type.
3886 2011-08-30 Javier Miranda <miranda@adacore.com>
3888 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3889 controls generation of a warning associated with late declaration of
3890 dispatching functions. Required to avoid generating spurious
3893 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3895 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3896 return object has an anonymous access type and the function's type is
3897 a named access type.
3898 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3899 conversions on implicit conversions, since such conversions can occur
3900 for anonymous access cases due to expansion. Issue error for attempt
3901 to rename an anonymous expression as an object of a named access type.
3902 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3903 to indicate whether this function should report errors on invalid
3905 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3906 the expression is of an anonymous access type and the expected type is
3907 a named general access type, rewrite the expression as a type
3908 conversion, unless this is an expression of a membership test.
3909 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3910 calling of Error_Msg_N on new formal Report_Errs.
3911 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3912 calling of Error_Msg_NE on new formal Report_Errs.
3913 (Valid_Conversion): Move declaration of this function to the package
3914 spec, to allow calls from membership test processing. For Ada 2012,
3915 enforce legality restrictions on implicit conversions of anonymous
3916 access values to general access types, disallowing such conversions in
3917 cases where the expression has a dynamic accessibility level (access
3918 parameters, stand-alone anonymous access objects, or a component of a
3919 dereference of one of the first two cases).
3920 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3921 in the context of a named general access expected type.
3922 * exp_ch4.adb Add with and use of Exp_Ch2.
3923 (Expand_N_In): Add processing for membership tests applied to
3924 expressions of an anonymous access type. First, Valid_Conversion is
3925 called to check whether the test is statically False, and then the
3926 conversion is expanded to test that the expression's accessibility
3927 level is no deeper than that of the tested type. In the case of
3928 anonymous access-to-tagged types, a tagged membership test is applied
3930 (Tagged_Membership): Extend to handle access type cases, applying the
3931 test to the designated types.
3932 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3933 accessibility level, and the actual is a 'Access applied to a current
3934 instance, pass the accessibility level of the type of the current
3935 instance rather than applying Object_Access_Level to the prefix. Add a
3936 ??? comment, since this level isn't quite right either (will eventually
3937 need to pass an implicit level parameter to init procs).
3939 2011-08-30 Bob Duff <duff@adacore.com>
3941 * s-taskin.ads: Minor comment fix.
3943 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3945 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3946 component and the selector is a dispatching operation, check if it is
3947 a prefixed call before rewriting as a parameterless function call.
3949 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3951 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3952 tsystem.h into $(RTSDIR) instead of rts.
3954 2011-08-29 Robert Dewar <dewar@adacore.com>
3956 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3958 * gcc-interface/Make-lang.in: Update dependencies.
3960 2011-08-29 Yannick Moy <moy@adacore.com>
3962 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3963 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3964 table to hold dereferences.
3965 (Add_ALFA_Xrefs): Take into account dereferences as special
3966 reads/writes to the variable "HEAP".
3967 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3968 (Generate_Dereference): New procedure to store a read/write dereferencew
3970 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3971 the special "HEAP" var.
3972 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3974 * sem_util.adb (Note_Possible_Modification): Store write dereference
3977 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3979 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3980 ensures that the level of the subpool access type is not deeper than
3981 that of the pool object.
3982 * sem_util.adb (Object_Access_Level): Expand to handle defining
3984 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3985 subpool handle name of a rewritten allocator.
3987 2011-08-29 Robert Dewar <dewar@adacore.com>
3989 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3991 2011-08-29 Thomas Quinot <quinot@adacore.com>
3993 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3994 values, we generate multiple triples of parameters in the TypeCode.
3995 Bump Choice_Index for each such triple so that a subsequent default
3996 choice is associated with the correct index in the typecode.
3998 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4000 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4002 (First, Last): Handle properly an iterator over a null container.
4004 2011-08-29 Bob Duff <duff@adacore.com>
4006 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4007 processing if we run across a node with no Scope. This can happen if
4008 we're with-ing an library-level instance, and that instance got errors
4009 that caused "instantiation abandoned".
4010 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4011 an exception instead of using Assert, so it won't go into an infinite
4012 loop, even when assertions are turned off.
4014 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4016 * a-coorse.adb: Proper handling of empty ordered sets.
4018 2011-08-29 Johannes Kanig <kanig@adacore.com>
4020 * debug.adb: Add comments.
4022 2011-08-29 Thomas Quinot <quinot@adacore.com>
4024 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4027 2011-08-29 Yannick Moy <moy@adacore.com>
4029 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4030 declaration for Itypes in Alfa mode.
4032 2011-08-29 Robert Dewar <dewar@adacore.com>
4034 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4035 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4036 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4039 2011-08-29 Tristan Gingold <gingold@adacore.com>
4041 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4043 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4044 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4047 2011-08-29 Robert Dewar <dewar@adacore.com>
4049 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4051 2011-08-29 Javier Miranda <miranda@adacore.com>
4053 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4054 renamings of formal subprograms when the actual for a formal type is
4057 2011-08-29 Matthew Heaney <heaney@adacore.com>
4059 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4062 2011-08-29 Matthew Heaney <heaney@adacore.com>
4064 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4065 components of record type.
4066 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4069 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4071 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4072 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4075 2011-08-29 Robert Dewar <dewar@adacore.com>
4077 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4080 2011-08-29 Matthew Heaney <heaney@adacore.com>
4082 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4083 components of record type.
4085 2011-08-29 Bob Duff <duff@adacore.com>
4087 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4088 by the termination handler.
4090 2011-08-29 Yannick Moy <moy@adacore.com>
4092 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4093 created in Alfa mode, instead of inserting artificial declarations of
4094 non-Itypes in the tree.
4095 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4096 know if an Itype has a corresponding declaration, as defined in
4099 2011-08-29 Yannick Moy <moy@adacore.com>
4101 * gnat1drv.adb: Minor rewrite.
4103 2011-08-29 Bob Duff <duff@adacore.com>
4105 * s-tasuti.adb (Make_Passive): Work around race condition in
4106 Make_Independent, which can cause Wait_Count to be zero. So instead of
4107 asserting that Wait_Count > 0, and then decrementing it, decrement it
4108 only if Wait_Count > 0.
4109 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4110 should be nonnegative, so declare them Natural instead of Integer.
4112 2011-08-29 Robert Dewar <dewar@adacore.com>
4114 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4115 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4116 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4117 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4118 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4120 2011-08-29 Tristan Gingold <gingold@adacore.com>
4122 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4124 2011-08-29 Vadim Godunko <godunko@adacore.com>
4126 * s-parint.ads: Minor comment clarification.
4128 2011-08-29 Vincent Celier <celier@adacore.com>
4130 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4131 may be used as identifiers.
4133 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4135 * a-coinho.ads: Minor reformating.
4137 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4139 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4140 container of a derived type.
4142 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4144 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4145 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4147 2011-08-29 Pascal Obry <obry@adacore.com>
4149 * exp_disp.adb: Minor comment fix.
4150 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4151 to avoid warnings when compiling with -Wall.
4152 (Make_Disp_Conditional_Select_Body): Likewise.
4153 (Make_Disp_Timed_Select_Body): Likewise.
4155 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4157 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4158 an entity name, generate reference for it.
4160 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4162 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4164 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4165 the class-wide type.
4166 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4168 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4170 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4171 subtype for an object whose type is an unconstrained union.
4173 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4175 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4176 is allowed in a component definition, by AI95-406.
4178 2011-08-29 Matthew Heaney <heaney@adacore.com>
4180 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4182 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4184 * a-except-2005.adb: Alphabetize all routines.
4185 (Triggered_By_Abort): New routine.
4186 * a-except-2005.ads (Triggered_By_Abort): New routine.
4187 * a-except.adb Alphabetize all routines.
4188 (Triggered_By_Abort): New routine.
4189 * a-except.ads (Triggered_By_Abort): New routine.
4190 * exp_ch7.adb: Update all comments involving the detection of aborts in
4192 (Build_Object_Declarations): Do not generate code to detect the
4193 presence of an abort at the start of finalization code, use a runtime
4195 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4197 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4198 allocate a task on a subpool.
4199 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4200 The flag disables all actions related to the maintenance of
4201 Finalize_Address_Table when subpools are not in use.
4202 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4204 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4205 performs costly task locking when subpools are not in use.
4207 2011-08-29 Yannick Moy <moy@adacore.com>
4209 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4210 types and dispatching calls in Alfa mode.
4211 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4212 correspondance between body and spec scopes, to reuse utility functions
4213 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4214 by testing the presence of the library unit for the body
4215 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4216 mode the expansion of accept statements is skipped
4217 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4218 the unique entity corresponding to the one returned by
4219 Unique_Defining_Entity applied to the enclosing declaration of the
4222 2011-08-29 Bob Duff <duff@adacore.com>
4224 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4225 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4226 an alias for pn. ppp is an alias for pt.
4228 2011-08-29 Javier Miranda <miranda@adacore.com>
4230 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4231 aggregate to take a consistent decision on the need to convert into
4232 assignments aggregates that initialize constant objects.
4234 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4236 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4237 Build_Allocate_Deallocate_Proc in order to handle allocation of
4238 non-controlled objects on subpools.
4239 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4240 to be end-user visible.
4241 * s-finmas.adb: Add with and use clause for System.HTable.
4242 Add an instantiation of Simple_HTable which provides a mapping between
4243 the address of a controlled object and the corresponding
4244 Finalize_Address used to clean up the object. The table is used when a
4245 master is operating in heterogeneous mode.
4246 (Attach): Explain why the input node is not verified on being already
4248 (Delete_Finalize_Address): New routine.
4249 (Detach): Add pragma Assert which ensures that a node is already
4251 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4252 since nodes are no longer removed on traversal. Explain why node
4253 detachment is undesirable in this case.
4254 (Get_Finalize_Address): New routine.
4255 (Hash): New routine.
4256 (Is_Empty_List): Removed.
4257 (pm): Renamed to Print_Master. Add output for discriminant
4259 Comment reformatting.
4260 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4261 * s-finmas.ads: Various comments additions / improvements.
4262 Type Finalization_Master has a discriminant which determines the mode of
4264 (Delete_Finalize_Address): New routine.
4265 (Get_Finalize_Address): New routine.
4266 (pm): Renamed to Print_Master.
4267 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4268 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4269 use clause for System.IO.
4270 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4271 Finalize_Address depending on the mode of allocation and the mode of
4273 (Deallocate_Any_Controlled): Remove the relation pair object -
4274 Finalize_Address regardless of the master mode. Add comment explaining
4276 (Detach): Ensure that fields Prev and Next are null after detachment.
4277 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4278 scheme to check whether the list of subpools is empty. There is no
4279 longer need to store the next subpool or advance the current pointer.
4280 (Is_Empty_List): New routine.
4281 (Print_Pool): New routine.
4282 (Print_Subpool): New routine.
4283 * s-stposu.ads: Various comments additions / improvements.
4284 Field Master of type Root_Subpool is now a heterogeneous collection.
4285 (Print_Pool): New routine.
4286 (Print_Subpool): New routine.
4288 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4290 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4291 forms, using aspects of container types.
4292 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4293 Has_Implicit_Dereference flags, that may be set on the partial view.
4294 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4295 container type with an indexing aspect.
4296 (Analyze_Quantified_Expression): Analyze construct with expansion
4297 disabled, because it will be rewritten as a loop during expansion.
4298 (Try_Container_Indexing): The prefix itself may be a container type
4299 with an indexing aspect, as with a vector of vectors.
4300 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4301 the original doamin of iteration, for name capture.
4302 (Analyze_Iterator_Specification): If the domain is an expression that
4303 needs finalization, create a separate declaration for it.
4304 For an iterator with "of" retrieve default iterator info from aspect of
4305 container type. For "in" iterator, retrieve type of Iterate function.
4306 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4307 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4308 analysis, to prevent spurious errors about late attributes.
4309 * sprint.adb: Handle quantified expression with either loop or iterator
4311 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4314 2011-08-29 Vincent Celier <celier@adacore.com>
4316 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4317 Binder or Linker of the main project file.
4319 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4321 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4324 2011-08-29 Yannick Moy <moy@adacore.com>
4326 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4328 2011-08-29 Yannick Moy <moy@adacore.com>
4330 * exp_ch11.adb: Minor expansion of comment.
4332 2011-08-29 Yannick Moy <moy@adacore.com>
4334 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4336 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4338 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4339 interpretation, set the type before resolving the operands, because
4340 legality checks on an exponention operand need to know the type of the
4343 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4345 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4346 cleanups on a master if the instance is within a generic unit.
4347 Complement to the corresponding fix to inline.adb for K520-030.
4349 2011-08-29 Tristan Gingold <gingold@adacore.com>
4351 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4353 * exp_intr.adb: Minor comment fix.
4355 2011-08-29 Bob Duff <duff@adacore.com>
4357 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4358 Delay_Required was used as an uninitialized variable.
4360 2011-08-29 Robert Dewar <dewar@adacore.com>
4362 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4363 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4364 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4366 2011-08-29 Thomas Quinot <quinot@adacore.com>
4368 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4369 Remove unused variables.
4371 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4373 * sem_res.adb: Remove Build_Explicit_Dereference.
4374 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4375 from sem_res.adb, used in analysis of additional constructs.
4376 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4377 expansion of iterators.
4378 (Is_Object_Reference): Recognize variables rewritten as explicit
4379 dereferences in Ada2012.
4380 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4381 Reversible_Iterator names, for expansion of Ada2012 iterators.
4382 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4383 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4384 linked list container.
4385 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4386 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4388 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4390 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4393 2011-08-29 Vincent Celier <celier@adacore.com>
4395 * make.adb (Gnatmake): Get the maximum number of simultaneous
4396 compilation processes after the Builder switches has been scanned, as
4397 there may include -jnn.
4399 2011-08-29 Matthew Heaney <heaney@adacore.com>
4401 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4403 2011-08-29 Tristan Gingold <gingold@adacore.com>
4405 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4406 GNAT_DRIVER_COMMAND_LINE to 255.
4408 2011-08-29 Pascal Obry <obry@adacore.com>
4410 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4411 reformatting and style fix (class attribute casing).
4413 2011-08-29 Yannick Moy <moy@adacore.com>
4415 * exp_ch11.adb: Yet another case where expansion should be common
4416 between CodePeer and Alfa.
4418 2011-08-29 Yannick Moy <moy@adacore.com>
4420 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4422 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4424 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4425 incomplete type and its completion match.
4427 2011-08-29 Yannick Moy <moy@adacore.com>
4429 * exp_ch13.adb: Adjust previous change.
4431 2011-08-29 Robert Dewar <dewar@adacore.com>
4433 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4434 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4437 2011-08-29 Emmanuel Briot <briot@adacore.com>
4439 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4440 initialize aggregated projects.
4442 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4444 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4445 depth of candidates to resolve a potentially spurious ambiguity between
4446 two visible subprograms.
4448 2011-08-29 Yannick Moy <moy@adacore.com>
4450 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4452 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4453 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4456 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4458 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4461 2011-08-29 Thomas Quinot <quinot@adacore.com>
4463 * sem_res.adb: Minor reformatting.
4465 2011-08-29 Johannes Kanig <kanig@adacore.com>
4467 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4469 * gnat1drv.adb (Adjust_Global_Switches): Set
4470 Use_Expressions_With_Actions to False in ALFA mode.
4471 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4474 2011-08-29 Yannick Moy <moy@adacore.com>
4476 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4477 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4478 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4479 tagged types and dispatching calls in Alfa mode.
4481 2011-08-29 Javier Miranda <miranda@adacore.com>
4483 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4484 we do not report an error on an Empty node.
4486 2011-08-29 Geert Bosch <bosch@adacore.com>
4488 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4489 a-nlrear.o and a-nurear.o.
4491 2011-08-29 Robert Dewar <dewar@adacore.com>
4493 * freeze.adb: Minor code reorganization.
4495 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4496 sem_ch6.adb: Minor reformatting
4498 2011-08-29 Tristan Gingold <gingold@adacore.com>
4500 * s-except.ads, s-except.adb: Provide dummy body.
4502 2011-08-29 Yannick Moy <moy@adacore.com>
4504 * sem_warn.adb (Within_Postcondition): Take into account the case of
4505 an Ensures component in a Test_Case.
4507 2011-08-29 Tristan Gingold <gingold@adacore.com>
4509 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4510 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4511 System_Exceptions_Debug
4512 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4513 * a-except.adb: With and use System.Exceptions_Debug instead of
4515 * a-except-2005.adb: Likewise.
4516 * s-assert.adb: Likewise.
4517 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4518 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4519 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4520 s-excdeb. Update dependencies.
4521 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4522 as these no longer need external libraries.
4524 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4526 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4527 exponentiation operator on universal values in a context that requires
4530 2011-08-29 Tristan Gingold <gingold@adacore.com>
4532 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4533 before calling notify_handled_exception.
4534 * a-exextr.adb: Fix comment.
4536 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4538 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4539 Finalize_Address of the access type's finalization master.
4540 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4541 access type's finalization master. Add a guard to prevent
4542 Associated_Storage_Pool from being set on .NET/JVM.
4543 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4544 attribute Finalize_Address of the access type's finalization master.
4545 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4546 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4547 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4549 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4550 use clause for System.IO
4551 (Detach): Relax the assertion, to be reinstated later.
4552 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4553 Relax the assertion on Finalize_Address, to be reinstated later.
4554 (Is_Empty_List): New routine.
4555 (pm): New debug routine.
4556 (Set_Finalize_Address): New routine.
4557 * s-finmas.ads (pm): New debug routine.
4558 (Set_Finalize_Address): New routine.
4559 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4561 2011-08-29 Tristan Gingold <gingold@adacore.com>
4563 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4564 Remove convention C.
4566 2011-08-29 Tristan Gingold <gingold@adacore.com>
4568 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4569 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4570 (Finalize_TCB): Remove its finalization.
4571 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4572 * s-soflin.adb (NT_Exc_Stack): Remove
4573 (Get_Exc_Stack_Addr_NT): Likewise.
4574 (Get_Exc_Stack_Addr_Soft): Likewise.
4575 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4576 (Get_Exc_Stack_Addr): Likewise.
4577 (Get_Exc_Stack_Addr_Soft): Likewise
4578 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4579 (Exc_Stack_Ptr_T): Likewise.
4580 (Private_Data): Remove Exc_Stack_Ptr component.
4582 2011-08-29 Tristan Gingold <gingold@adacore.com>
4584 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4586 2011-08-29 Tristan Gingold <gingold@adacore.com>
4588 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4590 2011-08-29 Geert Bosch <bosch@adacore.com>
4592 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4593 L2_Norm, Swap_Column): New generic subprograms
4594 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4595 L2_Norm, Swap_Column): Implement new subprograms in order to
4596 eliminate dependency on BLAS and LAPACK libraries in
4597 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4598 version. Forward_Eliminate/Back_Substitute can be used to put a
4599 matrix in row echelon or reduced row echelon form using partial
4601 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4602 Swap_Column): Instantiate from System.Generic_Array_Operations.
4603 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4604 (Sqrt): Local function for simple computation of square root without
4605 adding dependencies on Generic_Elementary_Functions.
4606 (Swap): New subprogram to exchange floating point numbers.
4607 (Inverse): Reimplement using Jordan-Gauss elimination.
4608 (Jacobi): New procedure implementing Jacobi's method for computation
4609 of eigensystems, based on Rutishauser's implementation.
4610 (L2_Norm): Implement directly using the inner product.
4611 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4612 decreasing eigenvalue as required by the Ada RM.
4613 (Swap_Column): New helper procedure for Sort_Eigensystem.
4614 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4615 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4618 2011-08-29 Thomas Quinot <quinot@adacore.com>
4620 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4623 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4625 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4626 than the current node.
4627 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4628 Finalization_Master. The list headers have two fields instead of three.
4629 This should fix alignment issue but subpool allocations are now
4630 unusable. Alphabetize subprograms.
4631 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4632 the size of the header when converting the beginning of the object to
4633 a FM_Node. Set the master's Finalize_Address attribute if not already
4635 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4636 header when converting the beginning of the object to a FM_Node.
4638 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4640 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4641 reraise when compiling for CodePeer.
4643 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4645 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4646 now needed by a-convec.adb. Fix warning.
4648 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4650 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4651 processing of TSS routine Finalize_Address when compiling in
4654 2011-08-29 Thomas Quinot <quinot@adacore.com>
4656 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4657 sem_warn.adb: Minor reformatting.
4659 2011-08-29 Emmanuel Briot <briot@adacore.com>
4661 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4662 languages from aggregated projects.
4664 2011-08-29 Yannick Moy <moy@adacore.com>
4666 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4667 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4668 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4669 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4670 for stubs are traversed too when parameter is set
4671 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4672 (Traverse_Declarations_Or_Statements): Do the special traversing for
4673 stubs when required.
4674 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4675 return subprogram or package body from stub.
4676 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4677 stubs without prior subprogram decl.
4679 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4681 * gnat_ugn.texi: Fix typo.
4683 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4685 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4686 which accounts for size vs alignment issues and calculates the size of
4688 (Deallocate_Any_Controlled): Ditto.
4689 (Nearest_Multiple_Rounded_Up): New routine.
4691 2011-08-29 Tristan Gingold <gingold@adacore.com>
4693 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4694 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4695 (Set_Exception_Msg): Ditto.
4696 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4698 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4699 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4700 (Raise_With_Msg): Remove Cleanup_Flag.
4701 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4702 Clean_Flag and Private_Data components.
4704 2011-08-29 Yannick Moy <moy@adacore.com>
4706 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4708 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4709 of an explicitly declared type, so that the base types of the original
4710 type and this generated type are the same, and a "type" (not a subtype
4712 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4713 small" in Alfa mode, like in CodePeer mode.
4714 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4715 clauses in Alfa mode.
4717 2011-08-29 Javier Miranda <miranda@adacore.com>
4719 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4720 function to the package spec.
4721 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4722 internally generated bodies of null procedures locate the internally
4723 generated spec enforcing mode conformance.
4724 (Is_Interface_Conformant): Ensure that the controlling formal of the
4727 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4729 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4730 reject the pragma if it appears to apply to a formal subprogram.
4732 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4734 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4735 inner expression, to prevent double evaluation.
4737 2011-08-29 Tristan Gingold <gingold@adacore.com>
4739 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4741 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4742 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4743 (Raise_Current_Excep): Adjust call.
4744 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4746 2011-08-29 Thomas Quinot <quinot@adacore.com>
4748 * exp_disp.adb: Minor reformatting.
4750 2011-08-29 Tristan Gingold <gingold@adacore.com>
4752 * a-exexpr.adb (Setup_Exception): Removed.
4753 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4754 * a-except.adb (Exception_Propagation): Removed.
4755 * a-except-2005.adb (Setup_Exception): Removed.
4756 (Reraise): Remove call to Setup_Exception.
4757 (Reraise_Occurrence): Ditto.
4758 (Reraise_Occurrence_Always): Ditto.
4759 (Reraise_Occurrence_No_Defer): Ditto.
4760 (Transfer_Occurrence): Ditto.
4761 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4762 (Set_Exception_Msg): Ditto.
4764 2011-08-29 Robert Dewar <dewar@adacore.com>
4766 * a-convec.adb, exp_disp.adb: Minor reformatting.
4768 2011-08-29 Tristan Gingold <gingold@adacore.com>
4770 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4772 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4774 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4775 Exception_Handlers to No_List instead of Empty_List in the case where
4776 there are no handlers.
4778 2011-08-29 Tristan Gingold <gingold@adacore.com>
4780 * gcc-interface/gigi.h (enum standard_datatypes): Add
4781 ADT_reraise_zcx_decl
4782 (reraise_zcx_decl): New macro.
4783 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4784 (gigi): Set reraise_zcx_decl.
4785 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4786 (gnat_to_gnu): Handle N_Raise_Statement.
4788 2011-08-29 Robert Dewar <dewar@adacore.com>
4790 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4791 a-undesu.adb: Minor reformatting.
4793 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4795 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4796 table, accept an unfrozen untagged component if it is an actual for a
4797 formal incomplete type.
4798 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4799 provide new iterator forms over vectors.
4800 Introduce type Iterator in package body to implement operations of
4801 Reversible_Iterator interface.
4802 * a-iteint.ads: Make package pure so it is usable with new container
4803 packages, that are categorized Remote_Types.
4805 2011-08-29 Robert Dewar <dewar@adacore.com>
4807 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4809 2011-08-29 Bob Duff <duff@adacore.com>
4811 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4812 of <>, because this is the routine that checks for dimensionality
4813 errors (for example, for a two-dimensional array, (others => <>) should
4814 be (others => (others => <>)).
4816 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4818 * impunit.adb: Add new run-time units.
4819 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4820 s-stposu.ads, s-stposu.adb: Code clean up.
4821 Handle protected class-wide or task class-wide types
4822 Handle C/C++/CIL/Java types.
4823 * s-spsufi.adb, s-spsufi.ads: New files.
4825 2011-08-29 Yannick Moy <moy@adacore.com>
4827 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4828 library-level subprogram.
4829 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4831 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4833 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4835 * gnat_rm.texi: Update doc for Test_Case pragma.
4837 2011-08-29 Tristan Gingold <gingold@adacore.com>
4839 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4841 (GCC_Exception_Access): New type.
4842 (Unwind_DeleteException): New imported procedure
4843 (Foreign_Exception): Import it.
4844 (GNAT_GCC_Exception): Simply have the occurrence inside.
4845 (To_GCC_Exception): New function.
4846 (To_GNAT_GCC_Exception): New function.
4847 (GNAT_GCC_Exception_Cleanup): New procedure..
4848 (Propagate_GCC_Exception): New procedure.
4849 (Reraise_GCC_Exception): New procedure.
4850 (Setup_Current_Excep): New procedure.
4851 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4852 (Unwind_RaiseException): Ditto.
4853 (Unwind_ForcedUnwind): Ditto.
4855 (Begin_Handler): Change type of parameter.
4856 (End_Handler): Ditto. Now delete the exception if still present.
4857 (Setup_Key): Removed.
4858 (Is_Setup_And_Not_Propagated): Removed.
4859 (Set_Setup_And_Not_Propagated): Ditto.
4860 (Clear_Setup_And_Not_Propagated): Ditto.
4861 (Save_Occurrence_And_Private): Ditto.
4862 (EID_For): Add 'not null' constraint on parameter.
4863 (Setup_Exception): Does nothing.
4864 (Propagate_Exception): Simplified.
4865 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4866 re-raise is not expanded anymore.
4867 * s-except.ads (Foreign_Exception): New exception - placeholder for
4869 * raise-gcc.c (__gnat_setup_current_excep): Declare
4870 (CXX_EXCEPTION_CLASS): Define (not yet used)
4871 (GNAT_EXCEPTION_CLASS): Define.
4872 (is_handled_by): Handle foreign exceptions.
4873 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4875 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4877 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4879 2011-08-29 Thomas Quinot <quinot@adacore.com>
4881 * a-synbar-posix.adb: Minor reformatting.
4883 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4885 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4886 a-exetim-default.ads (Interrupt_Clocks_Supported,
4887 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4888 definitions to be compliant with AI-0171. The target systems do not
4889 support separate account for the execution time of interrupt handlers.
4891 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4893 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4894 in the barrier to put first the easiest to evaluate (and the one which
4895 will be True more often). More efficient.
4897 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4899 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4901 2011-08-29 Bob Duff <duff@adacore.com>
4903 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4904 attributes that are now aspects, as specified by AI05-0229-1.
4905 * sem_ch13.adb (Analyze_Aspect_Specifications,
4906 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4907 pragmas or attribute references, as appropriate.
4909 2011-08-29 Robert Dewar <dewar@adacore.com>
4911 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4912 a-synbar-posix.ads: Minor reformatting.
4914 2011-08-29 Yannick Moy <moy@adacore.com>
4916 * snames.ads-tmpl: Add name Force.
4918 2011-08-29 Pascal Obry <obry@adacore.com>
4920 * prj-nmsc.adb: Minor reformatting.
4922 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4924 * a-exetim.ads (Interrupt_Clocks_Supported,
4925 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4926 definitions to be compliant with AI-0171.
4928 2011-08-29 Robert Dewar <dewar@adacore.com>
4930 * a-ngelfu.adb: Add comments.
4932 2011-08-29 Geert Bosch <bosch@adacore.com>
4934 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4935 the closest machine number to Pi / 2.0.
4937 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4939 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4940 package Ada.Synchronous_Barriers.
4941 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4942 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4943 default implementation using protected objects and another one
4944 a-synbar-posix using POSIX barriers as the underlying support.
4945 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4946 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4947 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4948 Clean up dependencies.
4949 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4951 2011-08-29 Robert Dewar <dewar@adacore.com>
4953 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4954 exp_dist.adb: Minor code reorganization.
4957 2011-08-29 Thomas Quinot <quinot@adacore.com>
4959 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4960 primitive operation must support external streaming if it is not a
4961 controlling access result.
4963 2011-08-29 Thomas Quinot <quinot@adacore.com>
4965 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4967 2011-08-29 Bob Duff <duff@adacore.com>
4969 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4970 restriction on allocators, as required by AI05-0013-1.
4971 * restrict.ads: Minor comment fix.
4973 2011-08-29 Tristan Gingold <gingold@adacore.com>
4975 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4976 (To_Jmpbuf_Address): Ditto
4977 (builtin_longjmp): Ditto
4979 2011-08-29 Thomas Quinot <quinot@adacore.com>
4981 * sem_res.adb: Minor reformatting.
4983 2011-08-29 Vincent Celier <celier@adacore.com>
4985 * make.adb (Gnatmake): Move special processing for VM targets after the
4986 call to Get_Target_Parameters.
4988 2011-08-29 Thomas Quinot <quinot@adacore.com>
4990 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4992 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4994 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4995 where an anonymous access discriminant of a limited designated type
4996 appears in a non-immutably limited discriminated type and issue an
4997 error message. Add local variable Desig_T and replace all occurrences
5000 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5002 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5003 implementation is compliant to RM D.15(15/2) after the modification
5004 imposed by AI05-0094-1 (binding interpretation).
5006 2011-08-29 Robert Dewar <dewar@adacore.com>
5008 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5009 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5011 2011-08-29 Thomas Quinot <quinot@adacore.com>
5013 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5014 the scope name, do not report a missing label as a style violation (it
5015 will be diagnosed as an illegality).
5016 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5017 variant records: Get_Enum_Lit_From_Pos already returns a usage
5018 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5019 on Expr in Integer_Literal case so that it can be used by
5022 2011-08-29 Tristan Gingold <gingold@adacore.com>
5024 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5026 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5027 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5029 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5030 Build_Abort_Block_Handler to build the exception handler. Do not
5031 undefer aborts for the Abort_Signal exception handler if back-end
5032 exception mechanism.
5033 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5034 back_end exceptions for all others and abort_signal.
5035 * s-except.ads (ZCX_By_Default): New constant.
5036 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5037 (Raise_Exception_Always): Ditto.
5038 (Raise_From_Signal_Handler): Ditto.
5039 (Raise_With_Location_And_Msg): Ditto.
5040 (Raise_With_Msg): Ditto.
5042 (Reraise_Occurence): Ditto.
5043 (Reraise_Occurrence_Always): Ditto.
5044 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5045 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5047 2011-08-29 Thomas Quinot <quinot@adacore.com>
5049 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5051 2011-08-29 Robert Dewar <dewar@adacore.com>
5053 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5054 Minor code reorganization.
5056 2011-08-29 Bob Duff <duff@adacore.com>
5058 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5059 2012, not just Ada 2005.
5061 2011-08-29 Vincent Celier <celier@adacore.com>
5063 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5064 with a project file or with gprbuid, if -gnatep= is specified, the
5065 builder may need to be invoked with -x.
5067 2011-08-29 Tristan Gingold <gingold@adacore.com>
5069 * a-exexpr-gcc.adb: Minor comment fix.
5071 2011-08-29 Robert Dewar <dewar@adacore.com>
5073 * sem_ch8.adb: Minor reformatting.
5075 2011-08-29 Bob Duff <duff@adacore.com>
5077 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5078 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5079 treating "some" as unreserved in earlier Ada versions. This is now
5080 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5081 rather than Name_Some, since Tok_Some is now recognized as reserved.
5082 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5084 * scans.ads: Minor comment fixes.
5085 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5086 for other language versions.
5087 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5088 treating "some" as unreserved in earlier Ada versions. This is now
5089 handled in Snames.Is_Keyword_Name.
5090 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5092 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5093 unreserved in earlier Ada versions. This is now handled in
5094 Snames.Is_Keyword_Name.
5095 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5096 words as for other language versions.
5097 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5098 Ada 2012, not just Ada 2005.
5100 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5102 * sem_ch13.adb: Additional semantic checks for aspects involved in
5105 2011-08-29 Matthew Heaney <heaney@adacore.com>
5107 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5108 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5109 Container parameter.
5110 (Ancestor_Find): ditto.
5112 2011-08-29 Thomas Quinot <quinot@adacore.com>
5114 * par-endh.adb: Minor reformatting.
5116 2011-08-29 Tristan Gingold <gingold@adacore.com>
5118 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5119 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5120 (Adjust_N_CLeanups_For): Remove.
5121 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5123 (Propgate_Exception): Adjust.
5124 * raise-gcc.c: Add a few static/const.
5125 (Adjust_N_Cleanups_For): Remove declaration.
5126 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5128 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5130 * sem_ch8.adb: Use type of function return when rewriting as object
5133 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5135 * sem_type.adb: Minor reformatting.
5137 2011-08-29 Robert Dewar <dewar@adacore.com>
5139 * makeutl.adb: Minor reformatting.
5141 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5143 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5144 function call of a limited type, the expansion of the renaming is
5145 complicated by the presence of various temporaries and subtypes that
5146 capture constraints of the renamed object.
5147 Rewrite node as an object declaration, whose expansion is simpler.
5148 Given that the object is limited there is no copy involved and no
5151 2011-08-29 Robert Dewar <dewar@adacore.com>
5153 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5154 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5156 2011-08-29 Tristan Gingold <gingold@adacore.com>
5158 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5159 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5160 system-linux-hppa.ads, system-linux-s390.ads,
5161 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5162 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5163 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5164 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5165 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5166 system-solaris-sparc.ads, system-lynxos-x86.ads,
5167 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5168 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5169 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5170 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5171 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5172 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5173 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5174 * opt.ads: Adjust comment.
5175 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5176 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5177 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5179 2011-08-29 Emmanuel Briot <briot@adacore.com>
5181 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5182 file name is specified on the gnatmake or gprbuild command line, and
5183 before we search for that file in the project.
5185 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5187 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5188 used to determine whether a possible interpretation for an overloadable
5189 entity is declared within the current instantiation and should be
5190 included in the candidate set.
5192 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5194 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5196 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5198 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5199 access subtype is access_to_subprogram, when applying checks for
5202 2011-08-29 Matthew Heaney <heaney@adacore.com>
5204 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5205 for sibling when common parent.
5207 2011-08-29 Thomas Quinot <quinot@adacore.com>
5209 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5212 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5214 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5215 for the return type when in ASIS mode.
5217 2011-08-29 Vincent Celier <celier@adacore.com>
5219 * make.adb (Gnatmake): Get the default search dirs, then the target
5220 parameters after getting the Builder switches, as the Builder switches
5221 may include --RTS= and that could change the default search dirs.
5223 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5225 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5226 Make_Final_Call. Move the processing for class-wide types before the
5227 processing for derivations from [Limited_]Controlled.
5228 (Make_Final_Call): Move the processing for class-wide types before the
5229 processing for derivations from [Limited_]Controlled.
5230 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5231 Add code to account for alignments larger than the list header. Add a
5232 comment illustrating the structure of the allocated object + padding +
5234 (Deallocate_Any_Controlled): Add code to account for alignments larger
5235 than the list header.
5237 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5239 * sinfo.ads, sinfo.adb: New node kind
5240 N_Formal_Incomplete_Type_Definition, related flags.
5241 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5242 Parse formal incomplete types.
5243 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5245 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5246 Formal incomplete types do not need completion.
5247 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5248 Validate_Incomplete_Type_Instance): New procedures to handle formal
5250 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5251 that corresponds to a formal incomplete type.
5252 * sprint.adb: Handle formal incomplete type declarations.
5253 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5256 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5258 * a-fihema.ads, a-fihema.adb: Unit removed.
5259 * a-undesu.ads, a-undesu.adb: New unit implementing
5260 Ada.Unchecked_Deallocate_Subpool.
5261 * einfo.adb: Remove Associated_Collection from the node usage.
5262 Add Finalization_Master to the node usage.
5263 (Associated_Collection): Removed.
5264 (Finalization_Master): New routine.
5265 (Set_Associated_Collection): Removed.
5266 (Set_Finalization_Master): New routine.
5267 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5268 Finalization_Master to the output.
5269 * einfo.ads: Remove attribute Associated_Collection and its uses in
5271 Add new attribute Finalization_Master along with its uses in entitites.
5272 (Associated_Collection): Removed along with its pragma import.
5273 (Finalization_Master): New routine along with a pragma import.
5274 (Set_Associated_Collection): Removed along with its pragma import.
5275 (Set_Finalization_Master): New routine along with a pragma import.
5276 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5277 Build_Finalization_Collection with Build_Finalization_Master.
5278 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5279 before the bodies of the predefined routines. Add comment explaining
5280 this. Replace call to Build_Finalization_Collection with
5281 Build_Finalization_Master.
5282 (Freeze_Type): Replace call to Build_Finalization_Collection with
5283 Build_Finalization_Master.
5284 (Make_Finalize_Address_Body): Comment reformatting.
5285 (Make_Predefined_Primitive_Specs): Code reformatting.
5286 (Stream_Operation_OK): Update comment mentioning finalization
5287 collections. Replace RE_Finalization_Collection with
5288 RE_Finalization_Master.
5289 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5290 Associated_Collection with Finalization_Master. Replace call to
5291 Build_Finalization_Collection with Build_Finalization_Master.
5292 (Expand_Allocator_Expression): Replace call to Associated_Collection
5293 with Finalization_Master. Replace call to Set_Associated_Collection with
5294 Set_Finalization_Master. Remove the generation of
5295 Set_Finalize_Address_Ptr.
5296 (Expand_N_Allocator): Replace call to Associated_Collection with
5297 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5298 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5299 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5300 comment on usage. Replace call to Needs_BIP_Collection with
5301 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5302 BIP_Finalization_Master. Update all comments which mention finalization
5303 collections. Replace Associated_Collection with
5304 Finalization_Master. Replace Build_Finalization_Collection with
5305 Build_Finalization_Master.
5306 (BIP_Formal_Suffix): Update BIP_Collection's case.
5307 (Build_Heap_Allocator): Update the related comment. Rename local
5308 variable Collect to Fin_Mas_Id and update its occurrences. Update
5309 comments which mention finalization collections. Replace
5310 Set_Associated_Collection with Set_Finalization_Master.
5311 (Expand_Call): Update the code which detects a special piece of library
5313 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5314 Add_Collection_Actual_To_Build_In_Place_Call with
5315 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5316 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5317 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5318 Add_Collection_Actual_To_Build_In_Place_Call with
5319 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5320 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5321 Add_Collection_Actual_To_Build_In_Place_Call with
5322 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5323 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5324 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5325 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5326 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5327 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5328 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5329 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5330 Replace the call to Associated_Collection with Finalization_Master.
5331 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5332 Update the way finalization master names are generated. Update the
5333 retrieval of the correct access type which will carry the pool and
5335 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5336 (Make_Finalize_Address_Body): Abstract types do not need
5337 Finalize_Address. Code reformatting.
5338 (Make_Finalize_Address_Stmts): Update comment on usage.
5339 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5340 (Process_Declarations): Update comments.
5341 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5342 Build_Finalization_Master. Update associated comment.
5343 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5344 * exp_ch13.adb: Update comments which mention finalization collections.
5345 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5346 with Finalization_Master.
5347 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5348 create calls to routines Allocate_Any_Controlled and
5349 Deallocate_Any_Controlled.
5350 (Find_Finalize_Address): New routine.
5351 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5353 (Requires_Cleanup_Actions): Update the comment on freeze node
5355 * exp_util.ads: Remove comment on generated code for
5356 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5357 is better to simply look in the body.
5358 * freeze.adb (Freeze_All): Update the comment of finalization
5359 collections. Replace the call to Associated_Collection with
5360 Finalization_Master. Replace the call to Build_Finalization_Collection
5361 with Build_Finalization_Master.
5362 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5363 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5365 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5366 Ada.Finalization. Add processing for children of System.Storage_Pools.
5367 * rtsfind.ads: Remove the naming of second level children of
5369 Remove Ada_Finalization_Heap_Management from the list of units.
5370 Remove subtype Ada_Finalization_Child.
5371 Remove the following subprogram entities:
5375 RE_Finalization_Collection
5376 RE_Finalization_Collection_Ptr
5377 RE_Set_Finalize_Address_Ptr
5379 Add the naming of second level children of System.Storage_Pools.
5380 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5382 Add subtype System_Storage_Pools_Child.
5383 Add the following subprogram entities to System.Finalization_Masters:
5385 RE_Finalization_Master
5386 RE_Finalization_Master_Ptr
5388 Add the following subprogram entities to System.Storage_Pools.Subpools:
5390 RE_Allocate_Any_Controlled
5391 RE_Deallocate_Any_Controlled
5392 RE_Root_Storage_Pool_With_Subpools
5396 Move the following subprogram entities from
5397 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5399 RE_Add_Offset_To_Address
5404 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5405 Set_Associated_Collection with Set_Finalization_Master.
5406 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5407 BIP_Finalization_Master is created.
5408 * s-finmas.adb: New unit System.Finalization_Masters.
5409 * s-finmas.ads: New unit System.Finalization_Masters.
5410 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5411 * s-stposu.ads, s-stposu.adb: New unit implementing
5412 System.Storage_Pools.Subpools.
5414 2011-08-29 Bob Duff <duff@adacore.com>
5416 * tbuild.adb: Add assertion.
5418 2011-08-29 Thomas Quinot <quinot@adacore.com>
5420 * s-pooglo.adb: Minor reformatting.
5422 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5424 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5425 an indexed component of a packed array whose element type is a record
5426 with a representation clause different from that of the right-hand
5427 side, generate a temporary to minimuze the number of bit-field
5428 operations generated.
5430 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5432 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5433 declarations, and thus are likely insertion points for actions.
5435 2011-08-29 Bob Duff <duff@adacore.com>
5437 * einfo.ads: Minor comment fix.
5439 2011-08-29 Robert Dewar <dewar@adacore.com>
5441 * frontend.adb, gnat1drv.adb: Minor reformatting.
5443 2011-08-29 Tristan Gingold <gingold@adacore.com>
5445 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5446 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5447 space in front of the header.
5449 2011-08-29 Johannes Kanig <kanig@adacore.com>
5451 * frontend.adb (Frontend): Exit after creating Standard package when
5452 -gnatd.H is present.
5453 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5456 2011-08-29 Robert Dewar <dewar@adacore.com>
5458 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5459 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5460 snames.ads-tmpl: Minor reformatting.
5462 2011-08-29 Philippe Gil <gil@adacore.com>
5464 * prj.adb (Reset_Units_In_Table): New procedure.
5465 Reset units to avoid access to freed memory.
5467 2011-08-29 Thomas Quinot <quinot@adacore.com>
5469 * get_scos.adb: When reading a P statement SCO without a pragma name
5470 (from an older ALI file), ensure that the Pragma_Name component is set
5471 to Unknown_Pragma (not left uninitialized).
5473 2011-08-29 Vincent Celier <celier@adacore.com>
5475 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5476 modified to compute correctly the object path of a SAL project that is
5477 extending another library project.
5478 (Write_Path_File): New procedure.
5479 * makeutl.ads (Directories): New table moved from Buildgpr
5480 (Get_Directories): New procedure moved from Buildgpr
5481 (Write_Path_File): New procedure
5482 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5483 paths before binding SALs, instead of Set_Ada_Paths.
5484 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5486 * prj.adb (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
5491 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5492 (Current_Source_Path_File_Of): New function
5493 (Set_Current_Object_Path_File_Of): New procedure
5494 (Current_Source_Object_File_Of): New function
5495 (Set_Current_Object_Path_File_Of): New procedure
5497 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5499 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5500 packed entity, use a bit-field assignment only if there is no change of
5503 2011-08-29 Thomas Quinot <quinot@adacore.com>
5505 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5506 Is_RTU instead of using Chars comparisons.
5508 2011-08-29 Thomas Quinot <quinot@adacore.com>
5510 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5511 temporary object if the actual is constrained, and the discriminants
5512 read from the stream don't match.
5514 2011-08-29 Tristan Gingold <gingold@adacore.com>
5516 * sem_attr.adb, exp_attr.adb: Add handling of
5517 Attribute_System_Allocator_Alignment
5518 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5519 Attribute_System_Allocator_Alignment.
5520 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5521 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5522 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5523 get_target_system_allocator_alignment.
5525 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5527 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5530 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5532 * exp_ch3.adb (In_Runtime): Fix typo.
5534 2011-08-29 Bob Duff <duff@adacore.com>
5536 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5538 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5540 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5541 and a separate tag assignment is generated, ensure that the tag
5542 assignment is analyzed.
5544 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5546 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5547 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5548 of statement lists that may contain local declarations.
5549 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5550 duplicate the triggering statements needed for the expansion of this
5551 construct, when the trigger is a dispatching call to a synchronized
5554 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5556 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5557 * bindgen.adb: Add comments.
5558 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5561 2011-08-29 Robert Dewar <dewar@adacore.com>
5563 * exp_attr.adb: Minor reformatting.
5564 Minor code reorganization and commenting.
5565 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5568 2011-08-29 Thomas Quinot <quinot@adacore.com>
5570 * get_scos.adb: Ignore chaining indicators not currently supported
5573 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5575 * system.ads: Minor editing.
5577 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5579 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5581 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5582 Attribute_Elab_Subp_Body.
5583 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5584 * sem_util.adb: Update comments.
5586 2011-08-29 Thomas Quinot <quinot@adacore.com>
5588 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5589 pragma name for each SCO statement corresponding to a pragma.
5591 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5593 * opt.ads: Minor editing.
5595 2011-08-29 Yannick Moy <moy@adacore.com>
5597 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5598 that only made sense for CodePeer mode.
5600 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5602 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5603 which is no longer used.
5604 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5605 handling of the 64-bit division check.
5606 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5608 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5611 2011-08-29 Thomas Quinot <quinot@adacore.com>
5613 * get_scos.adb: Minor reformatting.
5615 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5617 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5618 statement list is wrapped in a block, the block is explicitly analyzed
5619 in order to properly redecorate the entities and create a servicing
5622 2011-08-29 Tristan Gingold <gingold@adacore.com>
5624 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5625 (Set_Zero_Cost_Handling): Remove.
5627 2011-08-29 Thomas Quinot <quinot@adacore.com>
5629 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5631 2011-08-29 Geert Bosch <bosch@adacore.com>
5633 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5634 instruction, as the latter may produce -0.0, which is not a valid VAX
5636 (Neg_G): Likewise for VAX F float.
5638 2011-08-29 Robert Dewar <dewar@adacore.com>
5640 * exp_util.adb: Minor reformatting.
5642 2011-08-29 Yannick Moy <moy@adacore.com>
5644 * sem_ch3.adb: Minor comment update.
5646 2011-08-29 Thomas Quinot <quinot@adacore.com>
5648 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5651 2011-08-29 Thomas Quinot <quinot@adacore.com>
5653 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5654 current statement sequence on a generic instantiation or a subprogram
5657 2011-08-29 Robert Dewar <dewar@adacore.com>
5659 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5662 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5664 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5665 Correct the check which involves the freeze node of a controlled or
5666 access-to-controlled type.
5668 2011-08-29 Geert Bosch <bosch@adacore.com>
5670 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5672 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5675 2011-08-29 Yannick Moy <moy@adacore.com>
5677 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5678 for every index type and component type that is not a subtype_mark.
5679 (Process_Subtype): Set Etype of subtype.
5681 2011-08-29 Robert Dewar <dewar@adacore.com>
5683 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5684 reorganization. Minor reformatting.
5686 2011-08-29 Steve Baird <baird@adacore.com>
5688 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5689 for CodePeer and ALFA modes.
5691 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5693 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5694 that comes from an enclosing scope if it is not the renaming of an
5695 actual, to handle properly a spurious ambiguity in an instance.
5697 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5699 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5700 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5701 use it instead of the Esize of the first parameter.
5702 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5704 <Size>: Likewise. Call it for composite types on the RM size.
5706 2011-08-29 Yannick Moy <moy@adacore.com>
5708 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5709 * sem_util.adb (Unique_Name): Correct behaviour for names of
5712 2011-08-29 Yannick Moy <moy@adacore.com>
5714 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5715 verification mode, analyze pragma expression for correctness, for
5716 pre/post on library-level subprogram, as it is not expanded later.
5718 2011-08-29 Yannick Moy <moy@adacore.com>
5720 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5721 in formal verification.
5723 2011-08-29 Thomas Quinot <quinot@adacore.com>
5725 * sem_util.adb: Minor reformatting.
5726 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5728 * par_sco.ads, par_sco.adb: Update comments.
5730 2011-08-29 Yannick Moy <moy@adacore.com>
5732 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5733 associated getter/setter.
5734 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5736 2011-08-29 Vincent Celier <celier@adacore.com>
5738 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5739 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5740 with declarations for Language_Kind and Dependency_Kind for Ada.
5741 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5742 (Process_Compiler): Take into account the new attributes Dependency_Kind
5744 (Check_Configuration): Check if language kind is unit based, not if the
5745 language name is Ada.
5746 (Process_Exceptions_Unit_Based): Ditto
5747 (Add_Language): Remove default additions of language and dependency kind
5748 * prj.ads: Minor comment change
5749 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5751 2011-08-29 Johannes Kanig <kanig@adacore.com>
5753 * debug.adb: Update comments.
5755 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5757 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5758 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5759 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5760 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5761 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5763 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5765 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5766 (GNATLIBCFLAGS_FOR_C): Replace
5767 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5768 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5769 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5770 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5772 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5774 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5776 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5778 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5780 2011-08-05 Nicolas Roche <roche@adacore.com>
5782 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5783 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5785 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5787 2011-08-05 Matthew Heaney <heaney@adacore.com>
5789 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5790 subprogram bodies declared out-of-order.
5792 2011-08-05 Yannick Moy <moy@adacore.com>
5794 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5795 entities directly in package Standard, otherwise skip the standard
5798 2011-08-05 Robert Dewar <dewar@adacore.com>
5800 * a-cbmutr.adb: Minor reformatting
5801 (Allocate_Node): refactor node allocation algorithm
5803 2011-08-05 Robert Dewar <dewar@adacore.com>
5805 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5806 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5808 (Analyze_Pragma, case Check_Policy): Ditto.
5809 * sem_prag.ads (Check_Disabled): New function
5810 * snames.ads-tmpl: Add Name_Disable.
5812 2011-08-05 Robert Dewar <dewar@adacore.com>
5814 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5815 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5817 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5819 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5820 that appears in a generic formal part and applies to a formal
5823 2011-08-05 Robert Dewar <dewar@adacore.com>
5825 * a-cbmutr.ads: Minor reformatting.
5827 2011-08-05 Matthew Heaney <heaney@adacore.com>
5829 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5830 to check count, check sign of value instead.
5831 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5832 (Copy_Subtree): allocate copy of source element
5833 (Equal_Subtree): compare elements, not access objects
5835 2011-08-05 Vincent Celier <celier@adacore.com>
5837 * gnat_ugn.texi: Fix VMS alternative.
5839 2011-08-05 Thomas Quinot <quinot@adacore.com>
5841 * sem_ch11.adb: Add comment.
5843 2011-08-05 Robert Dewar <dewar@adacore.com>
5845 * exp_util.adb: Minor comment fix.
5847 2011-08-05 Robert Dewar <dewar@adacore.com>
5849 * scng.adb (Error_Unterminated_String): Improve flag position when
5852 2011-08-05 Matthew Heaney <heaney@adacore.com>
5854 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5856 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5857 multiway tree containers.
5859 2011-08-05 Robert Dewar <dewar@adacore.com>
5861 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5862 * stylesw.adb: Implement -gnatyC to control comment spacing
5863 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5865 * usage.adb: Add line for -gnatyC.
5867 2011-08-05 Robert Dewar <dewar@adacore.com>
5869 * gnat_ugn.texi: Document -gnatyC.
5870 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5871 synonym for COMMENTS2).
5873 2011-08-05 Robert Dewar <dewar@adacore.com>
5875 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5876 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5877 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5878 a-comutr.ads, lib-xref.adb: Minor reformatting.
5880 2011-08-05 Robert Dewar <dewar@adacore.com>
5882 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5883 warning if there is an exception handler present.
5885 2011-08-05 Pascal Obry <obry@adacore.com>
5887 * a-iteint.ads: Fix copyright year.
5889 2011-08-05 Thomas Quinot <quinot@adacore.com>
5891 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5892 statement SCO for a USE clause or a representation clause.
5894 2011-08-05 Yannick Moy <moy@adacore.com>
5896 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5897 between body and spec for stub.
5898 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5899 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5900 pragma precondition or postcondition, for which the enclosing
5901 subprogram or package in the AST is not the desired one, return empty.
5903 2011-08-05 Thomas Quinot <quinot@adacore.com>
5905 * g-expect.adb: Minor reformatting.
5907 2011-08-05 Bob Duff <duff@adacore.com>
5909 * a-fihema.adb: Comment out OS_Lib.
5911 2011-08-05 Matthew Heaney <heaney@adacore.com>
5913 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5914 (unbounded multiway tree containers) and a-iteint.ads.
5915 * a-comutr.ads, a-comutr.adb:
5916 This is the new Ada 2012 unit for unbounded multiway tree containers
5917 * a-cimutr.ads, a-cimutr.adb
5918 This is the new Ada 2012 unit for indefinite multiway tree containers
5919 * a-iteint.ads: New file.
5921 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5923 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5925 2011-08-05 Bob Duff <duff@adacore.com>
5927 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5929 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5931 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5933 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5934 general indexing aspects of Ada2012. Called when analyzing indexed
5935 components when other interpretations fail.
5936 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5937 in an expression context where overloading is meaningful. This excludes
5938 the occurrence in an aspect specification (efficiency only).
5939 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5940 related to iterators can be set by an attribute specification, but
5942 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5943 Constant_Indexing and Variable_Indexing.
5944 (Check_Indexing_Functions): New procedure to perform legality checks.
5945 Additional semantic checks at end of declarations.
5947 2011-08-05 Sergey Rybin <rybin@adacore.com>
5949 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5950 order of calling Tree_Write/Tree_Read routines made for aspects.
5952 2011-08-05 Bob Duff <duff@adacore.com>
5954 * a-fihema.adb (Finalize): Fix race condition.
5956 2011-08-05 Yannick Moy <moy@adacore.com>
5958 * sem_ch12.adb (Analyze_Package_Instantiation,
5959 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5962 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5964 * sem_type.adb (Specific_Type): in an instance, the type-specific
5965 operand of an equality check that involves null may have a private
5966 type. Use full view to determine legality of construct.
5968 2011-08-05 Vincent Celier <celier@adacore.com>
5970 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5971 delete or close the file when the call to gnatmake was successful.
5973 2011-08-05 Yannick Moy <moy@adacore.com>
5975 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5976 Global_Discard_Names.
5978 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5980 * sinfo.ads: comments on use of entity field for aspect specifications.
5982 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5984 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5985 node is not itself an entity but a selected component, it is a
5986 rewritten parameterless call to an en enclosing synchronized operation,
5987 and this expansion will be performed again in the instance, so there is
5988 no global information to preserve.
5990 2011-08-05 Javier Miranda <miranda@adacore.com>
5992 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5993 for renamings of predefined primitives.
5994 (In_Predef_Prims_DT): New subprogram.
5996 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5998 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5999 possible interpretation of name is a reference type, add an
6000 interpretation that is the designated type of the reference
6001 discriminant of that type.
6002 * sem_res.adb (resolve): If the interpretation imposed by context is an
6003 implicit dereference, rewrite the node as the deference of the
6004 reference discriminant.
6005 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6006 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6007 parent type or base type.
6008 * sem_ch4.adb (Process_Indexed_Component,
6009 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6010 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6011 Check for implicit dereference.
6012 (List_Operand_Interps): Indicate when an implicit dereference is
6014 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6016 2011-08-05 Thomas Quinot <quinot@adacore.com>
6018 * scos.ads: Update documentation of SCO table. Pragma statements can now
6019 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6020 * par_sco.ads, par_sco.adb: Implement the above change.
6021 (Process_Decisions_Defer): Generate a P decision for the first parameter
6022 of a dyadic pragma Debug.
6023 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6025 * put_scos.adb: Code simplification based on above change.
6027 2011-08-05 Robert Dewar <dewar@adacore.com>
6029 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6030 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6031 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6032 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6034 2011-08-05 Bob Duff <duff@adacore.com>
6036 * a-stunau.ads, g-spipat.adb: Update comments.
6038 2011-08-05 Bob Duff <duff@adacore.com>
6040 * a-fihema.ads: Minor comment fix.
6041 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6043 (Attach, Detach): Remove some unnecessary code.
6044 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6046 2011-08-05 Bob Duff <duff@adacore.com>
6048 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6049 allocation for Objects component. This simplifies the code somewhat. It
6050 is also a little more efficient in the not-so-unusual case where there
6051 are no controlled objects allocated.
6052 Make Finalization_Started flag atomic.
6053 (Finalize): Avoid unnecessary detachment of items from the list.
6054 (pcol): Minor cleanup.
6056 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6058 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6059 package whose name is the same as that of the generic unit, or its
6062 2011-08-05 Bob Duff <duff@adacore.com>
6064 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6065 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6066 Minor comment fixes.
6068 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6070 * make.adb (Linking_Phase): No longer need to set source search path
6071 before calling gnatlink in CodePeer mode.
6072 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6073 gcc in CodePeer mode, since the binder generated file no longer has a
6075 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6076 * switch-c.adb: Update comment.
6078 2011-08-05 Thomas Quinot <quinot@adacore.com>
6080 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6082 2011-08-05 Nicolas Roche <roche@adacore.com>
6084 * gnat_ugn.texi: Fix minor syntax error issue.
6086 2011-08-05 Vincent Celier <celier@adacore.com>
6088 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6089 delete or close the file when the call to gnatmake returns a non
6090 successful return code.
6092 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6094 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6095 check, indicate that the copy of the original node does not come from
6096 source, to prevent an infinite recursion of the expansion.
6098 2011-08-05 Johannes Kanig <kanig@adacore.com>
6100 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6101 VC generation for subprogram bodies.
6103 2011-08-05 Yannick Moy <moy@adacore.com>
6106 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6107 the base type with the smallest allowed base type.
6109 2011-08-05 Sergey Rybin <rybin@adacore.com>
6111 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6114 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6116 * sem_ch12.ads: minor comment updates.
6118 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6120 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6121 instantiation and a formal package the compiler generates a package
6122 renaming declaration so that the generic name within the declaration
6123 is interpreted as a renaming of the instance. At the end of a formal
6124 package declaration, this renaming must become invisible.
6126 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6128 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6129 comparison and rely on concrete entities instead.
6131 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6133 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6134 and discriminants, to indicate that the type has an access discriminant
6135 that supports implicit dereference.
6136 * snames.ads-tmpl: Add names of aspects and attributes related to
6137 Ada2012 iterators: constant_indexing, default_iterator,
6138 iterator_element, implicit_dereference, variable_indexing.
6139 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6140 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6141 iterator-related aspects.
6142 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6144 2011-08-05 Sergey Rybin <rybin@adacore.com>
6146 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6147 metrics in gnatmetric to cover new kinds of coupling mentrics.
6149 2011-08-05 Steve Baird <baird@adacore.com>
6151 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6152 of calling the user-defined main subprogram.
6153 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6154 is set) Call_Main_Subprogram ahead of, as opposed to
6156 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6157 generation of a "with" of the user-defined main subprogram.
6158 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6159 (which is now called from Gen_Main instead).
6161 2011-08-05 Emmanuel Briot <briot@adacore.com>
6163 * projects.texi: Added reference to the Makefile package.
6165 2011-08-05 Thomas Quinot <quinot@adacore.com>
6167 * exp_ch7.adb: Minor comment rewording.
6169 2011-08-05 Ed Falis <falis@adacore.com>
6171 * env.c: Fix comment.
6173 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6175 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6176 character comparison and rely on concrete entities instead.
6178 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6180 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6181 suggested by AI95-0068.
6183 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6185 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6186 the two potential initialization calls. This accounts for any
6187 access-before-elaboration checks which may precede the initialization
6189 (Next_Suitable_Statement): New routine. Returns the next real statement
6190 after the input node while skipping generated checks.
6191 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6192 with comment on usage.
6193 Do not generate Elaborate_All when the trigger is a finalization call
6194 coming from a type init proc.
6195 (Check_Elab_Call): Propagate the initialization procedure context to
6196 subsequent calls to Check_A_Call.
6197 (Check_Internal_Call_Continue): Propagate the initialization procedure
6198 context to subsequent calls to Check_Elab_Call.
6199 (Is_Finalization_Procedure): New routine. Returns True if the input
6200 entity denotes a [Deep_]Finalize routine.
6201 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6202 along with comment on usage.
6204 2011-08-05 Vadim Godunko <godunko@adacore.com>
6206 * s-atocou.ads: Add list of supported platforms.
6208 2011-08-05 Yannick Moy <moy@adacore.com>
6210 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6212 * opt.ads (Disable_ALI_File): new Boolean flag
6213 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6215 2011-08-05 Ed Falis <falis@adacore.com>
6217 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6218 environ is properly defined.
6220 2011-08-05 Vincent Celier <celier@adacore.com>
6222 * make.adb (Compilation_Phase): Exit immediately when all objects have
6223 been found up to date, to avoid multiple exit messages.
6224 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6225 same project for languages with no compiler.
6226 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6228 2011-08-05 Robert Dewar <dewar@adacore.com>
6230 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6231 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6232 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6233 s-atocou-builtin.adb: Minor reformatting.
6235 2011-08-05 Yannick Moy <moy@adacore.com>
6237 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6238 if the node to wrap is a pragma check, this node and enclosed
6239 expression are not expanded, so do not apply any transformations here.
6240 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6241 introducing transient scopes.
6243 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6245 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6246 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6247 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6248 routine is available, so we use the default implementation of these
6250 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6251 support for copying attributes on VxWorks 6.
6253 2011-08-05 Yannick Moy <moy@adacore.com>
6255 * debug.adb: Remove use of -gnatd.D.
6256 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6257 * opt.ads: Simplify variables for ALFA mode, to keep one only
6258 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6261 2011-08-05 Vincent Celier <celier@adacore.com>
6263 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6264 Builder'Default_Switches.
6266 2011-08-05 Vincent Celier <celier@adacore.com>
6268 * makeusg.adb: Add lines for --create-map-file switches.
6270 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6272 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6273 profile is incomplete and the full view is available, replace it with
6275 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6276 incomplete, freezing the subprogram is delayed until the full view is
6278 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6279 fixed-point multiplication operator and the predefined operator is
6280 resolved in favor of the user-defined one.
6282 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6284 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6287 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6289 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6290 whether a type lacks user-defined Read or Write operations, or has a
6291 component that lacks them.
6292 * sem_attr.adb (Check_Stream_Attribute): if restriction
6293 No_Default_Stream_Attributes is active, verify that all subcomponent
6294 types of the target have user-defined stream operations, and report
6296 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6297 * exp_strm.adb: Build_Elementary_Input_Call,
6298 Build_Elementary_Write_Call): remove checks for restriction
6299 No_Default_Stream_Attributes, now checked in semantics.
6301 2011-08-04 Vincent Celier <celier@adacore.com>
6303 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6304 switches on the command line, look for all valid --RTS switches in the
6305 Builder switches and for each language use the first runtime name found
6306 to invoke gprconfig.
6307 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6308 command line and there is no auto-configuration.
6309 (Runtime_Name_Set_For): New function.
6311 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6313 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6314 elaborate initialization expression for variable Abort when processing
6315 a package body or a declaration.
6316 (Create_Finalizer): Propagate the package context when creating the
6317 exception-related variables.
6318 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6319 For_Package along with usage comment.
6321 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6323 * gcc-interface/Makefile.in: Clean up targets.
6324 Enable new package for atomic counters and copy-on-write implementation
6325 of unbounded strings on x86 platforms.
6326 * gcc-interface/Make-lang.in: Update dependencies.
6328 2011-08-04 Robert Dewar <dewar@adacore.com>
6330 * exp_ch7.adb: Minor reformatting.
6332 2011-08-04 Robert Dewar <dewar@adacore.com>
6334 * exp_strm.adb: Minor reformatting.
6336 2011-08-04 Vadim Godunko <godunko@adacore.com>
6338 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6339 operations are not supported.
6340 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6341 * s-atocou-x86.adb: New file.
6342 * Makefile.rtl: Add s-atocou.o file
6344 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6346 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6347 (Compilation_Phase): ... here.
6348 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6350 2011-08-04 Thomas Quinot <quinot@adacore.com>
6352 * Make-generated.in: Fix minor typo in comment.
6354 2011-08-04 Thomas Quinot <quinot@adacore.com>
6356 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6359 2011-08-04 Robert Dewar <dewar@adacore.com>
6361 * a-coinho.adb: Minor reformatting.
6363 2011-08-04 Robert Dewar <dewar@adacore.com>
6365 * a-coinho.ads: Minor reformatting.
6367 2011-08-04 Vadim Godunko <godunko@adacore.com>
6369 * s-atocou.ads, s-atocou.adb: New files.
6370 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6371 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6372 direct use of GCC's atomic builtins and replace them by use of new
6373 atomic counter package.
6375 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6377 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6379 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6381 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6382 with a call to Get_External_Tag.
6383 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6384 subprogram usage. Remove the guard against package declarations and
6385 bodies since Build_Cleanup_Statements is no longer invoked in that
6387 (Build_Components): Initialize Tagged_Type_Stmts when the context
6388 contains at least one library-level tagged type.
6389 (Build_Finalizer): New local variables Has_Tagged_Types and
6390 Tagged_Type_Stmts along with associated comments on usage. Update the
6391 logic to include tagged type processing.
6392 (Create_Finalizer): Insert all library-level tagged type unregistration
6393 code before the jump block circuitry.
6394 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6395 (Expand_N_Package_Declaration): Remove the call to
6396 Build_Cleanup_Statements.
6397 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6398 unregister the external tag of a tagged type.
6399 (Processing_Actions): Reimplemented to handle tagged types.
6400 (Process_Declarations): Detect the declaration of a library-level
6401 tagged type and carry out the appropriate actions.
6402 (Unregister_Tagged_Types): Removed. The machinery has been directly
6403 merged with Build_Finalizer.
6405 2011-08-04 Robert Dewar <dewar@adacore.com>
6407 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6408 gnatls.adb, exp_ch3.adb: Minor reformatting.
6410 2011-08-04 Marc Sango <sango@adacore.com>
6412 * sem_attr.adb (Analyze_Attribute): Replace the message
6413 "invisible attribute of}" of the spark restriction violation in
6414 attribute reference by the simple message "invisible attribute of type".
6415 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6416 two insertion characters: '&' and '}'.
6418 2011-08-04 Vadim Godunko <godunko@adacore.com>
6420 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6421 * a-coinho.ads, a-coinho.adb: New file.
6422 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6424 2011-08-04 Nicolas Roche <roche@adacore.com>
6426 * alfa_test.adb: Not all ali files are containing alfa information even
6427 if compiled with -gnatd.F. So suppress warning about missing ALFA
6430 2011-08-04 Yannick Moy <moy@adacore.com>
6432 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6434 * put_alfa.adb: Check that scope name is not empty.
6436 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6438 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6439 Needs_Elementary_Stream_Operation, to determine whether user-defined
6440 Read and Write attributes are available for the elementary components
6441 of the given type. If only the predefined attributes are available,
6442 then when restriction No_Default_Stream_Attributes is active the
6443 predefined stream attributes for the composite type cannot be created.
6445 2011-08-04 Robert Dewar <dewar@adacore.com>
6447 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6448 Put routines in alpha order
6450 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6452 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6453 * gcc-interface/Make-lang.in: Update dependencies.
6455 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6457 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6458 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6461 2011-08-04 Robert Dewar <dewar@adacore.com>
6463 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6464 lib-xref-alfa.adb: Minor reformatting.
6466 2011-08-04 Marc Sango <sango@adacore.com>
6468 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6469 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6470 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6473 2011-08-04 Tristan Gingold <gingold@adacore.com>
6475 * bindgen.adb (Gen_Adainit_C): Remove.
6476 (Gen_Adafinal_C): Ditto.
6477 (Gen_Elab_Externals_C): Ditto.
6478 (Gen_Elab_Calls_C): Ditto.
6479 (Gen_Elab_Order_C): Ditto.
6480 (Gen_Elab_Defs_C): Ditto.
6481 (Gen_Finalize_Library_C): Ditto.
6482 (Gen_Finalize_Library_Defs_C): Ditto.
6483 (Gen_Main_C): Ditto.
6484 (Gen_Output_File_C): Ditto.
6485 (Gen_Restrictions_C): Ditto.
6486 (Gen_Versions_C): Ditto.
6487 (Write_Info_Ada_C): Ditto.
6488 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6489 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6490 Always call Gen_Output_File_Ada.
6491 * gnatlink.adb (Begin_Info): Now a constant.
6493 (Ada_Bind_File): Remove
6494 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6495 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6496 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6497 * opt.ads (Ada_Bind_File): Remove.
6499 2011-08-04 Thomas Quinot <quinot@adacore.com>
6501 * projects.texi: Document target-specific directory in default project
6504 2011-08-04 Thomas Quinot <quinot@adacore.com>
6506 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6509 2011-08-04 Yannick Moy <moy@adacore.com>
6511 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6512 opt.ads, lib-xref.ads: Code clean up.
6514 2011-08-04 Yannick Moy <moy@adacore.com>
6516 * gnat_rm.texi: Update description of Test_Case
6517 * gnat_ugn.texi: Typo.
6519 2011-08-04 Ed Falis <falis@adacore.com>
6521 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6523 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6525 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6526 it is of type Root_Controlled. This action eliminates fields Prev and
6527 Next from type equality.
6529 2011-08-04 Yannick Moy <moy@adacore.com>
6531 * lib-xref-alfa.adb: Correct typo.
6533 2011-08-04 Matthew Heaney <heaney@adacore.com>
6535 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6538 2011-08-04 Yannick Moy <moy@adacore.com>
6540 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6541 (Analyze_Pragma): allow static string expression for name of Test_Case,
6542 instead of simply string literals.
6543 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6546 2011-08-04 Vincent Celier <celier@adacore.com>
6548 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6549 case suffixes to find truncated main sources.
6551 2011-08-04 Tristan Gingold <gingold@adacore.com>
6553 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6554 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6555 (Compute_Current_Task): Ditto.
6557 2011-08-04 Tristan Gingold <gingold@adacore.com>
6559 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6561 2011-08-04 Yannick Moy <moy@adacore.com>
6563 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6564 library-level constant.
6565 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6566 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6567 used as selector of parameter association, in ALFA mode.
6569 2011-08-04 Robert Dewar <dewar@adacore.com>
6571 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6572 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6575 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6577 * make.adb (Linking_Phase): Set source search path before calling
6578 gnatlink in CodePeer mode.
6580 2011-08-04 Javier Miranda <miranda@adacore.com>
6582 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6583 Remove code which takes care of building TSDs.
6584 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6585 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6586 the accessibility check in VM targets.
6587 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6588 (Building_Static_DT): Now returns false for VM targets.
6589 (Build_VM_TSDs): Removed.
6590 (Expand_Interface_Conversion): Generate missing runtime check for
6591 conversions to interface types whose target type is unknown at compile
6593 (Make_VM_TSD): Add missing code to disable the generation of calls to
6594 Check_TSD if the tagged type is not defined at library level, or not
6595 has a representation clause specifying its external tag, or -gnatdQ is
6597 * exp_disp.ads (Build_VM_TSDs): Removed.
6598 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6599 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6600 register primitives in the dispatch tables in VM targets.
6601 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6602 initialization of class-wide interface objects in VM targets.
6603 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6606 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6608 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6609 when dotnet-ld cannot be found.
6611 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6613 * bindgen.adb: Simplify significantly generation of binder body file in
6615 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6616 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6619 2011-08-04 Yannick Moy <moy@adacore.com>
6621 * sem_prag.adb, sem.ads: Code cleanup.
6623 2011-08-04 Tristan Gingold <gingold@adacore.com>
6625 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6626 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6627 results if possible.
6628 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6629 * gnat_ugn.texi: Update dynamic stack usage section.
6631 2011-08-04 Steve Baird <baird@adacore.com>
6633 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6634 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6635 contains only a call to the user-defined main subprogram.
6636 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6637 call the "wrapper" subprogram instead of directly
6638 calling the user-defined main subprogram.
6640 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6642 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6643 alternatives of a case statement for controlled objects. Rename local
6644 variable A to Dead_Alt.
6645 (Expand_N_If_Statement): Check the then and else statements of an if
6646 statement for controlled objects. Check the then statements of all
6647 elsif parts of an if statement for controlled objects.
6648 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6650 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6651 detects a loop associated with the expansion of an array object.
6652 Augment the processing of the loop statements to account for a possible
6653 wrap done by Process_Statements_For_Controlled_Objects.
6654 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6655 statements and abortable part of an asynchronous select for controlled
6657 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6658 conditional entry call for controlled objects.
6659 (Expand_N_Selective_Accept): Check the alternatives of a selective
6660 accept for controlled objects.
6661 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6662 alternatives of a timed entry call for controlled objects.
6663 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6664 exception handler for controlled objects.
6665 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6666 Add formal parameter Nested_Constructs along with its associated
6668 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6669 Requires_Cleanup_Actions.
6670 (Process_Statements_For_Controlled_Objects): New routine.
6671 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6672 routine. Inspect a node which contains a non-handled sequence of
6673 statements for controlled objects. If such an object is found, the
6674 statements are wrapped in a block.
6676 2011-08-04 Bob Duff <duff@adacore.com>
6678 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6679 need to compare with Class_Wide_Type (T2), in order to get at the
6680 original class-wide type node.
6681 * sem_type.ads (Covers): Improve the comment.
6682 * einfo.ads (Class_Wide_Type): Improve the comment.
6683 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6684 the type of the Deref.
6686 2011-08-04 Yannick Moy <moy@adacore.com>
6688 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6689 separate declarations.
6690 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6691 check identifier of pragma argument.
6692 (Chain_TC): check that no other test case associated to the same entity
6693 share the same name.
6694 (Check_Test_Case): disallow test case inside subprogram body
6695 (Analyze_Pragma): correct call to check identifier and not argument
6696 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6697 function gets name from test case pragma.
6699 2011-08-04 Yannick Moy <moy@adacore.com>
6701 * gnat_rm.texi: Document new pragma and aspect.
6702 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6703 (No_Duplicates_Allowed): new constant array defining whether duplicates
6704 aspects of each kind can appear on the same declaration.
6705 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6706 field, which points to a node holding the previous Spec_PPC_List.
6707 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6708 through the indirection with Contract.
6709 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6710 * par-prag.adb (Prag): do nothing on Test_Case pragma
6711 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6713 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6714 component Ensures of Test_Case.
6715 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6716 (Analyze_Generic_Subprogram_Declaration,
6717 Analyze_Subprogram_Instantiation,
6718 Analyze_Abstract_Subprogram_Declaration,
6719 Analyze_Subprogram_Body_Helper,
6720 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6721 insert contract in subprogram node at point of definition
6723 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6724 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6725 corresponding pragma
6726 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6727 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6728 similar to the analysis of pre/post
6729 (Derive_Subprogram): insert contract in subprogram node at point of
6731 * sem_prag.adb, sem_prag.ads
6732 (Check_Arg_Is_String_Literal, Check_Identifier):
6733 new checking procedures to be called in treatment of pragmas
6734 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6735 pragma is well-formed. This does not check currently that 'Result is
6736 used only in the Ensures component of a Test_Case.
6737 (Analyze_Pragma): add case for Test_Case
6738 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6739 components of a Test_Case.
6740 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6741 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6742 pragma, treated as spec expressions.
6743 (Sig_Flags): add value -1 for Test_Case.
6744 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6745 Get_Requires_From_Test_Case_Pragma): getters for both expression
6746 components of a Test_Case.
6747 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6748 indirection between an entry or [generic] subprogram entity and its
6749 pre/post + test-cases.
6750 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6751 get/set for fields of an N_Contract node.
6752 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6753 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6754 names and pragma for Test_Case.
6755 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6757 2011-08-04 Vincent Celier <celier@adacore.com>
6759 * gnat_ugn.texi: Improve documentation of gnatmake switch
6760 --source-info-file=.
6762 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6764 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6765 type). Initialize Atyp to the appropriate type which is later checked
6766 for completion. Rewrite the assertion associated with private type
6769 2011-08-04 Ed Falis <falis@adacore.com>
6771 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6772 initialize the number of CPUs.
6774 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6776 * sem_type.adb (Disambiguate): New subsidiary routine
6777 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6778 equality on an anonymous access type whose designated type is private
6779 does not lead to an ambiguity with the universal access equality
6780 operator in the body or child units of the defining package. The same
6781 is true for a multiplication operator on a private type completed with
6784 2011-08-04 Javier Miranda <miranda@adacore.com>
6786 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6787 (Normalize_Scalars_Config): Removed.
6789 (Register_Opt_Config_Switches): Remove registering config values of
6790 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6791 (Restore_Opt_Config_Switches): Remove code which restores the values of
6792 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6793 Init_Or_Norm_Scalars.
6794 (Save_Opt_Config_Switches): Remove code which saves values of
6795 Init_Or_Norm_Scalars and Normalize_Scalars.
6796 (Set_Opt_Config_Switches): Remove code which restores config values of
6797 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6798 Init_Or_Norm_Scalars.
6800 2011-08-04 Yannick Moy <moy@adacore.com>
6802 * frontend.adb (Frontend): remove previous patch to avoid full
6803 qualification in ALFA mode.
6804 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6805 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6806 unique name for an entity, which could be used to identify the entity
6807 across compilation units.
6809 2011-08-04 Thomas Quinot <quinot@adacore.com>
6812 (Initialize_Default_Project_Path): Add target specific directory
6813 ($prefix/$target/lib/gnat) in front of project path in all cases
6814 (making gnatmake's behaviour consistent with gprbuild).
6815 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6816 Pass target name from Sdefault to project subsystem.
6817 * gnatls.adb: Show new target specific default project directory.
6819 2011-08-04 Johannes Kanig <kanig@adacore.com>
6821 * cstand.adb: Add Information to Identifier in Standard
6822 (Identifer_For): Set Entity to the corresponding entity
6824 2011-08-04 Sergey Rybin <rybin@adacore.com>
6826 * gnat_ugn.texi: Update doc on gnatcheck.
6828 2011-08-04 Yannick Moy <moy@adacore.com>
6830 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6833 2011-08-04 Yannick Moy <moy@adacore.com>
6835 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6836 performing expansion.
6837 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6838 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6839 it is not called in ALFA mode.
6841 2011-08-04 Emmanuel Briot <briot@adacore.com>
6843 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6844 after all, so removed.
6846 2011-08-04 Sergey Rybin <rybin@adacore.com>
6848 * vms_data.ads: Add missing VMS qualifiers.
6850 2011-08-04 Emmanuel Briot <briot@adacore.com>
6852 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6853 the list of files on the command line after processing it through
6856 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6858 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6859 processing for .NET/JVM. These targets can now benefit from
6860 Raise_From_Controlled_Operation and they share the same processing with
6862 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6863 These targets need transient scopes in order to properly finalize short
6864 lived controlled objects.
6865 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6866 NET/JVM. These targets can now benefit from
6867 Raise_From_Controlled_Operation and they share the same processing with
6870 2011-08-04 Geert Bosch <bosch@adacore.com>
6872 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6874 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6876 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6877 Expand_Record_Aggregate, to determine whether aggregate must be
6878 expanded into assignments. This is the case if the ancestor part is
6879 private, regarless of the setting of the flag Has_Private_Ancestor.
6881 2011-08-04 Ed Falis <falis@adacore.com>
6883 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6885 2011-08-04 Bob Duff <duff@adacore.com>
6887 * sinfo.ads: Fix comment.
6889 2011-08-04 Steve Baird <baird@adacore.com>
6891 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6892 choose a package name in much the same way as is
6893 done for JGNAT when VM_Target /= No_VM, except that
6894 a slightly more distinctive prefix string is used.
6896 2011-08-04 Emmanuel Briot <briot@adacore.com>
6898 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6899 gnatmake command line.
6900 This behavior was never documented (and was supported only because of
6901 an early bug in the code). This case might lead to ambiguous cases
6902 (between unit names and truncated base names without suffixes).
6904 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6906 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6907 Remove the external tag of a tagged type from the internal hash table.
6908 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6909 expanded usage of the routine. Strenghten the check for Is_Master. Add
6910 processing for tagged types.
6911 (Build_Finalizer): Create all the necessary lists used in finalizer
6912 creation when the processed context is a package that may contain
6914 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6915 Requires_Cleanup_Actions.
6916 (Expand_N_Package_Body): Package bodies may need clean up code
6917 depending on whether they contain tagged types.
6918 (Expand_N_Package_Declaration): Package declarations may need clean up
6919 code depending on whether they contain tagged types.
6920 (Unregister_Tagged_Types): New routine. Search through a list of
6921 declarations or statements, looking for non-abstract Ada tagged types.
6922 For each such type, generate code to unregister the external tag.
6923 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6924 Requires_Cleanup_Actions.
6925 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6926 through a list of declarations or statements looking for non-abstract
6927 Ada tagged types or controlled objects.
6928 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6929 Requires_Cleanup_Actions.
6930 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6931 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6934 2011-08-04 Vincent Celier <celier@adacore.com>
6936 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6937 has Ada sources, not project Project, because if the root project
6938 Project has no sources of its own, all projects will be deemed without
6941 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6943 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6944 of the No_Param_Proc acc-to-subp type used for initialization of
6945 __gnat_finalize_library_objects so that it's declared at library level
6946 rather than nested inside of the adainit routine.
6948 2011-08-04 Javier Miranda <miranda@adacore.com>
6950 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6951 if the tagged type has a representation clause which specifies its
6954 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6956 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6957 Remove previous procedure with that name.
6958 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6960 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6961 subtype mark, the ancestor cannot have unknown discriminants.
6962 (Resolve_Record_Aggregate): if the type has invisible components
6963 because of a private ancestor, the aggregate is illegal.
6965 2011-08-04 Vincent Celier <celier@adacore.com>
6967 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6968 account switches -gnat2005, -gnat12 and -gnat2012.
6970 2011-08-04 Bob Duff <duff@adacore.com>
6972 * s-tasdeb.ads: Minor comment fix.
6974 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6976 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6978 * switch.ads, switch.adb (Is_Language_Switch): New function.
6980 2011-08-04 Vincent Celier <celier@adacore.com>
6982 * switch-c.adb: Minor comment addition.
6984 2011-08-04 Vincent Celier <celier@adacore.com>
6986 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6987 ending with '=' is followed by a space (missing file name).
6989 2011-08-04 Pascal Obry <obry@adacore.com>
6991 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6993 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6995 * sem_ch12.adb (Analyze_Associations): New routine
6996 Check_Overloaded_Formal_Subprogram to reject a formal package when
6997 there is a named association or a box initialisation for an overloaded
6998 formal subprogram of the corresponding generic.
7000 2011-08-04 Yannick Moy <moy@adacore.com>
7002 * alfa.ads (ALFA_Xref_Record): add component for type of entity
7003 * get_alfa.adb, put_alfa.adb: Read and write new component of
7005 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7007 2011-08-04 Pascal Obry <obry@adacore.com>
7009 * urealp.adb: Minor reformatting.
7011 2011-08-04 Tristan Gingold <gingold@adacore.com>
7013 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7014 Handle the case when Cleanup_Protected_Object returns Empty.
7016 2011-08-04 Yannick Moy <moy@adacore.com>
7018 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7020 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7022 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7023 call, ignore functions.
7025 2011-08-04 Geert Bosch <bosch@adacore.com>
7027 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7030 2011-08-04 Emmanuel Briot <briot@adacore.com>
7032 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7033 as an index for Builder'Switches. This conforms to the documentation.
7034 * make.adb (Insert_Project_Sources): avoid duplicate code
7036 2011-08-04 Emmanuel Briot <briot@adacore.com>
7038 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7039 name on the command line (for instance "../dummy"), never assume it can
7042 2011-08-04 Tristan Gingold <gingold@adacore.com>
7044 * bindgen.adb: Remove code the reference or create the
7045 Break_Start/__gnat_break_start procedure.
7046 * s-stalib.adb (Break_Start): Removed.
7048 2011-08-04 Emmanuel Briot <briot@adacore.com>
7050 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7051 shared with gprbuild.
7053 2011-08-04 Yannick Moy <moy@adacore.com>
7055 * par-ch4.adb (P_Primary): preferentially issue an error message about
7056 a missing parenthesis arount a conditional or case expression in Ada
7057 2012 mode, if we detect that the alignment is not correct for a
7060 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7062 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7063 tag-to-class-wide conversion as needing finalization actions.
7064 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7065 a tag-to-class-wide conversion as needing finalization actions.
7066 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7067 conversion does not need finalization actions.
7068 (Is_Tag_To_CW_Conversion): New routine.
7069 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7070 whether an object is the result of a tag-to-class-wide conversion.
7072 2011-08-04 Yannick Moy <moy@adacore.com>
7074 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7075 the left-hand-side and right-hand-side of a conjunct are inserted when
7076 translating a pre- or postcondition
7077 * sem_ch6.adb: Correct typo in comment
7079 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7081 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7082 Unchecked_Conversion and Unchecked_Deallocation.
7084 2011-08-04 Thomas Quinot <quinot@adacore.com>
7086 * make.adb: Minor reformatting.
7088 2011-08-04 Emmanuel Briot <briot@adacore.com>
7090 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7091 sources in the project and its imported projects, but not in the whole
7094 2011-08-04 Emmanuel Briot <briot@adacore.com>
7096 * make.adb: Remove debug trace.
7098 2011-08-04 Vincent Celier <celier@adacore.com>
7100 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7101 path in canonical form, to be able to compare path names on platforms
7102 such as Windows or Darwin.
7104 2011-08-04 Thomas Quinot <quinot@adacore.com>
7106 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7107 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7108 * scos.ads: Update documentation accordingly.
7109 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7112 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7114 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7115 attribute only if prefix type is scalar.
7117 2011-08-04 Emmanuel Briot <briot@adacore.com>
7119 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7120 in gnatmake for specifying mains on the command line that do not belong
7121 to the main project. These mains must currently all belong to the same
7123 (Ultimate_Extension_Of): removed, since duplicated
7124 Ultimate_Extending_Project.
7126 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7128 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7130 (CodePeer_Mode_String): New.
7131 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7133 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7134 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7135 mode, since no useful elaboration subprogram is needed by CodePeer.
7136 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7137 In this mode, compile binder file with -gnatC and do stop after this
7140 2011-08-04 Vincent Celier <celier@adacore.com>
7142 * exp_ch7.adb: Minor comment fix.
7144 2011-08-04 Robert Dewar <dewar@adacore.com>
7146 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7147 exp_ch4.adb, makeutl.adb: Minor reformatting.
7149 2011-08-04 Emmanuel Briot <briot@adacore.com>
7151 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7152 Create several new subprograms to move code out of Make. This makes the
7153 code more readable, removes code duplication, and is a preparation work
7154 for adding support for aggregate projects.
7156 2011-08-04 Tristan Gingold <gingold@adacore.com>
7158 * s-po32gl.ads, s-po32gl.adb: New files.
7159 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7160 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7161 (Build_Finalization_Collection): Use it.
7162 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7163 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7165 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7166 * gcc-interface/Make-lang.in: Update dependencies.
7168 2011-08-04 Emmanuel Briot <briot@adacore.com>
7170 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7173 2011-08-04 Emmanuel Briot <briot@adacore.com>
7175 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7176 command line is not a file name, also check whether it could be a unit
7179 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7181 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7182 the header of the finalization routine.
7183 If the unit has no finalizer but is a body whose spec has one, then
7184 generate the decrement of the elaboration entity only.
7185 If the unit has a finalizer and is a spec, then do not generate the
7186 decrement of the elaboration entity.
7187 (Gen_Finalize_Library_C): Likewise.
7189 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7191 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7192 (Bounds_Size_Expression): Removed.
7193 (Double_Alignment_Of): New subsidiary routine.
7194 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7195 for a hole in the dope vector of unconstrained arrays due to different
7196 index and element alignments.
7198 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7200 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7201 raise program_error because body has not been seen yet.
7203 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7205 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7208 2011-08-04 Vincent Celier <celier@adacore.com>
7210 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7212 2011-08-04 Yannick Moy <moy@adacore.com>
7214 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7215 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7217 2011-08-04 Thomas Quinot <quinot@adacore.com>
7219 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7220 instantiation in RCI.
7222 2011-08-04 Emmanuel Briot <briot@adacore.com>
7224 * make.adb: Share more code with gprbuild
7226 2011-08-04 Emmanuel Briot <briot@adacore.com>
7228 * projects.texi: Added documentation for the IDE'Gnat project file
7231 2011-08-04 Nicolas Roche <roche@adacore.com>
7233 * gnat_rm.texi: Minor editing.
7235 2011-08-04 Javier Miranda <miranda@adacore.com>
7237 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7238 and the library case for VM targets.
7239 (Gen_Adainit_Ada): Likewise.
7241 2011-08-04 Robert Dewar <dewar@adacore.com>
7243 * g-altive.ads: Minor comment updates.
7244 * prj-nmsc.adb: Minor reformatting.
7246 2011-08-04 Javier Miranda <miranda@adacore.com>
7249 (Normalize_Scalars_Config): Value of the configuration switch set by
7250 pragma Normalize_Scalars when it appears in the gnat.adc file.
7251 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7252 to save and restore settings of this pragma.
7254 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7255 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7257 2011-08-04 Vincent Celier <celier@adacore.com>
7259 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7261 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7263 * makeutl.adb: Minor reformatting.
7265 2011-08-04 Olivier Hainque <hainque@adacore.com>
7267 * g-altive.ads: Update comments to reflect that only the soft
7268 binding is available today.
7270 2011-08-04 Robert Dewar <dewar@adacore.com>
7272 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7273 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7274 * gcc-interface/Make-lang.in: Update dependencies.
7276 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7278 * prj-env.adb: Remove local debug traces.
7280 2011-08-04 Yannick Moy <moy@adacore.com>
7282 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7283 was used instead of Hi_OK, which could cause a read of an uninitialized
7284 value later on. Detected while working on the new warning.
7285 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7287 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7288 in more cases, in order to detect more unreferenced values.
7289 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7290 object for expression, if any.
7292 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7294 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7295 the operand types instead of the Esize.
7297 2011-08-04 Steve Baird <baird@adacore.com>
7299 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7300 enable CodePeer_Mode.
7301 * bindusg.adb (Display): Add help message describing -P binder switch.
7302 * gnat_ugn.texi: Document -P binder switch.
7303 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7304 user-defined main program directly.
7305 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7306 user-defined main program in the context clause of the package body.
7308 2011-08-04 Yannick Moy <moy@adacore.com>
7310 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7311 duplicate of Defining_Entity
7312 (Get_Unique_Entity_For_Decl): rename function into
7313 Unique_Defining_Entity
7314 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7315 (Formal_Proof_On): remove synthesized flag
7316 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7317 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7318 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7319 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7320 Annotate (Formal_Proof)
7322 2011-08-04 Emmanuel Briot <briot@adacore.com>
7324 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7325 source files with non-standard naming schemes, in imported projects
7327 2011-08-04 Emmanuel Briot <briot@adacore.com>
7329 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7330 specified on the gprbuild command line, we need to compile all units
7331 within that file, not just the first one we find
7332 Fix error message for mains that are not found.
7334 2011-08-04 Thomas Quinot <quinot@adacore.com>
7336 * sem_ch6.adb: Update comment.
7337 * sem_ch12.adb: Minor reformatting.
7339 2011-08-04 Bob Duff <duff@adacore.com>
7341 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7342 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7343 race condition whose symptom is to fail to lock Parent. That, in turn,
7344 causes Parent.Awake_Count to be accessed without locking Parent, which
7345 causes another race condition whose symptom is that Parent.Awake_Count
7346 can be off by 1 (either too high or too low). The solution is to lock
7347 Parent unconditionally, and then lock Acceptor, before reading
7348 Acceptor.Terminate_Alternative.
7350 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7352 * debug.adb: Update comment.
7354 2011-08-04 Robert Dewar <dewar@adacore.com>
7356 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7357 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7358 exp_ch6.adb: Minor reformatting.
7360 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7362 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7365 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7367 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7369 2011-08-04 Thomas Quinot <quinot@adacore.com>
7371 * sinfo.ads: Minor reformatting.
7373 2011-08-04 Emmanuel Briot <briot@adacore.com>
7375 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7376 even if there is no location.
7378 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7380 * sem_res.adb, sem_ch4.adb: move check for restriction
7381 No_Task_Hierarchy to resolve_allocator.
7383 2011-08-04 Thomas Quinot <quinot@adacore.com>
7385 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7386 This flag of N_Pragma nodes is not used, remove it as well as all of
7387 the associated circuitry.
7389 2011-08-04 Javier Miranda <miranda@adacore.com>
7391 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7392 runtime check on duplicated externa tags
7393 * debug.adb Document switch -gnatdQ.
7395 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7397 * a-fihema.ads: Minor typo fix.
7399 2011-08-04 Yannick Moy <moy@adacore.com>
7401 * sem_ch10.adb: Minor comment update.
7403 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7405 * einfo.adb: Update the node field usage to reflect the renaming of
7406 Return_Flag to Return_ Flag_Or_Transient_Decl.
7407 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7408 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7409 (Write_Field15_Name): Change Return_Flag to
7410 Return_Flag_Or_Transient_Decl.
7411 * einfo.ads: Rename node field Return_Flag to
7412 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7413 occurrences in entities.
7414 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7415 associated Inline pragma.
7416 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7417 associated Inline pragma.
7418 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7420 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7421 Return_Flag and Set_Return_Flag.
7422 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7423 objects generated for controlled transients declared inside an
7424 Exception_With_Actions. Update the calls to Return_Flag.
7425 (Process_Object_Declaration): Add code to add a null guard for hook
7426 objects generated for controlled transients declared inside an
7427 Exception_With_Actions. Update related comment.
7428 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7429 objects generated for controlled transients declared inside an
7430 Exception_With_Actions. Update the calls to Return_Flag.
7431 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7433 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7435 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7436 positional aggregate.
7438 2011-08-04 Vincent Celier <celier@adacore.com>
7440 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7441 SLOC only for pragmas.
7443 2011-08-04 Emmanuel Briot <briot@adacore.com>
7445 * projects.texi: Minor typo fix.
7447 2011-08-04 Emmanuel Briot <briot@adacore.com>
7449 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7450 on case-sensitive file systems.
7452 2011-08-04 Thomas Quinot <quinot@adacore.com>
7454 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7455 nested in a disabled pragma.
7456 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7457 enclosing pragma, if any, for X decisions.
7459 2011-08-04 Thomas Quinot <quinot@adacore.com>
7461 * sem_prag.adb: Minor reformatting.
7463 2011-08-04 Vincent Celier <celier@adacore.com>
7465 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7466 allowed in no run time mode.
7468 2011-08-04 Vincent Celier <celier@adacore.com>
7470 * make.adb (Check): When -gnatc is used, check for the source file
7471 inside the ALI file with a canonical case file name.
7473 2011-08-04 Emmanuel Briot <briot@adacore.com>
7475 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7476 overriding the separator.
7478 2011-08-04 Robert Dewar <dewar@adacore.com>
7480 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7481 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7483 2011-08-04 Robert Dewar <dewar@adacore.com>
7485 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7487 2011-08-04 Yannick Moy <moy@adacore.com>
7489 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7490 'Result only appears in postcondition of function.
7492 2011-08-04 Thomas Quinot <quinot@adacore.com>
7494 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7495 external tag, include the value of the external tag in the exception
7498 2011-08-04 Yannick Moy <moy@adacore.com>
7500 * sem_attr.adb (Result): modify error message for misplaced 'Result
7502 2011-08-04 Sergey Rybin <rybin@adacore.com>
7504 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7505 clear that the second argument must be an identifier.
7507 2011-08-04 Thomas Quinot <quinot@adacore.com>
7509 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7510 -fpreserve-control-flow, insert an IF statement on the barrier
7511 condition to ensure that a conditional branch instruction is generated.
7513 2011-08-04 Emmanuel Briot <briot@adacore.com>
7515 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7516 (Processing_Flags.Ignore_Missing_With): new flag.
7518 2011-08-04 Emmanuel Briot <briot@adacore.com>
7520 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7521 Source_List_File on case-insensitive systems where the file is actually
7522 on a case-sensitive file system (NFS,...).
7524 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7526 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7527 function return contains a controlled [extension] aggregate and the
7528 return statement is not part of a handled sequence of statements, wrap
7529 the return in a block. This ensures that all controlled temporaries
7530 generated during aggregate resolution will be picked up by the
7531 finalization machinery.
7533 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7535 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7536 components, freeze type before resolution, to ensure that default
7537 initializations are present for all components.
7538 * sem_res.adb (Resolve_Actuals): the designated object of an
7539 accces-to-constant type is a legal actual in a call to an
7540 initialization procedure.
7542 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7544 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7545 N_Unchecked_Type_Conversion to the possible containers of a renamed
7548 2011-08-04 Yannick Moy <moy@adacore.com>
7550 * par-ch13.adb (Aspect_Specifications_Present): recognize
7551 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7552 is issued in Strict mode.
7553 * par.adb: Fix typos in comments.
7555 2011-08-04 Yannick Moy <moy@adacore.com>
7557 * sem_attr.adb (Result): modify error message to take into account Post
7558 aspect when compiling Ada 2012 (or newer) code.
7560 2011-08-04 Nicolas Roche <roche@adacore.com>
7562 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7563 remove need for GCC exceptions.
7565 2011-08-04 Vincent Celier <celier@adacore.com>
7567 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7568 project, not the source file name.
7569 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7570 excluded, continue looking. This excluded source will only be returned
7571 if there is no other source with the same base name that is not locally
7574 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7576 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7577 private and one of the operands is a real literal, use a qualified
7578 expression rather than a conversion which is not meaningful to the
7581 2011-08-04 Yannick Moy <moy@adacore.com>
7583 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7584 corresponding aspect X'Class are allowed, proceed with analysis of the
7585 aspect instead of skipping it.
7587 2011-08-04 Tristan Gingold <gingold@adacore.com>
7589 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7590 This will allow to have an Ada implementation for the subprogram.
7592 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7594 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7595 completion and aspects are present, apply them to the entity for the
7596 type which is currently the partial view, but which is the one that
7598 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7599 applies to a partial view, indicate that the full view has predicates
7600 and delayed aspects.
7601 (Replace_Type_Reference): Handle properly predicates that apply to the
7602 full view of a private completion.
7604 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7606 * layout.adb (Layout_Type): For composite types, do not set Esize.
7607 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7609 (Size_Known): Look at the RM size of components instead of the Esize.
7610 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7611 issue warning and activate Implicit_Packing.
7612 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7613 if the Esize is not known.
7614 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7615 for elementary types only.
7616 (Analyze_Record_Representation_Clause): Look at the RM size instead
7617 of the Esize to issue errors.
7618 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7620 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7622 Look at the RM size instead of the Esize for types if the latter is
7624 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7626 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7628 * sem_type.adb: proper handling of equality not involving anonymous
7631 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7633 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7634 Vis_Decls. When creating a library-level finalizer for a package spec,
7635 both the declaration and body of the finalizer are inserted either in
7636 the visible or private declarations of the package spec.
7638 2011-08-04 Javier Miranda <miranda@adacore.com>
7640 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7641 use of the full-view of a type when invoking Is_Ancestor.
7642 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7643 the full-view of private parents is requested, then use also the
7644 full-view of the parent of the first derivation.
7646 2011-08-04 Tristan Gingold <gingold@adacore.com>
7648 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7649 instead of the locally imported procedure.
7650 * s-taprop-mingw.adb (Enter_Task): Ditto.
7651 * s-valrea.adb (Scan_Real): Ditto.
7652 * s-imgrea.adb (Set_Image_Real): Ditto.
7653 * s-flocon.ads: Make the package pure.
7655 2011-08-04 Thomas Quinot <quinot@adacore.com>
7657 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7658 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7659 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7660 New subprogram, moved here from...
7661 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7662 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7663 rewriting of the last argument into a procedure call statement here...
7664 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7667 2011-08-04 Thomas Quinot <quinot@adacore.com>
7669 * par_sco.adb: Minor reformatting.
7671 2011-08-04 Robert Dewar <dewar@adacore.com>
7673 * erroutc.adb: Minor reformatting.
7675 2011-08-04 Thomas Quinot <quinot@adacore.com>
7677 * par_sco.adb: Comment update.
7679 2011-08-04 Tristan Gingold <gingold@adacore.com>
7681 * s-flocon.ads: New file.
7682 * g-flocon.ads: Now a renaming of s-flocon.
7683 * Makefile.rtl: Add s-flocon.o
7685 2011-08-04 Javier Miranda <miranda@adacore.com>
7687 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7688 constrained, do not attempt to build a subtype of it.
7690 2011-08-04 Yannick Moy <moy@adacore.com>
7692 * errout.ads Change comments: remove 'R'M as an example where quotes
7693 are needed; add ALFA as another case where quotes are not needed
7694 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7695 case where quotes are not needed.
7696 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7697 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7698 Remove all occurrences of 'A'L'F'A
7700 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7702 * sem_ch13.adb: check legality of invariant pragma.
7704 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7706 * bindgen.adb: Add comments.
7708 2011-08-04 Yannick Moy <moy@adacore.com>
7710 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7712 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7713 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7715 2011-08-04 Robert Dewar <dewar@adacore.com>
7717 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7718 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7719 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7721 2011-08-04 Thomas Quinot <quinot@adacore.com>
7723 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7725 2011-08-04 Thomas Quinot <quinot@adacore.com>
7728 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7731 2011-08-04 Robert Dewar <dewar@adacore.com>
7733 * einfo.ads, exp_ch4.adb: Minor reformatting.
7735 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7737 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7739 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7741 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7742 type in all cases to compute list of primitive operations, because full
7743 view may be an itype that is not attached to the list of declarations.
7745 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7747 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7748 library has already been finalized.
7749 (Gen_Adafinal_C): Likewise.
7750 (Gen_Adainit_Ada): Generate an early return if the library has
7751 already been elaborated.
7752 (Gen_Adainit_C): Likewise.
7753 (Gen_Output_File_Ada): Generate an elaboration flag.
7754 (Gen_Output_File_C): Likewise.
7756 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7758 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7759 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7760 built in the first place.
7761 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7762 for CodePeer because Finalize_Address was not built to begin with.
7763 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7765 2011-08-04 Pascal Obry <obry@adacore.com>
7767 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7768 filenames, this ensures unicity of filenames across processes.
7770 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7772 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7773 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7774 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7775 Add False as the actual to From_Abort in the generated call to
7776 Raise_From_Controlled_Operation.
7778 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7780 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7781 so that the ali file name can be retrieved from outside of this package.
7782 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7783 doing nothing in the general case, but used to update the object file
7784 timestamp if directly generated by the backend.
7785 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7786 to a later time than the ali file one.
7788 2011-08-04 Yannick Moy <moy@adacore.com>
7790 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7791 entities whose body contains an Annotate pragma which forces formal
7793 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7794 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7795 Mark_Non_ALFA_Subprogram to pass in a message and node.
7796 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7797 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7798 surrounding subprogram.
7799 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7800 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7801 as not in ALFA is annotated with Formal_Proof being On, then an error
7802 is issued based on the additional parameters for message and node.
7803 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7804 * gcc-interface/Make-lang.in: Update dependencies.
7806 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7808 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7809 Finalize_Address when CodePeer is enabled.
7811 2011-08-04 Pascal Obry <obry@adacore.com>
7813 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7814 the latter returns a pointer to a static buffer which is deallocated
7815 at the end of the routine.
7817 2011-08-04 Yannick Moy <moy@adacore.com>
7819 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7820 after index creation; mark unconstrained base array type generated as
7821 being in/not in ALFA as well
7822 (Make_Index): mark subtype created as in/not in ALFA
7823 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7824 over a loop as in/not in ALFA, depending on its type and form of loop
7827 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7829 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7830 directly to False on .NET and JVM.
7832 2011-08-04 Yannick Moy <moy@adacore.com>
7834 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7835 constraint that subtype must come from source code to be in ALFA, so
7836 that anonymous subtypes can be in ALFA too.
7838 2011-08-04 Yannick Moy <moy@adacore.com>
7840 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7841 reference for ALFA mode.
7842 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7843 procedure public so as to use it from formal verification back-end.
7845 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7847 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7848 invalid checks of the Parameter, making Remove_Switch not working
7851 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7853 * targparm.ads: Update header: no run-time exception is needed on this
7856 2011-08-04 Vincent Celier <celier@adacore.com>
7858 * a-fihema.adb: Use System.IO instead of GNAT.IO
7860 2011-08-04 Thomas Quinot <quinot@adacore.com>
7862 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7863 are forbidden in Compiler_Unit mode.
7865 2011-08-04 Robert Dewar <dewar@adacore.com>
7867 * sem_util.adb: Minor reformatting.
7869 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7871 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7872 library-level finalizers.
7873 (Gen_Finalize_Library_C): Update the import string for library-level
7875 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7876 library-level finalizer.
7877 * exp_ch7.adb: Remove with and use clauses for Stringt.
7878 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7879 Spec_Decl. Add local variable Body_Id. The names of library-level
7880 finalizers are now manually fully qualified and are no longer external.
7881 A single name is now capable of servicing .NET, JVM and non-VM targets.
7882 Pragma Export is no longer required to provide visibility for the name.
7883 (Create_Finalizer_String): Removed.
7884 (New_Finalizer_Name): New routine which mimics New_..._Name.
7886 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7888 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7889 elaboration counter to Standard_Short_Integer.
7890 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7891 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7892 (Gen_Elab_Externals_C): Likewise.
7894 2011-08-04 Ed Falis <falis@adacore.com>
7896 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7897 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7898 system-vxworks-mips.ads, system-vxworks-x86.ads
7899 (Always_Compatible_Rep): set to False for all VxWorks targets.
7901 2011-08-04 Robert Dewar <dewar@adacore.com>
7903 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7904 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7905 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7906 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7907 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7908 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7909 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7910 Minor reformatting and code reorganization.
7912 2011-08-04 Emmanuel Briot <briot@adacore.com>
7914 * projects.texi: Added doc for aggregate projects.
7916 2011-08-04 Emmanuel Briot <briot@adacore.com>
7918 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7919 Add support for overriding the Project_Path in aggregate projects.
7921 2011-08-04 Robert Dewar <dewar@adacore.com>
7923 * a-cofove.ads: Minor reformatting.
7925 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7927 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7928 on the generated code.
7929 (Build_Finalize_Statements): Update the comment on the generated code.
7930 (Build_Initialize_Statements): Update the comment on the generated code.
7931 (Build_Object_Declarations): Add local variable Result. The object
7932 declarations are now built in sequence.
7933 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7936 2011-08-04 Robert Dewar <dewar@adacore.com>
7938 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7940 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7942 * einfo.ads (Elaboration_Entity): Document new definition and use.
7943 (Elaboration_Entity_Required): Adjust to above change.
7944 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7945 * exp_ch12.adb: And with and use for Snames.
7946 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7947 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7948 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7949 <Check_Unit_Name>: Deal with N_Expanded_Name.
7950 <Attribute_Elaborated>: Extend to all unit names.
7951 * sem_elab.adb: And with and use for Uintp.
7952 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7953 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7954 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7955 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7956 from Gen_Adainit_Ada.
7957 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7958 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7959 case, do not call System.Standard_Library.Adafinal; instead call
7960 finalize_library if needed.
7961 (Gen_Adafinal_C): Likewise.
7962 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7963 non-main program case.
7964 (Gen_Adainit_C): Generate a couple of external declarations here.
7965 In the main program case, set SSL.Finalize_Library_Objects.
7966 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7967 (Gen_Elab_Calls_C): Likewise.
7968 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7969 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7970 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7972 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7973 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7975 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7976 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7977 of external declarations. Call Gen_Finalize_Library_C.
7979 2011-08-04 Emmanuel Briot <briot@adacore.com>
7981 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7982 Compute_Compilation_Phases): new subprogram.
7983 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7984 The number of mains as well as the various compilation phases that
7985 need to be run are now project tree specific, since various
7986 aggregated trees might have different requirements. In particular,
7987 they do not all require bind or link phases.
7989 2011-08-04 Emmanuel Briot <briot@adacore.com>
7991 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7992 (Project_Tree_Appdata): New type.
7993 It is now possible to associate application-specific data to a project
7994 tree. In particular, this is used in the gprbuild builder to avoid a
7995 number of global tables and htables, especially now that there can be
7996 several project trees loaded at once because of aggregate projects.
7997 (Debug_Name): new procedure.
7998 * projects.texi: Clarify syntax of "**" for Source_Dirs
8000 2011-08-03 Emmanuel Briot <briot@adacore.com>
8002 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8003 the "roots" for a main.
8004 (Fill_From_Project): add support for aggregate projects. Main units
8005 in aggregated projects are now automatically added in the list of
8006 files to build (although this fails later on in gprbuild, because
8007 these files are not using the root proejct tree, so this needs
8009 * gcc-interface/Make-lang.in: Update dependencies.
8011 2011-08-03 Yannick Moy <moy@adacore.com>
8013 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8014 conditional expression in ALFA.
8015 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8016 expressions as not in ALFA.
8018 2011-08-03 Robert Dewar <dewar@adacore.com>
8020 * a-cofove.adb: Minor reformatting.
8022 2011-08-03 Emmanuel Briot <briot@adacore.com>
8024 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8025 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8027 These packages are more logically placed in the Queue package, since
8028 they manipulate the queue. It is also likely that they can be adapted
8029 for gnatmake, thus sharing more code.
8030 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8031 that we could move the above.
8033 2011-08-03 Emmanuel Briot <briot@adacore.com>
8035 * errutil.adb (Finalize): clean up the list of error messages on exit.
8036 Calling this subprogram multiple times will no longer show duplicate
8037 error messages on stderr.
8039 2011-08-03 Emmanuel Briot <briot@adacore.com>
8041 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8042 Getopt_Switches when we have already define a command line
8045 2011-08-03 Yannick Moy <moy@adacore.com>
8047 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8048 in ALFA. Instead, they are considered as assertions to prove.
8049 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8050 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8051 if they have no ELSE part, or if they occur in pre- and postconditions,
8052 where the Condition cannot have side-effects in ALFA
8053 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8054 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8055 Instead, include type conversion between scalar types in ALFA.
8056 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8057 if-and-only-if its type is in ALFA.
8059 2011-08-03 Thomas Quinot <quinot@adacore.com>
8061 * scos.adb, get_scos.adb, put_scos.adb
8062 New code letter for decisions: G (entry guard)
8064 (Traverse_Subprogram_Body): Rename to...
8065 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8066 (Traverse_Protected_Body): New subprogram
8067 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8068 protected bodies and entry bodies.
8070 2011-08-03 Yannick Moy <moy@adacore.com>
8072 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8073 entities with get/set subprograms, which is set on procedure entities
8074 generated by the compiler for a postcondition.
8075 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8076 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8077 entity for a declaration
8078 (Get_Unique_Entity_For_Decl): new function returning an entity which
8079 represents a declaration, so that matching spec and body have the same
8082 2011-08-03 Robert Dewar <dewar@adacore.com>
8084 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8085 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8087 2011-08-03 Yannick Moy <moy@adacore.com>
8089 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8090 library-level because retriction No_Implicit_Dynamic_Code in the
8091 front-end prevents its definition as a local subprogram
8092 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8093 for reuse in other contexts
8094 (Traverse_Declarations_Or_Statements,
8095 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8096 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8097 procedures take a callback parameter to be called on all declarations
8099 (Traverse_All_Compilation_Units): new generic function to traverse a
8100 compilation unit and call a callback parameter on all declarations
8102 2011-08-03 Javier Miranda <miranda@adacore.com>
8104 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8105 in Java since they are always enclosed in a namespace that
8106 differentiates them, and overloaded entities are supported by the VM.
8108 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8110 * checks.adb (Determine_Range): If a computed bound of an operation is
8111 outside the range of the base type of the expression, and overflow
8112 checks are enabled, the result is unknown and cannot be used for any
8113 subsequent constant folding.
8114 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8115 unknown, so is the result of the comparison.
8117 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8119 * a-except-2005.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-2005.ads (Raise_From_Controlled_Operation): Add new formal
8124 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8125 From_Abort. When finalization was triggered by an abort, propagate
8126 Standard'Abort_Signal rather than Program_Error.
8127 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8129 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8130 Abort_Id. Update the calls to Build_Object_Declarations and
8131 Build_Raise_Statement to include Abort_Id.
8132 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8133 calls to Build_Object_Declarations and Build_Raise_Statement to include
8135 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8136 calls to Build_Object_Declarations and Build_Raise_Statement to include
8138 (Build_Components): Create an entity for Abort_Id when exceptions are
8139 allowed on the target.
8140 (Build_Finalizer): New local variable Abort_Id.
8141 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8142 calls to Build_Object_Declarations and Build_Raise_Statement to include
8144 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8145 declaration of flag Abort_Id to preserve the original abort status
8146 before finalization code is executed.
8147 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8148 runtime routine Raise_From_Controlled_Operation.
8149 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8150 Abort_Id. Update the call to Build_Object_Declarations to include
8151 Abort_Id. Update the layout of the finalizer body.
8152 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8153 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8154 clunky code to create all flags and objects related to
8155 exception propagation and replace it with a call to
8156 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8158 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8159 Add new formal Abort_Id and associated comment on its use.
8160 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8162 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8163 Remove the clunky code to create all flags and objects related to
8164 exception propagation and replace it with a call to
8165 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8167 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8169 * s-tassta.adb: Fix minor typos.
8171 2011-08-03 Robert Dewar <dewar@adacore.com>
8173 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8174 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8176 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8178 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8179 to packages. This ensures that the finalizer body will not end up
8180 inside the freeze node.
8181 (Process_Declarations): Add code to detect whether a freeze node has a
8182 nested finalization collection.
8184 2011-08-03 Pascal Obry <obry@adacore.com>
8186 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8187 (Current_Session): Return a not null access to Session_Type.
8188 (Default_Session): Likewise.
8190 2011-08-03 Robert Dewar <dewar@adacore.com>
8192 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8193 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8195 2011-08-03 Pascal Obry <obry@adacore.com>
8197 * g-awk.ads: Minor comment fix.
8199 2011-08-03 Sergey Rybin <rybin@adacore.com>
8201 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8202 the tree structure related to discriminant constraints.
8203 Original_Discriminant cannot be used any more for computing the
8204 defining name for the reference to a discriminant.
8206 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8208 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8209 function is not visibly tagged, this is not a dispatching call and
8210 therfore is not Tag_Indeterminate, even if the function is marked as
8211 dispatching on result.
8213 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8215 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8216 (Expand_N_Free_Statement): Add a guard to protect against run-times
8217 which do not support controlled types.
8218 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8219 against run-times which do not support controlled types.
8220 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8221 against run-times which do not support controlled types.
8222 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8223 against run-times which do not support controlled types.
8224 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8225 protect against run-times which do not support controlled types.
8227 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8229 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8230 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8232 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8234 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8235 modified in the source, to prevent spurious warnings when compiling
8238 2011-08-03 Thomas Quinot <quinot@adacore.com>
8240 * a-except-2005.adb: Minor reformatting.
8242 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8244 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8245 is a renaming declaration in the private part of a package, do not emit
8246 a warning that the with_clause could be moved because the renaming may
8247 be used in the body or in a child unit.
8249 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8251 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8252 Propagate the Comes_From_Source attribute from the original return
8253 object to the renaming.
8255 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8257 * exp_ch7.adb (Build_Raise_Statement): Do not call
8258 Raise_From_Controlled_Operation when this routine is not present in
8259 the run-time library.
8260 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8261 libraries (Ravenscar), tasks are non-terminating, and protected objects
8262 and tasks can only appear at library level, so we do not want
8263 finalization of protected objects nor tasks.
8264 * exp_intr.adb: Minor clarification in comment.
8265 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8266 Gen_Output_File_C): Remove references to finalization of library-level
8267 objects when using restricted run-time libraries.
8269 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8271 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8272 Original_Discriminant only if the parent type is a generic formal.
8274 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8276 * exp_ch13.adb: Add with and use clause for Targparm;
8277 (Expand_N_Free_Statement): Prevent the generation of a custom
8278 Deallocate on .NET/JVM targets since this requires pools and address
8280 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8281 .NET/JVM targets, attach the newly allocated object to the access
8282 type's finalization collection. Do not generate a call to
8283 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8284 exist in the runtime.
8285 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8286 create a custom Allocate for object that do not require initialization.
8287 Attach a newly allocated object to the access type's finalization
8288 collection on .NET/JVM.
8289 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8290 assignment of controlled types on .NET/JVM. The two hidden pointers
8291 Prev and Next and stored and later restored after the assignment takes
8293 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8294 kludge for .NET/JVM to recognize a particular piece of code coming from
8295 Heap_Management and change the call to Finalize into Deep_Finalize.
8296 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8297 finalization collections on .NET/JVM only for types derived from
8298 Controlled. Separate the association of storage pools with a collection
8299 and only allow it on non-.NET/JVM targets.
8300 (Make_Attach_Call): New routine.
8301 (Make_Detach_Call): New routine.
8302 (Process_Object_Declarations): Suppress the generation of
8303 build-in-place return object clean up code on .NET/JVM since it uses
8305 * exp_ch7.ads (Make_Attach_Call): New routine.
8306 (Make_Detach_Call): New routine.
8307 * exp_intr.adb Add with and use clause for Targparm.
8308 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8309 on .NET/JVM targets.
8310 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8311 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8312 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8313 names used in finalization.
8315 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8317 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8318 (Attach, Detach): Lock the current task when chaining an object onto a
8321 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8323 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8324 Rewritten to create the message strings when the exception is not
8325 raised by an abort during finalization.
8326 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8327 Raise_From_Controlled_Operation and update its associated comment.
8328 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8329 Ada.Finalization.Heap_Management provides key functionality
8330 associated with controlled objects on the heap, their creation,
8331 finalization and reclamation. Type Finalization_Collection is
8332 effectively a wrapper which sits ontop of a storage pool and performs
8333 all necessary bookkeeping for all the objects it contains. Each
8334 access-to-controlled or access-to-class-wide type receives a collection
8335 as part of its expansion. The compiler generates buffer code and
8336 invokes Allocate / Deallocate to create and destroy allocated
8338 * a-finali.adb ("="): Removed.
8339 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8340 fields Prev and Next.
8341 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8342 A library unit with at least one controlled object on the library level
8343 has a special finalizer which is invoked by the binder. To signal this,
8344 ali files carry field PF.
8345 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8346 associated comment on field usage.
8347 * a-tags.adb (Get_RC_Offset): Removed.
8348 (Needs_Finalization): New routine.
8349 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8350 Dispatch tables now carry field Needs_Finalization which provides
8351 runtime indication whether a type is controlled or has controlled
8352 components or both. Remove field RC_Offset.
8353 (Get_RC_Offset): Removed along with its associated pragma Export.
8354 Since tagged types with controlled components no longer carry hidden
8355 field _controller, the special mechanism to retrieve its location is no
8357 (Needs_Finalization): New routine.
8358 * atree.ads, atree.adb (Elist24): New routine.
8359 (Set_Elist24): New routine.
8360 * atree.h: Add a define clause for Elist24.
8361 * bindgen.adb New library-level variable Lib_Final_Built.
8362 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8363 presence of a VM target, the routine generates calls to the proper
8364 library finalization routine.
8365 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8366 targets. Set the correct library finalization routine depending on
8367 whether the library has controlled objects or this is a VM compilation.
8368 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8369 to library-level finalizers of compiled units in reverse order of
8370 elaboration. It also produces exception management code and reraises a
8371 potential exception after all units have been finalized.
8372 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8373 library-level finalizers of compiled units in reverse order of
8375 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8376 definitions of all library-level finalizers available to the compilation
8377 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8379 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8380 System.Standard_Library.Adafinal directly. If the library needs
8381 finalization actions, create the sequence of finalization calls.
8382 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8383 Generate a with clause for System.Soft_Links when compiling for a VM.
8384 Remove the code which imports System.Standard_Library.Adafinal as
8385 Do_Finalize. Generate the library finalization routine.
8386 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8387 If the library needs finalization actions, create all the definitions
8388 of library- level finalizers.
8389 (Has_Finalizer): New routine. Determines whether at least one compiled
8390 unit has a library-level finalizer.
8391 Add type Qualification_Mode.
8392 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8393 * einfo.adb: New usage of field 15 as Return_Flag.
8394 Remove Finalization_Chain_Entity from the usages of field 19.
8395 Remove Associated_Final_Chain from the usages of field 23.
8396 New usage of field 23 as Associated_Collection.
8397 New usage of field 24 as Finalizer.
8398 New usage of flag 252 as Is_Processed_Transient.
8399 (Associated_Final_Chain): Removed.
8400 (Associated_Collection): New routine.
8401 (Finalization_Chain_Entity): Removed.
8402 (Finalizer): New routine.
8403 (Is_Finalizer): New routine.
8404 (Is_Processed_Transient): New routine.
8405 (Return_Flag): New routine.
8406 (Set_Associated_Final_Chain): Removed.
8407 (Set_Associated_Collection): New routine.
8408 (Set_Finalization_Chain_Entity): Removed.
8409 (Set_Finalizer): New routine.
8410 (Set_Is_Processed_Transient): New routine.
8411 (Set_Return_Flag): New routine.
8412 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8414 (Write_Field8_Name): Alphabetize the output.
8415 (Write_Field11_Name): Alphabetize the output.
8416 (Write_Field12_Name): Alphabetize the output.
8417 (Write_Field13_Name): Alphabetize the output.
8418 (Write_Field14_Name): Alphabetize the output.
8419 (Write_Field15_Name): Alphabetize the output.
8420 (Write_Field16_Name): Alphabetize the output.
8421 (Write_Field17_Name): Alphabetize the output.
8422 (Write_Field18_Name): Alphabetize the output.
8423 (Write_Field19_Name): Alphabetize the output. Remove the output of
8424 Finalization_Chain_Entity.
8425 (Write_Field20_Name): Alphabetize the output.
8426 (Write_Field21_Name): Alphabetize the output.
8427 (Write_Field22_Name): Alphabetize the output.
8428 (Write_Field23_Name): Alphabetize the output. Remove the output of
8429 Associated_Final_Chain. Add output for Associated_Collection.
8430 (Write_Field24_Name): Alphabetize the output.
8431 (Write_Field25_Name): Add output for Finalizer.
8432 (Write_Field26_Name): Alphabetize the output.
8433 (Write_Field27_Name): Alphabetize the output.
8434 (Write_Field28_Name): Alphabetize the output.
8435 * einfo.ads: Add new field description for Associated_Collection and
8437 Remove Associated_Final_Chain and its uses in nodes.
8438 Remove Finalization_Chain_Entity and its uses in nodes.
8439 Add new field description for Finalizer and its uses in nodes.
8440 Add new synthesized attribute Is_Finalizer.
8441 Add new flag description for Is_Processed_Transient and its uses in
8443 Add new field description for Return_Flag and its uses in nodes.
8444 (Associated_Final_Chain): Removed along with its pragma Inline.
8445 (Associated_Collection): New routine and pragma Inline.
8446 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8447 (Finalizer): New routine and pragma Inline.
8448 (Is_Finalizer): New routine and pragma Inline.
8449 (Is_Processed_Transient): New routine and pragma Inline.
8450 (Return_Flag): New routine and pragma Inline.
8451 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8452 (Set_Associated_Collection): New routine and pragma Inline.
8453 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8454 (Set_Finalizer): New routine and pragma Inline.
8455 (Set_Is_Processed_Transient): New routine and pragma Inline.
8456 (Set_Return_Flag): New routine and pragma Inline.
8457 * exp_aggr.adb: Alphabetize subprograms.
8458 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8459 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8460 associated comments. Remove local variables External_Final_List and
8462 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8463 Ancestor. Remove the retrieval of finalization lists. Update the call to
8465 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8466 lists. Update the call to Late_Expansion.
8467 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8468 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8469 (Gen_Assign): Remove the retrieval of the finalization list used to
8470 build the assignment. Update the calls to Make_Init_Call and
8472 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8473 Remove the mechanism to determine attachment levels and finalization
8474 list retrieval. Remove the processing for coextensions.
8475 (Init_Controller): Removed. Controllers no longer exist.
8476 (Late_Expansion): Remove formals Flist and Obj along with their
8477 associated comments. Update the calls to Build_Record_Aggr_Code and
8478 Build_Array_Aggr_Code.
8479 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8480 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8481 appear in entry bodies, protected subprograms and task bodies.
8482 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8483 * exp_ch3.adb (Add_Final_Chain): Removed.
8484 (Build_Array_Init_Proc): Alphabetize local variables.
8485 (Build_Assignment): Alphabetize local variables. Update the call to
8487 (Build_Class_Wide_Master): Rename local variables to better reflect
8489 (Build_Discriminant_Assignments): Code reformatting.
8490 (Build_Init_Call_Thru): Code reformatting.
8491 (Build_Init_Procedure): Code reformatting. Generate a special version
8492 of Deep_Finalize which is capable of finalizing all initialized
8493 components and ignore the rest.
8494 (Build_Init_Statements): Rename local variables to better reflect their
8496 Reimplement the mechanism to include the creation and update of an index
8497 variable called a "counter". It is used as a bookmark for tracing
8498 initialized and non-initialized components.
8499 (Build_Initialization_Call): Remove local variable Controller_Typ.
8500 Alphabetize all local variables. Remove the initialization of the
8501 record controller and update the call to Make_Init_Call.
8502 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8503 New local variable Counter.
8504 (Constrain_Array): Alphabetize.
8505 (Expand_Freeze_Array_Type): Create a collection instead of a
8507 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8508 Finalize_Address which is used in conjunction with allocated controlled
8510 (Expand_N_Object_Declaration): Remove the creation of a finalization
8511 list for anonymous access types. Update the calls to Make_Init_Call and
8513 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8514 retrieval of finalization lists. Remove the expansion of the record
8515 controller. Create TSS primitive Finalize_Address used in conjunction
8516 with controlled objects on the heap. Create finalization collections
8517 for access-to-controlled record components.
8518 (Expand_Record_Controller): Removed.
8519 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8520 class-wide types now requires additional processing. Create
8521 finalization collections for access-to-controlled types.
8522 (Increment_Counter): New routine.
8523 (Make_Counter): New routine.
8524 (Make_Eq_If): Remove the mention of Name_uController.
8525 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8526 types coming from System.Finalization_Root.
8527 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8528 (Predefined_Primitive_Bodies): There is no longer need to skip types
8529 coming from System.Finalization_Root.
8530 (Stream_Operation_OK): Do not generate stream routines for
8531 type Ada.Finalization.Heap_Management.Finalization_Collection.
8532 * exp_ch3.ads: Alphabetize subprograms.
8533 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8534 Add with and use clause for Lib.
8535 (Complete_Coextension_Finalization): Removed.
8536 (Complete_Controlled_Allocation): New routine. Create a finalization
8537 collection for anonymous access-to-controlled types. Create a custom
8538 Allocate which interfaces with the back end and the machinery in
8540 (Expand_Allocator_Expression): Add necessary calls to
8541 Complete_Controlled_Allocation. Remove the retrieval of finalization
8542 lists. Update the calls to Make_Adjust_Call. Generate a call to
8543 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8544 the associated collection.
8545 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8546 Code clean up. Remove the retrieval of finalization lists and
8548 Update the call to Make_Init_Call. Generate a call to
8549 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8550 the associated collection.
8551 (Get_Allocator_Final_List): Removed. Finalization lists are not
8553 (Suitable_Element): Remove the mention of Name_uController.
8554 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8555 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8556 the left hand side, carry out the assignment and adjust the left hand
8558 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8559 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8560 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8561 BIP_Collection and BIPcollection.
8562 (Build_Heap_Allocator): New routine used to allocate the return object
8563 of a build-in-place function onto a collection.
8564 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8565 (Expand_Call): Do not replace direct calls to Deep routines with their
8567 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8568 and update their occurrences. Add a special return flag to monitor the
8569 [ab]normal execution of the function. The flag is set right before the
8571 Rewrite the mechanism used to allocate a build-in-place return object
8572 on the heap or on a storage pool.
8573 (Is_Direct_Deep_Call): New routine.
8574 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8575 build-in-place function call instead of a final list. Build a call to
8576 Set_Finalize_Address_Ptr to decorate the associated collection.
8577 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8578 order to name the build-in-place function call's result for later
8579 finalization. Add a collection to a build-in-place function call
8580 instead of a final list.
8581 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8582 build-in-place function call instead of a final list. Remove the code
8583 which moves one final list and transforms it into the actual in a
8584 nested build-in-place call.
8585 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8586 build-in-place function call instead of a final list.
8587 (Move_Final_List): Removed.
8588 (Needs_BIP_Collection): New routine.
8589 (Needs_BIP_Final_List): Removed.
8590 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8591 enumeration type BIP_Formal_Kind.
8592 Update the related comment.
8593 (Needs_BIP_Collection): New routine.
8594 (Needs_BIP_Final_List): Removed.
8595 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8596 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8597 majority of subprograms in this unit. Add Name_Finalize_Address to
8598 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8599 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8600 statements for an array type.
8601 (Build_Adjust_Statements): Create the adjust statements for a record
8603 (Build_Cleanup_Statements): New routine. A procedure which given any
8604 construct containing asynchronous calls, references to _master, or is a
8605 task body, a task allocation or a protected body produces the necessary
8606 runtime calls to clean up these constructs.
8607 (Build_Exception_Handler): New routine.
8608 (Build_Final_List): Removed.
8609 (Build_Finalization_Collection): New routine. A core procedure which
8610 creates a collection to service heap allocated controlled objects
8611 associated with an access-to-controlled type.
8612 (Build_Finalize_Statements): Create the finalization statements for a
8614 (Build_Finalizer): New routine. A core procedure which given any
8615 construct with declarations and/or statements detects all objects which
8616 need any type of clean up (controlled objects, protected objects) and
8617 generates all necessary code to clean up the said objects in the proper
8619 (Build_Finalizer_Call): New routine.
8620 (Build_Initialize_Statements): Create the initialization statements for
8621 an array type. The generated routine contains code to finalize partially
8623 (Build_Object_Declarations): New routine.
8624 (Build_Raise_Statement): New routine.
8625 (Clean_Simple_Protected_Objects): Removed.
8626 (Controller_Component): Removed.
8627 (Enclosing_Function): New routine.
8628 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8629 either declarations or statements or both.
8630 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8631 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8633 (Find_Final_List): Removed.
8634 (Global_Flist_Ref): Removed.
8635 (In_Finalization_Root): Removed.
8636 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8637 scope in terms of tree nodes. Process all transient variables within
8639 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8640 generated after the adjust.
8641 (Make_Attach_Call): Removed.
8642 (Make_Call): New routine.
8643 (Make_Clean): Removed.
8644 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8646 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8648 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8650 (Make_Final_Call): Modified to simply create a call to either
8651 Deep_Finalize or Finalize.
8652 (Make_Finalize_Address_Body): New routine.
8653 (Make_Finalize_Address_Stmts): New routine. A function which produces
8654 TSS primitive Finalize_Address used in conjunction with heap allocated
8656 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8657 (Make_Init_Call): Rewritten. There is no longer an attach call
8658 generated after initialization.
8659 (Make_Local_Deep_Finalize): New routine.
8660 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8661 (Make_Transient_Block): Remove the finalization list retrieval and
8663 (Needs_Finalization): Moved to Exp_Util.
8664 (Parent_Field_Type): New routine.
8665 (Preprocess_Components): New routine.
8666 (Process_Transient_Objects): New routine.
8667 (Wrap_HSS_In_Block): New routine.
8668 (Wrap_Transient_Declaration): Remove finalization list management and
8669 controller insertion.
8670 (Wrap_Transient_Expression): Code reformatting.
8671 (Wrap_Transient_Statement): Code reformatting.
8672 * exp_ch7.ads (Build_Final_List): Removed.
8673 (Build_Finalization_Collection): New routine.
8674 (Build_Raise_Statement): New routine.
8675 (Controller_Component): Removed.
8676 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8677 (Find_Final_List): Removed.
8678 (In_Finalization_Root): Removed.
8679 (Is_Simple_Protected_Type): Update related comment.
8680 (Make_Adjust_Call): New parameter profile and associated comments.
8681 (Make_Attach_Call): Removed.
8682 (Make_Final_Call): New parameter profile and associated comments.
8683 (Make_Finalize_Address_Body): New routine.
8684 (Make_Init_Call): New parameter profile and associated comments.
8685 (Make_Local_Deep_Finalize): New routine.
8686 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8687 (Needs_Finalization): Moved to Exp_Util.
8688 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8689 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8690 (Find_Protection_Type): Moved to Exp_Util.
8691 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8692 (Make_DT): Update sequence of dispatch table initialization. Remove the
8693 initialization of field RC_Offset. Add initialization of field Needs_
8695 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8696 Reimplement how an object is first finalized, then deallocated.
8697 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8699 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8700 Register TSS_Finalize_Address with type TSS_Names.
8701 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8702 procedure provides the interface between an allocation / deallocation
8703 and the support machinery in Ada.Finalization.Heap_Management.
8704 (Find_Init_Call): Code reformatting.
8705 (Find_Init_Call_In_List): Code reformatting.
8706 (Find_Protection_Type): Moved from Exp_Ch9.
8707 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8708 (Has_Controlled_Coextensions): Removed.
8709 (Has_Controlled_Objects): New routine.
8710 (In_Library_Level_Package_Body): New routine.
8711 (Insert_Action_After): New routine.
8712 (Is_Finalizable_Transient): New routine. This predicate determines
8713 whether an object declaration is one of the many variants of controlled
8715 (Is_Null_Access_BIP_Func_Call): New routine.
8716 (Is_Non_BIP_Func_Call): New routine.
8717 (Is_Related_To_Func_Return): New routine.
8718 (Needs_Finalization): Moved from Exp_Ch7.
8719 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8720 (Find_Protection_Type): Moved from Exp_Ch9.
8721 (Has_Controlled_Coextensions): Removed.
8722 (Has_Controlled_Objects): New routine.
8723 (In_Library_Level_Package_Body): New routine.
8724 (Insert_Action_After): New routine.
8725 (Is_Finalizable_Transient): New routine.
8726 (Is_Null_Access_BIP_Func_Call): New routine.
8727 (Is_Non_BIP_Func_Call): New routine.
8728 (Is_Related_To_Func_Return): New routine.
8729 (Needs_Finalization): Moved from Exp_ch7.
8730 * expander.adb (Expand): Add a case for N_Free_Statement.
8731 * freeze.adb (Freeze_All): Replace the generation of a finalization
8732 list with a collection for access-to-controlled types.
8733 (Freeze_Entity): Code reformatting.
8734 (Freeze_Record_Type): Remove the freezing of a record controller
8736 (Freeze_Subprogram): Code reformatting.
8737 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8739 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8740 has a library-level finalizer.
8741 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8742 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8743 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8744 files. Add a-fihema to the list of object files.
8746 Alphabetize the associations in type Is_Parameterless_Attribute.
8747 * rtsfind.ads: Ada.Finalization_List.Controller and
8748 System.Finalization_Implementation are no longer a GNAT unit.
8749 Update the range of type Ada_Finalization_Child. Remove the following
8750 recoverable entities:
8752 RE_Attach_To_Final_List
8756 RE_Finalizable_Ptr_Ptr
8757 RE_Global_Final_List
8758 RE_Limited_Record_Controller
8761 RE_Record_Controller
8762 RE_Simple_List_Controller
8764 Add the following recoverable entities:
8766 RE_Add_Offset_To_Address
8770 RE_Exception_Identity
8771 RE_Finalization_Collection
8772 RE_Finalization_Collection_Ptr
8773 RE_Needs_Finalization
8774 RE_Save_Library_Occurrence
8775 RE_Set_Finalize_Address_Ptr
8776 RE_Set_Storage_Pool_Ptr
8778 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8780 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8781 (First_Stored_Discriminant): Remove the mention of Name_uController.
8782 * sem_aux.ads: Comment reformatting.
8783 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8784 to redecorate an already existing class-wide type.
8785 (Decorate_Tagged_Type): New parameter profile and associated comment.
8786 Create a "shadow class-wide type" for a shadow entity.
8787 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8788 of the final chain along with the associated comment.
8789 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8790 Full_Desig and set it to the full view of the designated type.
8791 Initialize the finalization collection to empty.
8792 (Build_Derived_Record_Type): Alphabetize local variables. Code
8794 (Collect_Fixed_Components): Remove the mention of Name_uController.
8795 (Create_Constrained_Components): Remove the mention of Name_uController.
8796 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8797 class-wide type of a shadow entity.
8798 (Process_Full_View): Update the machinery which marks type
8799 Limited_Controlled's entity as limited.
8800 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8801 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8802 list, instead make a collection build-in-place formal.
8803 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8804 a designated type in order to establish a match between the renaming
8805 and the renamed entity.
8806 (Find_Selected_Component): Add guard to prevent spurious exceptions
8807 from being raised on .NET/JVM.
8808 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8809 to the list of primitive that need special processing. Update arrays
8810 C_Names and D_Names.
8811 (Replace_Types): Handle class-wide types.
8812 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8813 different parameter profile, look at the first formal.
8814 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8815 use clauses for Exp_Util.
8816 * sem_res.adb: Remove with and use clauses for Elists.
8817 (Propagate_Coextensions): Removed.
8818 (Resolve_Allocator): Do not propagate the list of coextensions from one
8819 allocator to another.
8820 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8821 Deaccessed_T to Desig_Typ.
8822 (Enter_Name): Remove the mention of Name_uController.
8823 (Gather_Components): Remove the mention of Name_uController.
8824 (Incomplete_Or_Private_View): New routine.
8825 (Is_Coextension_Root): Removed.
8826 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8827 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8828 (Is_Coextension_Root): Removed.
8829 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8830 Controlled types are now derived from a null tagged record. Remove
8831 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8832 * sinfo.adb (Coextensions): Removed.
8833 (Set_Coextensions): Removed.
8834 * sinfo.ads: Remove Coextensions from the explanation of node fields
8835 and its uses in nodes.
8836 Update the field usage of N_Allocator.
8837 (Coextensions): Removed along with its pragma Inline.
8838 (Set_Coextensions): Removed along with its pragma Inline.
8839 * snames.ads-tmpl: Remove names
8844 Name_uLocal_Final_List
8845 Name_Finalization_Root
8852 Name_Finalize_Address
8853 * s-pooglo.adb (Allocate): Add overriding indicator.
8854 (Deallocate): Add overriding indicator.
8855 (Storage_Size): Add overriding indicator.
8856 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8857 than Finalize_Global_List.
8858 (Null_Finalize_Global_List): Removed.
8859 (Save_Library_Occurrence): New routine.
8860 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8861 initialization. Add variable Finalize_Library_Objects along with its
8862 pragma Export. Add variables Library_Exception and
8863 Library_Exception_Set along with their pragma Export.
8864 (Null_Finalize_Global_List): Removed.
8865 (Save_Library_Occurrence): New routine.
8866 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8867 rather than Finalize_Global_List.
8868 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8869 of the constructed node.
8871 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8873 * link.c: Include "auto-host.h" before system headers.
8875 2011-08-03 Vincent Celier <celier@adacore.com>
8877 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8878 that are not extended. Do not check if a library project that is
8879 extended should be regenerated. Do not add to table Library_Paths the
8880 libraries that are in extended projects. Link only with libraries that
8881 are in libray projects that are not extended.
8882 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8883 for a library project that is extended.
8885 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8887 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8888 conforming subprogram renamings that appear to be completions if they
8889 are not fully conformant.
8890 Such renamings are homographs but not completions.
8891 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8892 names in a subprogram renaming that appears in an instance.
8894 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8896 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8897 not immutably limited, build actual subtype from expression to provide
8898 proper bounds to caller.
8900 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8902 * sem_ch8.adb: Minor comment correction.
8904 2011-08-03 Thomas Quinot <quinot@adacore.com>
8906 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8907 returning a limited array, use an extended return statement.
8909 2011-08-03 Vincent Celier <celier@adacore.com>
8911 * make.adb (Initialize): If --subdirs= is used, but no project file is
8912 specified, attempt to create the specify subdir if it does not already
8913 exist and use it as the object directory as if -D had been specified.
8915 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8917 * s-tpopsp-vms.adb: New file.
8918 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8919 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8921 2011-08-03 Emmanuel Briot <briot@adacore.com>
8923 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8926 2011-08-03 Yannick Moy <moy@adacore.com>
8928 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8929 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8930 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8931 detect that an array has static bounds.
8933 2011-08-03 Thomas Quinot <quinot@adacore.com>
8935 * exp_dist.adb: Minor reformatting.
8937 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8939 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8940 (ATCB_Key): Removed, not always used.
8942 2011-08-03 Emmanuel Briot <briot@adacore.com>
8944 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8945 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8946 most remaining global variables.
8948 2011-08-03 Robert Dewar <dewar@adacore.com>
8950 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8951 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8954 2011-08-03 Javier Miranda <miranda@adacore.com>
8956 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8957 that must be passed by copy in VM targets.
8959 2011-08-03 Emmanuel Briot <briot@adacore.com>
8961 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8962 duplicates a similar htable now in the project tree.
8964 2011-08-03 Claire Dross <dross@adacore.com>
8966 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8967 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8968 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8969 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8970 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8971 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8972 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8975 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8977 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8978 (ATCB_Key): Removed, not always used.
8979 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8981 * s-tpopsp-tls.adb: New file.
8982 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8983 x86/x64/ia64/powerpc/sparc Linux.
8985 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8987 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8988 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8990 2011-08-03 Thomas Quinot <quinot@adacore.com>
8992 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8993 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8994 Fix type selection for mapping integer types to PolyORB types.
8996 2011-08-03 Bob Duff <duff@adacore.com>
8998 * sem_ch7.adb: Minor comment clarification.
9000 2011-08-03 Bob Duff <duff@adacore.com>
9002 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9003 an error analyzing a choice, skip further processing. Further
9004 processing could cause a crash or cascade errors.
9006 2011-08-03 Emmanuel Briot <briot@adacore.com>
9008 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9009 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9010 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9011 prj-env.ads (Shared_Project_Tree_Data): new type
9012 An aggregate project and its aggregated trees need to share the common
9013 data structures used for lists of strings, packages,... This makes the
9014 code simpler since otherwise we have to pass the root tree (also used
9015 for the configuration file data) in addition to the current project
9016 tree. This also avoids ambiguities as to which tree should be used.
9017 And finally this saves a bit of memory.
9018 (For_Every_Project_Imported): new parameter Tree.
9019 Since aggregated projects are using a different tree, we need to let
9020 the caller know which tree to use to manipulate the returned project.
9022 2011-08-03 Robert Dewar <dewar@adacore.com>
9024 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9025 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9026 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9027 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9029 2011-08-03 Javier Miranda <miranda@adacore.com>
9031 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9032 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9034 2011-08-03 Bob Duff <duff@adacore.com>
9036 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9039 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9041 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9042 g-sehash.ads: Fix typo. Update header.
9044 2011-08-03 Thomas Quinot <quinot@adacore.com>
9046 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9049 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9051 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9052 prefixes of private types along with records, since the selector may be
9054 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9055 private types along with records, since the selector may be a
9058 2011-08-03 Emmanuel Briot <briot@adacore.com>
9060 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9062 2011-08-03 Javier Miranda <miranda@adacore.com>
9064 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9065 Tagged_Type_Expansion.
9067 2011-08-03 Yannick Moy <moy@adacore.com>
9069 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9070 violation when the argument of concatenation is the name of a
9073 2011-08-03 Emmanuel Briot <briot@adacore.com>
9075 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9076 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9077 (Process_Declarative_Items): new parameter Child_Env.
9079 2011-08-03 Yannick Moy <moy@adacore.com>
9081 * alfa.ads: Update format of ALFA section in ALI file in order to
9082 add a mapping from bodies to specs when both are present.
9083 (ALFA_Scope_Record): Add components for spec file/scope.
9084 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9086 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9087 collected, fill in the spec information when relevant.
9088 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9091 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9093 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9094 code unit to decide whether to add internally generated subprograms.
9096 2011-08-03 Javier Miranda <miranda@adacore.com>
9098 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9099 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9100 be handled by copy in VM targets.
9102 2011-08-03 Emmanuel Briot <briot@adacore.com>
9104 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9105 code with Makeutl.Get_Switches.
9106 * prj-tree.adb: Update comment.
9108 2011-08-03 Thomas Quinot <quinot@adacore.com>
9110 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9111 subprogram with a limited formal that does not support external
9114 2011-08-03 Yannick Moy <moy@adacore.com>
9116 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9118 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9119 not from current unit in two phases, because it is not possible to
9120 change the table while iterating over its content.
9121 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9123 2011-08-03 Sergey Rybin <rybin@adacore.com>
9125 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9126 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9128 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9130 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9131 and the component type is composite, this is ambiguous for predefined
9132 concatenation, but if the node is not overloaded and the entity is a use
9133 -defined function its profile can be used to resolve that aggregate.
9135 2011-08-03 Robert Dewar <dewar@adacore.com>
9137 * exp_ch4.adb: Minor code cleanup.
9139 2011-08-03 Thomas Quinot <quinot@adacore.com>
9141 * exp_dist.adb: Do not generate distribution stubs if serious errors
9142 have been diagnosed.
9144 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9146 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9147 the first formal of a primitive operation, go to the base type to
9148 handle properly an access to a derived type with constrained
9150 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9151 user-defined function that is only use-visible.
9153 2011-08-03 Robert Dewar <dewar@adacore.com>
9155 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9156 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9157 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9158 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9159 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9160 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9161 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9162 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9164 2011-08-03 Robert Dewar <dewar@adacore.com>
9166 * repinfo.adb (List_Mechanism): Add handling of
9167 Convention_Ada_Pass_By_XXX.
9168 * sem_mech.adb (Set_Mechanism): Ditto.
9169 * sem_prag.adb (Process_Convention): Add entries for
9170 Convention_Ada_Pass_By_XXX.
9171 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9173 2011-08-03 Pascal Obry <obry@adacore.com>
9175 * makeutl.adb: Minor reformatting.
9177 2011-08-03 Vincent Celier <celier@adacore.com>
9180 (Get_File_Name) If the file cannot be found when there are no config
9181 pragmas file and May_Fail is True, return No_File instead of the file
9182 name, to be consistent.
9184 2011-08-03 Pascal Obry <obry@adacore.com>
9186 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9189 2011-08-03 Javier Miranda <miranda@adacore.com>
9192 (Same_Representation): In VM targets the representation of arrays with
9193 aliased components differs from arrays with non-aliased components.
9195 2011-08-03 Emmanuel Briot <briot@adacore.com>
9197 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9198 not systematically lower case attribute indexes that contain no "."
9199 Fix definition of several Naming attributes, which take
9200 a unit name as index and therefore should be case insensitive.
9201 Minor refactoring (reduce length of variable names).
9203 2011-08-03 Emmanuel Briot <briot@adacore.com>
9205 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9207 2011-08-03 Emmanuel Briot <briot@adacore.com>
9209 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9210 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9211 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9212 prj-tree.ads (Prj.Tree.Environment): new type.
9214 2011-08-03 Emmanuel Briot <briot@adacore.com>
9216 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9217 prj-tree.adb, prj-tree.ads (Environment): new type.
9219 2011-08-03 Emmanuel Briot <briot@adacore.com>
9221 * prj-tree.ads: Remove unused variable.
9223 2011-08-03 Yannick Moy <moy@adacore.com>
9225 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9226 issuing messages related to SPARK restriction violation.
9228 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9230 * sem_ch6.adb: guard against error nodes in return statements.
9232 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9234 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9235 a warning can only appear on a configuration file, so emit warning
9236 without further checks.
9238 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9240 * s-interr.ads: add overriding keyword.
9242 2011-08-03 Geert Bosch <bosch@adacore.com>
9244 * exp_attr.adb: Fix minor typo.
9246 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9248 * par-ch4.adb: improve error recovery.
9250 2011-08-03 Emmanuel Briot <briot@adacore.com>
9252 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9253 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9256 2011-08-03 Emmanuel Briot <briot@adacore.com>
9258 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9259 "external" as an attribute name in aggregate projects.
9261 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9263 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9264 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9265 from 0, so we need to adjust.
9267 2011-08-03 Emmanuel Briot <briot@adacore.com>
9269 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9270 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9272 2011-08-03 Yannick Moy <moy@adacore.com>
9274 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9275 restriction on overloaded entity if the entity is not an operator.
9277 2011-08-03 Yannick Moy <moy@adacore.com>
9279 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9280 restrict.ads: Rename remaining Check_Formal_Restriction* into
9281 Check_SPARK_Restriction*.
9283 2011-08-03 Emmanuel Briot <briot@adacore.com>
9285 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9286 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9288 (Project_Empty): removed
9289 (Empty_Project): new parameter Qualifier
9290 This is used to have fields specific to aggregate projects, cleaner
9291 New field to store the list of aggregated projects.
9292 (Check_Aggregate_Project): removed
9293 (Process_Aggregated_Projects, Free): new subprograms.
9295 2011-08-03 Olivier Hainque <hainque@adacore.com>
9297 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9299 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9301 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9302 explicit dereference of an unconstrained type, create a constrained
9303 subtype for it, as is done for function calls that return an
9306 2011-08-03 Thomas Quinot <quinot@adacore.com>
9308 * g-pehage.adb (Finalize): Avoid possible double-free.
9310 2011-08-03 Steve Baird <baird@adacore.com>
9312 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9313 Elab_Spec/Body attrs in CodePeer_Mode.
9315 2011-08-03 Javier Miranda <miranda@adacore.com>
9317 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9318 low bound is not known at compile time but they have no others choice.
9319 Done because in this case the bounds can be obtained directly from the
9322 2011-08-03 Ed Falis <falis@adacore.com>
9324 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9325 on VxWorks SMP. Remove unusable constant ANY_CPU.
9327 2011-08-03 Emmanuel Briot <briot@adacore.com>
9329 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9330 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9331 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9332 Prj.Env.Initialize_Empty): new subprograms
9333 (Get_Env, Find_Project): remove parameter Target_Name.
9335 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9337 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9338 as a condition for the delayed call to Derived_Subprograms done for the
9339 case of the rewriting of a derived type that constrains the
9340 discriminants of its parent type.
9341 Avoids redundant subprogram derivations for private subtype derivations.
9343 2011-08-03 Javier Miranda <miranda@adacore.com>
9345 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9346 Build_Record_Aggr_Code.
9347 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9348 discriminants in extension aggregates.
9350 2011-08-03 Emmanuel Briot <briot@adacore.com>
9352 * prj-pp.adb (Print): also output project qualifiers, since in
9353 particular "aggregate" is mandatory in an aggregate project.
9355 2011-08-03 Emmanuel Briot <briot@adacore.com>
9357 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9358 (Debug_Output): new function.
9360 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9362 * gnat_ugn.texi: Document -Wstack-usage.
9363 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9365 2011-08-03 Thomas Quinot <quinot@adacore.com>
9367 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9368 have keyword LIMITED.
9370 2011-08-03 Yannick Moy <moy@adacore.com>
9372 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9373 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9374 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9375 section (does not happen in compiler, only if code directly calls
9377 * get_alfa.adb, get_alfa.ads: New files.
9378 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9380 * lib-xref-alfa.adb: New file.
9381 * lib-xref.adb, lib-xref.ads
9382 (Xref_Entry): redefine information needed in cross-references for ALFA.
9383 Push ALFA treatments in separated local package.
9384 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9385 identifiers. Return entity of package body instead of spec. Return
9386 Empty for a scope with no location.
9387 (Generate_Reference): adapt to new components for ALFA information.
9388 Remove the need for D references on definitions.
9389 (Is_Local_Reference): moved to ALFA local package
9390 (Output_References): extract subfunction as Extract_Source_Name
9391 (Output_Local_References): remove procedure, replaced by filtering of
9392 cross-references in package ALFA and printing in Put_ALFA.
9393 (Write_Entity_Name): remove procedure
9394 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9395 print exact name of entity as it appears in source file
9396 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9397 * put_alfa.adb, put_alfa.ads: New files.
9398 * xref_lib.adb (Search_Xref): protect read of cross-references against
9399 reading other sections of the ALI file, in gnatxref
9400 (Search): protect read of cross-references against reading other
9401 sections of the ALI file, in gnatfind.
9402 * gcc-interface/Make-lang.in: Update dependencies.
9404 2011-08-03 Thomas Quinot <quinot@adacore.com>
9406 * sem_ch3.adb: Minor reformatting.
9408 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9410 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9411 raising an exception.
9413 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9415 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9416 type, always use 1 as the lower bound or string, even if lower bound of
9417 context is not static, to handle properly null strings in a non-static
9420 2011-08-03 Bob Duff <duff@adacore.com>
9422 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9423 always legal on the right-hand side of an assignment statement; there
9424 is always an applicable index constraint in this case. Therefore, the
9425 check for Pkind = N_Assignment_Statement is now unconditional -- it
9426 doesn't depend on whether Is_Constrained (Typ).
9428 2011-08-03 Robert Dewar <dewar@adacore.com>
9430 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9432 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9434 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9435 for an itype created within a generic unit.
9437 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9439 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9440 suppresses all inlining.
9442 2011-08-03 Robert Dewar <dewar@adacore.com>
9444 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9445 exp_aggr.adb: Minor reformatting.
9447 2011-08-03 Thomas Quinot <quinot@adacore.com>
9449 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9450 tagged assignment when discriminant checks are suppressed. This is
9451 useless and extremely costly in terms of static stack usage.
9453 2011-08-03 Bob Duff <duff@adacore.com>
9455 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9456 of generics, because this leads to the wrong entity in the wrong scope,
9457 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9459 (Process_Interface_Name): Follow Alias for instances of generics, to
9460 correct for the above change.
9462 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9464 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9465 is an integer literal it is always safe to replace the reference. In
9466 addition, if the reference appears in the generated code for an object
9467 declaration it is necessary to copy because otherwise the reference
9468 might be to the uninitilized value of the discriminant of the object
9471 2011-08-03 Pascal Obry <obry@adacore.com>
9473 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9474 ACL used, in this case we want to check for ending .exe, not .exe
9475 anywhere in the path.
9477 2011-08-03 Sergey Rybin <rybin@adacore.com>
9479 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9480 the tree structure (semantic decoration of references to record
9483 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9485 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9486 choices of a named array aggregate, bail out when any choices are
9487 marked as Errors_Posted.
9489 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9491 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9492 in which entity is frozen, to handle properly loop variables in
9495 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9497 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9498 subtype is not static, compute the upper bound using attributes, to
9499 handle properly index types that are not integer types.
9501 2011-08-03 Bob Duff <duff@adacore.com>
9503 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9504 Update copyright notice.
9506 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9508 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9509 Original_Discriminant if within an instance.
9510 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9512 2011-08-03 Thomas Quinot <quinot@adacore.com>
9514 * einfo.ads: Minor reformatting.
9516 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9518 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9519 composite type with an unfrozen subcomponent, in the profile of a
9520 primitive operation.
9522 2011-08-03 Robert Dewar <dewar@adacore.com>
9524 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9526 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9528 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9529 unconstrained type with discriminants is initialized with an aggregate,
9530 use the constrained subtype of the aggregate as the type of the object,
9531 because it is immutable, and this allows the back-end to generate no
9532 code for the object declaration.
9534 2011-08-03 Robert Dewar <dewar@adacore.com>
9536 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9537 comparison operand is variable, and turns out to be zero or negative.
9539 2011-08-03 Javier Miranda <miranda@adacore.com>
9542 (Expand_Dispatching_Constructor_Call): Disable expansion of
9543 code required for native targets. Done to avoid generating
9544 references to unavailable runtime entities in VM targets.
9546 (Expand_N_Object_Declaration): Add missing support to handle
9547 the explicit initialization of class-wide interface objects.
9550 2011-08-03 Matthew Heaney <heaney@adacore.com>
9552 * a-cobove.adb (Merge): Move source onto target, instead of using
9555 2011-08-03 Matthew Heaney <heaney@adacore.com>
9557 * a-cbdlli.adb (Splice): Move source items from first to last.
9559 2011-08-03 Yannick Moy <moy@adacore.com>
9561 * sem_util.ads: Add comment.
9563 2011-08-03 Javier Miranda <miranda@adacore.com>
9566 (Expand_Record_Aggregate): In VM targets disable the expansion into
9567 assignments of aggregates whose type is not known at compile time.
9569 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9571 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9572 protected entries and task entries, to build the proper renaming
9573 declaration for entry formals, used in debugging.
9574 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9575 parameters in the same way.
9577 2011-08-02 Robert Dewar <dewar@adacore.com>
9579 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9580 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9581 code reorganization.
9583 2011-08-02 Robert Dewar <dewar@adacore.com>
9585 * debug.adb: Debug flag d.P to suppress length comparison optimization
9586 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9587 comparison of Length by comparing First/Last instead.
9589 2011-08-02 Matthew Heaney <heaney@adacore.com>
9591 * a-cobove.ads: Code clean up.
9593 2011-08-02 Vincent Celier <celier@adacore.com>
9595 * adaint.c (file_names_case_sensitive_cache): New static int.
9596 (__gnat_get_file_names_case_sensitive): Cache the return value in
9597 file_names_case_sensitive_cache at the first invocation, to avoid
9598 multiple calls to getenv.
9600 2011-08-02 Bob Duff <duff@adacore.com>
9602 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9604 2011-08-02 Yannick Moy <moy@adacore.com>
9606 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9607 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9608 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9609 indicate that we are in a precondition or postcondition. This is used in
9610 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9611 decide whether to flag the spec or body of the current subprogram as
9614 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9616 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9618 * a-extiin.ads: New file.
9620 2011-08-02 Bob Duff <duff@adacore.com>
9622 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9623 now raises Name_Error instead of Use_Error in certain cases. The other
9624 parts of this AI were already implemented properly.
9626 2011-08-02 Vincent Celier <celier@adacore.com>
9628 * link.c: Only import "auto-host.h" when building the gnattools.
9630 2011-08-02 Yannick Moy <moy@adacore.com>
9632 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9633 which calls a local subprogram, so extract subprogram
9634 from Mark_Non_ALFA_Subprogram_Body.
9636 2011-08-02 Javier Miranda <miranda@adacore.com>
9639 (Extract_Dispatching_Call): If the type of the dispatching object is an
9640 access type then return an explicit dereference in the Object out-mode
9643 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9645 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9646 compatibility checks for all indexes of an array subtype, not just the
9647 first. Reset Has_Dynamic_Range_Check on the subtype before each
9648 potential check to ensure that Insert_Range_Checks will not elide any
9649 of the dynamic checks.
9651 2011-08-02 Yannick Moy <moy@adacore.com>
9653 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9654 SPARK restriction at parsing time.
9655 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9656 directive only if the SPARK restriction is set for this unit.
9658 2011-08-02 Yannick Moy <moy@adacore.com>
9660 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9661 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9662 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9663 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9664 Mark_Non_ALFA_Subprogram_Body.
9665 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9668 2011-08-02 Yannick Moy <moy@adacore.com>
9670 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9673 2011-08-02 Robert Dewar <dewar@adacore.com>
9675 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9676 exp_ch3.adb: Minor reformatting.
9678 2011-08-02 Emmanuel Briot <briot@adacore.com>
9680 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9681 files, not any regular file.
9682 (__gnat_locate_file_with_predicate): new subprogram.
9684 2011-08-02 Yannick Moy <moy@adacore.com>
9686 * sinfo.adb, sinfo.ads: Restrict the use of flags
9687 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9688 nodes, plus N_Subtype_Declaration for the 2nd one.
9690 2011-08-02 Sergey Rybin <rybin@adacore.com>
9692 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9693 - fix bugs in the description of Source_Trace;
9694 - get rid of UNIT_NAME;
9696 2011-08-02 Javier Miranda <miranda@adacore.com>
9699 (Build_Dispatching_Requeue): Adding support for VM targets
9700 since we cannot directly reference the Tag entity.
9701 * exp_sel.adb (Build_K): Adding support for VM targets.
9702 (Build_S_Assignment): Adding support for VM targets.
9704 (Default_Prim_Op_Position): In VM targets do not restrict availability
9705 of predefined interface primitives to compiling in Ada 2005 mode.
9706 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9707 restricted to compiling in Ada 2005 mode.
9708 (Make_VM_TSD): Generate code that declares and initializes the OSD
9709 record. Needed to support dispatching calls through synchronized
9712 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9713 primitives associated with synchronized interfaces.
9714 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9715 primitives associated with synchronized interfaces.
9717 2011-08-02 Yannick Moy <moy@adacore.com>
9719 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9720 statements hidden in SPARK if preceded by the HIDE directive
9721 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9722 exception handlers as hidden in SPARK if preceded by the HIDE directive
9723 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9724 if starting with the HIDE directive
9725 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9726 starting with the HIDE directive; mark the declarations in a private
9727 part as hidden in SPARK if the private part starts with the HIDE
9729 * restrict.adb, restrict.ads
9730 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9731 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9732 argument node belongs to a part which is hidden in SPARK
9733 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9734 parts in SPARK; protect the possibly costly call to
9735 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9736 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9737 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9738 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9740 (Scan): recognize special comment starting with '#' and followed by
9741 SPARK keyword "hide" as a HIDE directive.
9743 2011-08-02 Yannick Moy <moy@adacore.com>
9745 * types.ads, erroutc.ads: Minor reformatting.
9747 2011-08-02 Vincent Celier <celier@adacore.com>
9749 * link.c: Add response file support for cross platforms.
9751 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9753 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9754 in an association, set parent field of copy before partial analysis.
9755 * sem_res.adb (Resolve_Slice): create reference to itype only when
9756 expansion is enabled.
9758 2011-08-02 Yannick Moy <moy@adacore.com>
9760 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9761 for new flag denoting which subprogram bodies are in ALFA
9762 * restrict.adb, sem_ch7.adb: Update comment
9763 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9764 sem_ch9.adb, sem_res.adb: Add calls to
9765 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9766 * sem_ch6.adb (Analyze_Function_Return): add calls to
9767 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9768 middle of the body, and extended return.
9769 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9770 False when missing return.
9771 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9772 to True for subprograms whose spec is in ALFA. Remove later on the flag
9773 on the entity used for a subprogram body when there exists a separate
9775 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9776 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9777 False, otherwise do nothing.
9779 2011-08-02 Robert Dewar <dewar@adacore.com>
9781 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9783 2011-08-02 Yannick Moy <moy@adacore.com>
9785 * sem_ch4.ads: minor formatting.
9787 2011-08-02 Yannick Moy <moy@adacore.com>
9789 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9790 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9791 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9792 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9793 opt.ads: cleanup of SPARK mode
9795 2011-08-02 Yannick Moy <moy@adacore.com>
9797 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9799 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9800 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9802 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9803 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9804 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9805 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9807 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9809 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9810 functions whose return type is not in ALFA.
9811 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9813 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9814 parameter's type is not in ALFA.
9815 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9818 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9820 * sem_ch6 (Analyze_Expression_Function): treat the function as
9821 Inline_Always, and introduce a subprogram declaration for it when it is
9823 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9824 expression functions, so that the back-end can determine whether they
9825 can in fact be inlined.
9826 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9827 a function body comes from an expression function.
9829 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9831 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9832 null exclusions to test Can_Never_Be_Null on the anonymous access types
9833 of the formals rather than testing the formals themselves. Exclude this
9834 check in cases where the Old_Formal is marked as a controlling formal,
9835 to avoid issuing spurious errors for bodies completing dispatching
9836 operations (due to the flag not getting set on controlling access
9837 formals in body specs).
9838 (Find_Corresponding_Spec): When checking full and subtype conformance of
9839 subprogram bodies in instances, pass Designated and E in that order, for
9840 consistency with the expected order of the formals (New_Id followed by
9843 2011-08-02 Robert Dewar <dewar@adacore.com>
9845 * sem_ch8.adb: Minor reformatting.
9847 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9849 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9850 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9851 primitive operations of class-wide actuals.
9853 2011-08-02 Javier Miranda <miranda@adacore.com>
9855 * exp_atag.ads, exp_atag.adb
9856 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9857 since its value is implicitly passed in argument Typ.
9858 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9859 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9860 Build_Common_Dispatching_Select_Statements.
9862 2011-08-02 Robert Dewar <dewar@adacore.com>
9864 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9865 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9868 2011-08-02 Robert Dewar <dewar@adacore.com>
9870 * sem_res.adb: Minor reformatting.
9871 * sem_prag.adb: Minor reformatting.
9873 2011-08-02 Javier Miranda <miranda@adacore.com>
9875 * exp_atag.adb, exp_atags.ads
9876 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9877 by the tagged type Entity. Required to use this routine in the VM
9878 targets since we do not have available the Tag entity in the VM
9881 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9882 Ada.Tags has not been previously loaded.
9884 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9885 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9887 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9888 view of enclosing scopes. Required to handle enclosing scopes that
9889 are synchronized types whose full view is a task type.
9891 (Build_VM_TSDs): Minor code improvement to avoid generating and
9892 analyzing lists with empty nodes.
9893 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9894 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9895 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9896 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9897 (Make_Select_Specific_Data_Table): Add support for VM targets.
9898 (Make_VM_TSD): Generate code to initialize the SSD structure of
9901 2011-08-02 Yannick Moy <moy@adacore.com>
9903 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9904 cross-references section in ALI.
9905 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9906 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9908 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9909 subprogram or package entity of a node
9910 (Is_Local_Reference_Type): new function returns True for references
9911 selected in local cross-references.
9912 (Lt): function extracted from Lt in Output_References
9913 (Write_Entity_Name): function extracted from Output_References
9914 (Generate_Definition): generate reference with type 'D' for definition
9915 of objects (object declaration and parameter specification), with
9916 appropriate locations and units, for use in local cross-references.
9917 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9918 references of type 'I' for initialization in object definition.
9919 (Output_References): move part of function Lt and procedure
9920 Write_Entity_Name outside of the body. Ignore references of types 'D'
9921 and 'I' introduced for local cross-references.
9922 (Output_Local_References): new procedure to output the local
9923 cross-references sections.
9924 (Lref_Entity_Status): new array defining whether an entity is a local
9925 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9926 with 'I' type when initialization expression is present.
9927 * get_scos.adb, get_scos.ads: Correct comments and typos
9929 2011-08-02 Javier Miranda <miranda@adacore.com>
9931 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9933 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9935 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9938 2011-08-02 Vincent Celier <celier@adacore.com>
9940 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9941 (No_Space_Img): New function
9942 (Find_Excluded_Sources): When reading from a file, record the file name
9943 and the line number for each excluded source.
9944 (Mark_Excluded_Sources): When reporting an error, if the excluded
9945 sources were read from a file, include file name and line number in
9948 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9950 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9952 2011-08-02 Robert Dewar <dewar@adacore.com>
9954 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9956 2011-08-02 Javier Miranda <miranda@adacore.com>
9958 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9959 generation of TSDs to the DOTNET compiler.
9960 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9961 generation of TSDs to the DOTNET compiler.
9963 2011-08-02 Javier Miranda <miranda@adacore.com>
9965 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9966 record of all the tagged types declared inside library level package
9967 declarations, library level package bodies or library level subprograms.
9968 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9969 associated with a given tagged type.
9970 (Build_VM_TSDs): New subprogram.
9971 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9972 compilation units that are subprograms.
9973 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9974 compilation units that are package bodies.
9975 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9976 units that are a package declaration or a package instantiation.
9977 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9978 reorganization to improve the error generated by the frontend when the
9979 function Ada.Tags.Secondary_Tag is not available.
9980 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9981 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9983 2011-08-02 Javier Miranda <miranda@adacore.com>
9985 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9987 2011-08-02 Robert Dewar <dewar@adacore.com>
9989 * s-imenne.ads: Minor reformatting.
9991 2011-08-02 Robert Dewar <dewar@adacore.com>
9993 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9994 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9995 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9997 2011-08-02 Robert Dewar <dewar@adacore.com>
9999 * einfo.ads (Materialize_Entity): Document this is only for renamings
10000 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10001 required debug information in the case where we transform the object
10002 declaration into a renaming declaration.
10003 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10005 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10006 Materialize_Entity.
10008 2011-08-02 Robert Dewar <dewar@adacore.com>
10010 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10011 Suppress_Init_Procs.
10012 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10013 Suppress_Initialization/Initialization_Suppressed.
10014 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10015 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10016 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10017 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10019 2011-08-02 Robert Dewar <dewar@adacore.com>
10021 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10022 Minor reformatting.
10024 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10026 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10027 only have inheritable classwide pre/postconditions.
10029 2011-08-02 Javier Miranda <miranda@adacore.com>
10031 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10032 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10033 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10034 checks if the external tag of a type is the same as the external tag
10035 of some other declaration.
10037 2011-08-02 Thomas Quinot <quinot@adacore.com>
10039 * s-taskin.ads: Minor reformatting.
10041 2011-08-02 Emmanuel Briot <briot@adacore.com>
10043 * g-comlin.adb (Display_Help): swap the order in which it prints the
10044 short help and the general usage.
10046 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10048 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10049 the aspect declarations and attach them to the generic copy for
10050 subsequent analysis.
10051 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10052 declarations of the generic tree to the new subprogram declarations.
10053 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10054 conditions that apply to a subprogram instance.
10056 2011-08-02 Robert Dewar <dewar@adacore.com>
10058 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10060 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10062 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10063 private type with a tagged full view is not derived in the immediate
10064 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10066 2011-08-02 Robert Dewar <dewar@adacore.com>
10068 * exp_ch4.adb: Minor reformatting.
10070 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10072 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10073 Ada2012 iterator, the loop will be rewritten during expansion into a
10074 while loop with a cursor and an element declaration. Do not analyze the
10075 body in this case, because if the container is for indefinite types the
10076 actual subtype of the elements will only be determined when the cursor
10077 declaration is analyzed.
10079 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10081 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10082 size/alignment related attributes in CodePeer_Mode.
10084 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10086 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10087 Prepend_Element, since this can result in the operation getting the
10088 wrong slot in the full type's dispatch table if the full type has
10089 inherited operations. The incomplete type's operation will get added
10090 to the proper position in the full type's primitives
10091 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10092 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10093 dispatching operations, since there are cases where nonprimitive
10094 subprograms can get added to the list of incomplete dependents (such
10095 as subprograms in nested packages).
10096 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10097 private part when determining whether to add a primitive with a
10098 parameter of a tagged incomplete type to the Private_Dependents list.
10099 Such primitives can also occur in the visible part, and should not have
10100 been excluded from being private dependents.
10101 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10102 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10103 list of a Taft-amendment incomplete type is a primitive before issuing
10104 an error that the full type must appear in the same unit. There are
10105 cases where nonprimitives can be in the list (such as subprograms in
10107 * sem_disp.adb (Derives_From): Use correct condition for checking that
10108 a formal's type is derived from the type of the corresponding formal in
10109 the parent subprogram (the condition was completely wrong). Add
10110 checking that was missing for controlling result types being derived
10111 from the result type of the parent operation.
10113 2011-08-02 Yannick Moy <moy@adacore.com>
10115 * errout.adb (First_Node): minor renaming
10116 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10119 2011-08-02 Yannick Moy <moy@adacore.com>
10121 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10122 before accessing operands.
10123 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10124 decide whether an initialization expression respects SPARK rules, as
10125 the plain node is the expanded one. This allows for more valid warnings
10127 * gnat_rm.texi: Minor update.
10129 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10131 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10134 2011-08-02 Robert Dewar <dewar@adacore.com>
10136 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10138 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10140 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10141 loop statements and the element renaming declaration with a block when
10142 the element type is controlled.
10144 2011-08-02 Yannick Moy <moy@adacore.com>
10146 * sinfo.ads: Minor formatting.
10148 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10150 * sem_aggr.adb (Add_Association): if the association has a box and no
10151 expression, use the Sloc of the aggregate itself for the new
10153 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10156 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10158 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10159 When a container is provided via a function call, generate a renaming
10160 of the function result. This avoids the creation of a transient scope
10161 and the premature finalization of the container.
10162 * exp_ch7.adb (Is_Container_Cursor): Removed.
10163 (Wrap_Transient_Declaration): Remove the supression of the finalization
10164 of the list controller when the declaration denotes a container cursor,
10167 2011-08-02 Yannick Moy <moy@adacore.com>
10169 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10170 node is from source, instead of the original node being from source.
10172 (Resolve_Array_Aggregate): refine the check for a static expression, to
10173 recognize also static ranges
10174 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10175 Array_Type_Declaration): postpone the test for the type being a subtype
10176 mark after the type has been resolved, so that component-selection and
10177 expanded-name are discriminated.
10178 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10179 to distinguish the case of an iteration scheme, so that an error is
10180 issed on a non-static range in SPARK except in an iteration scheme.
10181 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10182 In_Iter_Schm = True.
10183 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10184 user-defined operators so that they are allowed in renaming
10186 (Find_Selected_Component): refine the check for prefixing of operators
10187 so that they are allowed in renaming. Move the checks for restrictions
10188 on selector name after analysis discriminated between
10189 component-selection and expanded-name.
10190 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10191 concatenation argument of string type if it is static.
10192 * sem_util.adb, sem_util.ads
10193 (Check_Later_Vs_Basic_Declarations): add a new function
10194 Is_Later_Declarative_Item to decice which declarations are allowed as
10195 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10196 mode, add that renamings are considered as later items.
10197 (Enclosing_Package): new function to return the enclosing package
10198 (Enter_Name): correct the rule for homonyms in SPARK
10199 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10200 from source (result of expansion) to avoid issuing wrong warnings.
10202 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10204 * errout.adb: On anything but an expression First_Node returns its
10207 2011-08-02 Pascal Obry <obry@adacore.com>
10209 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10211 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10213 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10214 Set the associated loop as the related expression of internally
10216 * exp_ch7.adb (Is_Container_Cursor): New routine.
10217 (Wrap_Transient_Declaration): Supress the finalization of the list
10218 controller when the declaration denotes a container cursor.
10220 2011-08-02 Yannick Moy <moy@adacore.com>
10222 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10224 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10225 expression is a simple expression. This check cannot be performed in
10226 the semantics, so just drop it.
10227 (P_Index_Or_Discriminant_Constraint): move check that the index or
10228 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10229 semantics. Other cases were previously checked in the semantics.
10230 * par-ch4.adb (P_Name): move checks that a selector name is not
10231 character literal or an operator symbol to Find_Selected_Component in
10233 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10234 declarations are not placed after later declarations in a separate
10235 procedure in Sem_Util (possibly not the best choice?), to be used both
10236 during parsing, for Ada 83 mode, and during semantic analysis, for
10238 * par-endh.adb (Check_End): move check that end label is not missing
10239 to Process_End_Label in the semantics
10240 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10241 the special case for SPARK restriction
10242 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10243 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10244 parameter Force to issue the error message even on internal node (used
10245 for generated end label). Call Check_Restriction to check when an error
10246 must be issued. In SPARK mode, issue an error message even if the
10247 restriction is not set.
10248 (Check_Restriction): new procedure with an additional out parameter to
10249 inform the caller that a message has been issued
10250 * sem_aggr.adb: Minor modification of message
10251 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10252 instead of issuing an error message directly
10253 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10254 declarations are not placed after later declarations, by calling
10255 Check_Later_Vs_Basic_Declarations
10256 (Analyze_Subtype_Declaration): move here the check that an index or
10257 discriminant constraint must be a subtype mark. Change the check that
10258 a subtype of String must start at one so that it works on subtype marks.
10259 * sem_ch4.adb (Analyze_Call): move here the check that a named
10260 association cannot follow a positional one in a call
10261 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10262 instead of issuing an error message directly
10263 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10264 selector name is not a character literal or an operator symbol. Move
10265 here the check that the prefix of an expanded name cannot be a
10266 subprogram or a loop statement.
10267 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10268 procedure called from parsing and semantics to check that basic
10269 declarations are not placed after later declarations
10270 (Process_End_Label): move here the check that end label is not missing
10272 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10274 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10275 representation clause in codepeer mode, since it confuses CodePeer and
10276 does not bring useful info.
10278 2011-08-02 Ed Falis <falis@adacore.com>
10280 * init.c: initialize fp hw on MILS.
10282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10284 * errout.adb (First_Node): for bodies, return the node itself (small
10285 optimization). For other nodes, do not check source_unit if the node
10286 comes from Standard.
10288 2011-08-02 Robert Dewar <dewar@adacore.com>
10290 * exp_ch3.adb: Minor comment additions.
10291 * sem_ch13.adb: Minor reformatting.
10293 2011-08-02 Pascal Obry <obry@adacore.com>
10295 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10297 2011-08-02 Robert Dewar <dewar@adacore.com>
10299 * sem_attr.adb: Minor reformatting.
10301 2011-08-02 Robert Dewar <dewar@adacore.com>
10303 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10304 (Has_Default_Component_Value): Removed
10305 * einfo.ads Comment updates
10306 (Has_Default_Aspect): Replaces Has_Default_Value
10307 (Has_Default_Component_Value): Removed
10309 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10311 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10312 (Get_Simple_Init_Val): Handle Default_Value aspect
10313 (Needs_Simple_Initialization): Handle Default_Value aspect
10314 * exp_ch3.ads: Needs_Simple_Initialization
10315 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10316 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10318 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10319 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10320 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10322 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10324 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10325 package containing iteration primitives.
10326 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10328 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10330 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10331 "of", pre-analyze expression in case it is a function call with
10332 finalization actions that must be placed ahead of the loop.
10333 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10334 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10336 2011-08-02 Geert Bosch <bosch@adacore.com>
10338 * cstand.adb (Create_Float_Types): Only consider C's long double for
10339 Long_Long_Float, in addition to double.
10341 2011-08-02 Robert Dewar <dewar@adacore.com>
10343 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10344 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10345 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10346 Minor reformatting.
10348 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10350 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10353 2011-08-02 Javier Miranda <miranda@adacore.com>
10355 * einfo.ads, einfo.adb
10356 (Original_Access_Type): Move this attribute to Node26 since there was
10357 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10358 which causes conflicts and breaks the generation of the .NET compiler.
10359 (Interface_Name): Add missing documentation on JGNAT only uses of
10362 2011-08-02 Geert Bosch <bosch@adacore.com>
10364 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10365 (Find_Back_End_Float_Type): Likewise
10366 (Create_Back_End_Float_Types): Likewise
10367 (Create_Float_Types): Likewise
10368 (Register_Float_Type): Likewise
10369 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10370 Nlist and split out type selection in new local Find_Base_Type function.
10371 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10373 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10375 2011-08-02 Robert Dewar <dewar@adacore.com>
10377 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10379 * opt.ads: Minor comment change.
10380 * sem_ch12.adb: Minor code reorganization.
10382 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10384 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10385 subtype's list of rep items to the list on the full subtype in the case
10386 where the lists are the same.
10388 2011-08-02 Geert Bosch <bosch@adacore.com>
10390 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10391 using the one from System.Strings, which also deallocates all strings.
10393 2011-08-02 Geert Bosch <bosch@adacore.com>
10395 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10397 * gcc-interface/Make-lang.in: Update dependencies.
10399 2011-08-02 Olivier Hainque <hainque@adacore.com>
10401 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10404 2011-08-02 Javier Miranda <miranda@adacore.com>
10406 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10407 associated with anonymous access to subprograms.
10409 2011-08-02 Geert Bosch <bosch@adacore.com>
10412 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10413 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10414 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10415 (Add_Symbol_Definition): Move to switch-c.adb
10416 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10417 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10418 (Add_Symbol_Definition): Move to switch-c.adb.
10419 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10421 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10422 Move to warnsw.adb.
10423 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10424 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10425 Move to warnsw.adb.
10426 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10427 (Add_Symbol_Definition): Moved from Prepcomp.
10428 * switch-c.ads: Update copyright notice. Use String_List instead of
10429 Argument_List, removing dependency on System.OS_Lib.
10431 2011-08-02 Yannick Moy <moy@adacore.com>
10433 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10434 mode on initialization expression which does not respect SPARK
10436 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10437 if the tree referenced by its argument represents an initialization
10438 expression in SPARK, suitable for initializing an object in an object
10441 2011-08-02 Javier Miranda <miranda@adacore.com>
10443 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10444 internally generated access to subprogram with its associated protected
10446 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10448 2011-08-02 Geert Bosch <bosch@adacore.com>
10450 * cstand.adb (Register_Float_Type): Print information about type to
10451 register, if the Debug_Flag_Dot_B is set.
10452 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10453 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10454 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10455 with a requested precision of more than Max_Digits digits and no more
10456 than Max_Base_Digits digits, if a range specification is present and the
10457 Predefined_Float_Types list has a suitable type to derive from.
10458 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10459 case of type completion with pragma Import
10461 (Process_Import_Predefined_Type): Processing to complete a type
10462 with pragma Import. Currently supports floating point types only.
10463 (Set_Convention_From_Pragma): Do nothing without underlying type.
10464 (Process_Convention): Guard against absence of underlying type,
10465 which may happen when importing incomplete types.
10466 (Process_Import_Or_Interface): Handle case of importing predefined
10467 types. Tweak error message.
10469 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10471 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10472 functions to previous change. Reorganize code slightly.
10474 2011-08-02 Geert Bosch <bosch@adacore.com>
10476 * back_end.ads (Register_Type_Proc): New call back procedure type for
10477 allowing the back end to provide information about available types.
10478 (Register_Back_End_Types): New procedure to register back end types.
10479 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10481 * cstand.adb (Back_End_Float_Types): New list for floating point types
10482 supported by the back end.
10483 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10484 (Copy_Float_Type): New procedure to make new copies of predefined types.
10485 (Register_Float_Type): New call back procedure to populate the BEFT list
10486 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10487 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10488 (Create_Float_Types): New procedure to create entities for floating
10489 point types predefined in Standard, and put these and any remaining
10490 BEFTs on the Predefined_Float_Types list.
10491 * stand.ads (Predefined_Float_Types): New list for predefined floating
10492 point types that do not have declarations in package Standard.
10494 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10496 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10497 entity node for the unit containing the parameter.
10498 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10499 (Add_Inlined_Subprogram): Likewise.
10500 * gcc-interface/Make-lang.in: Update dependencies.
10502 2011-08-02 Thomas Quinot <quinot@adacore.com>
10504 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10507 2011-08-02 Geert Bosch <bosch@adacore.com>
10509 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10511 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10513 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10514 computed value of Base_Type.
10516 2011-08-02 Yannick Moy <moy@adacore.com>
10518 * restrict.adb (Check_Restriction): issue an error for any use of
10519 class-wide, even if the No_Dispatch restriction is not set.
10520 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10521 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10522 when completing a private extension, the type named in the private part
10523 is not the same as that named in the visible part.
10524 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10525 of an inherited primitive operations of a tagged type or type extension
10526 that returns the tagged type.
10527 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10528 function which returns True for an implicit operation inherited by the
10529 derived type declaration for the argument type.
10530 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10533 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10535 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10536 Process_Bounds, to perform analysis with expansion of a range or an
10537 expression that is the iteration scheme for a loop.
10538 (Analyze_Iterator_Specification): If domain of iteration is given by a
10539 function call with a controlled result, as is the case if call returns
10540 a predefined container, ensure that finalization actions are properly
10542 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10544 2011-08-02 Javier Miranda <miranda@adacore.com>
10546 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10547 * gcc-interface/Make-lang.in: Update dependencies.
10549 2011-08-02 Javier Miranda <miranda@adacore.com>
10551 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10552 determine if the analysis is performed using N or Original_Node (N).
10553 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10554 functionality of routine Is_Variable avoids code duplication.
10555 * checks.adb (Determine_Range): Handle temporaries generated by
10556 Remove_Side_Effects.
10558 2011-08-02 Javier Miranda <miranda@adacore.com>
10560 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10561 expansion of the condition. Required since the previous analysis was
10562 done with expansion disabled (see Resolve_Quantified_Expression) and
10563 hence checks were not inserted and record comparisons have not been
10566 2011-08-02 Ed Falis <falis@adacore.com>
10568 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10571 2011-08-02 Bob Duff <duff@adacore.com>
10573 * opt.ads: Minor comment fix.
10575 2011-08-02 Bob Duff <duff@adacore.com>
10577 * sem_ch12.adb (Analyze_Package_Instantiation,
10578 Analyze_Subprogram_Instantiation): Turn off style checking while
10579 analyzing an instance. Whatever style checks that apply to the generic
10580 unit should apply, so it makes no sense to apply them in an instance.
10581 This was causing trouble when compiling an instance of a runtime
10582 unit that violates the -gnatyO switch.
10583 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10584 one of the two case statements, causing spurious errors.
10586 2011-08-02 Robert Dewar <dewar@adacore.com>
10588 * uname.adb: Minor reformatting.
10589 * gnatcmd.adb: Minor reformatting.
10590 * exp_attr.adb: Minor reformatting.
10592 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10594 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10595 No_Dispatching_Calls, do not look for the Assign primitive, because
10596 predefined primitives are not created in this case.
10598 2011-08-02 Bob Duff <duff@adacore.com>
10600 * stylesw.ads: Minor comment fixes.
10602 2011-08-02 Robert Dewar <dewar@adacore.com>
10604 * freeze.adb (Add_To_Result): New procedure.
10606 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10608 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10609 time, if the specific run-time routines for handling streams of strings
10610 are not available, use the default mechanism.
10612 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10614 * s-regpat.ads: Fix typo.
10616 2011-08-02 Vincent Celier <celier@adacore.com>
10618 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10619 not null, call it to create the in memory config project file without
10620 parsing an existing default config project file.
10622 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10624 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10626 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10628 * sem_elim.adb: an abstract subprogram does not need an eliminate
10629 pragma for its descendant to be eliminable.
10631 2011-08-02 Ed Falis <falis@adacore.com>
10633 * init.c: revert to handling before previous checkin for VxWorks
10634 * s-intman-vxworks.adb: delete unnecessary declarations related to
10635 using Ada interrupt facilities for handling signals.
10636 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10637 * s-intman-vxworks.ads: Import __gnat_install_handler as
10638 Initialize_Interrupts.
10639 * s-taprop-vxworks.adb: Delete Signal_Mask.
10640 (Abort_Handler): change construction of mask to unblock exception
10643 2011-08-02 Jerome Guitton <guitton@adacore.com>
10645 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10646 Debug_Raise_Exception before propagation starts.
10648 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10650 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10651 to Restriction_Check_Required.
10652 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10653 * sem_res.adb (Resolve_Call): Likewise.
10654 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10656 2011-08-02 Bob Duff <duff@adacore.com>
10658 * stylesw.ads: Update comment.
10659 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10660 * errout.ads: Remove obsolete comment.
10662 2011-08-02 Javier Miranda <miranda@adacore.com>
10664 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10665 (Set_Is_Safe_To_Reevaluate): new procedure.
10666 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10667 assignment is allowed on safe-to-reevaluate variables.
10668 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10669 temporary created to remove side effects in expressions that use
10670 the secondary stack as safe-to-reevaluate.
10671 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10672 variables that are not true constants.
10674 2011-08-02 Robert Dewar <dewar@adacore.com>
10676 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10677 sem_res.adb, sem_ch6.adb: Minor reformatting.
10679 2011-08-02 Jerome Guitton <guitton@adacore.com>
10681 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10683 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10685 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10686 not set Overridden_Operation if subprogram is an initialization
10689 2011-08-02 Yannick Moy <moy@adacore.com>
10691 * par-ch6.adb: Correct obsolete name in comments
10692 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10693 which takes two message arguments (existing function takes one), with
10694 second message used for continuation.
10695 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10696 block statements that originate from a source block statement, not
10697 generated block statements
10698 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10699 symmetry with procedure case
10700 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10701 function to issue an error in formal mode if a package specification
10702 contains more than one tagged type or type extension.
10703 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10704 parameters matching formals of tagged types are objects (or ancestor
10705 type conversions of objects), not general expressions. Issue an error
10706 on view conversions that are not involving ancestor conversion of an
10708 (Resolve_Type_Conversion): in formal mode, issue an error on the
10709 operand of an ancestor type conversion which is not an object
10710 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10711 procedure so that it works also for actuals of function calls
10712 (Is_Actual_Tagged_Parameter): new function which determines if its
10713 argument is an actual parameter of a formal of tagged type in a
10715 (Is_SPARK_Object_Reference): new function which determines if the tree
10716 referenced by its argument represents an object in SPARK
10718 2011-08-02 Robert Dewar <dewar@adacore.com>
10720 * sem_ch3.adb: Minor reformatting
10721 Minor comment addition
10722 Minor error msg text change
10724 2011-08-02 Javier Miranda <miranda@adacore.com>
10726 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10727 function. Used to be more precise when we generate a variable plus one
10728 assignment to remove side effects in the evaluation of the Bound
10730 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10731 of the bound expression to force its re-analysis and thus expand the
10732 associated transient scope (if required). Code cleanup replacing the
10733 previous code that declared the constant entity by an invocation to
10734 routine Force_Evaluation which centralizes this work in the frontend.
10736 2011-08-02 Robert Dewar <dewar@adacore.com>
10738 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10739 (Base_Type): Now uses improved Is_Base_Type function
10740 * einfo.ads (Base_Type): Inline this function
10742 2011-08-02 Robert Dewar <dewar@adacore.com>
10744 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10745 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10747 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10749 * gcc-interface/Make-lang.in: Update dependencies.
10750 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10753 2011-08-02 Yannick Moy <moy@adacore.com>
10755 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10756 non-simple expression used in delta constraint
10757 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10758 index constraint which is not a subtype mark
10759 * par.adb: With and use Restrict
10760 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10761 mode on component type which is not a subtype mark and default
10762 expression on component
10763 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10764 of string which does not have a lower index bound equal to 1
10765 (Array_Type_Declaration): issue an error in formal mode on index or
10766 component type which is not a subtype mark, and on aliased keyword on
10768 (Derived_Type_Declaration): issue an error in formal mode on interface,
10769 limited or abstract type
10770 (Record_Type_Declaration): issue an error in formal mode on interface
10771 (Record_Type_Definition): issue an error in formal mode on tagged types
10772 and type extensions not declared in the specification of a library unit
10773 package; on null non-tagged record; on variant part
10775 2011-08-02 Vincent Celier <celier@adacore.com>
10777 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10778 not declared for qualified library project when Library_Name is not
10779 declared, but Library_Dir is.
10781 2011-08-02 Robert Dewar <dewar@adacore.com>
10783 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10784 pragmas (affects aspects [Component_]Default_Value
10785 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10786 component type for the resolution
10788 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10790 * einfo.adb (Base_Type): Tune implementation for speed.
10792 2011-08-02 Robert Dewar <dewar@adacore.com>
10794 * freeze.adb: Minor reformatting.
10796 2011-08-02 Thomas Quinot <quinot@adacore.com>
10798 * scos.ads: Update comments.
10800 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10802 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10803 base type, because the parent may be a subtype of a private type whose
10804 convention is established in a private part.
10806 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10808 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10809 statement in a block when the expansion of the return expression has
10810 created a finalization chain.
10811 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10812 with the parent node.
10813 Add N_Extended_Return_Statement to handle the case where a transient
10814 object declaration appears in the Return_Object_Declarations list of
10815 an extended return statement.
10817 2011-08-02 Matthew Gingell <gingell@adacore.com>
10819 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10820 unused parameter 'name'.
10822 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10824 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10825 inherited operation, check whether its alias, which is the source
10826 operastion that it renames, has been marked eliminated.
10828 2011-08-02 Javier Miranda <miranda@adacore.com>
10830 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10831 in-mode parameter whose type is an access type since it can be used to
10832 modify its designated object. Enforce code that handles as safe an
10833 access type that is not access-to-constant but it is the result of a
10834 previous removal of side-effects.
10835 (Remove_Side_Effects): Minor code reorganization of cases which require
10836 no action. Done to incorporate documentation on new cases uncovered
10837 working in this ticket: no action needed if this routine was invoked
10838 too early and the nodes are not yet decorated.
10839 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10840 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10841 were issued with actuals that are implicitly provided by
10844 2011-08-02 Robert Dewar <dewar@adacore.com>
10846 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10848 2011-08-02 Yannick Moy <moy@adacore.com>
10850 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10851 to issue an error in formal mode on attribute not supported in this mode
10852 (Analyze_Attribute): issue errors on standard attributes not supported
10854 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10855 comment, and issue error in formal mode on modulus which is not a power
10857 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10859 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10861 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10862 operator on modular type (except 'not').
10864 2011-08-02 Robert Dewar <dewar@adacore.com>
10866 * gnat_rm.texi: Minor reformatting.
10868 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10870 * s-osinte-linux.ads: Minor comment update and reformatting.
10871 * i-cexten.ads: Make this unit pure, as for its parent.
10872 Will allow its usage in more contexts if needed.
10874 2011-08-02 Robert Dewar <dewar@adacore.com>
10876 * s-utf_32.ads: Minor comment fix.
10878 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10880 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10881 operation of a tagged synchronized type, handle the case where the
10882 controlling argument is overloaded.
10884 2011-08-02 Yannick Moy <moy@adacore.com>
10886 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10887 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10888 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10889 SPARK mode and formal verification mode on processing SPARK restriction
10890 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10891 requiring consistency checking.
10893 2011-08-02 Robert Dewar <dewar@adacore.com>
10895 * sem_res.adb: Minor reformatting.
10897 2011-08-02 Robert Dewar <dewar@adacore.com>
10899 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10900 a-cforse.ads: Remove unneeded with of Ada.Containers
10901 Remove commented out pragma Inline's
10902 Move specifications of new subprograms to the actual specs
10904 2011-08-02 Yannick Moy <moy@adacore.com>
10906 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10907 a-cforse.ads: Update comments.
10909 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10911 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10913 2011-08-02 Robert Dewar <dewar@adacore.com>
10915 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10916 a-cforse.ads, a-cofove.ads: Minor reformatting.
10918 2011-08-02 Claire Dross <dross@adacore.com>
10920 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10921 a-cofove.ads: Add comments.
10923 2011-08-02 Yannick Moy <moy@adacore.com>
10925 * gnat_rm.texi: Document formal containers.
10927 2011-08-02 Emmanuel Briot <briot@adacore.com>
10929 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10930 are empty sections.
10932 2011-08-02 Robert Dewar <dewar@adacore.com>
10934 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10937 2011-08-02 Robert Dewar <dewar@adacore.com>
10939 * aspects.adb: New aspects Default_Value and Default_Component_Value
10940 New format of Aspect_Names table checks for omitted entries
10941 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10942 handling of boolean aspects for derived types.
10943 New aspects Default_Value and Default_Component_Value
10944 New format of Aspect_Names table checks for omitted entries
10945 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10946 (Has_Default_Value): New flag
10947 (Has_Default_Component_Value): New flag
10948 (Has_Default_Value): New flag
10949 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10951 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10952 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10953 Default_Value and Default_Component_Value
10954 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10955 New aspects Default_Value and Default_Component_Value
10956 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10957 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10959 2011-08-02 Vincent Celier <celier@adacore.com>
10961 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10962 inherit library kind.
10964 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10966 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10967 Minor reformatting.
10969 2011-08-02 Robert Dewar <dewar@adacore.com>
10971 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10973 2011-08-02 Yannick Moy <moy@adacore.com>
10975 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10977 2011-08-02 Robert Dewar <dewar@adacore.com>
10979 * impunit.adb: Add comment.
10981 2011-08-02 Yannick Moy <moy@adacore.com>
10983 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10984 qualification of aggregates in formal mode
10985 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10987 (Resolve_Aggregate): complete the test that an aggregate is adequately
10988 qualified in formal mode
10990 2011-08-02 Pascal Obry <obry@adacore.com>
10992 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10993 * mlib-prj.adb: Supress warning when compiling binder generated file.
10994 (Build_Library): Supress all warnings when compiling the binder
10997 2011-08-02 Yannick Moy <moy@adacore.com>
10999 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11001 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11002 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11003 Add with/use clauses to make Check_Formal_Restriction visible
11005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11007 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11008 in-parameters when type of the generic formal is private in the generic
11009 spec and non-private in the body.
11011 2011-08-02 Claire Dross <dross@adacore.com>
11013 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11014 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11015 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11016 * impunit.adb, Makefile.rtl: Take new files into account.
11018 2011-08-02 Robert Dewar <dewar@adacore.com>
11020 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11021 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11023 2011-08-02 Yannick Moy <moy@adacore.com>
11025 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11027 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11028 matching static array bounds, taking into account the special case of
11030 * sem_ch3.adb: Typo in comment.
11032 2011-08-02 Yannick Moy <moy@adacore.com>
11034 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11035 which issues an error in formal mode if its argument node is originally
11037 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11038 has a discriminant specification so that it does not include the case
11040 (Derived_Type_Declaration): move here the test that a derived type has a
11041 discriminant specification
11042 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11043 first element of a component association before accessing its choices
11044 (presence of component association is not enough)
11045 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11046 declaration is a library item before accessing the next element in a
11047 list, as library items are not member of lists
11048 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11049 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11050 Check_Formal_Restriction whenever possible.
11052 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11054 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11055 reference when needed.
11057 2011-08-02 Bob Duff <duff@adacore.com>
11059 * gnat_ugn.texi: Fix typo.
11061 2011-08-02 Vincent Celier <celier@adacore.com>
11063 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11064 archive file name. Do not use the full path name of archives for Open
11067 2011-08-02 Robert Dewar <dewar@adacore.com>
11069 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11070 Analyze_Aspect_Specifications
11072 (Analyze_Aspect_Specifications): New handling for boolean aspects
11073 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11074 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11075 sequence for Analyze_Aspect_Specifications
11076 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11077 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11079 2011-08-02 Robert Dewar <dewar@adacore.com>
11081 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11082 aspects, since these no longer exist.
11084 2011-08-02 Robert Dewar <dewar@adacore.com>
11086 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11087 semicolon, do not try to see if there are aspects following it.
11088 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11091 2011-08-02 Robert Dewar <dewar@adacore.com>
11093 * sem_ch8.adb, aspects.ads: Minor reformatting.
11095 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11097 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11098 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11100 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11102 2011-08-02 Yannick Moy <moy@adacore.com>
11104 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11105 mode on subprogram declaration outside of package specification, unless
11106 it is followed by a pragma Import
11107 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11108 Access_Type_Declaration): issue error in formal mode on access type
11109 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11111 (Analyze_Object_Declaration): issue error in formal mode on object
11112 declaration which does not respect SPARK restrictions
11113 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11114 declaration which does not respect SPARK restrictions
11115 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11116 error in formal mode on digits or delta constraint
11117 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11118 decimal fixed point type
11119 (Derived_Type_Declaration): issue error in formal mode on derived type
11120 other than type extensions of tagged record types
11121 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11122 with check on access definition
11123 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11124 mode on protected definition.
11125 (Analyze_Task_Definition): issue error in formal mode on task definition
11127 2011-08-02 Robert Dewar <dewar@adacore.com>
11129 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11131 2011-08-02 Javier Miranda <miranda@adacore.com>
11133 * sem_ch6.adb (Can_Override_Operator): New function.
11134 (Verify_Overriding_Indicator): Add missing code to check overriding
11135 indicator in operators. Fixes regression.
11136 (Check_Overriding_Indicator): Minor reformating after replacing the
11137 code that evaluates if the subprogram can override an operator by
11138 invocations to the above new function.
11140 (Write_Field26_Name): Add missing code to ensure that, following
11141 the documentation in einfo.ads, this field is not shown as attribute
11142 "Static_Initialization" on non-dispatching functions.
11144 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11146 * sem_res.adb (Resolve_Call): A call to
11147 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11148 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11149 i.e., when the second parameter is of type Time_Span.
11151 2011-08-02 Vincent Celier <celier@adacore.com>
11153 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11154 with an archive instead of -L<library dir> -l<library name>.
11156 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11158 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11159 mark the base types In_Use in addition to making the operations
11162 2011-08-02 Ed Falis <falis@adacore.com>
11164 * init.c: add and setup __gnat_signal_mask for the exception signals
11165 * s-inmaop-vxworks.adb: new file.
11166 * s-intman-vxworks.adb: remove unnecessary initializations and
11168 * s-intman-vxworks.ads: remove unnecessary variable
11169 * s-taprop-vxworks.adb: simplify signal initialization
11171 2011-08-02 Robert Dewar <dewar@adacore.com>
11173 * sem_ch8.adb: Minor code reorganization, comment updates.
11175 2011-08-02 Robert Dewar <dewar@adacore.com>
11177 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11178 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11180 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11181 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11183 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11185 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11186 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11187 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11188 use_type_clauses, to handle more efficiently use_type and use_all_type
11190 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11191 Ada2012 Use_All_Type clause.
11192 (Use_Class_Wide_Operations): new procedure.
11194 2011-08-02 Robert Dewar <dewar@adacore.com>
11196 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11197 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11198 expression to expression function.
11200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11202 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11203 if types are compatible.
11205 2011-08-02 Yannick Moy <moy@adacore.com>
11207 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11208 returns True if its argument array types have same dimension and same
11209 static bounds at each index.
11210 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11211 OUT or IN OUT paramaters which are not view conversions in SPARK.
11212 (Resolve_Arithmetic_Op): issue an error in formal mode on
11213 multiplication or division with operands of fixed point types which are
11214 not qualified or explicitly converted.
11215 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11216 Boolean or array type (except String) operands.
11217 (Resolve_Equality_Op): issue an error in formal mode on equality
11218 operators for array types other than String with non-matching static
11220 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11221 for array types with non-matching static bounds. Factorize the code in
11222 Matching_Static_Array_Bounds.
11223 (Resolve_Qualified_Expression): issue an error in formal mode on
11224 qualified expressions for array types with non-matching static bounds.
11225 (Resolve_Type_Conversion): issue an error in formal mode on type
11226 conversion for array types with non-matching static bounds
11228 2011-08-02 Robert Dewar <dewar@adacore.com>
11230 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11232 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11234 * par-ch9.adb: save location of entry for proper error message.
11236 2011-08-02 Javier Miranda <miranda@adacore.com>
11238 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11239 (Use_Full_View) which permits this routine to climb through the
11240 ancestors using the full-view of private parents.
11241 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11242 Use_Full_View to true in calls to Is_Ancestor.
11243 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11244 true in call to Is_Ancestor.
11245 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11246 Use_Full_View to true in call to Is_Ancestor.
11247 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11248 call to Is_Ancestor.
11249 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11250 Use_Full_View to true in calls to Is_Ancestor.
11251 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11252 Make_Select_Specific_Data_Table, Register_Primitive,
11253 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11254 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11255 to true in call to Is_Ancestor.
11256 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11257 Use_Full_View to true in calls to Is_Ancestor.
11259 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11260 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11262 2011-08-02 Robert Dewar <dewar@adacore.com>
11264 * gnat_rm.texi: Minor reformatting.
11265 * sem_prag.adb: Minor reformatting.
11267 2011-08-02 Tristan Gingold <gingold@adacore.com>
11269 * vms_data.ads: Add VMS qualifier for -gnateP.
11271 2011-08-02 Robert Dewar <dewar@adacore.com>
11273 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11274 * par-ch7.adb (P_Package): Proper placement of aspects for package
11275 decl/instantiation.
11276 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11277 (End_Statements): Add Is_Sloc parameterr
11278 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11279 (Check_End): Ad Is_Sloc parameter
11280 (End_Statements): Add Is_Sloc parameterr
11282 2011-08-02 Vincent Celier <celier@adacore.com>
11284 * ug_words: Add VMS qualifier equivalent to -gnateP:
11285 /SYMBOL_PREPROCESSING.
11287 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11289 * gnat-style.texi: For hexadecimal numeric literals the typical
11290 grouping of digits is 4 to represent 2 bytes.
11291 A procedure spec which is split into several lines is indented two
11294 2011-08-02 Yannick Moy <moy@adacore.com>
11296 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11297 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11298 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11300 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11301 choice in array aggregate
11302 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11304 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11305 positional and named aggregate for record, or others in record
11306 aggregate, or multiple choice in record aggregate
11307 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11308 array operands to logical operations AND, OR and XOR do not have the
11309 same static lower and higher bounds
11310 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11312 2011-08-01 Robert Dewar <dewar@adacore.com>
11314 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11315 Replaces Last_Source_Node_In_Sequence.
11316 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11317 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11318 parens and blank in string (this was inconsistently implemented).
11320 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11321 blank in string (this was inconsistently implemented).
11323 (Set_Global_Switches): Set formal mode switches appropriately
11324 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11326 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11327 call Set_Error_Msg_Lang to set "spark" as language name.
11328 * par.adb: Remove unnecessary call to set formal language for errout
11329 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11330 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11332 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11333 calls to it, moved after resolution so that types are known
11334 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11335 result of concatenation is not of type String
11336 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11337 concatenation is not properly restricted
11338 * gnat_rm.texi: Add doc on pragma Spark_95.
11339 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11340 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11341 * gcc-interface/Make-lang.in: Update dependencies.
11343 2011-08-01 Javier Miranda <miranda@adacore.com>
11345 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11346 condition that detects if the overridden operation must replace an
11349 2011-08-01 Javier Miranda <miranda@adacore.com>
11351 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11352 code declarations inserted by Insert_Actions in each alternative of the
11353 N_Case_Expression node.
11355 2011-08-01 Robert Dewar <dewar@adacore.com>
11357 * sem_ch6.adb: Minor code reorganization.
11358 * sem_util.adb: Minor reformatting.
11360 2011-08-01 Pascal Obry <obry@adacore.com>
11362 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11363 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11365 2011-08-01 Yannick Moy <moy@adacore.com>
11367 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11368 literal or operator symbol which is prefixed
11369 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11370 mode on access attributes.
11371 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11372 that concatenation operands are properly restricted in formal mode
11373 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11374 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11375 result of the concatenation has a type different from String.
11376 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11377 Analyze_Quantified_Expression, Analyze_Slice,
11378 Analyze_Null): issue an error in formal mode on unsupported constructs
11380 (Analyze_Block_Statement): only issue error on source block statement
11381 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11382 function which returns the last node in a list of nodes for which
11383 Comes_From_Source returns True, if any
11384 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11385 Last_Source_Node_In_Sequence
11386 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11387 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11388 mode on unsupported constructs
11389 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11390 rest of the actions may be needed later on since the error is marked as
11392 * sinfo.ads: Typos in comments.
11394 2011-08-01 Pascal Obry <obry@adacore.com>
11396 * projects.texi: Minor editing.
11398 2011-08-01 Yannick Moy <moy@adacore.com>
11400 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11401 insertion character ~~
11402 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11403 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11404 with insertion character ~~
11405 (Set_Msg_Text): treat insertion character ~~
11406 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11407 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11408 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11409 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11410 errors related to the formal language restriction not serious
11411 (insertion character |).
11412 * par.adb (Par): set formal language for error messages if needed
11413 * sem_ch6.adb (Check_Missing_Return): take into account possible
11414 generated statements at the end of the function
11415 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11416 enumeration value to define a new pragma SPARK_95
11417 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11418 SPARK_Version): new type and variables to store the SPARK version
11420 (SPARK_Mode): return True when SPARK_Version is set
11421 * par-prag.adb: Correct indentation
11422 (Prag): take Pragma_SPARK_95 into account
11423 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11426 2011-08-01 Robert Dewar <dewar@adacore.com>
11428 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11429 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11430 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11432 2011-08-01 Pascal Obry <obry@adacore.com>
11434 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11435 Target_Name to Get_Path call.
11436 (Parse_Single_Project): Likewise.
11437 (Post_Parse_Context_Clause): Likewise.
11438 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11439 Call Initialise_Project_Path with the proper Target_Name.
11440 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11442 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11443 with the proper Target_Name.
11444 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11445 Part.Parse routine.
11446 (Parse_Project_And_Apply_Config): Likewise.
11447 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11448 This is fine as this part of the code is supporting only native
11450 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11451 is fine as this part of the code is supporting only native compilation.
11453 2011-08-01 Yannick Moy <moy@adacore.com>
11455 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11456 of homonym, unless the homonym is one of the cases allowed in SPARK
11457 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11458 package declaration occurring after a body.
11460 2011-08-01 Robert Dewar <dewar@adacore.com>
11462 * checks.adb, exp_ch4.adb: Minor reformatting.
11464 2011-08-01 Javier Miranda <miranda@adacore.com>
11466 * einfo.ads (Access_Disp_Table): Fix documentation.
11467 (Dispatch_Table_Wrappers): Fix documentation.
11469 2011-08-01 Pascal Obry <obry@adacore.com>
11471 * prj-env.adb, prj-env.ads: Minor reformatting.
11473 2011-08-01 Yannick Moy <moy@adacore.com>
11475 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11476 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11477 procedures out of these packages.
11478 * errout.ads, errout.adb
11479 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11480 procedures in of this package
11481 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11482 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11483 on misplaced later vs initial declarations, like in Ada 83
11484 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11485 formal mode on attribute of private type whose full type declaration
11487 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11488 package declaration inside a package specification
11489 (Analyze_Full_Type_Declaration): issue error in formal mode on
11490 controlled type or discriminant type
11491 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11492 user-defined operator means that it should come from the source
11493 (New_Overloaded_Entity): issue error in formal mode on overloaded
11495 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11497 2011-08-01 Thomas Quinot <quinot@adacore.com>
11499 * atree.adb: Minor reformatting.
11500 * checks.adb: Minor reformatting.
11502 2011-08-01 Vincent Celier <celier@adacore.com>
11504 * s-parame-vms-ia64.ads: Fix typo in comment
11506 * s-parame-vms-restrict.ads: Removed, unused.
11508 2011-08-01 Javier Miranda <miranda@adacore.com>
11511 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11513 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11514 * sem_ch3.ads, sem_ch3.adb
11515 (Is_Constant_Bound): New extended version of the subprogram that was
11516 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11517 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11518 * sem_aux.ads (Constant_Value): Fix typo in comment.
11519 * checks.adb (Generate_Index_Checks): New implementation which, for
11520 array objects with constant bounds, generates the runtime check
11521 referencing the bounds of the array type. For other cases this routine
11522 provides its previous behavior obtaining such values from the array
11524 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11526 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11527 we cannot have semantic interpretations of the new node.
11529 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11531 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11534 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11536 * sem_ch8.adb: Minor code editing.
11537 * s-vxwext.adb: Remove trailing space.
11538 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11539 consistency with other files.
11541 2011-08-01 Thomas Quinot <quinot@adacore.com>
11543 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11545 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11547 * par-ch10.adb: reject parameterized expressions as compilation unit.
11548 * sem_ch4.adb: handle properly conditional expression with overloaded
11549 then_clause and no else_clause.
11551 2011-08-01 Tristan Gingold <gingold@adacore.com>
11553 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11554 like done by System.Aux_DEC.
11555 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11557 2011-08-01 Yannick Moy <moy@adacore.com>
11559 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11560 missing label at end of declaration (subprogram or package)
11561 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11562 of positional and named parameter association
11563 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11564 Error_Msg_SP which adds a prefix to the error message giving the name
11565 of the formal language analyzed
11566 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11567 access result type in subprogram, unconstrained array as result type,.
11568 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11570 * sem_ch8.adb: Code clean up.
11572 2011-08-01 Javier Miranda <miranda@adacore.com>
11574 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11575 * einfo.ads (Access_Disp_Table): Fix documentation.
11576 (Dispatch_Table_Wrappers): Fix documentation.
11577 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11578 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11579 to enforce the documentation of this attribute.
11580 (Set_Is_Interface): Cleanup the assertion.
11581 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11582 the Underlying_Type entity before reading attribute Access_Disp_Table.
11583 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11584 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11585 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11586 the Underlying_Type entity before reading attribute Access_Disp_Table.
11587 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11588 Locate the Underlying_Type entity before reading attribute
11591 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11593 * s-poosiz.ads: Additional overriding indicators.
11595 2011-08-01 Yannick Moy <moy@adacore.com>
11597 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11599 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11600 parameter specification does not include a subtype mark.
11601 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11602 formal mode on abstract subprogram.
11603 (Analyze_Subprogram_Specification): issue error in formal mode on
11604 user-defined operator.
11605 (Process_Formals): issue error in formal mode on access parameter and
11606 default expression.
11607 * sem_ch9.adb (Analyze_Abort_Statement,
11608 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11609 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11610 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11611 Analyze_Requeue, Analyze_Selective_Accept,
11612 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11613 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11614 issue error in formal mode on user-defined raise statement.
11616 2011-08-01 Thomas Quinot <quinot@adacore.com>
11618 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11619 declaration being hidden when overriding an implicit inherited
11621 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11622 (-gnats), do not complain about a source file that contains only a
11625 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11627 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11628 variable if already set.
11630 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11632 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11633 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11634 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11635 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11636 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11637 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11638 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11639 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11640 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11641 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11642 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11643 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11644 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11645 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11646 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11647 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11648 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11649 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11650 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11651 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11652 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11653 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11654 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11655 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11656 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11657 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11658 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11659 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11660 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11661 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11662 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11663 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11664 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11665 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11666 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11667 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11668 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11669 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11670 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11671 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11672 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11673 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11674 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11675 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11676 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11677 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11678 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11679 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11680 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11681 Use GNAT instead of GNARL.
11683 2011-08-01 Bob Duff <duff@adacore.com>
11685 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11686 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11687 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11690 2011-08-01 Yannick Moy <moy@adacore.com>
11692 * debug.adb (d.D) reverve flag for the SPARK mode
11693 (d.E) reverve flag for SPARK generation mode
11694 (d.F) reverve flag for Why generation mode
11695 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11696 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11697 functions which return True when the corresponding modes are set
11698 (Formal_Language): return "spark" or "alfa" when in formal verification
11700 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11701 Error_Msg to prefix the error message with a tag giving the formal
11703 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11704 message with a tag giving the formal language
11705 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11707 (Analyze_Case_Statement): issue error in formal mode on case statement
11708 with a single "others" case alternative
11709 (Analyze_Exit_Statement): issue errors in formal mode on exit
11710 statements which do not respect SPARK restrictions
11711 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11712 (Check_Unreachable_Code): always issue an error (not a warning) in
11713 formal mode on unreachable code (concerns both code after an infinite
11714 loop and after an unconditional jump, both not allowed in SPARK)
11715 * sem_ch6.adb (Analyze_Return_Statement): add call to
11716 Set_Return_Present for a procedure containing a return statement
11717 (already done for functions in Analyze_Function_Return)
11718 (Analyze_Function_Return): issue error in formal mode on extended
11719 return or if return is not last statement in function
11720 (Check_Missing_Return): issue error in formal mode if function does
11721 not end with return or if procedure contains a return
11722 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11723 function to detect if there is an inner scope of its parameter S which
11726 2011-08-01 Thomas Quinot <quinot@adacore.com>
11728 * sem_ch6.ads: Minor reformatting.
11730 2011-08-01 Javier Miranda <miranda@adacore.com>
11732 * sem_util.adb (Abstract_Interface_List): Complete condition when
11733 processing private type declarations to avoid reading unavailable
11735 (Is_Synchronized_Tagged_Type): Complete condition when processing
11736 private extension declaration nodes to avoid reading unavailable
11739 2011-08-01 Thomas Quinot <quinot@adacore.com>
11741 * sem_ch3.adb: Minor reformatting.
11743 2011-08-01 Thomas Quinot <quinot@adacore.com>
11745 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11746 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11747 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11748 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11749 for VMS, instead parametrize the common implementation with
11750 System.Parameters declarations.
11752 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11754 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11756 2011-08-01 Tristan Gingold <gingold@adacore.com>
11758 * seh_init.c: Fix SEH handler installation on win64.
11760 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11762 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11763 double analysis of an anonymous access to subprogram, because it can
11764 lead to improper sharing of profiles and a back-end crash.
11766 2011-08-01 Robert Dewar <dewar@adacore.com>
11768 * make.adb, sem_ch4.adb: Minor reformatting.
11769 * gcc-interface/Make-lang.in: Update dependencies.
11770 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11772 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11774 * gnat_rm.texi: Fix definition of Long_Integer.
11776 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11778 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11779 to prevent storage exhaustion.
11780 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11781 finalized is a function body, insert the cleanup code before the final
11782 return statement, to prevent spurious warnings.
11783 * s-pooglo.ads: add overriding indicator.
11785 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11787 * sem_ch4.adb (Operator_Check): improve error message when both a
11788 with_clause and a use_clause are needed to make operator usage legal.
11789 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11790 determine whether a compilation unit is visible within an other,
11791 either through a with_clause in the current unit, or a with_clause in
11792 its library unit or one one of its parents.
11794 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11796 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11797 over an arbitrary expression of an array or container type.
11798 * lib-xref.adb: clarify comment.
11800 2011-08-01 Bob Duff <duff@adacore.com>
11802 * einfo.ads: Minor reformatting.
11803 * debug.adb: Minor comment improvement.
11805 2011-08-01 Javier Miranda <miranda@adacore.com>
11807 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11808 consider hidden subprograms as valid candidates.
11810 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11812 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11814 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11816 * gnat_ugn.texi: Fix typo.
11818 2011-08-01 Robert Dewar <dewar@adacore.com>
11820 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11821 lib-xref.adb: Minor reformatting
11823 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11825 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11826 when to generate a call to Move_Final_List.
11827 (Has_Controlled_Parts): Remove this function.
11829 2011-08-01 Geert Bosch <bosch@adacore.com>
11831 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11832 "," in choice list.
11834 2011-08-01 Thomas Quinot <quinot@adacore.com>
11836 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11837 explicit raise of a predefined exception as Comes_From_Source if the
11838 original N_Raise_Statement comes from source.
11840 2011-08-01 Robert Dewar <dewar@adacore.com>
11842 * sinfo.ads: Add comment.
11843 * sem_ch6.adb: Minor reformatting.
11845 2011-08-01 Robert Dewar <dewar@adacore.com>
11847 * freeze.adb (Freeze_Entity): Refine check for bad component size
11848 clause to avoid rejecting confirming clause when atomic/aliased present.
11850 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11852 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11853 better determine whether an entity reference is a write.
11854 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11856 * lib-xref.adb (Output_References): Do no suppress a read reference at
11857 the same location as an immediately preceeding modify-reference, to
11858 handle properly in-out actuals.
11860 2011-08-01 Tristan Gingold <gingold@adacore.com>
11862 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11864 2011-08-01 Quentin Ochem <ochem@adacore.com>
11866 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11867 heap to compute the result.
11869 2011-08-01 Robert Dewar <dewar@adacore.com>
11871 * atree.ads: Minor reformatting.
11873 2011-08-01 Emmanuel Briot <briot@adacore.com>
11875 * g-expect.adb (Get_Command_Output): Fix memory leak.
11877 2011-08-01 Geert Bosch <bosch@adacore.com>
11879 * cstand.adb (P_Float_Type): New procedure to print the definition of
11880 predefined fpt types.
11881 (P_Mixed_Name): New procedure to print a name using mixed case
11882 (Print_Standard): Use P_Float_Type for printing floating point types
11883 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11884 precision IEEE float.
11886 2011-08-01 Thomas Quinot <quinot@adacore.com>
11888 * sem_ch3.adb: Minor reformatting.
11890 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11892 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11893 the completion of a generic function, insert the new body rather than
11894 rewriting the original.
11896 2011-08-01 Yannick Moy <moy@adacore.com>
11898 * sinfo.ads, errout.ads: Typos in comments.
11900 2011-08-01 Robert Dewar <dewar@adacore.com>
11902 * par-endh.adb: Minor reformatting.
11904 2011-08-01 Robert Dewar <dewar@adacore.com>
11906 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11907 (Pre_Post_Aspects): New subtype.
11908 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11909 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11910 * par-ch7.adb (P_Package): Remove Decl parameter
11911 (P_Package): Handle new syntax for aspects (before IS)
11912 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11914 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11915 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11916 (P_Package): Remove Decl parameter
11917 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11919 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11921 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11922 * sinfo.ads: Document new syntax for aspects in packages etc.
11923 * sprint.adb: Handle new syntax of aspects before IS in package
11925 2011-08-01 Thomas Quinot <quinot@adacore.com>
11927 * atree.ads: Minor reformatting.
11928 * sem_prag.adb: Minor reformatting.
11930 2011-08-01 Robert Dewar <dewar@adacore.com>
11932 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11933 case expr alternative.
11935 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11937 * sem_ch12.adb: Fix typo.
11939 2011-08-01 Geert Bosch <bosch@adacore.com>
11941 * sem_prag.adb (Check_No_Link_Name): New procedure.
11942 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11943 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11944 instead of Standard_Long_Long_Float_Size global. Preparation for
11945 eventual removal of per type constants.
11946 * exp_util.ads (Get_Stream_Size): New function returning the stream
11947 size value of subtype E.
11948 * exp_util.adb (Get_Stream_Size): Implement new function.
11949 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11951 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11953 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11955 2011-08-01 Geert Bosch <bosch@adacore.com>
11957 * cstand.adb: Fix comments.
11958 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11959 count of arguments.
11961 2011-08-01 Robert Dewar <dewar@adacore.com>
11963 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11965 2011-08-01 Geert Bosch <bosch@adacore.com>
11967 * atree.ads: Fix comment.
11969 2011-08-01 Robert Dewar <dewar@adacore.com>
11971 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11972 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11973 * par.adb: Add with for Namet.Sp.
11974 * par-tchk.adb: Minor reformatting.
11976 2011-08-01 Vincent Celier <celier@adacore.com>
11978 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11979 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11980 of the init procedure of a SAL.
11981 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11984 2011-08-01 Thomas Quinot <quinot@adacore.com>
11986 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11989 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11991 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11993 2011-08-01 Thomas Quinot <quinot@adacore.com>
11995 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11996 conformant with its spec (return True only for types that have
11997 an overriding Initialize primitive operation that prevents them from
11998 having preelaborable initialization).
11999 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12000 initialization for controlled types in Ada 2005 or later mode.
12002 2011-08-01 Robert Dewar <dewar@adacore.com>
12004 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12006 (Same_Aspect): New function.
12007 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12008 Type_Invariant, Precondition, Postcondition.
12009 * snames.ads-tmpl: Add Name_Type_Invariant.
12011 2011-08-01 Robert Dewar <dewar@adacore.com>
12013 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12015 (Freeze_All_Ent): Fix error in handling inherited aspects.
12016 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12017 already analyzed, but don't skip entire processing of a declaration,
12018 that's wrong in some cases of declarations being rewritten.
12019 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12020 Don't delay for integer, string literals
12021 Treat predicates in usual manner for delay, remove special case code,
12023 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12024 (Build_Predicate_Function): Update saved expression in aspect
12025 (Build_Invariant_Procedure): Update saved expression in aspect
12026 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12027 of replacement of discriminant references if the reference is simple.
12029 2011-08-01 Robert Dewar <dewar@adacore.com>
12031 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12032 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12033 Static_Predicate and Dynamic_Predicate.
12034 (Build_Predicate_Function): Add processing for Static_Predicate
12035 and Dynamic_Predicate.
12036 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12037 (From_Static_Predicate): New flag
12038 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12040 2011-08-01 Robert Dewar <dewar@adacore.com>
12042 * usage.adb: Documentation cleanup for Ada version modes in usage.
12043 * expander.adb: Minor reformatting.
12045 2011-08-01 Robert Dewar <dewar@adacore.com>
12047 * atree.ads: Minor comment fix.
12048 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12049 a-witeio.ads, sem_prag.adb: Minor reformatting.
12051 2011-08-01 Doug Rupp <rupp@adacore.com>
12053 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12054 pointers. Use descrip.h header file for convenience. Add some
12057 2011-08-01 Robert Dewar <dewar@adacore.com>
12059 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12060 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12061 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12063 (Check_Aspect_At_End_Of_Declarations): New procedure
12064 (Analye_Aspect_Specification): Minor changes for above procedures
12065 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12066 specification node as well.
12068 2011-08-01 Pascal Obry <obry@adacore.com>
12070 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12071 Windows files. Use GetFilesAttributes() in this case to check for file
12072 existence instead of returning with an error code.
12074 2011-08-01 Vincent Celier <celier@adacore.com>
12076 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12077 High is above Source length.
12079 2011-08-01 Robert Dewar <dewar@adacore.com>
12081 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12083 2011-08-01 Robert Dewar <dewar@adacore.com>
12085 * aspects.ads (Boolean_Aspects): New subtype.
12086 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12087 for derived types in cases where the parent type and derived type have
12089 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12090 with aspects when parent type also has aspects.
12091 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12092 boolean expression at this point).
12093 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12094 accordance with final decision on the Ada 2012 feature.
12095 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12097 2011-08-01 Matthew Heaney <heaney@adacore.com>
12099 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12101 2011-08-01 Pascal Obry <obry@adacore.com>
12103 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12104 Fix Replace_Slice when High is above current string size.
12105 (Replace_Slice): Fix DL computation when High is above current
12108 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12110 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12112 2011-08-01 Matthew Heaney <heaney@adacore.com>
12114 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12117 2011-08-01 Pascal Obry <obry@adacore.com>
12119 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12122 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12124 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12125 access to protected subprograms in generic bodies.
12126 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12127 protected type, indicate that the convention of the subprogram is
12128 Convention_Protected, because it may be used in subsequent declarations
12129 within the protected declaration.
12131 2011-08-01 Vincent Celier <celier@adacore.com>
12133 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12134 and "final" procedures when the name of the library is "ada", to avoid
12135 duplicate symbols "adainit" and "adafinal" in executables.
12137 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12139 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12140 quantified expression that appears within a postcondition and uses the
12141 Ada2012 'Result attribute.
12143 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12145 * init.c (__gnat_error_handler): Cast reason to int.
12146 (__gnat_install_handler): Explain sa_sigaction use.
12148 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12150 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12151 subprogram has copy-in copy-out parameters, try to promote the mode of
12152 the return type if it is passed in registers.
12154 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12156 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12157 left operand as addressable.
12159 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12161 * gcc-interface/gigi.h (build_function_stub): Remove.
12162 (build_return_expr): Likewise.
12163 (convert_vms_descriptor): Declare.
12164 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12165 (build_function_stub): Move to...
12166 * gcc-interface/utils2.c (build_return_expr): Move to...
12167 * gcc-interface/trans.c (build_function_stub): ...here.
12168 (build_return_expr): ...here.
12169 (Subprogram_Body_to_gnu): Add local variable for language_function.
12170 Disconnect the parameter attributes cache, if any, once done with it.
12171 Call end_subprog_body only after setting the end_locus.
12172 Build the stub associated with the function, if any, at the very end.
12173 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12174 variables and streamline control flow.
12176 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12179 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12180 g-trasym-dwarf.adb.
12182 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12185 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12186 Assign to act.sa_sigaction.
12187 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12188 current->return_address to char * before arithmetic.
12190 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12192 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12193 Correct argument types.
12194 Extract code from reason.
12195 (__gnat_install_handler): Assign to act.sa_sigaction.
12197 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12199 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12200 (GNAT1_OBJS): ...here.
12202 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12205 * g-socthi-mingw.adb (Fill): Fix formatting.
12207 * gcc-interface/gigi.h: Move around comment.
12209 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12212 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12214 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12217 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12219 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12221 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12222 range comparison if Pmode is SImode.
12224 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12225 Eric Botcazou <ebotcazou@adacore.com>
12227 * adadecode.c: Wrap up in extern "C" block.
12228 * adadecode.h: Likewise.
12229 * adaint.c: Likewise. Remove 'const' keyword.
12230 * adaint.h: Likewise.
12231 * argv.c: Likewise.
12232 * atree.h: Likewise.
12234 * cstreams.c: Likewise.
12236 * exit.c: Likewise.
12238 * final.c: Likewise.
12239 * init.c: Likewise.
12240 * initialize.c: Likewise.
12241 * link.c: Likewise.
12242 * namet.h: Likewise.
12243 * nlists.h: Likewise.
12244 * raise.c: Likewise.
12245 * raise.h: Likewise.
12246 * repinfo.h: Likewise.
12247 * seh_init.c: Likewise.
12248 * targext.c: Likewise.
12249 * tracebak.c: Likewise.
12250 * uintp.h: Likewise.
12251 * urealp.h: Likewise.
12252 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12253 * xsinfo.adb: Likewise.
12254 * xsnamest.adb: Likewise.
12255 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12256 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12257 * gcc-interface/misc.c: Likewise.
12258 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12259 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12260 ada/targext.o here...
12261 (GNAT_ADA_OBJS): ...and not here.
12262 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12263 (GNATBIND_OBJS): Reorder.
12265 2011-07-07 Richard Henderson <rth@redhat.com>
12267 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12268 dwarf2out_frame_init.
12270 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12272 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12274 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12277 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12279 2011-07-06 Richard Guenther <rguenther@suse.de>
12281 * gcc-interface/misc.c (gnat_init): Merge calls to
12282 build_common_tree_nodes and build_common_tree_nodes_2.
12283 Re-initialize boolean_false_node.
12285 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12286 Olivier Hainque <hainque@adacore.com>
12287 Nicolas Setton <setton@adacore.com>
12289 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12290 the type according to the ARTIFICIAL_P parameter.
12291 (create_type_decl): Likewise.
12292 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12294 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12296 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12297 (gnatbind): Likewise.
12299 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12301 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12303 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12305 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12306 local variable throughout. Remove useless call to Base_Type.
12307 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12308 Take it also into account for the volatileness of the field. Set the
12309 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12311 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12313 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12314 on a dereference built for a by-ref object if it has an address clause.
12316 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12318 * einfo.ads (Address_Taken): Document use for the second argument of
12319 Asm_Input and Asm_Output attributes.
12320 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12321 argument is an entity name, then set Address_Taken on it.
12322 <Attribute_Asm_Output>: Likewise.
12323 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12324 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12325 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12326 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12328 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12330 PR middle-end/46500
12331 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12333 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12335 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12336 (ada/utils.o): Update dependencies.
12337 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12338 ../../../libcpp/libcpp.a.
12339 * gcc-interface/utils.c: Include common/common-target.h.
12340 (process_attributes): Use targetm_common.have_named_sections.
12342 2011-06-07 Richard Guenther <rguenther@suse.de>
12344 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12347 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12349 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12350 TREE_THIS_NOTRAP flag.
12352 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12354 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12357 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12359 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12360 constants whose full view has discriminants specially.
12362 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12364 * gcc-interface/utils.c: Include diagnostic.h.
12365 (gnat_write_global_declarations): Output debug information for all
12366 global type declarations before finalizing the compilation unit.
12367 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12369 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12371 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12373 2011-05-25 Kai Tietz <ktietz@redhat.com>
12375 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12376 initialization instead of const/none-const pointer assignment.
12378 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12380 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12381 $(EXTRA_GNAT1_OBJS).
12382 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12383 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12384 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12385 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12386 libcommon-target.a instead of prefix.o.
12388 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12391 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12393 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12395 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12396 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12397 instead of version.o.
12399 2011-05-18 Kai Tietz <ktietz@redhat.com>
12401 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12402 boolean_false_node instead of integer_zero_node.
12403 (convert_with_check): Likewise.
12404 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12406 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12408 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12409 type of the parameter is an unconstrained array, convert the actual to
12410 the type of the formal in the In Out and Out cases as well.
12412 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12414 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12415 call build_function_type_array or build_varargs_function_type_array
12417 (create_subprog_type): Don't call build_function_type; call
12418 build_function_type_vec instead.
12420 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12422 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12423 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12424 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12426 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12428 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12430 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12431 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12433 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12435 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12437 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12439 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12440 instead of accessing TYPE_ARG_TYPES directly.
12441 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12443 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12446 * gcc-interface/gigi.h (get_variant_part): Declare.
12447 * gcc-interface/decl.c (get_variant_part): Make global.
12448 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12449 types have the same constant size, are record types and T1 has a
12450 variant part while T2 doesn't.
12452 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12454 * gcc-interface/utils.c (begin_subprog_body): Do not call
12456 (end_subprog_body): Likewise.
12458 2011-05-04 Richard Guenther <rguenther@suse.de>
12460 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12462 (pos_to_constructor): Likewise.
12464 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12465 Eric Botcazou <ebotcazou@adacore.com>
12467 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12468 of build_function_type. Adjust calls to...
12469 (build_raise_check): ...this. Do not take a void_tree parameter.
12470 Call build_function_type_list instead of build_function_type.
12471 Fix head comment and swap couple of conditional blocks.
12473 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12475 * gnatvsn.ads (Library_Version): Bump to 4.7.
12476 (Current_Year): Bump to 2011.
12478 2011-04-29 Michael Matz <matz@suse.de>
12480 * gcc-interface/misc.c (gnat_handle_option): Set
12481 warn_maybe_uninitialized.
12483 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12485 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12486 the Watson/McCabe paper.
12488 2011-04-23 Jim Meyering <meyering@redhat.com>
12490 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12492 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12494 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12497 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12499 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12501 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12502 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12503 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12504 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12505 <all>: Do not set flags on the reused DECL node coming from an alias.
12506 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12507 don't need debug info here...
12508 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12509 (gigi): Adjust calls to create_subprog_decl.
12510 (build_raise_check): Likewise.
12511 (establish_gnat_vms_condition_handler): Likewise.
12512 (Compilation_Unit_to_gnu): Likewise.
12513 (gnat_to_gnu): Likewise.
12515 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12517 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12518 (NO_REORDER_ADAFLAGS): New variable.
12519 (EXTRA_GNATTOOLS): Always define.
12520 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12521 Clean up and adjust list of files compiled with special options.
12522 * gcc-interface/Make-lang.in: Likewise.
12523 (ada/decl.o): Cosmetical change.
12524 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12526 2011-04-20 Jim Meyering <meyering@redhat.com>
12528 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12530 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12532 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12533 $(CFLAGS) on the link line.
12535 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12537 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12538 padded type built for the return type if it is unconstrained.
12540 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12542 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12544 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12546 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12547 before calling TREE_CHAIN.
12548 * gcc-interface/misc.c (gnat_init_ts): New function.
12549 (LANG_HOOKS_INIT_TS): Define.
12551 2011-04-12 Martin Jambor <mjambor@suse.cz>
12553 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12554 instead of cgraph_node.
12556 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12558 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12559 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12562 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12564 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12565 of aggregate types that contain a placeholder.
12567 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12569 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12571 (handle_type_generic_attribute): Likewise.
12573 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12576 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12578 2011-04-04 Kai Tietz <ktietz@redhat.com>
12581 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12584 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12586 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12587 type case, do not strip a padding type around the array type.
12589 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12591 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12594 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12596 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12597 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12598 code for -feliminate-unused-debug-types.
12599 (gnat_post_options): Likewise.
12601 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12603 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12604 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12607 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12609 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12610 DECL_ARTIFICIAL flag on enumeration types.
12612 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12614 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12615 fat pointer types artificial unconditionally.
12616 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12619 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12621 * gcc-interface/gigi.h (get_dummy_type): Declare.
12622 (build_dummy_unc_pointer_types): Likewise.
12623 (finish_fat_pointer_type): Likewise.
12624 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12625 fat pointer type has been built, complete it in place.
12626 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12627 and thin pointers. Remove useless variable.
12628 (finish_fat_pointer_type): Make global and move to...
12629 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12630 (get_dummy_type): New function.
12631 (build_dummy_unc_pointer_types): Likewise.
12632 (gnat_pushdecl): Propage the name to the anonymous variants only.
12633 (update_pointer_to): Only adjust the pointer types in the unconstrained
12636 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12638 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12639 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12640 if this is a Taft amendment type and the full declaration is available.
12641 * gcc-interface/trans.c (process_type): Likewise.
12642 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12643 (process_freeze_entity): Likewise.
12644 * gcc-interface/utils.c (dummy_global): New static variable.
12645 (gnat_write_global_declarations): If there are types declared as used
12646 at the global level, insert them in the global hash table.
12648 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12650 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12651 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12652 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12654 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12655 flag of the type accordingly.
12656 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12658 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12660 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12661 finalizing types when updating the pointers to the designated type.
12662 <all>: Finalize the deferred types even if we didn't defer processing
12663 of incomplete types in this invocation.
12665 2011-04-01 Olivier Hainque <hainque@adacore.com>
12666 Nicolas Setton <setton@adacore.com>
12667 Eric Botcazou <ebotcazou@adacore.com>
12669 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12670 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12672 2011-03-28 Kai Tietz <ktietz@redhat.com>
12674 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12676 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12677 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12679 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12681 2011-03-28 Tristan Gingold <gingold@adacore.com>
12684 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12685 Use ada output of gnatbind.
12686 (ada/b_gnatb.adb): Ditto.
12687 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12688 (ada.mostlyclean, ada.stage1)
12689 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12690 (ada.stagefeedback): Adjust.
12691 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12692 Use ada output of gnatbind.
12693 (b_gnatm.adb): Ditto.
12694 (b_gnatl.o, b_gnatm.o): New rules.
12696 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12698 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12699 for the padded type built to support a specified size or alignment.
12701 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12703 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12704 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12705 unconditionally to the end of the unit when the designated type is
12707 <all>: Rename local variable. Attempt to un-defer types only and do it
12708 for limited_with'ed types as well.
12709 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12710 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12711 consistently and remove redundant call to finalize_from_with_types.
12713 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12715 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12716 subprograms without a previous spec declared in the same unit.
12717 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12718 subprograms at the end of the unit instead of at the beginning.
12719 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12720 isn't public for the special handling of non-inline functions nested
12721 inside inline external functions.
12723 2011-03-25 Jeff Law <law@redhat.com>
12725 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12727 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12729 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12730 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12731 to compute Set_Size_Depends_On_Discriminant.
12732 (Layout_Type): Call it on array types in back-end layout mode.
12733 * sem_util.adb (Requires_Transient_Scope): Return true for array
12734 types only if the size depends on the value of discriminants.
12735 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12736 type if the RHS is a call to a function that returns an unconstrained
12737 type with default discriminant.
12739 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12741 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12742 non-conversion to the nominal result type at the end.
12744 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12746 * gcc-interface/trans.c (create_temporary): New function taken from...
12747 (create_init_temporary): ...here. Call it.
12748 (call_to_gnu): Create the temporary for the return value early, if any.
12749 Create it for a function with copy-in/copy-out parameters if there is
12750 no target; in other cases of copy-in/copy-out, use another temporary.
12751 Push the new binding level lazily. Add and rename local variables.
12753 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12755 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12757 (set_rm_size): Likewise.
12759 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12761 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12762 for the padded type built in order to support a specified alignment.
12763 Fix incorrect formatting.
12765 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12768 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12770 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12772 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12773 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12774 to the end of the list. Adjust recursive call. Rename local variable.
12775 If REORDER is true, reorder components of the record type.
12776 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12777 components_to_record and adjust the parameter list.
12779 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12781 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12782 disabled, use the variable for bounds of loop iteration scheme.
12784 2011-03-21 Kai Tietz <ktietz@redhat.com>
12787 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12789 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12791 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12792 out whether the expression is read-only. Short-circuit placeholder
12793 case and rename a couple of local variables.
12795 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12797 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12798 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12799 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12800 (convert): Deal with conversions from a smaller form type specially.
12802 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12804 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12805 its argument, except for the special -I- switch.
12807 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12809 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12812 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12814 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12816 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12818 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12820 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12821 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12822 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12823 Do not generate the check directly, instead instantiate the template
12824 check present in the descriptor.
12825 (make_descriptor_field): Move around.
12826 (build_vms_descriptor32): Build a template check in the POINTER field.
12827 (build_vms_descriptor): Remove useless suffixes.
12828 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12830 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12833 * targext.c: Include target files if IN_RTS is defined.
12835 2011-01-26 Richard Guenther <rguenther@suse.de>
12838 * targext.c: Include config.h.
12839 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12842 2011-01-04 Pascal Obry <obry@adacore.com>
12843 Eric Botcazou <ebotcazou@adacore.com>
12845 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12847 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12849 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12850 end-of-case on the end label and its associated gotos, if any.
12852 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12854 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12855 expressions of the parameter cache within the statement group of
12856 the CICO mechanism.
12858 2011-01-04 Olivier Hainque <hainque@adacore.com>
12859 Eric Botcazou <ebotcazou@adacore.com>
12861 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12862 (set_end_locus_from_node): New function.
12863 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12864 make and the function end_locus.
12865 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12866 for the elaboration subprogram.
12867 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12868 set the end_locus of the expression as well.
12870 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12873 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12874 variables that are referenced in exception handlers volatile.
12878 Copyright (C) 2011 Free Software Foundation, Inc.
12880 Copying and distribution of this file, with or without modification,
12881 are permitted in any medium without royalty provided the copyright
12882 notice and this notice are preserved.
12884 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12885 - fix bugs in the description of Source_Trace;
12886 - get rid of UNIT_NAME;
12888 2011-08-02 Javier Miranda <miranda@adacore.com>
12891 (Build_Dispatching_Requeue): Adding support for VM targets
12892 since we cannot directly reference the Tag entity.
12893 * exp_sel.adb (Build_K): Adding support for VM targets.
12894 (Build_S_Assignment): Adding support for VM targets.
12896 (Default_Prim_Op_Position): In VM targets do not restrict availability
12897 of predefined interface primitives to compiling in Ada 2005 mode.
12898 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12899 restricted to compiling in Ada 2005 mode.
12900 (Make_VM_TSD): Generate code that declares and initializes the OSD
12901 record. Needed to support dispatching calls through synchronized
12904 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12905 primitives associated with synchronized interfaces.
12906 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12907 primitives associated with synchronized interfaces.
12909 2011-08-02 Yannick Moy <moy@adacore.com>
12911 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12912 statements hidden in SPARK if preceded by the HIDE directive
12913 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12914 exception handlers as hidden in SPARK if preceded by the HIDE directive
12915 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12916 if starting with the HIDE directive
12917 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12918 starting with the HIDE directive; mark the declarations in a private
12919 part as hidden in SPARK if the private part starts with the HIDE
12921 * restrict.adb, restrict.ads
12922 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12923 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12924 argument node belongs to a part which is hidden in SPARK
12925 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12926 parts in SPARK; protect the possibly costly call to
12927 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12928 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12929 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12930 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12932 (Scan): recognize special comment starting with '#' and followed by
12933 SPARK keyword "hide" as a HIDE directive.
12935 2011-08-02 Yannick Moy <moy@adacore.com>
12937 * types.ads, erroutc.ads: Minor reformatting.
12939 2011-08-02 Vincent Celier <celier@adacore.com>
12941 * link.c: Add response file support for cross platforms.
12943 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12945 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12946 in an association, set parent field of copy before partial analysis.
12947 * sem_res.adb (Resolve_Slice): create reference to itype only when
12948 expansion is enabled.
12950 2011-08-02 Yannick Moy <moy@adacore.com>
12952 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12953 for new flag denoting which subprogram bodies are in ALFA
12954 * restrict.adb, sem_ch7.adb: Update comment
12955 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12956 sem_ch9.adb, sem_res.adb: Add calls to
12957 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12958 * sem_ch6.adb (Analyze_Function_Return): add calls to
12959 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12960 middle of the body, and extended return.
12961 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12962 False when missing return.
12963 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12964 to True for subprograms whose spec is in ALFA. Remove later on the flag
12965 on the entity used for a subprogram body when there exists a separate
12967 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12968 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12969 False, otherwise do nothing.
12971 2011-08-02 Robert Dewar <dewar@adacore.com>
12973 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12975 2011-08-02 Yannick Moy <moy@adacore.com>
12977 * sem_ch4.ads: minor formatting.
12979 2011-08-02 Yannick Moy <moy@adacore.com>
12981 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12982 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12983 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12984 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12985 opt.ads: cleanup of SPARK mode
12987 2011-08-02 Yannick Moy <moy@adacore.com>
12989 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12991 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12992 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12994 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12995 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12996 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12997 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12999 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13001 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13002 functions whose return type is not in ALFA.
13003 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13005 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13006 parameter's type is not in ALFA.
13007 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13010 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13012 * sem_ch6 (Analyze_Expression_Function): treat the function as
13013 Inline_Always, and introduce a subprogram declaration for it when it is
13015 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13016 expression functions, so that the back-end can determine whether they
13017 can in fact be inlined.
13018 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13019 a function body comes from an expression function.
13021 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13023 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13024 null exclusions to test Can_Never_Be_Null on the anonymous access types
13025 of the formals rather than testing the formals themselves. Exclude this
13026 check in cases where the Old_Formal is marked as a controlling formal,
13027 to avoid issuing spurious errors for bodies completing dispatching
13028 operations (due to the flag not getting set on controlling access
13029 formals in body specs).
13030 (Find_Corresponding_Spec): When checking full and subtype conformance of
13031 subprogram bodies in instances, pass Designated and E in that order, for
13032 consistency with the expected order of the formals (New_Id followed by
13035 2011-08-02 Robert Dewar <dewar@adacore.com>
13037 * sem_ch8.adb: Minor reformatting.
13039 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13041 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13042 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13043 primitive operations of class-wide actuals.
13045 2011-08-02 Javier Miranda <miranda@adacore.com>
13047 * exp_atag.ads, exp_atag.adb
13048 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13049 since its value is implicitly passed in argument Typ.
13050 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13051 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13052 Build_Common_Dispatching_Select_Statements.
13054 2011-08-02 Robert Dewar <dewar@adacore.com>
13056 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13057 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13058 Minor reformatting.
13060 2011-08-02 Robert Dewar <dewar@adacore.com>
13062 * sem_res.adb: Minor reformatting.
13063 * sem_prag.adb: Minor reformatting.
13065 2011-08-02 Javier Miranda <miranda@adacore.com>
13067 * exp_atag.adb, exp_atags.ads
13068 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13069 by the tagged type Entity. Required to use this routine in the VM
13070 targets since we do not have available the Tag entity in the VM
13073 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13074 Ada.Tags has not been previously loaded.
13076 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13077 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13079 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13080 view of enclosing scopes. Required to handle enclosing scopes that
13081 are synchronized types whose full view is a task type.
13083 (Build_VM_TSDs): Minor code improvement to avoid generating and
13084 analyzing lists with empty nodes.
13085 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13086 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13087 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13088 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13089 (Make_Select_Specific_Data_Table): Add support for VM targets.
13090 (Make_VM_TSD): Generate code to initialize the SSD structure of
13093 2011-08-02 Yannick Moy <moy@adacore.com>
13095 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13096 cross-references section in ALI.
13097 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13098 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13100 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13101 subprogram or package entity of a node
13102 (Is_Local_Reference_Type): new function returns True for references
13103 selected in local cross-references.
13104 (Lt): function extracted from Lt in Output_References
13105 (Write_Entity_Name): function extracted from Output_References
13106 (Generate_Definition): generate reference with type 'D' for definition
13107 of objects (object declaration and parameter specification), with
13108 appropriate locations and units, for use in local cross-references.
13109 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13110 references of type 'I' for initialization in object definition.
13111 (Output_References): move part of function Lt and procedure
13112 Write_Entity_Name outside of the body. Ignore references of types 'D'
13113 and 'I' introduced for local cross-references.
13114 (Output_Local_References): new procedure to output the local
13115 cross-references sections.
13116 (Lref_Entity_Status): new array defining whether an entity is a local
13117 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13118 with 'I' type when initialization expression is present.
13119 * get_scos.adb, get_scos.ads: Correct comments and typos
13121 2011-08-02 Javier Miranda <miranda@adacore.com>
13123 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13125 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13127 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13130 2011-08-02 Vincent Celier <celier@adacore.com>
13132 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13133 (No_Space_Img): New function
13134 (Find_Excluded_Sources): When reading from a file, record the file name
13135 and the line number for each excluded source.
13136 (Mark_Excluded_Sources): When reporting an error, if the excluded
13137 sources were read from a file, include file name and line number in
13140 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13142 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13144 2011-08-02 Robert Dewar <dewar@adacore.com>
13146 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13148 2011-08-02 Javier Miranda <miranda@adacore.com>
13150 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13151 generation of TSDs to the DOTNET compiler.
13152 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13153 generation of TSDs to the DOTNET compiler.
13155 2011-08-02 Javier Miranda <miranda@adacore.com>
13157 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13158 record of all the tagged types declared inside library level package
13159 declarations, library level package bodies or library level subprograms.
13160 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13161 associated with a given tagged type.
13162 (Build_VM_TSDs): New subprogram.
13163 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13164 compilation units that are subprograms.
13165 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13166 compilation units that are package bodies.
13167 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13168 units that are a package declaration or a package instantiation.
13169 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13170 reorganization to improve the error generated by the frontend when the
13171 function Ada.Tags.Secondary_Tag is not available.
13172 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13173 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13175 2011-08-02 Javier Miranda <miranda@adacore.com>
13177 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13179 2011-08-02 Robert Dewar <dewar@adacore.com>
13181 * s-imenne.ads: Minor reformatting.
13183 2011-08-02 Robert Dewar <dewar@adacore.com>
13185 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13186 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13187 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13189 2011-08-02 Robert Dewar <dewar@adacore.com>
13191 * einfo.ads (Materialize_Entity): Document this is only for renamings
13192 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13193 required debug information in the case where we transform the object
13194 declaration into a renaming declaration.
13195 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13197 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13198 Materialize_Entity.
13200 2011-08-02 Robert Dewar <dewar@adacore.com>
13202 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13203 Suppress_Init_Procs.
13204 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13205 Suppress_Initialization/Initialization_Suppressed.
13206 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13207 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13208 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13209 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13211 2011-08-02 Robert Dewar <dewar@adacore.com>
13213 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13214 Minor reformatting.
13216 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13218 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13219 only have inheritable classwide pre/postconditions.
13221 2011-08-02 Javier Miranda <miranda@adacore.com>
13223 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13224 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13225 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13226 checks if the external tag of a type is the same as the external tag
13227 of some other declaration.
13229 2011-08-02 Thomas Quinot <quinot@adacore.com>
13231 * s-taskin.ads: Minor reformatting.
13233 2011-08-02 Emmanuel Briot <briot@adacore.com>
13235 * g-comlin.adb (Display_Help): swap the order in which it prints the
13236 short help and the general usage.
13238 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13240 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13241 the aspect declarations and attach them to the generic copy for
13242 subsequent analysis.
13243 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13244 declarations of the generic tree to the new subprogram declarations.
13245 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13246 conditions that apply to a subprogram instance.
13248 2011-08-02 Robert Dewar <dewar@adacore.com>
13250 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13252 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13254 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13255 private type with a tagged full view is not derived in the immediate
13256 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13258 2011-08-02 Robert Dewar <dewar@adacore.com>
13260 * exp_ch4.adb: Minor reformatting.
13262 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13264 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13265 Ada2012 iterator, the loop will be rewritten during expansion into a
13266 while loop with a cursor and an element declaration. Do not analyze the
13267 body in this case, because if the container is for indefinite types the
13268 actual subtype of the elements will only be determined when the cursor
13269 declaration is analyzed.
13271 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13273 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13274 size/alignment related attributes in CodePeer_Mode.
13276 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13278 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13279 Prepend_Element, since this can result in the operation getting the
13280 wrong slot in the full type's dispatch table if the full type has
13281 inherited operations. The incomplete type's operation will get added
13282 to the proper position in the full type's primitives
13283 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13284 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13285 dispatching operations, since there are cases where nonprimitive
13286 subprograms can get added to the list of incomplete dependents (such
13287 as subprograms in nested packages).
13288 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13289 private part when determining whether to add a primitive with a
13290 parameter of a tagged incomplete type to the Private_Dependents list.
13291 Such primitives can also occur in the visible part, and should not have
13292 been excluded from being private dependents.
13293 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13294 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13295 list of a Taft-amendment incomplete type is a primitive before issuing
13296 an error that the full type must appear in the same unit. There are
13297 cases where nonprimitives can be in the list (such as subprograms in
13299 * sem_disp.adb (Derives_From): Use correct condition for checking that
13300 a formal's type is derived from the type of the corresponding formal in
13301 the parent subprogram (the condition was completely wrong). Add
13302 checking that was missing for controlling result types being derived
13303 from the result type of the parent operation.
13305 2011-08-02 Yannick Moy <moy@adacore.com>
13307 * errout.adb (First_Node): minor renaming
13308 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13311 2011-08-02 Yannick Moy <moy@adacore.com>
13313 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13314 before accessing operands.
13315 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13316 decide whether an initialization expression respects SPARK rules, as
13317 the plain node is the expanded one. This allows for more valid warnings
13319 * gnat_rm.texi: Minor update.
13321 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13323 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13326 2011-08-02 Robert Dewar <dewar@adacore.com>
13328 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13330 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13332 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13333 loop statements and the element renaming declaration with a block when
13334 the element type is controlled.
13336 2011-08-02 Yannick Moy <moy@adacore.com>
13338 * sinfo.ads: Minor formatting.
13340 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13342 * sem_aggr.adb (Add_Association): if the association has a box and no
13343 expression, use the Sloc of the aggregate itself for the new
13345 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13348 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13350 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13351 When a container is provided via a function call, generate a renaming
13352 of the function result. This avoids the creation of a transient scope
13353 and the premature finalization of the container.
13354 * exp_ch7.adb (Is_Container_Cursor): Removed.
13355 (Wrap_Transient_Declaration): Remove the supression of the finalization
13356 of the list controller when the declaration denotes a container cursor,
13359 2011-08-02 Yannick Moy <moy@adacore.com>
13361 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13362 node is from source, instead of the original node being from source.
13364 (Resolve_Array_Aggregate): refine the check for a static expression, to
13365 recognize also static ranges
13366 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13367 Array_Type_Declaration): postpone the test for the type being a subtype
13368 mark after the type has been resolved, so that component-selection and
13369 expanded-name are discriminated.
13370 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13371 to distinguish the case of an iteration scheme, so that an error is
13372 issed on a non-static range in SPARK except in an iteration scheme.
13373 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13374 In_Iter_Schm = True.
13375 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13376 user-defined operators so that they are allowed in renaming
13378 (Find_Selected_Component): refine the check for prefixing of operators
13379 so that they are allowed in renaming. Move the checks for restrictions
13380 on selector name after analysis discriminated between
13381 component-selection and expanded-name.
13382 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13383 concatenation argument of string type if it is static.
13384 * sem_util.adb, sem_util.ads
13385 (Check_Later_Vs_Basic_Declarations): add a new function
13386 Is_Later_Declarative_Item to decice which declarations are allowed as
13387 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13388 mode, add that renamings are considered as later items.
13389 (Enclosing_Package): new function to return the enclosing package
13390 (Enter_Name): correct the rule for homonyms in SPARK
13391 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13392 from source (result of expansion) to avoid issuing wrong warnings.
13394 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13396 * errout.adb: On anything but an expression First_Node returns its
13399 2011-08-02 Pascal Obry <obry@adacore.com>
13401 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13403 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13405 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13406 Set the associated loop as the related expression of internally
13408 * exp_ch7.adb (Is_Container_Cursor): New routine.
13409 (Wrap_Transient_Declaration): Supress the finalization of the list
13410 controller when the declaration denotes a container cursor.
13412 2011-08-02 Yannick Moy <moy@adacore.com>
13414 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13416 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13417 expression is a simple expression. This check cannot be performed in
13418 the semantics, so just drop it.
13419 (P_Index_Or_Discriminant_Constraint): move check that the index or
13420 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13421 semantics. Other cases were previously checked in the semantics.
13422 * par-ch4.adb (P_Name): move checks that a selector name is not
13423 character literal or an operator symbol to Find_Selected_Component in
13425 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13426 declarations are not placed after later declarations in a separate
13427 procedure in Sem_Util (possibly not the best choice?), to be used both
13428 during parsing, for Ada 83 mode, and during semantic analysis, for
13430 * par-endh.adb (Check_End): move check that end label is not missing
13431 to Process_End_Label in the semantics
13432 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13433 the special case for SPARK restriction
13434 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13435 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13436 parameter Force to issue the error message even on internal node (used
13437 for generated end label). Call Check_Restriction to check when an error
13438 must be issued. In SPARK mode, issue an error message even if the
13439 restriction is not set.
13440 (Check_Restriction): new procedure with an additional out parameter to
13441 inform the caller that a message has been issued
13442 * sem_aggr.adb: Minor modification of message
13443 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13444 instead of issuing an error message directly
13445 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13446 declarations are not placed after later declarations, by calling
13447 Check_Later_Vs_Basic_Declarations
13448 (Analyze_Subtype_Declaration): move here the check that an index or
13449 discriminant constraint must be a subtype mark. Change the check that
13450 a subtype of String must start at one so that it works on subtype marks.
13451 * sem_ch4.adb (Analyze_Call): move here the check that a named
13452 association cannot follow a positional one in a call
13453 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13454 instead of issuing an error message directly
13455 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13456 selector name is not a character literal or an operator symbol. Move
13457 here the check that the prefix of an expanded name cannot be a
13458 subprogram or a loop statement.
13459 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13460 procedure called from parsing and semantics to check that basic
13461 declarations are not placed after later declarations
13462 (Process_End_Label): move here the check that end label is not missing
13464 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13466 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13467 representation clause in codepeer mode, since it confuses CodePeer and
13468 does not bring useful info.
13470 2011-08-02 Ed Falis <falis@adacore.com>
13472 * init.c: initialize fp hw on MILS.
13474 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13476 * errout.adb (First_Node): for bodies, return the node itself (small
13477 optimization). For other nodes, do not check source_unit if the node
13478 comes from Standard.
13480 2011-08-02 Robert Dewar <dewar@adacore.com>
13482 * exp_ch3.adb: Minor comment additions.
13483 * sem_ch13.adb: Minor reformatting.
13485 2011-08-02 Pascal Obry <obry@adacore.com>
13487 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13489 2011-08-02 Robert Dewar <dewar@adacore.com>
13491 * sem_attr.adb: Minor reformatting.
13493 2011-08-02 Robert Dewar <dewar@adacore.com>
13495 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13496 (Has_Default_Component_Value): Removed
13497 * einfo.ads Comment updates
13498 (Has_Default_Aspect): Replaces Has_Default_Value
13499 (Has_Default_Component_Value): Removed
13501 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13503 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13504 (Get_Simple_Init_Val): Handle Default_Value aspect
13505 (Needs_Simple_Initialization): Handle Default_Value aspect
13506 * exp_ch3.ads: Needs_Simple_Initialization
13507 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13508 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13510 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13511 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13512 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13514 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13516 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13517 package containing iteration primitives.
13518 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13520 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13522 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13523 "of", pre-analyze expression in case it is a function call with
13524 finalization actions that must be placed ahead of the loop.
13525 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13526 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13528 2011-08-02 Geert Bosch <bosch@adacore.com>
13530 * cstand.adb (Create_Float_Types): Only consider C's long double for
13531 Long_Long_Float, in addition to double.
13533 2011-08-02 Robert Dewar <dewar@adacore.com>
13535 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13536 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13537 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13538 Minor reformatting.
13540 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13542 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13545 2011-08-02 Javier Miranda <miranda@adacore.com>
13547 * einfo.ads, einfo.adb
13548 (Original_Access_Type): Move this attribute to Node26 since there was
13549 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13550 which causes conflicts and breaks the generation of the .NET compiler.
13551 (Interface_Name): Add missing documentation on JGNAT only uses of
13554 2011-08-02 Geert Bosch <bosch@adacore.com>
13556 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13557 (Find_Back_End_Float_Type): Likewise
13558 (Create_Back_End_Float_Types): Likewise
13559 (Create_Float_Types): Likewise
13560 (Register_Float_Type): Likewise
13561 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13562 Nlist and split out type selection in new local Find_Base_Type function.
13563 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13565 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13567 2011-08-02 Robert Dewar <dewar@adacore.com>
13569 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13571 * opt.ads: Minor comment change.
13572 * sem_ch12.adb: Minor code reorganization.
13574 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13576 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13577 subtype's list of rep items to the list on the full subtype in the case
13578 where the lists are the same.
13580 2011-08-02 Geert Bosch <bosch@adacore.com>
13582 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13583 using the one from System.Strings, which also deallocates all strings.
13585 2011-08-02 Geert Bosch <bosch@adacore.com>
13587 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13589 * gcc-interface/Make-lang.in: Update dependencies.
13591 2011-08-02 Olivier Hainque <hainque@adacore.com>
13593 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13596 2011-08-02 Javier Miranda <miranda@adacore.com>
13598 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13599 associated with anonymous access to subprograms.
13601 2011-08-02 Geert Bosch <bosch@adacore.com>
13604 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13605 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13606 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13607 (Add_Symbol_Definition): Move to switch-c.adb
13608 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13609 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13610 (Add_Symbol_Definition): Move to switch-c.adb.
13611 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13613 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13614 Move to warnsw.adb.
13615 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13616 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13617 Move to warnsw.adb.
13618 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13619 (Add_Symbol_Definition): Moved from Prepcomp.
13620 * switch-c.ads: Update copyright notice. Use String_List instead of
13621 Argument_List, removing dependency on System.OS_Lib.
13623 2011-08-02 Yannick Moy <moy@adacore.com>
13625 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13626 mode on initialization expression which does not respect SPARK
13628 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13629 if the tree referenced by its argument represents an initialization
13630 expression in SPARK, suitable for initializing an object in an object
13633 2011-08-02 Javier Miranda <miranda@adacore.com>
13635 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13636 internally generated access to subprogram with its associated protected
13638 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13640 2011-08-02 Geert Bosch <bosch@adacore.com>
13642 * cstand.adb (Register_Float_Type): Print information about type to
13643 register, if the Debug_Flag_Dot_B is set.
13644 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13645 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13646 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13647 with a requested precision of more than Max_Digits digits and no more
13648 than Max_Base_Digits digits, if a range specification is present and the
13649 Predefined_Float_Types list has a suitable type to derive from.
13650 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13651 case of type completion with pragma Import
13653 (Process_Import_Predefined_Type): Processing to complete a type
13654 with pragma Import. Currently supports floating point types only.
13655 (Set_Convention_From_Pragma): Do nothing without underlying type.
13656 (Process_Convention): Guard against absence of underlying type,
13657 which may happen when importing incomplete types.
13658 (Process_Import_Or_Interface): Handle case of importing predefined
13659 types. Tweak error message.
13661 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13663 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13664 functions to previous change. Reorganize code slightly.
13666 2011-08-02 Geert Bosch <bosch@adacore.com>
13668 * back_end.ads (Register_Type_Proc): New call back procedure type for
13669 allowing the back end to provide information about available types.
13670 (Register_Back_End_Types): New procedure to register back end types.
13671 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13673 * cstand.adb (Back_End_Float_Types): New list for floating point types
13674 supported by the back end.
13675 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13676 (Copy_Float_Type): New procedure to make new copies of predefined types.
13677 (Register_Float_Type): New call back procedure to populate the BEFT list
13678 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13679 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13680 (Create_Float_Types): New procedure to create entities for floating
13681 point types predefined in Standard, and put these and any remaining
13682 BEFTs on the Predefined_Float_Types list.
13683 * stand.ads (Predefined_Float_Types): New list for predefined floating
13684 point types that do not have declarations in package Standard.
13686 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13688 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13689 entity node for the unit containing the parameter.
13690 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13691 (Add_Inlined_Subprogram): Likewise.
13692 * gcc-interface/Make-lang.in: Update dependencies.
13694 2011-08-02 Thomas Quinot <quinot@adacore.com>
13696 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13699 2011-08-02 Geert Bosch <bosch@adacore.com>
13701 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13703 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13705 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13706 computed value of Base_Type.
13708 2011-08-02 Yannick Moy <moy@adacore.com>
13710 * restrict.adb (Check_Restriction): issue an error for any use of
13711 class-wide, even if the No_Dispatch restriction is not set.
13712 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13713 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13714 when completing a private extension, the type named in the private part
13715 is not the same as that named in the visible part.
13716 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13717 of an inherited primitive operations of a tagged type or type extension
13718 that returns the tagged type.
13719 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13720 function which returns True for an implicit operation inherited by the
13721 derived type declaration for the argument type.
13722 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13725 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13727 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13728 Process_Bounds, to perform analysis with expansion of a range or an
13729 expression that is the iteration scheme for a loop.
13730 (Analyze_Iterator_Specification): If domain of iteration is given by a
13731 function call with a controlled result, as is the case if call returns
13732 a predefined container, ensure that finalization actions are properly
13734 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13736 2011-08-02 Javier Miranda <miranda@adacore.com>
13738 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13739 * gcc-interface/Make-lang.in: Update dependencies.
13741 2011-08-02 Javier Miranda <miranda@adacore.com>
13743 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13744 determine if the analysis is performed using N or Original_Node (N).
13745 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13746 functionality of routine Is_Variable avoids code duplication.
13747 * checks.adb (Determine_Range): Handle temporaries generated by
13748 Remove_Side_Effects.
13750 2011-08-02 Javier Miranda <miranda@adacore.com>
13752 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13753 expansion of the condition. Required since the previous analysis was
13754 done with expansion disabled (see Resolve_Quantified_Expression) and
13755 hence checks were not inserted and record comparisons have not been
13758 2011-08-02 Ed Falis <falis@adacore.com>
13760 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13763 2011-08-02 Bob Duff <duff@adacore.com>
13765 * opt.ads: Minor comment fix.
13767 2011-08-02 Bob Duff <duff@adacore.com>
13769 * sem_ch12.adb (Analyze_Package_Instantiation,
13770 Analyze_Subprogram_Instantiation): Turn off style checking while
13771 analyzing an instance. Whatever style checks that apply to the generic
13772 unit should apply, so it makes no sense to apply them in an instance.
13773 This was causing trouble when compiling an instance of a runtime
13774 unit that violates the -gnatyO switch.
13775 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13776 one of the two case statements, causing spurious errors.
13778 2011-08-02 Robert Dewar <dewar@adacore.com>
13780 * uname.adb: Minor reformatting.
13781 * gnatcmd.adb: Minor reformatting.
13782 * exp_attr.adb: Minor reformatting.
13784 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13786 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13787 No_Dispatching_Calls, do not look for the Assign primitive, because
13788 predefined primitives are not created in this case.
13790 2011-08-02 Bob Duff <duff@adacore.com>
13792 * stylesw.ads: Minor comment fixes.
13794 2011-08-02 Robert Dewar <dewar@adacore.com>
13796 * freeze.adb (Add_To_Result): New procedure.
13798 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13800 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13801 time, if the specific run-time routines for handling streams of strings
13802 are not available, use the default mechanism.
13804 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13806 * s-regpat.ads: Fix typo.
13808 2011-08-02 Vincent Celier <celier@adacore.com>
13810 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13811 not null, call it to create the in memory config project file without
13812 parsing an existing default config project file.
13814 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13816 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13818 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13820 * sem_elim.adb: an abstract subprogram does not need an eliminate
13821 pragma for its descendant to be eliminable.
13823 2011-08-02 Ed Falis <falis@adacore.com>
13825 * init.c: revert to handling before previous checkin for VxWorks
13826 * s-intman-vxworks.adb: delete unnecessary declarations related to
13827 using Ada interrupt facilities for handling signals.
13828 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13829 * s-intman-vxworks.ads: Import __gnat_install_handler as
13830 Initialize_Interrupts.
13831 * s-taprop-vxworks.adb: Delete Signal_Mask.
13832 (Abort_Handler): change construction of mask to unblock exception
13835 2011-08-02 Jerome Guitton <guitton@adacore.com>
13837 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13838 Debug_Raise_Exception before propagation starts.
13840 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13842 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13843 to Restriction_Check_Required.
13844 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13845 * sem_res.adb (Resolve_Call): Likewise.
13846 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13848 2011-08-02 Bob Duff <duff@adacore.com>
13850 * stylesw.ads: Update comment.
13851 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13852 * errout.ads: Remove obsolete comment.
13854 2011-08-02 Javier Miranda <miranda@adacore.com>
13856 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13857 (Set_Is_Safe_To_Reevaluate): new procedure.
13858 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13859 assignment is allowed on safe-to-reevaluate variables.
13860 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13861 temporary created to remove side effects in expressions that use
13862 the secondary stack as safe-to-reevaluate.
13863 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13864 variables that are not true constants.
13866 2011-08-02 Robert Dewar <dewar@adacore.com>
13868 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13869 sem_res.adb, sem_ch6.adb: Minor reformatting.
13871 2011-08-02 Jerome Guitton <guitton@adacore.com>
13873 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13875 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13877 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13878 not set Overridden_Operation if subprogram is an initialization
13881 2011-08-02 Yannick Moy <moy@adacore.com>
13883 * par-ch6.adb: Correct obsolete name in comments
13884 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13885 which takes two message arguments (existing function takes one), with
13886 second message used for continuation.
13887 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13888 block statements that originate from a source block statement, not
13889 generated block statements
13890 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13891 symmetry with procedure case
13892 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13893 function to issue an error in formal mode if a package specification
13894 contains more than one tagged type or type extension.
13895 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13896 parameters matching formals of tagged types are objects (or ancestor
13897 type conversions of objects), not general expressions. Issue an error
13898 on view conversions that are not involving ancestor conversion of an
13900 (Resolve_Type_Conversion): in formal mode, issue an error on the
13901 operand of an ancestor type conversion which is not an object
13902 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13903 procedure so that it works also for actuals of function calls
13904 (Is_Actual_Tagged_Parameter): new function which determines if its
13905 argument is an actual parameter of a formal of tagged type in a
13907 (Is_SPARK_Object_Reference): new function which determines if the tree
13908 referenced by its argument represents an object in SPARK
13910 2011-08-02 Robert Dewar <dewar@adacore.com>
13912 * sem_ch3.adb: Minor reformatting
13913 Minor comment addition
13914 Minor error msg text change
13916 2011-08-02 Javier Miranda <miranda@adacore.com>
13918 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13919 function. Used to be more precise when we generate a variable plus one
13920 assignment to remove side effects in the evaluation of the Bound
13922 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13923 of the bound expression to force its re-analysis and thus expand the
13924 associated transient scope (if required). Code cleanup replacing the
13925 previous code that declared the constant entity by an invocation to
13926 routine Force_Evaluation which centralizes this work in the frontend.
13928 2011-08-02 Robert Dewar <dewar@adacore.com>
13930 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13931 (Base_Type): Now uses improved Is_Base_Type function
13932 * einfo.ads (Base_Type): Inline this function
13934 2011-08-02 Robert Dewar <dewar@adacore.com>
13936 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13937 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13939 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13941 * gcc-interface/Make-lang.in: Update dependencies.
13942 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13945 2011-08-02 Yannick Moy <moy@adacore.com>
13947 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13948 non-simple expression used in delta constraint
13949 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13950 index constraint which is not a subtype mark
13951 * par.adb: With and use Restrict
13952 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13953 mode on component type which is not a subtype mark and default
13954 expression on component
13955 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13956 of string which does not have a lower index bound equal to 1
13957 (Array_Type_Declaration): issue an error in formal mode on index or
13958 component type which is not a subtype mark, and on aliased keyword on
13960 (Derived_Type_Declaration): issue an error in formal mode on interface,
13961 limited or abstract type
13962 (Record_Type_Declaration): issue an error in formal mode on interface
13963 (Record_Type_Definition): issue an error in formal mode on tagged types
13964 and type extensions not declared in the specification of a library unit
13965 package; on null non-tagged record; on variant part
13967 2011-08-02 Vincent Celier <celier@adacore.com>
13969 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13970 not declared for qualified library project when Library_Name is not
13971 declared, but Library_Dir is.
13973 2011-08-02 Robert Dewar <dewar@adacore.com>
13975 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13976 pragmas (affects aspects [Component_]Default_Value
13977 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13978 component type for the resolution
13980 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13982 * einfo.adb (Base_Type): Tune implementation for speed.
13984 2011-08-02 Robert Dewar <dewar@adacore.com>
13986 * freeze.adb: Minor reformatting.
13988 2011-08-02 Thomas Quinot <quinot@adacore.com>
13990 * scos.ads: Update comments.
13992 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13994 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13995 base type, because the parent may be a subtype of a private type whose
13996 convention is established in a private part.
13998 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14000 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14001 statement in a block when the expansion of the return expression has
14002 created a finalization chain.
14003 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14004 with the parent node.
14005 Add N_Extended_Return_Statement to handle the case where a transient
14006 object declaration appears in the Return_Object_Declarations list of
14007 an extended return statement.
14009 2011-08-02 Matthew Gingell <gingell@adacore.com>
14011 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14012 unused parameter 'name'.
14014 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14016 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14017 inherited operation, check whether its alias, which is the source
14018 operastion that it renames, has been marked eliminated.
14020 2011-08-02 Javier Miranda <miranda@adacore.com>
14022 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14023 in-mode parameter whose type is an access type since it can be used to
14024 modify its designated object. Enforce code that handles as safe an
14025 access type that is not access-to-constant but it is the result of a
14026 previous removal of side-effects.
14027 (Remove_Side_Effects): Minor code reorganization of cases which require
14028 no action. Done to incorporate documentation on new cases uncovered
14029 working in this ticket: no action needed if this routine was invoked
14030 too early and the nodes are not yet decorated.
14031 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14032 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14033 were issued with actuals that are implicitly provided by
14036 2011-08-02 Robert Dewar <dewar@adacore.com>
14038 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14040 2011-08-02 Yannick Moy <moy@adacore.com>
14042 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14043 to issue an error in formal mode on attribute not supported in this mode
14044 (Analyze_Attribute): issue errors on standard attributes not supported
14046 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14047 comment, and issue error in formal mode on modulus which is not a power
14049 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14051 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14053 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14054 operator on modular type (except 'not').
14056 2011-08-02 Robert Dewar <dewar@adacore.com>
14058 * gnat_rm.texi: Minor reformatting.
14060 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14062 * s-osinte-linux.ads: Minor comment update and reformatting.
14063 * i-cexten.ads: Make this unit pure, as for its parent.
14064 Will allow its usage in more contexts if needed.
14066 2011-08-02 Robert Dewar <dewar@adacore.com>
14068 * s-utf_32.ads: Minor comment fix.
14070 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14072 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14073 operation of a tagged synchronized type, handle the case where the
14074 controlling argument is overloaded.
14076 2011-08-02 Yannick Moy <moy@adacore.com>
14078 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14079 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14080 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14081 SPARK mode and formal verification mode on processing SPARK restriction
14082 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14083 requiring consistency checking.
14085 2011-08-02 Robert Dewar <dewar@adacore.com>
14087 * sem_res.adb: Minor reformatting.
14089 2011-08-02 Robert Dewar <dewar@adacore.com>
14091 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14092 a-cforse.ads: Remove unneeded with of Ada.Containers
14093 Remove commented out pragma Inline's
14094 Move specifications of new subprograms to the actual specs
14096 2011-08-02 Yannick Moy <moy@adacore.com>
14098 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14099 a-cforse.ads: Update comments.
14101 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14103 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14105 2011-08-02 Robert Dewar <dewar@adacore.com>
14107 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14108 a-cforse.ads, a-cofove.ads: Minor reformatting.
14110 2011-08-02 Claire Dross <dross@adacore.com>
14112 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14113 a-cofove.ads: Add comments.
14115 2011-08-02 Yannick Moy <moy@adacore.com>
14117 * gnat_rm.texi: Document formal containers.
14119 2011-08-02 Emmanuel Briot <briot@adacore.com>
14121 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14122 are empty sections.
14124 2011-08-02 Robert Dewar <dewar@adacore.com>
14126 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14129 2011-08-02 Robert Dewar <dewar@adacore.com>
14131 * aspects.adb: New aspects Default_Value and Default_Component_Value
14132 New format of Aspect_Names table checks for omitted entries
14133 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14134 handling of boolean aspects for derived types.
14135 New aspects Default_Value and Default_Component_Value
14136 New format of Aspect_Names table checks for omitted entries
14137 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14138 (Has_Default_Value): New flag
14139 (Has_Default_Component_Value): New flag
14140 (Has_Default_Value): New flag
14141 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14143 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14144 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14145 Default_Value and Default_Component_Value
14146 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14147 New aspects Default_Value and Default_Component_Value
14148 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14149 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14151 2011-08-02 Vincent Celier <celier@adacore.com>
14153 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14154 inherit library kind.
14156 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14158 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14159 Minor reformatting.
14161 2011-08-02 Robert Dewar <dewar@adacore.com>
14163 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14165 2011-08-02 Yannick Moy <moy@adacore.com>
14167 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14169 2011-08-02 Robert Dewar <dewar@adacore.com>
14171 * impunit.adb: Add comment.
14173 2011-08-02 Yannick Moy <moy@adacore.com>
14175 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14176 qualification of aggregates in formal mode
14177 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14179 (Resolve_Aggregate): complete the test that an aggregate is adequately
14180 qualified in formal mode
14182 2011-08-02 Pascal Obry <obry@adacore.com>
14184 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14185 * mlib-prj.adb: Supress warning when compiling binder generated file.
14186 (Build_Library): Supress all warnings when compiling the binder
14189 2011-08-02 Yannick Moy <moy@adacore.com>
14191 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14193 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14194 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14195 Add with/use clauses to make Check_Formal_Restriction visible
14197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14199 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14200 in-parameters when type of the generic formal is private in the generic
14201 spec and non-private in the body.
14203 2011-08-02 Claire Dross <dross@adacore.com>
14205 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14206 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14207 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14208 * impunit.adb, Makefile.rtl: Take new files into account.
14210 2011-08-02 Robert Dewar <dewar@adacore.com>
14212 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14213 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14215 2011-08-02 Yannick Moy <moy@adacore.com>
14217 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14219 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14220 matching static array bounds, taking into account the special case of
14222 * sem_ch3.adb: Typo in comment.
14224 2011-08-02 Yannick Moy <moy@adacore.com>
14226 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14227 which issues an error in formal mode if its argument node is originally
14229 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14230 has a discriminant specification so that it does not include the case
14232 (Derived_Type_Declaration): move here the test that a derived type has a
14233 discriminant specification
14234 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14235 first element of a component association before accessing its choices
14236 (presence of component association is not enough)
14237 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14238 declaration is a library item before accessing the next element in a
14239 list, as library items are not member of lists
14240 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14241 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14242 Check_Formal_Restriction whenever possible.
14244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14246 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14247 reference when needed.
14249 2011-08-02 Bob Duff <duff@adacore.com>
14251 * gnat_ugn.texi: Fix typo.
14253 2011-08-02 Vincent Celier <celier@adacore.com>
14255 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14256 archive file name. Do not use the full path name of archives for Open
14259 2011-08-02 Robert Dewar <dewar@adacore.com>
14261 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14262 Analyze_Aspect_Specifications
14264 (Analyze_Aspect_Specifications): New handling for boolean aspects
14265 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14266 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14267 sequence for Analyze_Aspect_Specifications
14268 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14269 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14271 2011-08-02 Robert Dewar <dewar@adacore.com>
14273 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14274 aspects, since these no longer exist.
14276 2011-08-02 Robert Dewar <dewar@adacore.com>
14278 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14279 semicolon, do not try to see if there are aspects following it.
14280 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14283 2011-08-02 Robert Dewar <dewar@adacore.com>
14285 * sem_ch8.adb, aspects.ads: Minor reformatting.
14287 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14289 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14290 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14292 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14294 2011-08-02 Yannick Moy <moy@adacore.com>
14296 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14297 mode on subprogram declaration outside of package specification, unless
14298 it is followed by a pragma Import
14299 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14300 Access_Type_Declaration): issue error in formal mode on access type
14301 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14303 (Analyze_Object_Declaration): issue error in formal mode on object
14304 declaration which does not respect SPARK restrictions
14305 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14306 declaration which does not respect SPARK restrictions
14307 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14308 error in formal mode on digits or delta constraint
14309 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14310 decimal fixed point type
14311 (Derived_Type_Declaration): issue error in formal mode on derived type
14312 other than type extensions of tagged record types
14313 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14314 with check on access definition
14315 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14316 mode on protected definition.
14317 (Analyze_Task_Definition): issue error in formal mode on task definition
14319 2011-08-02 Robert Dewar <dewar@adacore.com>
14321 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14323 2011-08-02 Javier Miranda <miranda@adacore.com>
14325 * sem_ch6.adb (Can_Override_Operator): New function.
14326 (Verify_Overriding_Indicator): Add missing code to check overriding
14327 indicator in operators. Fixes regression.
14328 (Check_Overriding_Indicator): Minor reformating after replacing the
14329 code that evaluates if the subprogram can override an operator by
14330 invocations to the above new function.
14332 (Write_Field26_Name): Add missing code to ensure that, following
14333 the documentation in einfo.ads, this field is not shown as attribute
14334 "Static_Initialization" on non-dispatching functions.
14336 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14338 * sem_res.adb (Resolve_Call): A call to
14339 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14340 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14341 i.e., when the second parameter is of type Time_Span.
14343 2011-08-02 Vincent Celier <celier@adacore.com>
14345 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14346 with an archive instead of -L<library dir> -l<library name>.
14348 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14350 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14351 mark the base types In_Use in addition to making the operations
14354 2011-08-02 Ed Falis <falis@adacore.com>
14356 * init.c: add and setup __gnat_signal_mask for the exception signals
14357 * s-inmaop-vxworks.adb: new file.
14358 * s-intman-vxworks.adb: remove unnecessary initializations and
14360 * s-intman-vxworks.ads: remove unnecessary variable
14361 * s-taprop-vxworks.adb: simplify signal initialization
14363 2011-08-02 Robert Dewar <dewar@adacore.com>
14365 * sem_ch8.adb: Minor code reorganization, comment updates.
14367 2011-08-02 Robert Dewar <dewar@adacore.com>
14369 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14370 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14372 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14373 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14375 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14377 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14378 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14379 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14380 use_type_clauses, to handle more efficiently use_type and use_all_type
14382 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14383 Ada2012 Use_All_Type clause.
14384 (Use_Class_Wide_Operations): new procedure.
14386 2011-08-02 Robert Dewar <dewar@adacore.com>
14388 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14389 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14390 expression to expression function.
14392 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14394 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14395 if types are compatible.
14397 2011-08-02 Yannick Moy <moy@adacore.com>
14399 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14400 returns True if its argument array types have same dimension and same
14401 static bounds at each index.
14402 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14403 OUT or IN OUT paramaters which are not view conversions in SPARK.
14404 (Resolve_Arithmetic_Op): issue an error in formal mode on
14405 multiplication or division with operands of fixed point types which are
14406 not qualified or explicitly converted.
14407 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14408 Boolean or array type (except String) operands.
14409 (Resolve_Equality_Op): issue an error in formal mode on equality
14410 operators for array types other than String with non-matching static
14412 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14413 for array types with non-matching static bounds. Factorize the code in
14414 Matching_Static_Array_Bounds.
14415 (Resolve_Qualified_Expression): issue an error in formal mode on
14416 qualified expressions for array types with non-matching static bounds.
14417 (Resolve_Type_Conversion): issue an error in formal mode on type
14418 conversion for array types with non-matching static bounds
14420 2011-08-02 Robert Dewar <dewar@adacore.com>
14422 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14424 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14426 * par-ch9.adb: save location of entry for proper error message.
14428 2011-08-02 Javier Miranda <miranda@adacore.com>
14430 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14431 (Use_Full_View) which permits this routine to climb through the
14432 ancestors using the full-view of private parents.
14433 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14434 Use_Full_View to true in calls to Is_Ancestor.
14435 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14436 true in call to Is_Ancestor.
14437 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14438 Use_Full_View to true in call to Is_Ancestor.
14439 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14440 call to Is_Ancestor.
14441 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14442 Use_Full_View to true in calls to Is_Ancestor.
14443 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14444 Make_Select_Specific_Data_Table, Register_Primitive,
14445 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14446 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14447 to true in call to Is_Ancestor.
14448 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14449 Use_Full_View to true in calls to Is_Ancestor.
14451 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14452 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14454 2011-08-02 Robert Dewar <dewar@adacore.com>
14456 * gnat_rm.texi: Minor reformatting.
14457 * sem_prag.adb: Minor reformatting.
14459 2011-08-02 Tristan Gingold <gingold@adacore.com>
14461 * vms_data.ads: Add VMS qualifier for -gnateP.
14463 2011-08-02 Robert Dewar <dewar@adacore.com>
14465 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14466 * par-ch7.adb (P_Package): Proper placement of aspects for package
14467 decl/instantiation.
14468 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14469 (End_Statements): Add Is_Sloc parameterr
14470 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14471 (Check_End): Ad Is_Sloc parameter
14472 (End_Statements): Add Is_Sloc parameterr
14474 2011-08-02 Vincent Celier <celier@adacore.com>
14476 * ug_words: Add VMS qualifier equivalent to -gnateP:
14477 /SYMBOL_PREPROCESSING.
14479 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14481 * gnat-style.texi: For hexadecimal numeric literals the typical
14482 grouping of digits is 4 to represent 2 bytes.
14483 A procedure spec which is split into several lines is indented two
14486 2011-08-02 Yannick Moy <moy@adacore.com>
14488 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14489 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14490 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14492 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14493 choice in array aggregate
14494 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14496 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14497 positional and named aggregate for record, or others in record
14498 aggregate, or multiple choice in record aggregate
14499 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14500 array operands to logical operations AND, OR and XOR do not have the
14501 same static lower and higher bounds
14502 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14504 2011-08-01 Robert Dewar <dewar@adacore.com>
14506 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14507 Replaces Last_Source_Node_In_Sequence.
14508 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14509 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14510 parens and blank in string (this was inconsistently implemented).
14512 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14513 blank in string (this was inconsistently implemented).
14515 (Set_Global_Switches): Set formal mode switches appropriately
14516 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14518 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14519 call Set_Error_Msg_Lang to set "spark" as language name.
14520 * par.adb: Remove unnecessary call to set formal language for errout
14521 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14522 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14524 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14525 calls to it, moved after resolution so that types are known
14526 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14527 result of concatenation is not of type String
14528 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14529 concatenation is not properly restricted
14530 * gnat_rm.texi: Add doc on pragma Spark_95.
14531 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14532 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14533 * gcc-interface/Make-lang.in: Update dependencies.
14535 2011-08-01 Javier Miranda <miranda@adacore.com>
14537 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14538 condition that detects if the overridden operation must replace an
14541 2011-08-01 Javier Miranda <miranda@adacore.com>
14543 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14544 code declarations inserted by Insert_Actions in each alternative of the
14545 N_Case_Expression node.
14547 2011-08-01 Robert Dewar <dewar@adacore.com>
14549 * sem_ch6.adb: Minor code reorganization.
14550 * sem_util.adb: Minor reformatting.
14552 2011-08-01 Pascal Obry <obry@adacore.com>
14554 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14555 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14557 2011-08-01 Yannick Moy <moy@adacore.com>
14559 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14560 literal or operator symbol which is prefixed
14561 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14562 mode on access attributes.
14563 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14564 that concatenation operands are properly restricted in formal mode
14565 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14566 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14567 result of the concatenation has a type different from String.
14568 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14569 Analyze_Quantified_Expression, Analyze_Slice,
14570 Analyze_Null): issue an error in formal mode on unsupported constructs
14572 (Analyze_Block_Statement): only issue error on source block statement
14573 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14574 function which returns the last node in a list of nodes for which
14575 Comes_From_Source returns True, if any
14576 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14577 Last_Source_Node_In_Sequence
14578 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14579 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14580 mode on unsupported constructs
14581 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14582 rest of the actions may be needed later on since the error is marked as
14584 * sinfo.ads: Typos in comments.
14586 2011-08-01 Pascal Obry <obry@adacore.com>
14588 * projects.texi: Minor editing.
14590 2011-08-01 Yannick Moy <moy@adacore.com>
14592 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14593 insertion character ~~
14594 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14595 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14596 with insertion character ~~
14597 (Set_Msg_Text): treat insertion character ~~
14598 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14599 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14600 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14601 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14602 errors related to the formal language restriction not serious
14603 (insertion character |).
14604 * par.adb (Par): set formal language for error messages if needed
14605 * sem_ch6.adb (Check_Missing_Return): take into account possible
14606 generated statements at the end of the function
14607 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14608 enumeration value to define a new pragma SPARK_95
14609 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14610 SPARK_Version): new type and variables to store the SPARK version
14612 (SPARK_Mode): return True when SPARK_Version is set
14613 * par-prag.adb: Correct indentation
14614 (Prag): take Pragma_SPARK_95 into account
14615 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14618 2011-08-01 Robert Dewar <dewar@adacore.com>
14620 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14621 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14622 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14624 2011-08-01 Pascal Obry <obry@adacore.com>
14626 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14627 Target_Name to Get_Path call.
14628 (Parse_Single_Project): Likewise.
14629 (Post_Parse_Context_Clause): Likewise.
14630 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14631 Call Initialise_Project_Path with the proper Target_Name.
14632 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14634 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14635 with the proper Target_Name.
14636 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14637 Part.Parse routine.
14638 (Parse_Project_And_Apply_Config): Likewise.
14639 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14640 This is fine as this part of the code is supporting only native
14642 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14643 is fine as this part of the code is supporting only native compilation.
14645 2011-08-01 Yannick Moy <moy@adacore.com>
14647 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14648 of homonym, unless the homonym is one of the cases allowed in SPARK
14649 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14650 package declaration occurring after a body.
14652 2011-08-01 Robert Dewar <dewar@adacore.com>
14654 * checks.adb, exp_ch4.adb: Minor reformatting.
14656 2011-08-01 Javier Miranda <miranda@adacore.com>
14658 * einfo.ads (Access_Disp_Table): Fix documentation.
14659 (Dispatch_Table_Wrappers): Fix documentation.
14661 2011-08-01 Pascal Obry <obry@adacore.com>
14663 * prj-env.adb, prj-env.ads: Minor reformatting.
14665 2011-08-01 Yannick Moy <moy@adacore.com>
14667 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14668 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14669 procedures out of these packages.
14670 * errout.ads, errout.adb
14671 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14672 procedures in of this package
14673 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14674 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14675 on misplaced later vs initial declarations, like in Ada 83
14676 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14677 formal mode on attribute of private type whose full type declaration
14679 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14680 package declaration inside a package specification
14681 (Analyze_Full_Type_Declaration): issue error in formal mode on
14682 controlled type or discriminant type
14683 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14684 user-defined operator means that it should come from the source
14685 (New_Overloaded_Entity): issue error in formal mode on overloaded
14687 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14689 2011-08-01 Thomas Quinot <quinot@adacore.com>
14691 * atree.adb: Minor reformatting.
14692 * checks.adb: Minor reformatting.
14694 2011-08-01 Vincent Celier <celier@adacore.com>
14696 * s-parame-vms-ia64.ads: Fix typo in comment
14698 * s-parame-vms-restrict.ads: Removed, unused.
14700 2011-08-01 Javier Miranda <miranda@adacore.com>
14703 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14705 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14706 * sem_ch3.ads, sem_ch3.adb
14707 (Is_Constant_Bound): New extended version of the subprogram that was
14708 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14709 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14710 * sem_aux.ads (Constant_Value): Fix typo in comment.
14711 * checks.adb (Generate_Index_Checks): New implementation which, for
14712 array objects with constant bounds, generates the runtime check
14713 referencing the bounds of the array type. For other cases this routine
14714 provides its previous behavior obtaining such values from the array
14716 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14718 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14719 we cannot have semantic interpretations of the new node.
14721 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14723 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14726 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14728 * sem_ch8.adb: Minor code editing.
14729 * s-vxwext.adb: Remove trailing space.
14730 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14731 consistency with other files.
14733 2011-08-01 Thomas Quinot <quinot@adacore.com>
14735 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14737 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14739 * par-ch10.adb: reject parameterized expressions as compilation unit.
14740 * sem_ch4.adb: handle properly conditional expression with overloaded
14741 then_clause and no else_clause.
14743 2011-08-01 Tristan Gingold <gingold@adacore.com>
14745 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14746 like done by System.Aux_DEC.
14747 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14749 2011-08-01 Yannick Moy <moy@adacore.com>
14751 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14752 missing label at end of declaration (subprogram or package)
14753 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14754 of positional and named parameter association
14755 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14756 Error_Msg_SP which adds a prefix to the error message giving the name
14757 of the formal language analyzed
14758 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14759 access result type in subprogram, unconstrained array as result type,.
14760 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14762 * sem_ch8.adb: Code clean up.
14764 2011-08-01 Javier Miranda <miranda@adacore.com>
14766 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14767 * einfo.ads (Access_Disp_Table): Fix documentation.
14768 (Dispatch_Table_Wrappers): Fix documentation.
14769 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14770 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14771 to enforce the documentation of this attribute.
14772 (Set_Is_Interface): Cleanup the assertion.
14773 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14774 the Underlying_Type entity before reading attribute Access_Disp_Table.
14775 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14776 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14777 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14778 the Underlying_Type entity before reading attribute Access_Disp_Table.
14779 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14780 Locate the Underlying_Type entity before reading attribute
14783 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14785 * s-poosiz.ads: Additional overriding indicators.
14787 2011-08-01 Yannick Moy <moy@adacore.com>
14789 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14791 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14792 parameter specification does not include a subtype mark.
14793 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14794 formal mode on abstract subprogram.
14795 (Analyze_Subprogram_Specification): issue error in formal mode on
14796 user-defined operator.
14797 (Process_Formals): issue error in formal mode on access parameter and
14798 default expression.
14799 * sem_ch9.adb (Analyze_Abort_Statement,
14800 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14801 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14802 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14803 Analyze_Requeue, Analyze_Selective_Accept,
14804 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14805 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14806 issue error in formal mode on user-defined raise statement.
14808 2011-08-01 Thomas Quinot <quinot@adacore.com>
14810 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14811 declaration being hidden when overriding an implicit inherited
14813 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14814 (-gnats), do not complain about a source file that contains only a
14817 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14819 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14820 variable if already set.
14822 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14824 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14825 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14826 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14827 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14828 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14829 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14830 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14831 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14832 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14833 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14834 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14835 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14836 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14837 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14838 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14839 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14840 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14841 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14842 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14843 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14844 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14845 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14846 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14847 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14848 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14849 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14850 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14851 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14852 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14853 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14854 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14855 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14856 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14857 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14858 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14859 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14860 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14861 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14862 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14863 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14864 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14865 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14866 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14867 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14868 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14869 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14870 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14871 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14872 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14873 Use GNAT instead of GNARL.
14875 2011-08-01 Bob Duff <duff@adacore.com>
14877 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14878 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14879 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14882 2011-08-01 Yannick Moy <moy@adacore.com>
14884 * debug.adb (d.D) reverve flag for the SPARK mode
14885 (d.E) reverve flag for SPARK generation mode
14886 (d.F) reverve flag for Why generation mode
14887 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14888 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14889 functions which return True when the corresponding modes are set
14890 (Formal_Language): return "spark" or "alfa" when in formal verification
14892 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14893 Error_Msg to prefix the error message with a tag giving the formal
14895 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14896 message with a tag giving the formal language
14897 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14899 (Analyze_Case_Statement): issue error in formal mode on case statement
14900 with a single "others" case alternative
14901 (Analyze_Exit_Statement): issue errors in formal mode on exit
14902 statements which do not respect SPARK restrictions
14903 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14904 (Check_Unreachable_Code): always issue an error (not a warning) in
14905 formal mode on unreachable code (concerns both code after an infinite
14906 loop and after an unconditional jump, both not allowed in SPARK)
14907 * sem_ch6.adb (Analyze_Return_Statement): add call to
14908 Set_Return_Present for a procedure containing a return statement
14909 (already done for functions in Analyze_Function_Return)
14910 (Analyze_Function_Return): issue error in formal mode on extended
14911 return or if return is not last statement in function
14912 (Check_Missing_Return): issue error in formal mode if function does
14913 not end with return or if procedure contains a return
14914 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14915 function to detect if there is an inner scope of its parameter S which
14918 2011-08-01 Thomas Quinot <quinot@adacore.com>
14920 * sem_ch6.ads: Minor reformatting.
14922 2011-08-01 Javier Miranda <miranda@adacore.com>
14924 * sem_util.adb (Abstract_Interface_List): Complete condition when
14925 processing private type declarations to avoid reading unavailable
14927 (Is_Synchronized_Tagged_Type): Complete condition when processing
14928 private extension declaration nodes to avoid reading unavailable
14931 2011-08-01 Thomas Quinot <quinot@adacore.com>
14933 * sem_ch3.adb: Minor reformatting.
14935 2011-08-01 Thomas Quinot <quinot@adacore.com>
14937 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14938 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14939 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14940 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14941 for VMS, instead parametrize the common implementation with
14942 System.Parameters declarations.
14944 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14946 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14948 2011-08-01 Tristan Gingold <gingold@adacore.com>
14950 * seh_init.c: Fix SEH handler installation on win64.
14952 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14954 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14955 double analysis of an anonymous access to subprogram, because it can
14956 lead to improper sharing of profiles and a back-end crash.
14958 2011-08-01 Robert Dewar <dewar@adacore.com>
14960 * make.adb, sem_ch4.adb: Minor reformatting.
14961 * gcc-interface/Make-lang.in: Update dependencies.
14962 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14964 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14966 * gnat_rm.texi: Fix definition of Long_Integer.
14968 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14970 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14971 to prevent storage exhaustion.
14972 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14973 finalized is a function body, insert the cleanup code before the final
14974 return statement, to prevent spurious warnings.
14975 * s-pooglo.ads: add overriding indicator.
14977 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14979 * sem_ch4.adb (Operator_Check): improve error message when both a
14980 with_clause and a use_clause are needed to make operator usage legal.
14981 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14982 determine whether a compilation unit is visible within an other,
14983 either through a with_clause in the current unit, or a with_clause in
14984 its library unit or one one of its parents.
14986 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14988 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14989 over an arbitrary expression of an array or container type.
14990 * lib-xref.adb: clarify comment.
14992 2011-08-01 Bob Duff <duff@adacore.com>
14994 * einfo.ads: Minor reformatting.
14995 * debug.adb: Minor comment improvement.
14997 2011-08-01 Javier Miranda <miranda@adacore.com>
14999 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15000 consider hidden subprograms as valid candidates.
15002 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15004 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15006 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15008 * gnat_ugn.texi: Fix typo.
15010 2011-08-01 Robert Dewar <dewar@adacore.com>
15012 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15013 lib-xref.adb: Minor reformatting
15015 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15017 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15018 when to generate a call to Move_Final_List.
15019 (Has_Controlled_Parts): Remove this function.
15021 2011-08-01 Geert Bosch <bosch@adacore.com>
15023 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15024 "," in choice list.
15026 2011-08-01 Thomas Quinot <quinot@adacore.com>
15028 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15029 explicit raise of a predefined exception as Comes_From_Source if the
15030 original N_Raise_Statement comes from source.
15032 2011-08-01 Robert Dewar <dewar@adacore.com>
15034 * sinfo.ads: Add comment.
15035 * sem_ch6.adb: Minor reformatting.
15037 2011-08-01 Robert Dewar <dewar@adacore.com>
15039 * freeze.adb (Freeze_Entity): Refine check for bad component size
15040 clause to avoid rejecting confirming clause when atomic/aliased present.
15042 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15044 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15045 better determine whether an entity reference is a write.
15046 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15048 * lib-xref.adb (Output_References): Do no suppress a read reference at
15049 the same location as an immediately preceeding modify-reference, to
15050 handle properly in-out actuals.
15052 2011-08-01 Tristan Gingold <gingold@adacore.com>
15054 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15056 2011-08-01 Quentin Ochem <ochem@adacore.com>
15058 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15059 heap to compute the result.
15061 2011-08-01 Robert Dewar <dewar@adacore.com>
15063 * atree.ads: Minor reformatting.
15065 2011-08-01 Emmanuel Briot <briot@adacore.com>
15067 * g-expect.adb (Get_Command_Output): Fix memory leak.
15069 2011-08-01 Geert Bosch <bosch@adacore.com>
15071 * cstand.adb (P_Float_Type): New procedure to print the definition of
15072 predefined fpt types.
15073 (P_Mixed_Name): New procedure to print a name using mixed case
15074 (Print_Standard): Use P_Float_Type for printing floating point types
15075 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15076 precision IEEE float.
15078 2011-08-01 Thomas Quinot <quinot@adacore.com>
15080 * sem_ch3.adb: Minor reformatting.
15082 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15084 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15085 the completion of a generic function, insert the new body rather than
15086 rewriting the original.
15088 2011-08-01 Yannick Moy <moy@adacore.com>
15090 * sinfo.ads, errout.ads: Typos in comments.
15092 2011-08-01 Robert Dewar <dewar@adacore.com>
15094 * par-endh.adb: Minor reformatting.
15096 2011-08-01 Robert Dewar <dewar@adacore.com>
15098 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15099 (Pre_Post_Aspects): New subtype.
15100 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15101 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15102 * par-ch7.adb (P_Package): Remove Decl parameter
15103 (P_Package): Handle new syntax for aspects (before IS)
15104 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15106 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15107 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15108 (P_Package): Remove Decl parameter
15109 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15111 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15113 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15114 * sinfo.ads: Document new syntax for aspects in packages etc.
15115 * sprint.adb: Handle new syntax of aspects before IS in package
15117 2011-08-01 Thomas Quinot <quinot@adacore.com>
15119 * atree.ads: Minor reformatting.
15120 * sem_prag.adb: Minor reformatting.
15122 2011-08-01 Robert Dewar <dewar@adacore.com>
15124 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15125 case expr alternative.
15127 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15129 * sem_ch12.adb: Fix typo.
15131 2011-08-01 Geert Bosch <bosch@adacore.com>
15133 * sem_prag.adb (Check_No_Link_Name): New procedure.
15134 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15135 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15136 instead of Standard_Long_Long_Float_Size global. Preparation for
15137 eventual removal of per type constants.
15138 * exp_util.ads (Get_Stream_Size): New function returning the stream
15139 size value of subtype E.
15140 * exp_util.adb (Get_Stream_Size): Implement new function.
15141 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15143 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15145 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15147 2011-08-01 Geert Bosch <bosch@adacore.com>
15149 * cstand.adb: Fix comments.
15150 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15151 count of arguments.
15153 2011-08-01 Robert Dewar <dewar@adacore.com>
15155 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15157 2011-08-01 Geert Bosch <bosch@adacore.com>
15159 * atree.ads: Fix comment.
15161 2011-08-01 Robert Dewar <dewar@adacore.com>
15163 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15164 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15165 * par.adb: Add with for Namet.Sp.
15166 * par-tchk.adb: Minor reformatting.
15168 2011-08-01 Vincent Celier <celier@adacore.com>
15170 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15171 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15172 of the init procedure of a SAL.
15173 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15176 2011-08-01 Thomas Quinot <quinot@adacore.com>
15178 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15181 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15183 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15185 2011-08-01 Thomas Quinot <quinot@adacore.com>
15187 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15188 conformant with its spec (return True only for types that have
15189 an overriding Initialize primitive operation that prevents them from
15190 having preelaborable initialization).
15191 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15192 initialization for controlled types in Ada 2005 or later mode.
15194 2011-08-01 Robert Dewar <dewar@adacore.com>
15196 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15198 (Same_Aspect): New function.
15199 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15200 Type_Invariant, Precondition, Postcondition.
15201 * snames.ads-tmpl: Add Name_Type_Invariant.
15203 2011-08-01 Robert Dewar <dewar@adacore.com>
15205 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15207 (Freeze_All_Ent): Fix error in handling inherited aspects.
15208 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15209 already analyzed, but don't skip entire processing of a declaration,
15210 that's wrong in some cases of declarations being rewritten.
15211 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15212 Don't delay for integer, string literals
15213 Treat predicates in usual manner for delay, remove special case code,
15215 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15216 (Build_Predicate_Function): Update saved expression in aspect
15217 (Build_Invariant_Procedure): Update saved expression in aspect
15218 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15219 of replacement of discriminant references if the reference is simple.
15221 2011-08-01 Robert Dewar <dewar@adacore.com>
15223 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15224 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15225 Static_Predicate and Dynamic_Predicate.
15226 (Build_Predicate_Function): Add processing for Static_Predicate
15227 and Dynamic_Predicate.
15228 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15229 (From_Static_Predicate): New flag
15230 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15232 2011-08-01 Robert Dewar <dewar@adacore.com>
15234 * usage.adb: Documentation cleanup for Ada version modes in usage.
15235 * expander.adb: Minor reformatting.
15237 2011-08-01 Robert Dewar <dewar@adacore.com>
15239 * atree.ads: Minor comment fix.
15240 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15241 a-witeio.ads, sem_prag.adb: Minor reformatting.
15243 2011-08-01 Doug Rupp <rupp@adacore.com>
15245 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15246 pointers. Use descrip.h header file for convenience. Add some
15249 2011-08-01 Robert Dewar <dewar@adacore.com>
15251 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15252 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15253 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15255 (Check_Aspect_At_End_Of_Declarations): New procedure
15256 (Analye_Aspect_Specification): Minor changes for above procedures
15257 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15258 specification node as well.
15260 2011-08-01 Pascal Obry <obry@adacore.com>
15262 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15263 Windows files. Use GetFilesAttributes() in this case to check for file
15264 existence instead of returning with an error code.
15266 2011-08-01 Vincent Celier <celier@adacore.com>
15268 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15269 High is above Source length.
15271 2011-08-01 Robert Dewar <dewar@adacore.com>
15273 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15275 2011-08-01 Robert Dewar <dewar@adacore.com>
15277 * aspects.ads (Boolean_Aspects): New subtype.
15278 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15279 for derived types in cases where the parent type and derived type have
15281 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15282 with aspects when parent type also has aspects.
15283 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15284 boolean expression at this point).
15285 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15286 accordance with final decision on the Ada 2012 feature.
15287 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15289 2011-08-01 Matthew Heaney <heaney@adacore.com>
15291 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15293 2011-08-01 Pascal Obry <obry@adacore.com>
15295 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15296 Fix Replace_Slice when High is above current string size.
15297 (Replace_Slice): Fix DL computation when High is above current
15300 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15302 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15304 2011-08-01 Matthew Heaney <heaney@adacore.com>
15306 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15309 2011-08-01 Pascal Obry <obry@adacore.com>
15311 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15314 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15316 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15317 access to protected subprograms in generic bodies.
15318 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15319 protected type, indicate that the convention of the subprogram is
15320 Convention_Protected, because it may be used in subsequent declarations
15321 within the protected declaration.
15323 2011-08-01 Vincent Celier <celier@adacore.com>
15325 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15326 and "final" procedures when the name of the library is "ada", to avoid
15327 duplicate symbols "adainit" and "adafinal" in executables.
15329 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15331 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15332 quantified expression that appears within a postcondition and uses the
15333 Ada2012 'Result attribute.
15335 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15337 * init.c (__gnat_error_handler): Cast reason to int.
15338 (__gnat_install_handler): Explain sa_sigaction use.
15340 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15342 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15343 subprogram has copy-in copy-out parameters, try to promote the mode of
15344 the return type if it is passed in registers.
15346 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15348 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15349 left operand as addressable.
15351 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15353 * gcc-interface/gigi.h (build_function_stub): Remove.
15354 (build_return_expr): Likewise.
15355 (convert_vms_descriptor): Declare.
15356 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15357 (build_function_stub): Move to...
15358 * gcc-interface/utils2.c (build_return_expr): Move to...
15359 * gcc-interface/trans.c (build_function_stub): ...here.
15360 (build_return_expr): ...here.
15361 (Subprogram_Body_to_gnu): Add local variable for language_function.
15362 Disconnect the parameter attributes cache, if any, once done with it.
15363 Call end_subprog_body only after setting the end_locus.
15364 Build the stub associated with the function, if any, at the very end.
15365 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15366 variables and streamline control flow.
15368 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15371 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15372 g-trasym-dwarf.adb.
15374 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15377 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15378 Assign to act.sa_sigaction.
15379 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15380 current->return_address to char * before arithmetic.
15382 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15384 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15385 Correct argument types.
15386 Extract code from reason.
15387 (__gnat_install_handler): Assign to act.sa_sigaction.
15389 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15391 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15392 (GNAT1_OBJS): ...here.
15394 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15397 * g-socthi-mingw.adb (Fill): Fix formatting.
15399 * gcc-interface/gigi.h: Move around comment.
15401 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15404 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15406 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15409 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15411 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15413 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15414 range comparison if Pmode is SImode.
15416 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15417 Eric Botcazou <ebotcazou@adacore.com>
15419 * adadecode.c: Wrap up in extern "C" block.
15420 * adadecode.h: Likewise.
15421 * adaint.c: Likewise. Remove 'const' keyword.
15422 * adaint.h: Likewise.
15423 * argv.c: Likewise.
15424 * atree.h: Likewise.
15426 * cstreams.c: Likewise.
15428 * exit.c: Likewise.
15430 * final.c: Likewise.
15431 * init.c: Likewise.
15432 * initialize.c: Likewise.
15433 * link.c: Likewise.
15434 * namet.h: Likewise.
15435 * nlists.h: Likewise.
15436 * raise.c: Likewise.
15437 * raise.h: Likewise.
15438 * repinfo.h: Likewise.
15439 * seh_init.c: Likewise.
15440 * targext.c: Likewise.
15441 * tracebak.c: Likewise.
15442 * uintp.h: Likewise.
15443 * urealp.h: Likewise.
15444 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15445 * xsinfo.adb: Likewise.
15446 * xsnamest.adb: Likewise.
15447 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15448 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15449 * gcc-interface/misc.c: Likewise.
15450 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15451 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15452 ada/targext.o here...
15453 (GNAT_ADA_OBJS): ...and not here.
15454 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15455 (GNATBIND_OBJS): Reorder.
15457 2011-07-07 Richard Henderson <rth@redhat.com>
15459 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15460 dwarf2out_frame_init.
15462 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15464 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15466 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15469 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15471 2011-07-06 Richard Guenther <rguenther@suse.de>
15473 * gcc-interface/misc.c (gnat_init): Merge calls to
15474 build_common_tree_nodes and build_common_tree_nodes_2.
15475 Re-initialize boolean_false_node.
15477 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15478 Olivier Hainque <hainque@adacore.com>
15479 Nicolas Setton <setton@adacore.com>
15481 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15482 the type according to the ARTIFICIAL_P parameter.
15483 (create_type_decl): Likewise.
15484 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15486 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15488 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15489 (gnatbind): Likewise.
15491 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15493 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15495 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15497 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15498 local variable throughout. Remove useless call to Base_Type.
15499 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15500 Take it also into account for the volatileness of the field. Set the
15501 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15503 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15505 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15506 on a dereference built for a by-ref object if it has an address clause.
15508 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15510 * einfo.ads (Address_Taken): Document use for the second argument of
15511 Asm_Input and Asm_Output attributes.
15512 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15513 argument is an entity name, then set Address_Taken on it.
15514 <Attribute_Asm_Output>: Likewise.
15515 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15516 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15517 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15518 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15520 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15522 PR middle-end/46500
15523 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15525 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15527 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15528 (ada/utils.o): Update dependencies.
15529 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15530 ../../../libcpp/libcpp.a.
15531 * gcc-interface/utils.c: Include common/common-target.h.
15532 (process_attributes): Use targetm_common.have_named_sections.
15534 2011-06-07 Richard Guenther <rguenther@suse.de>
15536 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15539 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15541 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15542 TREE_THIS_NOTRAP flag.
15544 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15546 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15549 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15551 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15552 constants whose full view has discriminants specially.
15554 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15556 * gcc-interface/utils.c: Include diagnostic.h.
15557 (gnat_write_global_declarations): Output debug information for all
15558 global type declarations before finalizing the compilation unit.
15559 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15561 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15563 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15565 2011-05-25 Kai Tietz <ktietz@redhat.com>
15567 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15568 initialization instead of const/none-const pointer assignment.
15570 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15572 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15573 $(EXTRA_GNAT1_OBJS).
15574 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15575 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15576 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15577 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15578 libcommon-target.a instead of prefix.o.
15580 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15583 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15585 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15587 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15588 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15589 instead of version.o.
15591 2011-05-18 Kai Tietz <ktietz@redhat.com>
15593 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15594 boolean_false_node instead of integer_zero_node.
15595 (convert_with_check): Likewise.
15596 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15598 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15600 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15601 type of the parameter is an unconstrained array, convert the actual to
15602 the type of the formal in the In Out and Out cases as well.
15604 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15606 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15607 call build_function_type_array or build_varargs_function_type_array
15609 (create_subprog_type): Don't call build_function_type; call
15610 build_function_type_vec instead.
15612 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15614 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15615 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15616 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15618 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15620 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15622 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15623 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15625 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15627 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15629 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15631 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15632 instead of accessing TYPE_ARG_TYPES directly.
15633 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15635 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15638 * gcc-interface/gigi.h (get_variant_part): Declare.
15639 * gcc-interface/decl.c (get_variant_part): Make global.
15640 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15641 types have the same constant size, are record types and T1 has a
15642 variant part while T2 doesn't.
15644 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15646 * gcc-interface/utils.c (begin_subprog_body): Do not call
15648 (end_subprog_body): Likewise.
15650 2011-05-04 Richard Guenther <rguenther@suse.de>
15652 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15654 (pos_to_constructor): Likewise.
15656 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15657 Eric Botcazou <ebotcazou@adacore.com>
15659 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15660 of build_function_type. Adjust calls to...
15661 (build_raise_check): ...this. Do not take a void_tree parameter.
15662 Call build_function_type_list instead of build_function_type.
15663 Fix head comment and swap couple of conditional blocks.
15665 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15667 * gnatvsn.ads (Library_Version): Bump to 4.7.
15668 (Current_Year): Bump to 2011.
15670 2011-04-29 Michael Matz <matz@suse.de>
15672 * gcc-interface/misc.c (gnat_handle_option): Set
15673 warn_maybe_uninitialized.
15675 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15677 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15678 the Watson/McCabe paper.
15680 2011-04-23 Jim Meyering <meyering@redhat.com>
15682 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15684 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15686 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15689 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15691 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15693 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15694 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15695 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15696 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15697 <all>: Do not set flags on the reused DECL node coming from an alias.
15698 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15699 don't need debug info here...
15700 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15701 (gigi): Adjust calls to create_subprog_decl.
15702 (build_raise_check): Likewise.
15703 (establish_gnat_vms_condition_handler): Likewise.
15704 (Compilation_Unit_to_gnu): Likewise.
15705 (gnat_to_gnu): Likewise.
15707 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15709 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15710 (NO_REORDER_ADAFLAGS): New variable.
15711 (EXTRA_GNATTOOLS): Always define.
15712 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15713 Clean up and adjust list of files compiled with special options.
15714 * gcc-interface/Make-lang.in: Likewise.
15715 (ada/decl.o): Cosmetical change.
15716 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15718 2011-04-20 Jim Meyering <meyering@redhat.com>
15720 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15722 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15724 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15725 $(CFLAGS) on the link line.
15727 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15729 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15730 padded type built for the return type if it is unconstrained.
15732 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15734 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15736 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15738 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15739 before calling TREE_CHAIN.
15740 * gcc-interface/misc.c (gnat_init_ts): New function.
15741 (LANG_HOOKS_INIT_TS): Define.
15743 2011-04-12 Martin Jambor <mjambor@suse.cz>
15745 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15746 instead of cgraph_node.
15748 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15750 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15751 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15754 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15756 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15757 of aggregate types that contain a placeholder.
15759 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15761 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15763 (handle_type_generic_attribute): Likewise.
15765 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15768 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15770 2011-04-04 Kai Tietz <ktietz@redhat.com>
15773 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15776 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15778 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15779 type case, do not strip a padding type around the array type.
15781 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15783 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15786 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15788 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15789 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15790 code for -feliminate-unused-debug-types.
15791 (gnat_post_options): Likewise.
15793 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15795 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15796 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15799 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15801 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15802 DECL_ARTIFICIAL flag on enumeration types.
15804 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15806 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15807 fat pointer types artificial unconditionally.
15808 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15811 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15813 * gcc-interface/gigi.h (get_dummy_type): Declare.
15814 (build_dummy_unc_pointer_types): Likewise.
15815 (finish_fat_pointer_type): Likewise.
15816 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15817 fat pointer type has been built, complete it in place.
15818 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15819 and thin pointers. Remove useless variable.
15820 (finish_fat_pointer_type): Make global and move to...
15821 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15822 (get_dummy_type): New function.
15823 (build_dummy_unc_pointer_types): Likewise.
15824 (gnat_pushdecl): Propage the name to the anonymous variants only.
15825 (update_pointer_to): Only adjust the pointer types in the unconstrained
15828 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15830 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15831 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15832 if this is a Taft amendment type and the full declaration is available.
15833 * gcc-interface/trans.c (process_type): Likewise.
15834 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15835 (process_freeze_entity): Likewise.
15836 * gcc-interface/utils.c (dummy_global): New static variable.
15837 (gnat_write_global_declarations): If there are types declared as used
15838 at the global level, insert them in the global hash table.
15840 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15842 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15843 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15844 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15846 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15847 flag of the type accordingly.
15848 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15850 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15852 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15853 finalizing types when updating the pointers to the designated type.
15854 <all>: Finalize the deferred types even if we didn't defer processing
15855 of incomplete types in this invocation.
15857 2011-04-01 Olivier Hainque <hainque@adacore.com>
15858 Nicolas Setton <setton@adacore.com>
15859 Eric Botcazou <ebotcazou@adacore.com>
15861 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15862 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15864 2011-03-28 Kai Tietz <ktietz@redhat.com>
15866 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15868 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15869 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15871 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15873 2011-03-28 Tristan Gingold <gingold@adacore.com>
15876 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15877 Use ada output of gnatbind.
15878 (ada/b_gnatb.adb): Ditto.
15879 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15880 (ada.mostlyclean, ada.stage1)
15881 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15882 (ada.stagefeedback): Adjust.
15883 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15884 Use ada output of gnatbind.
15885 (b_gnatm.adb): Ditto.
15886 (b_gnatl.o, b_gnatm.o): New rules.
15888 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15890 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15891 for the padded type built to support a specified size or alignment.
15893 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15895 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15896 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15897 unconditionally to the end of the unit when the designated type is
15899 <all>: Rename local variable. Attempt to un-defer types only and do it
15900 for limited_with'ed types as well.
15901 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15902 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15903 consistently and remove redundant call to finalize_from_with_types.
15905 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15907 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15908 subprograms without a previous spec declared in the same unit.
15909 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15910 subprograms at the end of the unit instead of at the beginning.
15911 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15912 isn't public for the special handling of non-inline functions nested
15913 inside inline external functions.
15915 2011-03-25 Jeff Law <law@redhat.com>
15917 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15919 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15921 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15922 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15923 to compute Set_Size_Depends_On_Discriminant.
15924 (Layout_Type): Call it on array types in back-end layout mode.
15925 * sem_util.adb (Requires_Transient_Scope): Return true for array
15926 types only if the size depends on the value of discriminants.
15927 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15928 type if the RHS is a call to a function that returns an unconstrained
15929 type with default discriminant.
15931 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15933 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15934 non-conversion to the nominal result type at the end.
15936 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15938 * gcc-interface/trans.c (create_temporary): New function taken from...
15939 (create_init_temporary): ...here. Call it.
15940 (call_to_gnu): Create the temporary for the return value early, if any.
15941 Create it for a function with copy-in/copy-out parameters if there is
15942 no target; in other cases of copy-in/copy-out, use another temporary.
15943 Push the new binding level lazily. Add and rename local variables.
15945 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15947 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15949 (set_rm_size): Likewise.
15951 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15953 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15954 for the padded type built in order to support a specified alignment.
15955 Fix incorrect formatting.
15957 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15960 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15962 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15964 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15965 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15966 to the end of the list. Adjust recursive call. Rename local variable.
15967 If REORDER is true, reorder components of the record type.
15968 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15969 components_to_record and adjust the parameter list.
15971 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15973 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15974 disabled, use the variable for bounds of loop iteration scheme.
15976 2011-03-21 Kai Tietz <ktietz@redhat.com>
15979 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15981 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15983 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15984 out whether the expression is read-only. Short-circuit placeholder
15985 case and rename a couple of local variables.
15987 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15989 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15990 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15991 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15992 (convert): Deal with conversions from a smaller form type specially.
15994 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15996 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15997 its argument, except for the special -I- switch.
15999 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
16001 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16004 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16006 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16008 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16010 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16012 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16013 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16014 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16015 Do not generate the check directly, instead instantiate the template
16016 check present in the descriptor.
16017 (make_descriptor_field): Move around.
16018 (build_vms_descriptor32): Build a template check in the POINTER field.
16019 (build_vms_descriptor): Remove useless suffixes.
16020 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16022 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16025 * targext.c: Include target files if IN_RTS is defined.
16027 2011-01-26 Richard Guenther <rguenther@suse.de>
16030 * targext.c: Include config.h.
16031 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16034 2011-01-04 Pascal Obry <obry@adacore.com>
16035 Eric Botcazou <ebotcazou@adacore.com>
16037 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16039 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16041 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16042 end-of-case on the end label and its associated gotos, if any.
16044 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16046 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16047 expressions of the parameter cache within the statement group of
16048 the CICO mechanism.
16050 2011-01-04 Olivier Hainque <hainque@adacore.com>
16051 Eric Botcazou <ebotcazou@adacore.com>
16053 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16054 (set_end_locus_from_node): New function.
16055 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16056 make and the function end_locus.
16057 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16058 for the elaboration subprogram.
16059 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16060 set the end_locus of the expression as well.
16062 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16065 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16066 variables that are referenced in exception handlers volatile.
16070 Copyright (C) 2011 Free Software Foundation, Inc.
16072 Copying and distribution of this file, with or without modification,
16073 are permitted in any medium without royalty provided the copyright
16074 notice and this notice are preserved.