2 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
4 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
5 make a packable type for fields of union types as well.
6 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
7 (gnat_to_gnu_component_type): Try to make a packable type for fields
8 of union types as well.
9 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
10 (maybe_pad_type): Try to make a packable type for fields of union types
12 (gnat_to_gnu_field): Likewise.
13 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
14 (set_rm_size): Likewise.
16 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
17 * gcc-interface/trans.c (add_decl_expr): Likewise.
18 * gcc-interface/utils.c (finish_record_type): Likewise.
19 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
21 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
23 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
24 declared as atomic. Move around conditionally executed code.
26 2011-10-24 Robert Dewar <dewar@adacore.com>
28 * sem.adb (Initialize): Fix bug that blew up if called a second
31 2011-10-24 Robert Dewar <dewar@adacore.com>
33 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
34 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
36 2011-10-24 Robert Dewar <dewar@adacore.com>
38 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
41 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
43 * gnat_rm.texi Add an entry for restriction No_Finalization.
45 2011-10-24 Ed Schonberg <schonberg@adacore.com>
47 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
48 current instance is within the one that contains the generic,
49 the freeze node for the current one must appear in the current
50 declarative part. Ditto if the current instance is within another
51 package instance. In both of these cases the freeze node of the
52 previous instance is not relevant.
54 2011-10-24 Gary Dismukes <dismukes@adacore.com>
56 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
57 of AAMP-specific switches -univ and -aamp_target.
59 2011-10-24 Robert Dewar <dewar@adacore.com>
61 * a-tienau.adb (Put): Deal properly with limited line length.
63 2011-10-24 Robert Dewar <dewar@adacore.com>
65 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
67 2011-10-24 Tristan Gingold <gingold@adacore.com>
69 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
72 2011-10-24 Ed Schonberg <schonberg@adacore.com>
74 * sem_ch12.adb (Earlier): make available globally. If both
75 nodes have the same sloc, the freeze node that does not come
76 from source is the later one.
77 (True_Parent): Make available globally.
78 (Previous_Instance): Subsidiary of
79 Insert_Freeze_Node_For_Instance, to check whether the generic
80 parent of the current instance is declared within a previous
81 instance in the same unit or declarative part, in which case the
82 freeze nodes of both instances must appear in order to prevent
83 elaboration problems in gigi.
84 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
85 freeze point, and the freeze node of a preceding instantiation
86 must be inserted before it.
88 2011-10-24 Robert Dewar <dewar@adacore.com>
90 * checks.ads, checks.adb: Add handling of Synchronization_Check
91 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
93 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
94 flag Minor code reorganization.
95 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
96 * par-prag.adb: Add dummy entries for pragma
97 Disable/Enable_Atomic_Synchronization.
98 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
99 case of Atomic_Synchronization specially (not suppressed
100 by All_Checks, cannot be set from Source).
101 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
102 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
103 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
104 entry for pragma Disable/Enable_Atomic_Synchronization
105 * switch-c.adb: The -gnatp switch does not disable
106 Atomic_Synchronization Add -gnatep switch to disable
107 Atomic_Synchronization.
108 * types.ads: Add entry for Synchronization_Check
109 * usage.adb: Add line for -gnated switch
110 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
112 2011-10-24 Geert Bosch <bosch@adacore.com>
114 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix
115 bounds start at Integer'First.
117 2011-10-24 Robert Dewar <dewar@adacore.com>
119 * sem_ch12.adb, s-gearop.adb: Minor reformatting
121 2011-10-24 Robert Dewar <dewar@adacore.com>
123 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings
124 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings
126 2011-10-24 Emmanuel Briot <briot@adacore.com>
128 * prj-proc.adb (Process_Expression_Variable_Decl): No special
129 handling for Project_Path unless it is an attribute.
131 2011-10-24 Javier Miranda <miranda@adacore.com>
133 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
134 (Install_Hidden_Primitives): New subprogram.
135 (Restore_Hidden_Primitives): New subprogram.
136 (Analyze_Formal_Package_Declaration,
137 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
138 Invoke Check_Hidden_Primitives after every call to
139 Analyze_Associations, and invoke Restore_Hidden_Primitives to
140 restore their visibility after processing the instantiation.
141 (Instantiate_Package_Body): Install visible primitives before
142 analyzing the instantiation and uninstall them to restore their
143 visibility when the instantiation has been analyzed.
144 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
145 (Remove_Suffix): New subprogram
146 * sem_ch3.adb (Derive_Subprogram): When handling
147 a derived subprogram for the instantiation of a formal derived
148 tagged type, inherit the dispatching attributes from the actual
149 subprogram (not from the parent type).
151 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
153 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
155 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
157 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
159 (Build_Discriminant_Assignments): Add local variable D_Loc and update
161 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
162 Var_Loc and update their uses.
163 (Build_Record_Init_Proc): Code reformatting.
164 (Increment_Counter): Add formal parameter Loc.
165 (Make_Counter): Add formal parameter Loc.
167 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
169 * sem_disp.adb (Covers_Some_Interface): Fix typo.
171 2011-10-24 Matthew Heaney <heaney@adacore.com>
173 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority):
174 Predicate had wrong sense.
176 2011-10-24 Yannick Moy <moy@adacore.com>
178 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
179 Translate arguments in positional notation into pragma argument
180 association arguments for the generated pragma.
182 2011-10-24 Arnaud Charlet <charlet@adacore.com>
184 * exp_ch5.adb: Fix minor typo.
186 2011-10-24 Ed Schonberg <schonberg@adacore.com>
188 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
189 the case of a component reference in an instance body, when the
190 enclosing type is private.
192 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
194 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
195 driver for getting the project support into gnatelim section.
197 2011-10-24 Robert Dewar <dewar@adacore.com>
199 * gnat_rm.texi: Minor correction to documentation on address
202 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
204 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
205 (Attach_Unprotected): New routine.
206 (Delete_Finalize_Address): Removed.
207 (Delete_Finalize_Address_Unprotected): New routine.
208 (Detach): Synchronize and call the unprotected version.
209 (Detach_Unprotected): Remove locking.
210 (Finalize): Add various comment on synchronization. Lock the critical
211 region and call the unprotected versions of routines.
212 (Finalize_Address): Removed.
213 (Finalize_Address_Unprotected): New routine.
214 (Set_Finalize_Address): Synchronize and call
215 the unprotected version.
216 (Set_Finalize_Address_Unprotected): New routine.
217 (Set_Heterogeneous_Finalize_Address): Removed.
218 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
219 (Set_Is_Heterogeneous): Add comment on synchronization and
221 * s-finmas.ads: Flag Finalization_Started is no longer atomic
222 because synchronization uses task locking / unlocking.
223 (Attach): Add comment on usage.
224 (Attach_Unprotected): New routine.
225 (Delete_Finalize_Address): Renamed to
226 Delete_Finalize_Address_Unprotected.
227 (Detach): Add comment on usage.
228 (Detach_Unprotected): New routine.
229 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
230 (Set_Finalize_Address): Add comment on usage.
231 (Set_Finalize_Address_Unprotected): New routine.
232 (Set_Heterogeneous_Finalize_Address): Renamed to
233 Set_Heterogeneous_Finalize_Address_Unprotected.
234 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
235 Allocation_Locked. Add various comments on synchronization. Lock
236 the critical region and call the unprotected version of
238 (Deallocate_Any_Controlled): Add various comments on
239 synchronization. Lock the critical region and call the unprotected
242 2011-10-24 Ed Schonberg <schonberg@adacore.com>
244 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
245 are universal and must carry the corresponding type.
246 * sem_eval.adb (Check_Non_Static_Context): If the type of the
247 expression is universal real, as may be the case for a fixed point
248 expression with constant operands in the context of a conversion,
249 there is nothing to check.
250 * s-finmas.adb: Minor reformatting
252 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
254 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
256 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
258 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
260 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
261 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
263 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
265 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
266 (unchecked_conversion_nop): Use it.
267 (gnat_to_gnu): Likewise.
269 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
271 * back_end.adb (Call_Back_End): Pass the maximum logical line number
272 instead of the maximum physical line number to gigi.
273 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
275 2011-10-16 Tom Tromey <tromey@redhat.com>
276 Dodji Seketeli <dodji@redhat.com>
278 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the
279 new public ordinary map interface.
281 2011-10-16 Tristan Gingold <gingold@adacore.com>
283 * link.c (_AIX): Add support for GNU ld.
285 2011-10-16 Fedor Rybin <frybin@adacore.com>
287 * gnat_ugn.texi: Fixing gnattest example names in the doc.
288 Adding explanation to additional tests usage.
290 2011-10-16 Robert Dewar <dewar@adacore.com>
292 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
294 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
296 * a-convec.adb: Fix minor inconsistencies.
298 2011-10-16 Matthew Heaney <heaney@adacore.com>
300 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
301 Implementation): Specify pragma Implementation_Defined.
303 2011-10-15 Nicolas Roche <roche@adacore.com>
305 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
306 either rtp-smp or ravenscar-cert-rtp runtimes.
308 2011-10-15 Bob Duff <duff@adacore.com>
310 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
311 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
313 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
314 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
316 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
317 pool only if RE_Root_Storage_Pool_Ptr is available.
318 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
319 pool actual unless RE_Root_Storage_Pool_Ptr is available.
320 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
321 formal only if RE_Root_Storage_Pool_Ptr is available.
323 2011-10-15 Matthew Heaney <heaney@adacore.com>
325 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
326 type): Specify Priority aspect for protected type.
328 2011-10-14 Ed Schonberg <schonberg@adacore.com>
330 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
331 is a generic actual, it is a subtype of a type that was frozen
332 by the instantiation, and even if not marked frozen it does not
333 affect the construction of the dispatch table.
335 2011-10-14 Robert Dewar <dewar@adacore.com>
337 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
339 * s-rident.ads: Add missing Compiler_Unit pragma.
341 2011-10-14 Gary Dismukes <dismukes@adacore.com>
343 * sem_res.adb: Minor reformatting.
345 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
347 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
348 Code and comment reformatting. Use BIP_Task_Master
349 when creating a _master.
350 (BIP_Formal_Suffix): Code reformatting. Correct the case for
352 (Make_Build_In_Place_Call_In_Object_Declaration): Use
353 BIP_Task_Master when creating a reference to the enclosing
354 function's _master formal.
355 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
357 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
358 (Needs_BIP_Finalization_Master): Alphabetized.
359 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
362 2011-10-14 Ed Schonberg <schonberg@adacore.com>
364 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
365 reject an aliased keyword on the object declaration of an extended
366 return statement. In older versions of the language indicate
367 that this is illegal in the standard.
369 2011-10-14 Pascal Obry <obry@adacore.com>
371 * sem_util.adb, sem_ch4.adb: Minor reformatting.
373 2011-10-14 Ed Schonberg <schonberg@adacore.com>
375 * sem_ch13.adb: Recognize properly procedure calls that are
376 transformed into code statements.
378 2011-10-14 Vincent Celier <celier@adacore.com>
380 * projects.texi: Minor fix in project example.
382 2011-10-14 Ed Schonberg <schonberg@adacore.com>
384 * sem_util.adb: Return objects are aliased if their type is
385 immutably limited as per AI05-0053.
387 2011-10-14 Gary Dismukes <dismukes@adacore.com>
389 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
390 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
391 Short_Circuit_And_Or expansion code (moved to sem_res).
392 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
393 "and" and "or" operators as short-circuit "and then" and "or
394 else", when pragma Short_Circuit_And_Or is active.
396 2011-10-13 Robert Dewar <dewar@adacore.com>
398 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
399 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
401 2011-10-13 Arnaud Charlet <charlet@adacore.com>
403 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
405 2011-10-13 Jerome Guitton <guitton@adacore.com>
407 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
409 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
411 * a-convec.ads (Cursor): Minor reformatting.
412 * a-convec.adb (Next): Fix minor inconsistencies.
413 (Previous): Likewise.
415 2011-10-13 Ed Schonberg <schonberg@adacore.com>
417 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
418 New predicate to determine whether some operations on an array
419 type are available when the full view of its component may differ
420 from the view of the point of the array declaration.
421 * sem_ch4.adb (Find_Equality_Types): Use
422 Available_Full_View_Of_Component.
423 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
425 2011-10-13 Ed Schonberg <schonberg@adacore.com>
427 * sem_ch9.adb: Analyze aspects while discriminants of protected
430 2011-10-13 Geert Bosch <bosch@adacore.com>
432 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
433 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
434 longer depend on an external library.
435 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
436 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
438 * gcc-interface/Make-lang.in: Update dependencies.
440 2011-10-13 Cyrille Comar <comar@adacore.com>
442 * gnat_ugn.texi: Minor editing.
444 2011-10-13 Vincent Celier <celier@adacore.com>
446 * projects.texi: Add documentation on packages and attributes
447 that are inherited from a project being extended into the
450 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
452 * exp_ch3.adb (Build_Master): Rewritten.
453 (Expand_N_Full_Type_Declaration): Reformat the declarative
454 region. Update the call to Build_Master_Renaming.
455 (Expand_Previous_Access_Type): Rewritten.
456 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
457 Add local constant Result_Subt and update related usage.
458 (Expand_N_Extended_Return_Statement): Add local constant
459 Result_Subt and update related usage.
460 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
461 new context detection mechanism.
462 (Build_Class_Wide_Master):
463 Use Insert_Action to add the renaming into the tree.
464 (Build_Master_Entity): Rewritten to use the new context detection
466 (Build_Master_Renaming): Add formal parameter Ins_Nod
467 and related usage. Use Insert_Action to add the renaming into the
469 (Find_Enclosing_Context): New subsidiary routine. Rather
470 than relying on enclosing scopes, this routine looks at the
471 tree structure to figure out the proper context for a _master
472 or a _chain. This approach eliminates the issues with transient
473 scopes which have not been converted into blocks.
474 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
475 to better reflect the new usage. Update the related comment.
476 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
477 the comment on usage.
478 * sem_ch3.adb (Access_Definition): Update the calls to
479 Build_Master_Entity and Build_Master_Renaming.
480 * sem_ch6.adb (Create_Extra_Formals): Add local variable
481 Full_Subt. Code reformatting.
482 * sem_util.adb (Is_Iterator): Alphabetized.
483 (Is_LHS): Alphabetized.
484 (Is_Limited_Class_Wide_Type): New routine.
485 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
487 2011-10-13 Geert Bosch <bosch@adacore.com>
489 * a-ngrear.adb (Solve): Make generic and move to
490 System.Generic_Array_Operations.
491 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
492 New generic solvers to compute a vector resp. matrix Y such
493 that A * Y = X, approximately.
494 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
495 Implement using Forward_Eliminate and Back_Substitute
496 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
498 * a-ngcoar.ads ("abs"): Fix return type to be real.
500 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
503 * s-linux-alpha.ads: Do not "with" Interfaces.C.
504 * s-linux-sparc.ads: Likewise.
506 2011-10-13 Geert Bosch <bosch@adacore.com>
508 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
510 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
512 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
515 2011-10-13 Geert Bosch <bosch@adacore.com>
517 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
518 move to System.Generic_Array_Operations.
520 2011-10-13 Geert Bosch <bosch@adacore.com>
522 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
523 * s-gearop.ads (L2_Norm): Change profile to be suitable for
525 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
528 2011-10-13 Robert Dewar <dewar@adacore.com>
530 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
531 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
532 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
533 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
534 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
535 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
537 2011-10-13 Geert Bosch <bosch@adacore.com>
539 * s-gearop.adb: Minor comment additions.
541 2011-10-13 Fedor Rybin <frybin@adacore.com>
543 * gnat_ugn.texi: Add gnattest section.
545 2011-10-13 Ed Schonberg <schonberg@adacore.com>
547 * freeze.adb: Do not create body of renaming if declaration has
550 2011-10-13 Olivier Hainque <hainque@adacore.com>
552 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
553 further, to the ppc+kernel case only.
555 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
557 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
558 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
559 Do not create a pool formal on .NET/JVM.
560 (Expand_N_Extended_Return_Statement): Alphabetize local
561 variables. Do not create a renaming of the build-in-place pool
562 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
563 Add the user-defined pool only on non-VM targets.
564 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
565 local variables. Do not add a pool actual on .NET/JVM.
566 * sem_ch6.adb: Add with and use clause for Targparm.
567 (Create_Extra_Formals): Add build-in-place pool formal only on
569 * rtsfind.ads: Alphabetize entries.
571 2011-10-13 Sergey Rybin <rybin@adacore.com>
573 * gnat_ugn.texi: Minor correction.
575 2011-10-13 Ed Schonberg <schonberg@adacore.com>
577 * sem_ch8.adb: Minor error message improvement.
579 2011-10-13 Robert Dewar <dewar@adacore.com>
581 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
583 2011-10-13 Gary Dismukes <dismukes@adacore.com>
585 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
586 of a for loop for an enumeration type with an enumeration rep
587 clause, which involves moving the original loop parameter into
588 a nested block, the loop parameter's entity must be removed from
589 the entity list of the loop scope.
591 2011-10-13 Bob Duff <duff@adacore.com>
593 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
594 that gets passed in the same cases where BIP_Alloc_Form is passed
595 (caller-unknown-size results). BIP_Storage_Pool is used when
596 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
597 to the user-defined storage pool is passed at the call site,
598 and this pool is used in callee to allocate the result.
599 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
600 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
601 the additional BIP_Storage_Pool actual.
602 (Expand_N_Extended_Return_Statement): Allocate the function
603 result using the user-defined storage pool, if BIP_Alloc_Form =
605 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
606 * exp_ch4.adb: Don't overwrite storage pool set by
607 Expand_N_Extended_Return_Statement.
608 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
609 for use in build-in-place function calls within allocators
610 where the access type has a user-defined storage pool.
612 2011-10-13 Sergey Rybin <rybin@adacore.com>
614 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
617 2011-10-13 Nicolas Roche <roche@adacore.com>
619 * gnatlink.adb: Ensure that -mrtp is passed when
620 runtime name ends with 'rtp'.
622 2011-10-13 Ed Schonberg <schonberg@adacore.com>
624 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
625 unchecked union type can be limited.
627 2011-10-13 Olivier Hainque <hainque@adacore.com>
629 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
630 the use of the signal trampoline for PPC in the sjlj case as well.
631 Add legitimate casts, preventing compile time warnings on the
632 (sighandler *) profile.
634 2011-10-13 Yannick Moy <moy@adacore.com>
636 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
637 analysis in Alfa mode.
639 2011-10-13 Ed Schonberg <schonberg@adacore.com>
641 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
642 expressions are legal limited return values if each one of their
643 dependent expressions are legal.
645 2011-10-13 Ed Schonberg <schonberg@adacore.com>
647 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
648 if the prefix of the call is a qualified expression, rewrite as
650 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
651 code statement is legal if it is a rewriting of a procedure call.
653 2011-10-13 Ed Schonberg <schonberg@adacore.com>
655 * exp_aggr.adb (Flatten): If a component association has a box,
656 assume that aggregate is not static.
657 (Safe_Aggregate): If a component association in a non-limited
658 aggregate has a box, assume that it cannot be expanded in place.
660 2011-10-13 Vincent Celier <celier@adacore.com>
662 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
663 Process_Project_Tree_Phase_1 with Packages_To_Check.
664 (Process_Project_And_Apply_Config): Ditto
665 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
666 Remove default for argument Packages_To_Check.
667 * prj-proc.adb (Recursive_Process): New argument
670 (Process_Project_Tree_Phase_1): Ditto.
671 (Recursive_Project.Process_Aggregated_Projects): Call
672 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
674 * prj-proc.ads (Process): New argument Packages_To_Check
675 (Process_Project_Tree_Phase_1): Ditto
677 2011-10-13 Arnaud Charlet <charlet@adacore.com>
679 * gcc-interface/Makefile.in: Fix typo.
681 2011-10-13 Ed Schonberg <schonberg@adacore.com>
683 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
684 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
685 Use sloc of defining identifier of farmal type declaration,
686 as sloc of generated internal entity, to prevent misplaced
689 2011-10-13 Ed Schonberg <schonberg@adacore.com>
691 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
692 is fully defined before checking that it is a numeric type.
694 2011-10-13 Ed Schonberg <schonberg@adacore.com>
696 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
697 association for component X has a box, then X is covered in the
698 aggregate even if there is not default value for X in the type
699 declaration, and X has to be default-initialized.
701 2011-10-13 Ed Schonberg <schonberg@adacore.com>
703 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
704 'Value): Mark literals as referenced only if reference is in
707 2011-10-13 Matthew Heaney <heaney@adacore.com>
709 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
711 2011-10-13 Olivier Hainque <hainque@adacore.com>
713 * sigtramp.h: New file. Prototype and spec of the signal
714 trampoline to be called by an established handler to provide
715 dwarf call frame info before the real signal processing code.
716 * sigtramp-ppcvxw.c: New file. Implementation of the signal
717 trampoline for ppc-vxworks.
718 * init.c (vxworks section): Use it for ppc.
720 2011-10-13 Thomas Quinot <quinot@adacore.com>
722 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
723 (Check_Future_Identifier): New subprogram,
724 factors duplicated code from Par.Ch2.P_Identifier and
725 Par.Ch3.P_Defining_Identifier.
727 2011-10-13 Thomas Quinot <quinot@adacore.com>
729 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
730 if we fail to initialize CV attributes or CV.
732 2011-10-13 Thomas Quinot <quinot@adacore.com>
734 * s-tasren.adb (Timed_Selective_Wait, case
735 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
736 we know abortion is already deferred.
738 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
740 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
741 (Build_Master_Renaming (function)): Removed.
742 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
743 (Expand_Full_Type_Declaration): Alphabetize
744 variables. Reformatting of code and comments. Rewrite the
745 section on processing of anonymous access-to-task types in
747 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
748 (Build_Master_Renaming): Moved to exp_ch9.
749 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
750 (Build_Master_Entity): Add formal parameter
751 Use_Current. Reformatting of code and comments.
752 (Build_Master_Renaming): Moved from exp_ch3.
753 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
754 exp_ch3. Update comment on usage.
755 (Build_Master_Entity):
756 Add formal parameter Use_Current. Update comment on usage.
757 (Build_Master_Renaming): Moved from exp_ch3.
758 * sem_ch3.adb (Access_Definition): Remove redundant code to
759 create a _master and a renaming.
761 2011-10-13 Ed Schonberg <schonberg@adacore.com>
763 * lib-xref.adb: Do no emit reference to overridden operation,
764 if it is internally generated.
766 2011-10-13 Vincent Celier <celier@adacore.com>
768 * bindgen.adb: Remove any processing related to g-trasym
769 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
770 * mlib-prj.adb: Remove any processing related to g-trasym.
772 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
774 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
775 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
776 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
777 (ADA_FLAGS_TO_PASS): Likewise.
778 (COMMON_FLAGS_TO_PASS): New.
779 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
780 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
781 (gnatlib): Use COMMON_FLAGS_TO_PASS.
782 (ada.install-common): Likewise.
783 (install-gnatlib): Likewise.
784 (install-gnatlib-obj): Likewise.
785 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
786 (gnat-cross): Delete.
787 (gnatboot): Likewise.
788 (gnatboot2): Likewise.
789 (gnatboot3): Likewise.
790 (gnatstage1): Likewise.
791 (gnatstage2): Likewise.
792 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
793 (MOST_ADAFLAGS): Likewise.
794 (LOOSE_CFLAGS): Likewise.
795 (gnat-cross): Likewise.
796 (GNATLIBFLAGS): Add -W -Wall.
797 (GNATLIBCFLAGS_FOR_C): Likewise.
798 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
799 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
801 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
803 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
804 (push_range_check_info): Likewise.
805 (gnat_to_gnu) <N_Code_Statement>: Likewise.
806 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
807 (gnat_invariant_expr): Likewise.
808 * gcc-interface/utils.c (compute_related_constant): Likewise.
809 (max_size): Fix handling of SAVE_EXPR.
810 (remove_conversions): Fix formatting.
812 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
814 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
815 (DECL_INDUCTION_VAR): New macro.
816 (SET_DECL_INDUCTION_VAR): Likewise.
817 * gcc-interface/gigi.h (convert_to_index_type): Declare.
818 (gnat_invariant_expr): Likewise.
819 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
820 parameter, set DECL_LOOP_PARM_P on it.
821 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
822 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
823 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
824 (struct range_check_info_d): New type.
825 (struct loop_info_d): Likewise.
826 (gnu_loop_stack): New stack.
827 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
828 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
829 is set, do not test DECL_RENAMED_OBJECT.
830 (push_range_check_info): New function.
831 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
832 the label. Reference the label and the iteration variable from it.
833 Build the special induction variable in the unsigned version of the
834 size type, if it is larger than the base type. And attach it to the
835 iteration variable if the latter isn't by-ref. In the iteration scheme
836 case, initialize the invariant conditions in front of the loop if
837 deemed profitable. Use gnu_loop_stack.
838 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
839 <N_Raise_Constraint_Error>: Always process the reason. In the range
840 check and related cases, and if loop unswitching is enabled, compute
841 invariant conditions and push this information onto the stack.
842 Do not translate again the condition if it has been already translated.
843 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
844 DECL_LOOP_PARM_P isn't set.
845 (convert_to_index_type): New function.
846 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
847 to convert the index from the base index type to sizetype.
848 (gnat_invariant_expr): New function.
850 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
852 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
853 two parallel arrays to hold standard builtin declarations, and
854 replace it with a function based interface that can support
855 creating builtins on the fly in the future.
856 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
857 (gnat_to_gnu): Ditto.
859 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
862 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
863 * gcc-interface/utils.c (global_context): New variable.
864 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
865 that are either public external or at top level. Use "No" macro.
866 (end_subprog_body): Call decl_function_context.
867 (rest_of_subprog_body_compilation): Likewise.
869 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
871 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
872 (rest_of_subprog_body_compilation): Likewise.
873 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
874 test for useless conversions by means of gnat_useless_type_conversion.
875 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
876 (language_function): Add named_ret_val and other_ret_val.
877 (f_named_ret_val): New macro.
878 (f_other_ret_val): Likewise.
879 (gigi): Call rest_of_subprog_body_compilation.
880 (struct nrv_data): New structure.
881 (is_nrv_p): New predicate.
882 (prune_nrv_r): New helper function.
883 (prune_nrv_in_block): New function.
884 (finalize_nrv_r): New helper function.
885 (finalize_nrv): New function.
886 (return_value_ok_for_nrv_p): New predicate.
887 (build_return_expr): If optimization is enabled, record candidates for
888 the Named Return Value optimization.
889 (build_function_stub): Call rest_of_subprog_body_compilation.
890 (Subprogram_Body_to_gnu): If optimization is enabled and there are
891 candidates, finalize the Named Return Value optimization.
892 Call rest_of_subprog_body_compilation.
893 (call_to_gnu): At the end, if a return value is needed, simplify the
894 result before wrapping it up in a COMPOUND_EXPR.
895 * gcc-interface/utils.c (end_subprog_body): Split into...
896 (rest_of_subprog_body_compilation): ...this. New function.
897 (gnat_useless_type_conversion): Likewise.
899 2011-10-06 Thomas Quinot <quinot@adacore.com>
901 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
902 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
903 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
904 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
905 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
906 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
907 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
908 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
910 2011-10-06 Ed Schonberg <schonberg@adacore.com>
912 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
915 2011-10-06 Matthew Heaney <heaney@adacore.com>
917 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
918 (Dequeue_Only_High_Priority): Protected procedure now implemented.
920 2011-10-06 Vincent Celier <celier@adacore.com>
922 * g-trasym.adb: Replace old implementation with the default
923 implementation that returns list of addresses as "0x...".
924 * g-trasym.ads: Update the list of platforms with the full
925 capability. Indicate that there is a default implementation
927 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
928 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
929 is now a default implementation for all platforms without the full
932 2011-10-06 Robert Dewar <dewar@adacore.com>
934 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
935 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
936 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
937 reorganization (use conditional expressions).
939 2011-10-06 Robert Dewar <dewar@adacore.com>
941 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
942 floating divide by zero.
944 2011-10-06 Ed Schonberg <schonberg@adacore.com>
946 * sem_ch6.adb: Limited interfaces that are not immutably limited
947 are OK in return statements.
949 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
951 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
952 change to powerpc section.
954 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
956 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
959 2011-09-27 Ed Schonberg <schonberg@adacore.com>
961 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
962 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
963 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
965 * a-coorma.ads: Minor reformmating.
966 * einfo.ads: Improve the comment describing the
967 Directly_Designated_Type function.
968 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
970 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
973 2011-09-27 Robert Dewar <dewar@adacore.com>
975 * a-comutr.ads: Minor reformatting.
977 2011-09-27 Ed Schonberg <schonberg@adacore.com>
979 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
980 iterators to multiway trees.
982 2011-09-27 Yannick Moy <moy@adacore.com>
984 * debug.adb (d.D): New option for strict Alfa mode.
985 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
986 permissions as strictly as possible.
987 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
988 Alfa mode, now, interpret ranges of base types like GNAT does; in
989 strict mode, simply change the range of the implicit base Itype.
990 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
992 2011-09-27 Robert Dewar <dewar@adacore.com>
994 * exp_ch9.adb: Minor comment fixes.
996 2011-09-27 Ed Schonberg <schonberg@adacore.com>
998 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1001 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1003 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1004 instead of Directly_Designated_Type in the indirect array case.
1006 2011-09-27 Robert Dewar <dewar@adacore.com>
1008 * exp_util.adb, exp_aggr.adb: Minor reformatting.
1010 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1012 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1013 on subtype declarations.
1014 * exp_aggr.adb: Minor comment update.
1016 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1018 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1019 test in the N_Explicit_Dereference case. Fold double logical
1020 negation in the special loop case and conditionalize it on
1021 Variable_Ref being true.
1023 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1025 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1026 single protected object and the selector is a discriminant or an
1027 entry family, this is a non-overloaded candidate interpretation,
1028 and possible primitive operations of the type must not be
1031 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1033 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1035 2011-09-27 Pascal Obry <obry@adacore.com>
1037 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1038 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1039 Add dummy definitions for pthread_rwlock_t
1040 and pthread_rwlockattr_t on all POSIX platforms.
1041 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1043 (Finalize_Lock): Likewise.
1044 (Write_Lock): Likewise.
1047 2011-09-27 Tristan Gingold <gingold@adacore.com>
1049 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1052 2011-09-27 Pascal Obry <obry@adacore.com>
1054 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1055 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1056 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1057 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1058 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1059 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1060 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1061 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1062 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1063 s-taprop-posix.adb: Revert previous changes.
1064 (Lock): Now a record containing the two possible lock
1065 (mutex and read/write) defined in OS_Interface.
1066 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1068 (Initialize_Protection): Likewise.
1070 (Lock_Read_Only): Likewise.
1073 2011-09-27 Pascal Obry <obry@adacore.com>
1075 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1076 OS_Interface.pthread_rwlock_t.
1078 2011-09-27 Robert Dewar <dewar@adacore.com>
1080 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1081 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1082 sem_ch5.adb, sem_util.adb: Minor reformatting.
1084 2011-09-27 Pascal Obry <obry@adacore.com>
1086 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1087 (Finalize_Lock)[RW_Lock]: Likewise.
1088 (Write_Lock)[RW_Lock]: Likewise.
1089 (Unlock)[RW_Lock]: Likewise.
1090 (Read_Lock): Define L as RW_Lock (instead of Lock).
1091 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1092 routine for r/w lock.
1093 (Finalize_Lock)[RW_Lock]: Likewise.
1094 (Write_Lock)[RW_Lock]: Likewise.
1095 (Unlock)[RW_Lock]: Likewise.
1096 (Read_Lock): Define L as RW_Lock (instead of Lock).
1098 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1099 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1100 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1101 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1102 routine for standard lock.
1103 (Finalize_Lock)[RW_Lock]: Likewise.
1104 (Write_Lock)[RW_Lock]: Likewise.
1105 (Unlock)[RW_Lock]: Likewise.
1106 (Read_Lock): Define L as RW_Lock (instead of Lock).
1107 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1108 in the record definition.
1109 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1110 lock for 'R' locking policy.
1111 (Initialize_Protection): Likewise.
1113 (Lock_Read_Only): Likewise.
1115 * s-taspri-posix.ads (RW_Lock): New type defined as
1116 OS_Interface.pthread_rwlock_t.
1118 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1119 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1120 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1121 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1123 2011-09-27 Pascal Obry <obry@adacore.com>
1125 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1127 2011-09-27 Pascal Obry <obry@adacore.com>
1129 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1130 s-osinte-hpux.ads, s-osinte-irix.ads,
1131 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1133 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1134 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1135 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1136 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1137 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1138 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1140 2011-09-27 Pascal Obry <obry@adacore.com>
1142 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1143 (RE_Id): Add RE_Lock_Read_Only.
1144 (RE_Unit_Table): Likewise.
1145 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1146 to lift restriction on first character. Handle now the
1147 Name_Concurrent_Readers_Locking where policy character is set to
1149 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1151 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1152 read only lock for function in protected object.
1153 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1154 this routine is now used.
1156 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1158 * s-atocou-x86.adb (Decrement): Use %;.
1159 (Increment): Likewise.
1161 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1163 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1164 dereference of the pointer to the storage area. Remove useless type
1165 conversions and factor out common code.
1167 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1169 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1170 variable and use it throughout.
1171 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1172 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1173 first step. Also convert to the unpadded type as a last step.
1175 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1177 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1178 DECL_CHAIN in comment.
1179 * gcc-interface/trans.c (gigi): Likewise.
1180 (Attribute_to_gnu): Likewise.
1181 (build_function_stub): Likewise.
1182 (gnat_to_gnu): Likewise.
1183 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1184 (convert_vms_descriptor64): Likewise.
1185 (convert_vms_descriptor32): Likewise.
1187 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1189 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1190 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1191 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1192 the type of the record is TYPE_READONLY.
1194 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1195 Robert Dewar <dewar@adacore.com>
1197 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1198 OUT formal parameter which is of an null-exclusion access subtype.
1200 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1202 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1203 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1204 (gnat_to_gnu_param): Likewise.
1205 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1206 maybe_unconstrained_array instead of doing the work manually.
1207 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1208 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1209 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1210 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1211 (gnat_stabilize_reference): Likewise.
1213 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1215 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1216 (SET_TYPE_NULL_BOUNDS): Likewise.
1217 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1218 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1219 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1221 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1222 check that the initializer is a valid constant expression for use in
1223 initializing a static variable. Add missing guard.
1224 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1225 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1226 pointer for the bounds.
1227 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1228 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1230 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1232 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1233 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1234 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1235 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1236 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1237 to the indirect case.
1238 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1239 the TREE_THIS_NOTRAP flag.
1241 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1243 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1244 iteration scheme, always generate the do-while form if optimization
1245 is enabled. Use more straightforward test at the end.
1247 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1249 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1250 XNEW instead of xmalloc. Do not build useless pointer type.
1251 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1252 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1253 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1255 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1257 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1258 the alignment if this doesn't prevent BLKmode access to the object.
1260 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1262 * gcc-interface/Makefile.in (darwin): Do not issue the
1263 '-flat_namespace' linker flag during Ada build.
1264 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1265 default shared library options.
1267 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1269 * gcc-interface/decl.c (annotate_value): Look up expression for
1270 insertion in the cache at the end.
1272 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1274 * gcc-interface/Make-lang.in: Update dependencies.
1276 2011-09-19 Steve Baird <baird@adacore.com>
1278 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1279 configuration pragma names so that Is_Configuration_Pragma_Name
1280 will return True for Name_Annotate. Make corresponding change in
1281 Pragma_Id enumeration type. This is needed to allow an Annotate
1282 pragma to occur in a configuration pragma file (typically,
1284 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1285 * gnat_rm.texi: Note that pragma Annotate may be used as a
1286 configuration pragma.
1288 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1290 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1291 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1293 2011-09-19 Yannick Moy <moy@adacore.com>
1295 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1296 for expansion of set membership.
1297 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1298 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1299 visible for use in Alfa expansion.
1300 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1301 variable in Alfa mode.
1303 2011-09-19 Thomas Quinot <quinot@adacore.com>
1305 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1307 2011-09-19 Thomas Quinot <quinot@adacore.com>
1309 * exp_ch9.adb: Minor reformatting.
1311 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1313 * freeze.adb (Build_Renamed_Body): Generic subprograms
1314 instantiations cannot be poperly inlined by the compiler, do
1315 not set the Body_To_Inline attribute in such cases.
1316 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1317 inlining-related flags from the generic subprogram declaration.
1319 2011-09-19 Thomas Quinot <quinot@adacore.com>
1321 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1322 (Build_Stub_Type): Remove, instead copy components from
1323 System.Partition_Interface.RACW_Stub_Type.
1324 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1325 (Copy_Component_List): New subprogram.
1327 2011-09-19 Yannick Moy <moy@adacore.com>
1329 * lib-xref.adb (Generate_Reference): Ignore references to
1330 constants in Standard.
1332 2011-09-19 Robert Dewar <dewar@adacore.com>
1334 * err_vars.ads, errout.ads: Minor reformatting.
1336 2011-09-19 Robert Dewar <dewar@adacore.com>
1338 * aspects.ads (Impl_Defined_Aspects): New array
1339 * lib-writ.adb (No_Dependences): New name for No_Dependence
1340 * restrict.adb (No_Dependences): New name for No_Dependence
1341 (Check_Restriction_No_Specification_Of_Aspect): New
1343 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1344 (Restricted_Profile_Result): New variable
1345 (No_Specification_Of_Aspects): New variable
1346 (No_Specification_Of_Aspect_Warning): New variable
1347 * restrict.ads (No_Dependences): New name for No_Dependence
1348 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1349 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1350 * s-rident.ads: Add restriction
1351 No_Implementation_Aspect_Specifications, this is also added to
1352 the No_Implementation_Extensions profile.
1353 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1354 No_Implementation_Defined_Aspects
1355 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1356 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1357 No_Implementation_Aspects
1358 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1359 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1361 2011-09-19 Yannick Moy <moy@adacore.com>
1363 * lib-xref.adb (Generate_Reference): Take into account multiple
1364 renamings for Alfa refs.
1366 2011-09-19 Thomas Quinot <quinot@adacore.com>
1368 * g-socthi-mingw.adb: Minor reformatting.
1370 2011-09-19 Yannick Moy <moy@adacore.com>
1372 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1373 expansion to False in mode Alfa
1375 2011-09-19 Pascal Obry <obry@adacore.com>
1377 * mingw32.h: Remove obsolete code needed for old versions
1380 2011-09-19 Robert Dewar <dewar@adacore.com>
1382 * errout.ads: Minor reformatting.
1384 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1386 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1387 function is transformed into a declaration and a body, insert
1388 body at the end of the declarative part, to prevent premature
1389 freeze actions, and preserve original specification in the
1390 subprogram declaration.
1392 2011-09-19 Vincent Celier <celier@adacore.com>
1394 * projects.texi: Minor editing.
1396 2011-09-19 Robert Dewar <dewar@adacore.com>
1398 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1399 exp_aggr.adb: Minor reformatting.
1401 2011-09-19 Yannick Moy <moy@adacore.com>
1403 * lib-xref.adb (Generate_Reference): Change entity referenced
1404 to underlying object if any, or else reference to the HEAP.
1406 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1408 * gcc-interface/Make-lang.in: Update dependencies.
1410 2011-09-15 Robert Dewar <dewar@adacore.com>
1412 * tree_io.ads: Minor reformatting.
1413 * a-intnam.ads: Fix bad header.
1415 2011-09-15 Thomas Quinot <quinot@adacore.com>
1417 * a-exexpr-gcc.adb: Minor reformatting.
1419 2011-09-15 Yannick Moy <moy@adacore.com>
1421 * sem_ch6.adb: Propagate information that an expression function comes
1422 from source (otherwise references to this entity are not stored).
1424 2011-09-15 Robert Dewar <dewar@adacore.com>
1426 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1427 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1428 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1430 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1432 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1433 if the expression function is not a completion, create a
1434 new specification for the generated declaration, and keep the
1435 original specification in the generated body. Shorter code also
1436 ensures that proper warnings are generated for unused formals
1439 2011-09-15 Sergey Rybin <rybin@adacore.com>
1441 * tree_io.ads: Update ASIS_Version_Number because of the changes
1442 in the tree structures for expression functions.
1444 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1446 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1447 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1448 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1449 (CLOCK_REALTIME): Fix wrong value on some OSes.
1450 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1452 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1454 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1455 to unconstrained array case, deal with each branch of a COND_EXPR.
1456 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1457 a COND_EXPR in the initializer, if present.
1459 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1461 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1462 of an addressable type.
1463 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1464 Deal with those cases for which creating a temporary is mandatory.
1466 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1468 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1469 this is a real formal parameter before testing whether it is by ref.
1471 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1473 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1474 (build_call_1_expr): Likewise.
1475 (build_call_2_expr): Likewise.
1476 (build_call_n_expr): New prototype.
1477 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1478 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1479 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1480 (Exception_Handler_to_gnu_zcx): Likewise.
1481 (gnat_to_gnu): Likewise.
1482 (build_binary_op_trapv): Likewise.
1483 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1484 (build_call_1_expr): Likewise.
1485 (build_call_2_expr): Likewise.
1486 (build_call_n_expr): New function.
1487 (build_call_raise): Use build_call_n_expr.
1488 (build_call_raise_range): Likewise.
1489 (build_call_raise_column): Likewise.
1490 (build_call_alloc_dealloc_proc): Likewise.
1491 (maybe_wrap_malloc): Likewise.
1492 (maybe_wrap_free): Likewise.
1494 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1496 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1498 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1499 the result type is null if ENABLE_CHECKING. Set operation_type at the
1500 end unconditionally if not set in the previous cases.
1501 Use build2 and void_type_node for MODIFY_EXPR.
1502 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1504 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1506 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1507 precision when converting to or from an integral type whose precision
1508 is not equal to its size.
1510 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1512 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1514 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1516 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1518 * system-darwin-ppc64.ads: New file.
1520 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1522 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1525 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1527 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1528 size switches to the link phase for shared libs.
1530 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1532 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1533 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1535 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1537 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1538 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1539 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1541 (TOOLS_FLAGS_TO_PASS): New.
1542 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1544 2011-09-06 Robert Dewar <dewar@adacore.com>
1546 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1547 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1549 2011-09-06 Robert Dewar <dewar@adacore.com>
1551 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1552 * s-rident.ads: New restriction No_Implementation_Units
1553 (this restriction is also part of the profile
1554 No_Implementation_Extensions)
1555 * sem_ch10.adb (Analyze_With_Clause): Add check for
1556 No_Implementation_Units restriction.
1558 2011-09-06 Jerome Guitton <guitton@adacore.com>
1560 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1563 2011-09-06 Thomas Quinot <quinot@adacore.com>
1565 * s-solita.adb: Minor reformatting.
1567 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1569 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1570 is a rewriting of an expression function does not freeze previous
1573 2011-09-06 Robert Dewar <dewar@adacore.com>
1575 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1577 2011-09-06 Tristan Gingold <gingold@adacore.com>
1579 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1580 powerpc-wrs-vxworksae.
1582 2011-09-06 Thomas Quinot <quinot@adacore.com>
1584 * s-os_lib.ads (Spawn): Minor documentation clarification,
1585 Success is True for a zero exit status.
1587 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1589 * sem_ch5.adb: Add message for common iterator error.
1591 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1593 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1594 selected component discriminated by a current instance, replace
1595 the constraint with a reference to the target object, regardless
1596 of whether the context is an init_proc.
1598 2011-09-06 Robert Dewar <dewar@adacore.com>
1600 * exp_attr.adb: Descriptor_Size is never static.
1602 2011-09-06 Robert Dewar <dewar@adacore.com>
1604 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1606 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1608 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1611 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1613 * sem_res.adb (Resolve): An expression that is the body of an
1614 expression function does not freeze.
1616 2011-09-06 Matthew Heaney <heaney@adacore.com>
1618 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1619 a-cuprqu.adb: Changed copyright notice to indicate current
1622 2011-09-06 Vincent Celier <celier@adacore.com>
1624 * prj.adb: Minor spelling error fix in comment
1625 * sem_res.adb: Minor reformatting
1627 2011-09-06 Pascal Obry <obry@adacore.com>
1629 * sysdep.c (winflush_nt): Removed as not needed anymore.
1630 (winflush_95): Likewise.
1631 (winflush_init): Likewise.
1632 (winflush_function): Likewise.
1633 (getc_immediate_common): Remove call to winflush_function.
1635 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1637 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1638 processing for Descriptor_Size.
1639 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1640 to account for its broader usage.
1641 * sem_attr.adb (Analyze_Attribute): Change the error detection
1642 circuitry for Descriptor_Size as the attribute is now applicable
1645 2011-09-06 Robert Dewar <dewar@adacore.com>
1647 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1649 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1651 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1652 in a parameter association must not set the Referenced flag on
1654 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1656 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1658 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1660 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1662 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1663 gnatlink-re): Speed up by using -j0.
1665 2011-09-06 Yannick Moy <moy@adacore.com>
1667 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1668 Set_Corresponding_Aspect when creating pragma from aspect.
1669 (Add_Predicates): Use new field Corresponding_Aspect.
1670 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1671 name when present, for the purpose of issuing error messages;
1672 remove local procedure Error_Pragma_Arg_Alternate_Name.
1673 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1675 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1678 2011-09-06 Robert Dewar <dewar@adacore.com>
1680 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1682 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1684 * exp_ch6.adb (Build_Heap_Allocator): Add new
1685 local variable Desig_Typ. Code and comment reformatting. Add
1686 machinery to ensure that the allocation uses a fat pointer when
1687 the type of the return object is a constrained array and the
1688 function return type is an unconstrained array.
1690 2011-09-06 Vincent Celier <celier@adacore.com>
1692 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1693 parameters in subprograms.
1695 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1697 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1699 2011-09-06 Thomas Quinot <quinot@adacore.com>
1701 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1702 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1704 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1705 is null, destroy task specific data, to make API consistent with
1706 other platforms, and thus compatible with the shared version
1708 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1709 Document the above assumption.
1711 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1713 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1714 variable for type of return value when return type is
1715 unconstrained and context is an assignment.
1717 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1719 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1720 class-wide operation if expansion is not enabled.
1722 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1724 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1727 2011-09-06 Yannick Moy <moy@adacore.com>
1729 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1730 Aspect_Invariant): Do not issue error at this point on illegal
1731 pragma placement, as this is checked later on when analyzing
1732 the corresponding pragma.
1733 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1734 similar to Error_Pragma_Arg, except the source name of the
1735 aspect/pragma to use in warnings may be equal to parameter
1736 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1737 message to distinguish source name of pragma/aspect, and whether
1738 the illegality resides in the type being public, or being private
1739 without a public declaration
1741 2011-09-06 Thomas Quinot <quinot@adacore.com>
1743 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1744 size check (fd_set is implemented differently on that platform).
1746 2011-09-06 Thomas Quinot <quinot@adacore.com>
1748 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1749 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1750 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1751 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1752 (ATCB_Allocation): New subpackage of
1753 System.Tasking.Primitive_Operations, shared across all targets
1754 with full tasking runtime.
1755 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1757 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1758 taking care of establishing a local temporary ATCB if the one
1759 being deallocated is Self, to avoid a reference to the freed
1760 ATCB in Abort_Undefer.
1762 2011-09-06 Thomas Quinot <quinot@adacore.com>
1764 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1765 terminated, mark it for deallocation upon termination.
1766 (Terminate_Task): Call Free_Task again if the task is marked
1767 for automatic deallocation upon termination.
1769 2011-09-06 Robert Dewar <dewar@adacore.com>
1771 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1772 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1773 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1774 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1775 a-intnam-solaris.ads, a-intnam-tru64.ads,
1776 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1777 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1778 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1779 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1780 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1781 Add new profile No_Implementation_Extensions
1782 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1783 profile No_Implementation_Extensions
1784 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1785 Check violation of restriction No_Implementation_Identifiers
1786 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1787 Add entry for Name_No_Implementation_Extensions
1789 2011-09-06 Robert Dewar <dewar@adacore.com>
1791 * impunit.ads: Minor reformatting.
1793 2011-09-06 Robert Dewar <dewar@adacore.com>
1795 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1797 2011-09-06 Pascal Obry <obry@adacore.com>
1799 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1802 2011-09-06 Robert Dewar <dewar@adacore.com>
1804 * g-socket.adb: Minor reformatting
1806 2011-09-06 Javier Miranda <miranda@adacore.com>
1808 * ali.adb (Scan_ALI): Add missing support to load references of
1809 entities imported from other languages.
1810 * ali.ads (Xref_Record): Adding new fields to store the language and
1811 name of an imported entity.
1812 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1815 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1817 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1818 is allowed on a full type declaration if it is the completion of
1819 a private declarations.
1820 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1821 aspect is allowed on a full type declaration in the private part
1824 2011-09-06 Robert Dewar <dewar@adacore.com>
1826 * sem_ch8.ads: Minor reformatting
1828 2011-09-06 Thomas Quinot <quinot@adacore.com>
1830 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1831 Guard against socket values that are not in [0;FD_SETSIZE[
1833 2011-09-06 Robert Dewar <dewar@adacore.com>
1835 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1838 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1840 * s-linux-alpha.ads: Minor reformatting
1841 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1842 Use sizeof instead of corresponding C defines in s-oscons template.
1844 2011-09-06 Vadim Godunko <godunko@adacore.com>
1846 * a-convec.ads, a-iteint.ads: Minor reformatting.
1848 2011-09-06 Vincent Celier <celier@adacore.com>
1850 * projects.texi: Add menus and @node lines.
1852 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1854 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1855 where the return type is an unconstrained array and the context
1856 is an assignment. Optimize the case when the target of the
1857 assignment is a selected component.
1859 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1861 * s-solita.adb: Update comments.
1863 2011-09-06 Pascal Obry <obry@adacore.com>
1865 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1866 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1867 * s-oscons-tmplt.c: Add support for generating pthread related
1868 types size on GNU/Linux as done for Darwin.
1869 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1871 2011-09-06 Robert Dewar <dewar@adacore.com>
1873 * exp_ch6.adb: Fix minor typo.
1875 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1877 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1878 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1879 (Double_Size_Of): Alphabetized. Update the comment on usage.
1880 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1881 (Nearest_Multiple_Rounded_Up): New routine.
1882 (Size_Of): Update comment on usage. The generated expression now
1883 accounts for alignment gaps by rounding the size of the type to the
1884 nearest multiple rounded up of the type's alignment.
1886 2011-09-06 Robert Dewar <dewar@adacore.com>
1888 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1890 2011-09-06 Steve Baird <baird@adacore.com>
1892 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1893 derived subprograms in checking for presence of an
1894 Extra_Accessibility_Of_Result formal parameter.
1895 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1896 checking for presence of an Extra_Accessibility_Of_Result formal
1898 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1899 case where the Parameter_Associatiations attribute is already set,
1900 but set to an empty list.
1901 (Needs_Result_Accessibility_Level):
1902 Unconditionally return False. This is a temporary
1903 change, disabling the Extra_Accessibility_Of_Result
1905 (Expand_Simple_Function_Return): Check for
1906 Extra_Accessibility_Of_Result parameter's presence instead of
1907 testing Ada_Version when generating a runtime accessibility
1908 check which makes use of the parameter.
1910 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1912 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1913 expression in a given case alternative must be attached to the
1914 statement list of the ccrresponding case statement alternative
1915 They cannot be propagated ahead of the case statement, because
1916 the validity of the expression that generated the action may
1917 hold only for that alternative.
1919 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1921 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1922 (Alignment_Of): Remove the code for strict alignment targets.
1923 (Double_Alignment_Of): Removed.
1924 (Double_Size_Of): New routine.
1925 (Make_Finalize_Address_Stmts): Change the
1926 calculation of the dope's size. Update relevant comments.
1927 (Size_Of): New routine.
1929 2011-09-06 Steve Baird <baird@adacore.com>
1931 * einfo.ads (Extra_Accessibility): Update associated comment to use
1932 the term "present" correctly ("present" just means that it is not
1933 an error to query the value of the attribute - it does not imply
1934 that the value must be non-null).
1935 (Extra_Constrained): Ditto.
1936 (Is_Visible_Formal): Ditto.
1937 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1938 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1939 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1940 * exp_ch6.adb (Expand_Call): The callee may require an
1941 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1942 < Ada_2012. This can occur if the callee is exported from a Gnat
1943 runtimes unit. Also improve a comment.
1945 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1947 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1948 (Alignment_Of): Rename formal parameter Some_Typ
1949 to Typ, update related comment. Use the allocator alignment on
1950 strict alignment targets such as SPARC.
1951 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1954 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1956 * sem_ch9.adb (Check_Interfaces): Test
1957 Is_Limited_Type rather than Is_Limited_Record when checking that
1958 the partial view of a synchronized full view must be limited.
1960 2011-09-06 Emmanuel Briot <briot@adacore.com>
1962 * g-comlin.adb (Free): Fix memory leak.
1964 2011-09-06 Robert Dewar <dewar@adacore.com>
1966 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1968 2011-09-06 Steve Baird <baird@adacore.com>
1970 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1971 (Ada2012) cases described in AI05-0234 where the accessibility
1972 level of a function result is "determined by the point of
1973 call", an implicit parameter representing that accessibility
1974 level is passed in. Extra_Accessibilty_Of_Result yields this
1975 additional formal parameter. Extra_Accessibility_Of_Result
1976 is analogous to the existing Extra_Accessibility
1977 function used in the implementation of access parameters.
1978 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1979 Extra_Accessibility_Of_Result attribute.
1980 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1981 (Set_Extra_Accessibility_Of_Result): New procedure.
1982 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1983 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1984 an accessibility level literal to Natural; introduce a nested
1985 function, Make_Level_Literal, to do this.
1986 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1987 determines whether a given function (or access-to-function
1988 type) needs to have an implicitly-declared accessibility-level
1989 parameter added to its profile.
1990 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1991 previously declared in the body of Exp_Ch6.
1992 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1994 (Has_Unconstrained_Access_Discriminants): New Function; a
1995 predicate on subtype entities which returns True if the given
1996 subtype is unconstrained and has one or more access discriminants.
1997 (Expand_Call): When expanding a call to a function which takes an
1998 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1999 actual parameter value. In the case of a function call which is
2000 used to initialize an allocator, this may not be possible because
2001 the Etype of the allocator may not have been set yet. In this
2002 case, we defer passing in the parameter and handle it later in
2003 Expand_Allocator_Expression.
2004 (Expand_Simple_Function_Return): When returning from a function which
2005 returns an unconstrained subtype having at least one access
2006 discriminant, generate the accessibility check needed to ensure that
2007 the function result will not outlive any objects designated by its
2009 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2011 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2012 is used to initialize an allocator, we may need to pass in "the
2013 accessibility level determined by the point of call" (AI05-0234)
2014 to the function. Expand_Call, where such actual parameters are
2015 usually generated, is too early in this case because the Etype of
2016 the allocator (which is used in determining the level to be passed
2017 in) may not have been set yet when Expand_Call executes. Instead,
2018 we generate code to pass in the appropriate actual parameter
2019 in Expand_Allocator_Expression.
2020 * sem_ch6.adb (Create_Extra_Formals): Create
2021 the new Extra_Accessibility_Of_Result formal if
2022 Needs_Result_Accessibility_Level returns True. This includes the
2023 introduction of a nested procedure, Check_Against_Result_Level.
2025 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2027 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2030 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2032 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2033 for the synchronization. Move the test for null from
2034 s-stposu.Allocate_Any_Controlled to this routine since the check
2035 needs to be protected too.
2036 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2037 synchronization code.
2038 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2039 explaining the context in which this routine is used.
2040 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2041 to s-finmas.Set_Finalize_Address.
2043 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2045 * einfo.ads: Document that itypes have no parent field.
2047 2011-09-05 Robert Dewar <dewar@adacore.com>
2049 * rtsfind.adb (Check_CRT): Check for overloaded entity
2050 * rtsfind.ads: Document that entities to be found by rtsfind
2051 cannot be overloaded
2052 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2053 (Lock_Entries_With_Status): New name for Lock_Entries with two
2054 arguments (changed to meet rtsfind no overloading rule).
2056 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2058 * s-finmas.adb (Set_Finalize_Address (Address,
2059 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2060 (Set_Finalize_Address (in out Finalization_Master,
2061 Finalize_Address_Ptr): Add synchronization code.
2062 * s-finmas.ads (Set_Finalize_Address (Address,
2063 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2064 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2065 Set_Finalize_Address for the heterogeneous case.
2067 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2069 * sem_ch3.adb: Undo previous change, not suitable after all.
2071 2011-09-05 Robert Dewar <dewar@adacore.com>
2073 * einfo.ads: Minor comment clarification.
2075 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2077 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2078 no longer needs to search through the entities of the return
2079 statement scope to find the _chain.
2080 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2081 (Analyze_Block_Statement): Add local variable
2082 Is_BIP_Return_Statement. Add machinery to install all entities
2083 produced by the expansion of the return object declaration.
2084 (Install_Return_Entities): New routine.
2085 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2087 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2089 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2090 of subunit is incomplete.
2091 (Analyze_Proper_Body): If parent spec is not available, do not
2094 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2096 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2097 interface type conversions, that are expanded into dereferences.
2099 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2101 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2102 Examine the parameter and return profile of a subprogram and swap
2103 any incomplete types coming from a limited context with their
2104 corresponding non-limited views.
2105 (Exchange_Limited_Views): New routine.
2107 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2109 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2110 of internal entity to the subtype declaration, so that when
2111 entities are subsequently exchanged in a package body, the tree
2112 remains properly formatted for ASIS.
2114 2011-09-05 Johannes Kanig <kanig@adacore.com>
2116 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2118 (Display_Help): display the user given help message, if available.
2120 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2122 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2123 is legal if the original node is an identifier that is a
2124 parameterless function call.
2126 2011-09-05 Pascal Obry <obry@adacore.com>
2128 * prj-nmsc.adb: Minor reformatting.
2129 Add support for standalone aggregate library.
2130 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2131 * projects.texi: Fix documentation for aggregate library projects.
2133 2011-09-05 Robert Dewar <dewar@adacore.com>
2135 * sem_ch6.adb: Minor reformatting.
2137 2011-09-05 Matthew Gingell <gingell@adacore.com>
2139 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2140 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2141 the bottom of the stack is not overwritten.
2143 2011-09-05 Thomas Quinot <quinot@adacore.com>
2145 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2147 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2149 * sem_ch3.adb (Access_Definition): If an access type declaration
2150 appears in a child unit, the scope of whatever anonymous type
2151 may be generated is the child unit itself.
2153 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2155 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2156 Comes_From_Source on rewritten body.
2157 (Analyze_Subprogram_Body_Helper): Check that the original node for
2158 the body comes from source, when determining whether expansion
2159 of a protected operation is needed.
2161 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2163 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2164 a selected component and the right-hand side is a self-referential
2165 access, the proper prefix of the rewritten attribute is a copy
2166 of the left-hand side, not of its prefix.
2168 2011-09-05 Robert Dewar <dewar@adacore.com>
2170 * sem_ch5.adb: Minor reformatting.
2171 * sem_ch3.adb: Minor code clean up.
2173 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2175 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2176 restriction No_Dynamic_Attachment is in effect or not should
2177 not influence the default priority associated to a protected
2178 object. With this change, when the restriction is in effect (as
2179 is the case for the Ravenscar profile) the default priority of
2180 a protected object with an interrupt handler is in the range of
2181 interrupt priorities (Default_Interrupt_Priority) as required
2184 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2186 * a-iteint.ads: Fix header.
2188 2011-09-05 Vincent Celier <celier@adacore.com>
2190 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2191 with a directory separator to avoid output such as:
2192 "/path/to/objauto.cgpr" has been deleted.
2194 2011-09-05 Robert Dewar <dewar@adacore.com>
2196 * sem_ch3.adb: Minor reformatting.
2198 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2200 * sem_ch5.adb: Better error message.
2202 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2204 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2205 (Expand_Array_Aggregate): Detect a special case of an aggregate
2206 which contains tasks in the context of an unexpanded return
2207 statement of a build-in-place function.
2208 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2209 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2210 which contains tasks and expand it now that the original simple
2211 return statement has been rewritten.
2212 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2213 reformatting. Do not create a chain for an extended return
2214 statement if one is already available.
2215 (Has_Activation_Chain): New routine.
2217 2011-09-05 Marc Sango <sango@adacore.com>
2219 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2220 the wrong test and add the correct test to detect the violation
2221 of illegal use of unconstrained string type in SPARK mode.
2223 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2225 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2226 message on an iterator over an array.
2228 2011-09-05 Robert Dewar <dewar@adacore.com>
2230 * lib-xref-alfa.adb: Minor reformatting.
2232 2011-09-05 Robert Dewar <dewar@adacore.com>
2234 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2235 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2237 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2239 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2241 2011-09-05 Johannes Kanig <kanig@adacore.com>
2243 * lib-xref-alfa.adb: Update comments.
2245 2011-09-05 Thomas Quinot <quinot@adacore.com>
2247 * sem_res.adb: Minor reformatting
2249 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2251 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2252 present, create them now. Needed in case the return type was
2253 a limited view in the function declaration.
2254 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2255 tasks, build the activation chain for it. Pass a reference to
2256 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2257 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2258 with build_in_place calls.
2259 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2260 incomplete, inatialize its Corresponding_Record_Type component.
2261 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2264 2011-09-05 Johannes Kanig <kanig@adacore.com>
2266 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2269 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2271 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2272 appears within a package specification and the token after "IS"
2273 is not a parenthesis, assume that this is an unparenthesized
2274 expression function, even if the token appears in a line by
2276 * par.adb: Clarify use of Labl field of scope stack in error
2279 2011-09-05 Bob Duff <duff@adacore.com>
2281 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2282 conversions instead of normal type conversions in all cases where a
2283 type conversion would be illegal. In particular, use unchecked
2284 conversions when the operand types are private.
2286 2011-09-05 Johannes Kanig <kanig@adacore.com>
2288 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2289 objects of task type or protected type.
2291 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2293 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2294 function comes from source, indicate that so does its rewriting,
2295 so it is compatible with any subsequent expansion of the
2296 subprogram body (e.g. when it is a protected operation).
2297 * sem_ch4.adb: minor reformatting
2299 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2301 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2302 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2303 may lead to wrong ancestor package in the case of instantiated subunit
2304 bodies. If a subunit is instantiated, follow the chain of instantiations
2305 rather than the stub structure.
2307 2011-09-02 Robert Dewar <dewar@adacore.com>
2309 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2310 * gcc-interface/Make-lang.in: Update dependencies.
2312 2011-09-02 Marc Sango <sango@adacore.com>
2314 * sem_ch3.adb (Analyze_Object_Declaration): Change
2315 comment and add additional check to differentiate constant of
2316 type string from others unconstrained type.
2318 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2320 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2321 present in incomplete type declarations to refine the error
2322 message the full declaration is in the same unit.
2323 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2324 an incomplete type, set the Premature_Use for additional message.
2325 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2326 and Premature_Use is set, place additional information at the
2327 point of premature use.
2329 2011-09-02 Bob Duff <duff@adacore.com>
2331 * sem_ch6.adb: (Check_Post_State): Suppress warning
2332 "postcondition refers only to pre-state" when the expression has not
2333 yet been analyzed, because it causes false alarms. This can happen when
2334 the postcondition contains a quantified expression, because those are
2335 analyzed later. This is a temporary/partial fix.
2336 (Process_Post_Conditions): Minor: change wording of warning.
2338 2011-09-02 Marc Sango <sango@adacore.com>
2340 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2341 illegal use of unconstrained string type in SPARK mode.
2342 * sem_res.adb (Analyze_Operator_Symbol): Set the
2343 right place where the string operand of concatenation should be
2344 violate in SPARK mode.
2346 2011-09-02 Robert Dewar <dewar@adacore.com>
2348 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2349 exp_ch3.adb: Minor reformatting.
2351 2011-09-02 Vincent Celier <celier@adacore.com>
2353 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2354 as the compiler driver so Is_Compilable returns True for sources.
2355 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2358 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2360 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2361 condition, a reference to a controlling formal must be interpreted
2362 as having the class-wide type (or an access to such) so that the
2363 inherited condition can be properly applied to any overriding
2364 operation (see ARM12 6.6.1 (7)).
2366 2011-09-02 Tristan Gingold <gingold@adacore.com>
2368 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2371 2011-09-02 Javier Miranda <miranda@adacore.com>
2373 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2374 initializing expression of a class-wide interface object declaration
2375 if its type is limited.
2377 2011-09-02 Johannes Kanig <kanig@adacore.com>
2379 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2380 literals, take into account the type name; the type is *not*
2381 the scope for an enumeration literal.
2383 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2385 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2386 to reject an overriding indicator on a user-defined Adjust
2387 subprogram for a limited controlled type.
2389 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2391 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2392 for an actual that is a function call returning an unconstrained
2393 limited controlled type.
2395 2011-09-02 Tristan Gingold <gingold@adacore.com>
2397 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2399 2011-09-02 Johannes Kanig <kanig@adacore.com>
2401 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2402 from "HEAP" to __HEAP Change comment that refers to that variable
2403 * put_alfa.adb: Change comment that refers to that variable
2405 2011-09-02 Robert Dewar <dewar@adacore.com>
2407 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2409 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2411 * exp_util.adb (Extract_Renamed_Object): Renamed to
2412 Find_Renamed_Object. This routine has been reimplemented and now uses
2413 tree traversal to locate a renamed object.
2414 (Is_Aliased): Replace call to Extract_Renamed_Object with
2415 Find_Renamed_Object.
2417 2011-09-02 Tristan Gingold <gingold@adacore.com>
2419 * init.c: (__gnat_is_vms_v7): New function.
2421 2011-09-02 Olivier Hainque <hainque@adacore.com>
2423 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2424 that have a misaligned backchain, necessarily bogus.
2426 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2428 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2429 TSS routine Finalize_Address when compiling in Alfa mode.
2430 (Expand_Freeze_Record_Type): Do not create TSS routine
2431 Finalize_Address when compiling in Alfa mode.
2432 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2433 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2435 (Expand_N_Allocator): Do not produce a call to
2436 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2437 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2438 produce a call to primitive Set_Finalize_Address in Alfa mode because
2439 Finalize_Address is not built.
2440 * exp_ch7.adb (Build_Finalization_Master): Do not create
2441 finalization masters in Afa mode since they are not needed.
2442 (Build_Finalizer): Do not create scope and library-level
2443 finalizers in Alfa mode since they are not needed.
2444 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2445 "new" and "free" when applied to controlled objects in Alfa mode since
2448 2011-09-02 Vincent Celier <celier@adacore.com>
2450 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2451 only library names with the syntax of Ada identifiers, to avoid errors
2452 when compiling the binder generated files.
2453 * projects.texi: Document restriction on SAL library names
2455 2011-09-02 Thomas Quinot <quinot@adacore.com>
2457 * a-chtgbo.adb: Minor comment fix.
2459 2011-09-02 Robert Dewar <dewar@adacore.com>
2461 * lib-xref.adb: Minor reformatting
2463 2011-09-02 Vincent Celier <celier@adacore.com>
2465 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2466 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2467 --version and --help in usage.
2468 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2470 2011-09-02 Bob Duff <duff@adacore.com>
2472 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2473 compilers don't understand it.
2475 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2477 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2478 underlying subtype rather than its base type on the call to
2479 Build_Record_Or_Elementary_Input_Function, so that any
2480 constraints on a discriminated subtype will be available for
2481 doing the check required by AI05-0192.
2482 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2483 If the prefix subtype of the 'Input attribute is a constrained
2484 discriminated subtype, then check each constrained discriminant value
2485 against the corresponding value read from the stream.
2487 2011-09-02 Yannick Moy <moy@adacore.com>
2489 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2490 warnings on suspicious contracts, and enable them with -gnatwa.
2492 2011-09-02 Robert Dewar <dewar@adacore.com>
2494 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2497 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2499 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2500 which ensure that restriction No_Dynamic_Attachment has not been
2502 (Make_Initialize_Protection): Protected types with attach or
2503 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2504 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2505 which ensures that restriction No_Dynamic_Attachment has not been
2507 * sem_attr.adb: (Eval_Attribute): Transform
2508 VAX_Float_Type'First and 'Last into references to
2509 the temporaries which store the corresponding bounds. The
2510 transformation is needed since the back end cannot evaluate
2511 'First and 'Last on VAX.
2512 (Is_VAX_Float): New routine.
2514 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2516 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2517 generic unit is not intrinsic and has an explicit convention,
2518 the instance inherits it.
2520 2011-09-02 Robert Dewar <dewar@adacore.com>
2522 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2523 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2525 2011-09-02 Thomas Quinot <quinot@adacore.com>
2527 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2528 Guard against a prefix that is an N_Has_Entity but has no
2531 2011-09-02 Yannick Moy <moy@adacore.com>
2533 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2536 2011-09-02 Yannick Moy <moy@adacore.com>
2538 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2539 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2541 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2542 procedure looking for suspicious postconditions.
2543 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2544 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2545 options -gnatw.t and -gnatw.T.
2547 2011-09-02 Pascal Obry <obry@adacore.com>
2549 * prj.adb: Minor code refactoring. Move check for null project in
2551 * projects.texi: Fix minor typos.
2553 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2555 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2556 of iteration is an expression, its value must be captured in a
2557 renaming declaration, so that modification of the elements is
2558 propagated to the original container.
2560 2011-09-02 Pascal Obry <obry@adacore.com>
2562 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2563 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2564 prj-tree.adb: Minor reformatting and style fixes.
2566 2011-09-02 Robert Dewar <dewar@adacore.com>
2568 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2569 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2570 No_Implicit_Aliasing
2571 (Analyze_Attribute, case Address): ditto
2572 (Analyze_Attribute, case Unrestricted_Access): ditto
2573 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2574 No_Implicit_Aliasing restriction.
2575 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2577 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2579 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2580 is an unchecked conversion, apply test to its expression.
2582 2011-09-02 Javier Miranda <miranda@adacore.com>
2584 * sem_ch3.adb (Check_Abstract_Overriding): When
2585 traversing the chain of aliased subprograms avoid reporting a
2586 redundant error on the current entity.
2588 2011-09-02 Sergey Rybin <rybin@adacore.com>
2590 * gnat_ugn.texi: Minor clean up.
2592 2011-09-02 Bob Duff <duff@adacore.com>
2594 * s-htable.adb (Set_If_Not_Present): Use renaming
2595 instead of ":=", because the type Key is limited in the generic (even
2596 if not in the instances).
2598 2011-09-02 Robert Dewar <dewar@adacore.com>
2600 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2601 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2604 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2606 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2607 inherited component with the enclosing derived type. Code reformatting.
2609 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2611 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2612 return done when overflow checks are enabled, since comparisons against
2613 Lor and Hir should not be done when OK1 is False.
2615 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2617 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2618 Add new formal Master_Exp. When present, add that expression to the
2619 call as an extra actual.
2620 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2621 Fmaster_Actual and in the case of a BIP call initializing a return
2622 object of an enclosing BIP function set it to a
2623 new reference to the implicit finalization master
2624 formal of the enclosing function. Fmaster_Actual is
2625 then passed to the new formal Master_Exp on the call to
2626 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2627 initializations of Enclosing_Func to its declaration.
2629 2011-09-02 Thomas Quinot <quinot@adacore.com>
2631 * csets.ads: Minor reformatting
2633 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2635 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2636 the full view of a private type coming from an instantiation.
2637 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2638 loop to iterate over the declarations rather than use the
2639 First_Entity / Next_Entity scheme.
2641 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2643 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2644 X'range (N) into X'First (N) .. X'Last (N), do not share the
2645 dimension indicator N, if present. Even though it is a static
2646 constant, its source location may be modified when printing
2647 expanded code under -gnatDL, and node sharing will lead to chaos
2648 in Sprint on large files, by generating a sloc value that does
2649 not correspond to any source file.
2651 2011-09-02 Bob Duff <duff@adacore.com>
2653 * einfo.adb: (Has_Xref_Entry): Do not call
2654 Implementation_Base_Type. Lib.Xref has been
2655 rewritten to avoid the need for it, and it was costly.
2656 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2657 functions in support of efficient xref.
2658 * lib-xref-alfa.adb: Misc changes related to Key component of
2660 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2661 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2662 no longer does. This is the one place where it is needed.
2664 2011-09-02 Johannes Kanig <kanig@adacore.com>
2666 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2667 similar interface as the other Getopt function.
2669 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2671 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2672 a call to Set_Finalize_Address if there is no allocator available.
2673 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2674 a case of allocator expansion where the allocator is not expanded but
2675 needs a custom allocate routine. Code reformatting.
2676 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2677 Ren_Obj. Code reformatting.
2678 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2679 through the use of 'reference.
2680 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2681 as part of build-in-place expansion. They are intentionally marked as
2682 coming from source, but their parents are not.
2684 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2686 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2687 is the generated subprogram declaration for a child unit body
2688 that acts as spec, use the original body in the with_clause,
2689 to prevent binding errors.
2691 2011-09-02 Vincent Celier <celier@adacore.com>
2693 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2694 qualifier /MULTI_UNIT_INDEX=
2696 2011-09-02 Johannes Kanig <kanig@adacore.com>
2698 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2699 instead of calling the callback function
2701 2011-09-02 Robert Dewar <dewar@adacore.com>
2703 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2704 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2706 2011-09-02 Vincent Celier <celier@adacore.com>
2708 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2709 explicitly declared in an extending project, do not warn if a source
2710 for an inherited naming exception is not found.
2712 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2714 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2715 expansion is inactive.
2717 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2719 * sem_util.adb (Note_Possible_Modification): If the entity
2720 being modified is the renaming generated for an Ada2012 iterator
2721 element, the enclosing container or array is modified as well.
2723 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2725 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2726 Initialize): Define and initialize the
2727 mutex attributes and condition variable attributes locally.
2729 2011-09-02 Vincent Celier <celier@adacore.com>
2731 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2732 exception replaced in an extending project.
2733 (Check_Object): No error when the other source is locally removed.
2735 2011-09-02 Yannick Moy <moy@adacore.com>
2737 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2740 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2742 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2744 * gcc-interface/Make-lang.in: Update dependencies.
2746 2011-09-01 Robert Dewar <dewar@adacore.com>
2748 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2750 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2752 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2753 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2754 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2755 specific for systems where their glibc version does not define the
2756 routines to handle dynamically allocated CPU sets.
2758 2011-09-01 Vincent Celier <celier@adacore.com>
2760 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2761 prj-env.adb: Implement inheritance of naming exceptions in extending
2764 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2766 * gnatls.adb: Display simple message instead of content of
2769 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2771 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2772 access discriminant and anonymous access component scopes.
2773 (Inherit_Component): Reuse the itype of an access discriminant
2774 or anonymous access component by copying it in order to set the proper
2775 scope. This is done only when the parent and the derived type
2776 are in different scopes.
2777 (Set_Anonymous_Etype): New routine.
2779 2011-09-01 Robert Dewar <dewar@adacore.com>
2781 * a-convec.adb: Minor reformatting throughout.
2783 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2785 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2786 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2787 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2788 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2789 CPU_SET_S respectively because we are now using dynamically allocated
2790 CPU sets which are more portable across different glibc versions.
2791 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2792 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2793 masks dynamically according to the number of processors in the target
2795 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2796 respectively, so we need to pass the size of the masks as
2798 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2799 created cpu_set_t masks
2800 with the number of processors available in the target platform,
2801 instead of static bit arrays. It enhances portability because
2802 it uses the information from the target platform.
2803 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2804 are using a restricted run-time library, use the flag
2805 Configurable_Run_Time_Mode instead of Restricted_Profile.
2807 2011-09-01 Vincent Celier <celier@adacore.com>
2809 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2810 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2812 2011-09-01 Nicolas Roche <roche@adacore.com>
2814 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2815 on VxWorks in kernel mode.
2817 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2819 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2820 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2821 directly the bit array.
2822 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2823 the linux macros with the same name.
2824 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2825 wrappers around the CPU_ZERO and CPU_SET linux macros.
2827 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2829 * exp_ch7.adb (Find_Insertion_List): Removed.
2830 (Process_Transient_Objects): Insert the declarations of the hook
2831 access type and the hook object before the associated transient object.
2833 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2835 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2836 package System.Aux_Dec when using restricted run-time libraries which
2837 do not have this package.
2839 2011-09-01 Tristan Gingold <gingold@adacore.com>
2841 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2843 2011-09-01 Bob Duff <duff@adacore.com>
2845 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2846 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2848 2011-09-01 Thomas Quinot <quinot@adacore.com>
2850 * exp_ch5.adb: Minor reformatting
2851 * gnat_ugn.texi: Fix minor typos.
2852 * gcc-interface/Make-lang.in: Update dependencies.
2854 2011-09-01 Robert Dewar <dewar@adacore.com>
2856 * inline.adb, sem_aggr.adb: Minor reformatting.
2858 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2860 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2862 2011-09-01 Robert Dewar <dewar@adacore.com>
2864 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2866 2011-09-01 Bob Duff <duff@adacore.com>
2868 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2869 body" the same as "in inlined body", because visibility shouldn't
2872 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2874 * inline.adb (Add_Inlined_Body): Refine previous change.
2876 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2878 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2879 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2880 Test for case where call
2881 initializes an object of a return statement before testing for
2882 a constrained call, to ensure that all such cases get handled
2883 by simply passing on the caller's parameters. Also, in that
2884 case call Needs_BIP_Alloc_Form to determine whether to pass on
2885 the BIP_Alloc_Form parameter of the enclosing function rather
2886 than testing Is_Constrained. Add similar tests for the return
2887 of a BIP call to later processing to ensure consistent handling.
2888 (Needs_BIP_Alloc_Form): New utility function.
2889 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2890 a BIP_Alloc_Form formal with call to new utility function
2891 Needs_BIP_Alloc_Form.
2893 2011-09-01 Pascal Obry <obry@adacore.com>
2895 * prj-part.adb: Minor reformatting.
2897 2011-09-01 Vincent Celier <celier@adacore.com>
2899 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2900 half character in the unit name.
2902 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2904 * exp_ch4.adb: Minor code and comment reformatting.
2906 2011-09-01 Thomas Quinot <quinot@adacore.com>
2908 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2909 for Is_Limited_Type and Is_Tagged_Type in condition checking
2910 for by-reference type.
2911 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2912 subprograms may have a completion because of a previous
2913 Inline_Always clause, but the enclosing package must be marked
2914 inlined for the subprogram body to become visible to the backend.
2916 2011-09-01 Thomas Quinot <quinot@adacore.com>
2918 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2920 2011-09-01 Pascal Obry <obry@adacore.com>
2922 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2924 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2926 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2927 the formals of a subprogram stub that acts as a spec.
2929 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2931 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2932 type, declare a renaming for it, not an object declaration.
2934 2011-09-01 Yannick Moy <moy@adacore.com>
2936 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2937 Ignore_Errors to ignore failures to read ALI files when True.
2939 2011-09-01 Javier Miranda <miranda@adacore.com>
2941 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2942 constructor calls associated with non-tagged record types.
2944 2011-09-01 Robert Dewar <dewar@adacore.com>
2946 * g-socthi-vms.adb: Minor reformatting.
2948 2011-09-01 Nicolas Roche <roche@adacore.com>
2950 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2951 in order to avoid impact of imcompatible changes.
2952 * cstreams.c: Likewise
2954 * aux-io.c: Likewise
2956 2011-09-01 Yannick Moy <moy@adacore.com>
2958 * lib-writ.adb (Write_With_Lines): Always output complete information
2959 on "with" line in Alfa mode, as this is required by formal verification
2962 2011-09-01 Tristan Gingold <gingold@adacore.com>
2964 * g-socthi-vms.adb: Add comments.
2966 2011-09-01 Pascal Obry <obry@adacore.com>
2968 * prj.ads: Minor reformatting.
2970 2011-09-01 Vincent Celier <celier@adacore.com>
2972 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2973 exceptions in the config pragmas file.
2975 2011-09-01 Tristan Gingold <gingold@adacore.com>
2977 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2979 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2981 * exp_ch7.adb (Find_Insertion_List): New routine.
2982 (Process_Transient_Objects): Add code to handle the abnormal
2983 finalization of a controlled transient associated with a subprogram
2984 call. Since transients are cleaned up right after the associated
2985 context, an exception raised during a subprogram call may bypass the
2988 2011-09-01 Robert Dewar <dewar@adacore.com>
2990 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2993 2011-09-01 Robert Dewar <dewar@adacore.com>
2995 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2997 2011-09-01 Robert Dewar <dewar@adacore.com>
2999 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3001 2011-09-01 Thomas Quinot <quinot@adacore.com>
3003 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3004 GNATRTL_NONTASKING_OBJS.
3006 2011-09-01 Robert Dewar <dewar@adacore.com>
3008 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3009 possibility of this flag being set for formals in Ada 2012 mode.
3010 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3012 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3014 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3016 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3019 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3021 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3022 insertion node in a tree of nested Expression_With_Actions nodes.
3023 (Process_Transient_Object): In the case where a complex if statement
3024 has been converted into nested Expression_With_Actions nodes, the
3025 "hook" object and the associated access type must be inserted before
3026 the top most Expression_With_Actions.
3028 2011-09-01 Robert Dewar <dewar@adacore.com>
3030 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3031 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3033 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3035 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3037 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3039 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3041 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3042 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3043 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3044 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3045 Dispatching_Domains_Frozen): Move this local data to package
3046 System.Tasking because with the CPU aspect we need to have access
3047 to this data when creating the task in System.Tasking.Stages.Create_Task
3048 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3049 Move these variables from the body of
3050 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3051 we need to have access to this data when creating the task in
3052 System.Tasking.Stages.Create_Task.
3053 * s-taskin.adb (Initialize): Signal the allocation of the environment
3054 task to a CPU, if any, so that we know whether the CPU can be
3055 transferred to a different dispatching domain.
3056 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3057 is being allocated belongs to the dispatching domain where the task
3058 lives. Signal the allocation of the task to a CPU, if any, so that we
3059 know whether the CPU can be transferred to a different dispatching
3062 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3064 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3065 attributes Same_Storage and Overlaps_Storage.
3067 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3069 * exp_strm.adb: Remove with and use clause for Opt.
3070 (Build_Array_Input_Function): Remove the version-dependent generation
3071 of the return statement. The Ada 2005 tree is now the default.
3073 2011-09-01 Yannick Moy <moy@adacore.com>
3075 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3076 it is never empty when compiling in Alfa mode.
3078 2011-09-01 Robert Dewar <dewar@adacore.com>
3080 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3081 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3082 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3083 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3085 2011-09-01 Matthew Heaney <heaney@adacore.com>
3087 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3088 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3089 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3090 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3091 unbounded queue container.
3092 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3093 bounded queue container.
3094 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3095 unbounded priority queue container.
3096 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3097 bounded priority queue container.
3099 2011-08-31 Pascal Obry <obry@adacore.com>
3101 * a-direct.adb: Do not try to create an UNC path on Windows.
3102 (Create_Path): Skip leading computer name in UNC path if any.
3104 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3106 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3107 version-dependent generation of the return statement. The Ada 2005 tree
3110 2011-08-31 Thomas Quinot <quinot@adacore.com>
3112 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3113 types Stream_Element_Offset and Storage_Offset have a different native
3114 type depending on whether the platform is 32 or 64 bits. When
3115 exchanging them, always convert to 64 bits.
3117 2011-08-31 Yannick Moy <moy@adacore.com>
3119 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3120 --force-alfa to gnat2why.
3122 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3124 * sem_ch12.adb (Save_References): If the node has aspects, save
3125 references within the corresponding expressions in a separate step,
3126 because the aspects are not directly in the tree for the declaration
3127 to which they belong.
3129 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3131 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3132 in CodePeer mode, since representation clauses are partially ignored.
3133 * gcc-interface/Make-lang.in: Update dependencies.
3135 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3137 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3138 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3139 to any dispatching domain.
3141 2011-08-31 Thomas Quinot <quinot@adacore.com>
3143 * exp_ch4.adb: Minor reformatting.
3145 2011-08-31 Bob Duff <duff@adacore.com>
3147 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3148 on nodes for which it is not defined.
3149 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3152 2011-08-31 Bob Duff <duff@adacore.com>
3154 * sem_ch3.adb (Process_Full_View): Disable legality check if
3155 In_Instance, to avoid spurious errors.
3156 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3157 if In_Instance, to avoid spurious errors.
3159 2011-08-31 Pascal Obry <obry@adacore.com>
3161 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3162 directory speparators.
3163 (Compose): Use Dir_Seps to handle both forms.
3164 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3166 (Extension): Use Dir_Seps to handle both forms.
3168 2011-08-31 Pascal Obry <obry@adacore.com>
3170 * prj-conf.adb: Minor reformatting.
3172 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3174 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3175 dispatching domain aspect.
3176 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3178 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3179 Dispatching_Domain aspect in a similar way as we do for the Priority
3181 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3182 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3184 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3185 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3186 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3187 Dispatching_Domain and add it to the task definition.
3188 (Sig_Flags): Add Pragma_Dispatching_Domain.
3189 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3190 support to find the types Dispatching_Domain and
3191 Dispatching_Domain_Access.
3192 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3193 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3194 query the availability of a pragma Dispatching_Domain.
3195 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3196 the expander to pass the Dispatching_Domain when creating a task.
3197 (Name_Dispatching_Domain): Add this new name for a pragma.
3198 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3199 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3200 task has been allocated at creation time.
3201 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3202 Ravenscar is always null.
3203 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3204 the task has been allocated at creation time.
3205 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3206 a specific dispatching domain.
3207 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3208 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3209 and CPU are specified for the task, and the CPU value is not contained
3210 within the range of processors for the domain.
3212 2011-08-31 Vincent Celier <celier@adacore.com>
3214 * make.adb (Original_Gcc) : New constant String_Access.
3215 (Gnatmake): For VM targets, do not use VM version of the compiler if
3216 --GCC= has been specified.
3218 2011-08-31 Thomas Quinot <quinot@adacore.com>
3220 * sem_ch5.adb: Minor reformatting.
3222 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3224 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3227 2011-08-31 Bob Duff <duff@adacore.com>
3229 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3230 the access type is private; we don't care about privacy in expansion.
3232 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3234 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3235 subcomponents tnat may be limited, because they originate in view
3236 conflicts. If the original aggregate is legal and the actuals are
3237 legal, the aggregate itself is legal.
3239 2011-08-31 Matthew Heaney <heaney@adacore.com>
3241 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3244 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3246 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3249 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3251 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3252 Interrupt_Priority aspects, force the analysis of the aspect expression
3253 (when building the equivalent pragma). Otherwise, its analysis is done
3254 too late, after the task or protected object has been created.
3255 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3256 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3257 to the object declaration because they are needed in the type
3260 2011-08-31 Robert Dewar <dewar@adacore.com>
3262 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3263 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3266 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3268 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3269 if the corresponding type is malformed due to restriction violations.
3271 2011-08-31 Robert Dewar <dewar@adacore.com>
3273 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3275 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3277 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3278 would cause the generation of Set_Finalize_Address if the target is a
3279 VM and the designated type is not derived from [Limited_]Controlled.
3281 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3283 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3285 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3286 case of a compilation error.
3288 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3290 * init.c (__gnat_error_handler): Standardize the stack overflow or
3291 erroneous memory access message.
3292 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3293 or erroneous memory access message.
3295 2011-08-31 Robert Dewar <dewar@adacore.com>
3297 * sem_ch4.adb: Minor reformatting.
3298 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3300 2011-08-31 Thomas Quinot <quinot@adacore.com>
3302 * scos.ads: Minor documentation clarification.
3303 * put_scos.adb: Do not generate SCO unit header line for a unit that
3306 2011-08-31 Robert Dewar <dewar@adacore.com>
3308 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3310 2011-08-31 Tristan Gingold <gingold@adacore.com>
3312 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3313 hold variables between these following subprograms.
3314 (Build_Exception_Handler, Build_Object_Declarations,
3315 Build_Raise_Statement): Use the above type as parameter.
3316 Make the above adjustments.
3317 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3319 2011-08-31 Pascal Obry <obry@adacore.com>
3321 * projects.texi: Minor reformatting.
3323 2011-08-31 Tristan Gingold <gingold@adacore.com>
3325 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3326 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3328 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3330 * exp_ch5.adb: Minor code cleanup.
3331 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3332 prevent cascaded errors.
3333 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3334 variable of an iterator specification in current scope.
3335 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3336 postconditions on the stack, as they contain no return statements.
3338 2011-08-31 Yannick Moy <moy@adacore.com>
3340 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3341 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3342 call Qualify_Entity_Names.
3343 (Expand_Alfa): call Qualify_Entity_Names in more cases
3344 * lib-xref-alfa.adb: Take into account system package.
3345 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3346 CodePeer mode in which we are interested in finding bugs even if
3347 compiler cannot compile source.
3348 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3351 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3353 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3354 denoted by the subtype mark to ensure getting the concurrent type in
3355 the case where the subtype mark denotes a private subtype of a
3356 concurrent type (needed when using -gnatc).
3357 (Process_Subtype): For the processing specific to type kinds, case on
3358 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3359 subtype denotes a private subtype whose base type is nonprivate (needed
3360 for subtypes of private fulfilled by task types when compiling with
3363 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3365 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3366 late primitives that override interface operations when the full
3367 expander is not active, to avoid blowups in Register_Primitive when
3368 types don't have associated secondary dispatch tables.
3370 2011-08-31 Yannick Moy <moy@adacore.com>
3372 * alfa_test.adb: Code clean up.
3374 2011-08-31 Marc Sango <sango@adacore.com>
3376 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3377 by Comes_From_Source (Original_Node (N)) in order to treat also the
3378 nodes which have been rewritten.
3379 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3380 explicit dereference and slice violation in spark mode on the nodes
3381 coming only from the source code.
3383 2011-08-31 Robert Dewar <dewar@adacore.com>
3385 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3386 lib-xref-alfa.adb: Minor reformatting.
3388 2011-08-31 Matthew Heaney <heaney@adacore.com>
3390 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3392 2011-08-31 Javier Miranda <miranda@adacore.com>
3394 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3395 only for class-wide subprograms conflicting with entities of concurrent
3398 2011-08-31 Matthew Heaney <heaney@adacore.com>
3400 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3403 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3405 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3406 general description of the routine.
3408 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3410 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3411 doubly-linked lists.
3413 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3415 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3416 check is needed for a left-hand side that is a dereference, and the
3417 base type is private without discriminants (whereas the full type does
3418 have discriminants), an extra retrieval of the underlying type may be
3419 needed in the case where the subtype is a record subtype whose base
3420 type is private. Update comments.
3422 2011-08-31 Javier Miranda <miranda@adacore.com>
3424 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3425 found check if there is a class-wide subprogram covering the primitive.
3427 2011-08-31 Yannick Moy <moy@adacore.com>
3429 * sem_res.adb: Further cases where full expansion test is needed,
3430 rather than expansion test.
3432 2011-08-31 Pascal Obry <obry@adacore.com>
3434 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3436 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3438 * exp_ch5.adb: Handle iterators over derived container types.
3440 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3442 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3443 (Has_Anonymous_Master): New routine.
3444 (Set_Has_Anonymous_Master): New routine.
3445 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3446 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3447 (Current_Anonymous_Master): New routine.
3448 (Current_Unit_First_Declaration): Removed.
3449 (Current_Unit_Scope): Removed.
3450 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3451 their objects on a per-unit heterogeneous finalization master.
3453 2011-08-31 Matthew Heaney <heaney@adacore.com>
3455 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3458 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3460 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3463 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3465 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3466 where the actual is an unexpanded call to 'Input.
3468 2011-08-31 Yannick Moy <moy@adacore.com>
3470 * sem_ch4.adb: Code clean up.
3472 2011-08-31 Yannick Moy <moy@adacore.com>
3474 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3476 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3478 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3479 and TSS primitive Finalize_Address if finalization is suppressed.
3480 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3481 primitive Finalize_Address if finalization is suppressed.
3483 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3485 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3486 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3487 sure that the underlying task has already been created before trying
3488 to change its affinity.
3489 (Set_CPU): Use the term processor instead of CPU, as we do in
3492 2011-08-31 Vincent Celier <celier@adacore.com>
3494 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3495 * prj-nmsc.adb (Process_Compiler): Process attribute
3496 Source_File_Switches.
3497 * prj.ads (Language_Config): New name list component
3498 Name_Source_File_Switches.
3499 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3501 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3503 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3504 discriminated component of an actual, expand at once to prevent
3505 ouf-of-order references with generated subtypes.
3507 2011-08-31 Yannick Moy <moy@adacore.com>
3509 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3510 reference to operator in Alfa xrefs.
3512 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3514 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3515 where the parent instance was frozen before the current instance due to
3516 the presence of a source body. Update calls to Insert_After_Last_Decl.
3517 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3518 Update the comment which illustrates the purpose of the routine.
3519 Package instances are now frozen by source bodies which appear after
3520 the instance. This ensures that entities coming from within the
3521 instance are available for use in the said bodies.
3522 (Install_Body): Add code to handle the case where the parent instance
3523 was frozen before the current instance due to the presence of a source
3524 body. Update calls to Insert_After_Last_Decl.
3526 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3528 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3530 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3532 2011-08-31 Yannick Moy <moy@adacore.com>
3534 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3536 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3537 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3538 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3539 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3540 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3541 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3542 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3543 ALFA in Alfa (we dropped acronym).
3544 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3545 operations in a case where it returned previously No_Elist.
3547 2011-08-31 Robert Dewar <dewar@adacore.com>
3549 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3550 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3551 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3552 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3553 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3554 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3557 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3559 * sem_ch12 (Check_Private_View): Revert previous change.
3560 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3561 conversion is in a generic instance.
3563 2011-08-31 Matthew Heaney <heaney@adacore.com>
3565 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3566 * a-chtgbo.adb (Free): Allow 0 as index value.
3568 2011-08-31 Matthew Heaney <heaney@adacore.com>
3570 * a-cborma.adb (Insert): Add comment to explain why no element
3573 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3575 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3576 spec discriminant is already a concurrent type, in which case just use
3577 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3579 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3581 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3582 system-linux-mips.ads, system-linux-mipsel.ads,
3583 system-linux-mips64el.ads, system-linux-ppc64.ads,
3584 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3586 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3588 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3589 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3590 (build_unary_op): Likewise.
3592 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3594 * raise-gcc.c: Do not include coretypes.h and tm.h.
3595 (setup_to_install): Remove test for compiler macro.
3596 * targext.c: Document use for the library.
3597 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3599 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3601 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3602 the expression to the nominal type if the latter is a record type with
3603 a variant part and the type of the former is a record type without one.
3605 2011-08-30 Yannick Moy <moy@adacore.com>
3607 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3608 expansion in Alfa mode.
3609 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3610 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3612 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3613 * sem_res.adb: Ditto.
3614 * gcc-interface/Make-lang.in: Update dependencies.
3616 2011-08-30 Thomas Quinot <quinot@adacore.com>
3618 * g-socket.ads: Minor documentation adjustment.
3620 2011-08-30 Robert Dewar <dewar@adacore.com>
3622 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3624 2011-08-30 Yannick Moy <moy@adacore.com>
3626 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3627 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3628 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3629 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3630 Revert change which introduced files for "light"
3631 expansion, to be replaced by a single file for Alfa expansion.
3633 2011-08-30 Robert Dewar <dewar@adacore.com>
3635 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3636 Minor code reorg/reformatting.
3638 2011-08-30 Yannick Moy <moy@adacore.com>
3640 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3641 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3642 used for testing full expansion, that is active expansion not in the
3643 reduced mode for Alfa
3644 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3645 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3646 of the verbose (Expander_Active and not ALFA_Mode)
3648 2011-08-30 Tristan Gingold <gingold@adacore.com>
3650 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3651 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3652 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3653 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3655 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3657 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3658 access conversions to check that the conversion is a rewritten node,
3659 rather than just having Comes_From_Source set to False, which wasn't
3662 2011-08-30 Robert Dewar <dewar@adacore.com>
3664 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3665 g-socket.ads: Minor reformatting.
3667 2011-08-30 Thomas Quinot <quinot@adacore.com>
3669 * sem_util.adb: Minor reformatting.
3671 2011-08-30 Tristan Gingold <gingold@adacore.com>
3673 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3674 to be compliant with the ABI.
3676 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3678 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3679 of a designated type when the related access type is an actual in an
3680 instance. This ensures that the full view of designated type is
3681 available when inside the body of the instance.
3683 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3685 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3686 in a position to be modified, a slice is treated like an indexed
3689 2011-08-30 Thomas Quinot <quinot@adacore.com>
3691 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3692 field tv_sec in struct timeval.
3694 2011-08-30 Yannick Moy <moy@adacore.com>
3696 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3697 blocks of code doing full expansion, previously only guarded by
3698 Expander_Active, by anding the test that ALFA_Mode is not set
3700 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3702 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3703 add the function to the list of private dependents, for subsequent
3704 legality check on Taft amendment types.
3705 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3706 Private_Dependents, as for other incomplete types.
3707 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3708 Taft-amendment type is used as the return type of a function.
3710 2011-08-30 Javier Miranda <miranda@adacore.com>
3712 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3713 which emits an error by a call to a new routine which report the error.
3714 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3715 entity does not cover an existing interface.
3716 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3718 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3719 protected procedures or entries whose mode is not conformant.
3720 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3721 an error by a call to a new routine which report the error.
3723 2011-08-30 Robert Dewar <dewar@adacore.com>
3725 * gnat_rm.texi: Minor change.
3726 * exp_attr_light.adb: Minor reformatting.
3728 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3730 * sem_ch3.adb: Patch inheritance of aspects in
3731 Complete_Private_Subtype, to avoid infinite loop.
3733 2011-08-30 Javier Miranda <miranda@adacore.com>
3735 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3736 been reported and a subprogram covering an interface primitive is not
3737 found then skip generating the internal entity. Done to avoid crashing
3739 (Check_Abstract_Overriding): Change text of error of wrong formal of
3740 protected subprogram or entry. Done for consistency to emit exactly the
3741 same error reported by Check_Synchronized_Overriding. In addition, the
3742 error is restricted to protected types (bug found working on AI05-0090)
3744 2011-08-30 Yannick Moy <moy@adacore.com>
3746 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3747 expansion in Alfa mode.
3748 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3749 * exp_light.adb, exp_light.ads: New package defining light expansion.
3750 * expander.adb (Expand): Call light expansion in Alfa mode
3751 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3753 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3755 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3756 * gnat1drv.adb (Adjust_Global_Switches): Comment
3758 2011-08-30 Yannick Moy <moy@adacore.com>
3760 * lib-xref-alfa.adb: Minor refactoring.
3762 2011-08-30 Yannick Moy <moy@adacore.com>
3764 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3766 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3767 expansion in Alfa mode.
3768 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3771 2011-08-30 Robert Dewar <dewar@adacore.com>
3773 * debug_a.adb: Update comment.
3775 2011-08-30 Robert Dewar <dewar@adacore.com>
3777 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3778 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3779 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3780 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3782 2011-08-30 Robert Dewar <dewar@adacore.com>
3784 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3787 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3789 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3790 Build_Finalization_Master by supplying an insertion node and enclosing
3791 scope. In its old version, the call did not generate a finalization
3793 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3794 recognize anonymous access-to-controlled components. Rewrite the
3795 machinery which creates finalization masters to service anonymous
3796 access-to-controlled components of a record type. In its current state,
3797 only one heterogeneous master is necessary to handle multiple anonymous
3799 (Freeze_Type): Comment reformatting.
3800 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3802 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3803 associates TSS primitive Finalize_Address with either the master itself
3804 or with the internal hash table depending on the mode of operation of
3807 2011-08-30 Javier Miranda <miranda@adacore.com>
3809 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3810 interface type then do not generate code to compare this component.
3811 Required since they have no components and their equality operator is
3814 2011-08-30 Steve Baird <baird@adacore.com>
3816 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3817 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3818 returns the (static) accessibility level of the object. Otherwise, the
3819 same as Type_Access_Level.
3820 (Dynamic_Accessibility_Level): New function; given an expression which
3821 could occur as the rhs of an assignment to a saooaaat (i.e., an
3822 expression of an access-to-object type), return the new value for the
3823 saooaaat's associated Extra_Accessibility object.
3824 (Effective_Extra_Accessibility): New function; same as
3825 Einfo.Extra_Accessibility except that object renames are looked through.
3827 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3828 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3830 (Effective_Extra_Accessibility): New function; see sem_util.ads
3832 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3833 (Extra_Accessibility): Update comments.
3834 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3835 except RM_Size field (which is only for types) is unaffected.
3837 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3838 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3840 (Init_Size): Add assertion that we are not trashing the
3841 Extra_Accessibility attribute of an object.
3842 (Init_Size_Align): Add assertion that we are not trashing the
3843 Extra_Accessibility attribute of an object.
3844 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3845 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3846 differently for the type of a (non-library-level) saooaaat depending
3847 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3848 is queried in this set of changes - everything else (in particular,
3849 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3850 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3851 The special treatment of library-level saooaaats is an optimization,
3852 not required for correctnesss. This is based on the observation that the
3853 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3854 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3856 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3857 false for the type of a saooaaat, declare and initialize its
3858 accessibility level object and set the Extra_Accessibility attribute
3859 of the saooaaat to refer to this object.
3860 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3861 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3862 calls to Effective_Extra_Accessibility in order to support
3863 renames of saooaaats.
3864 (Expand_N_Type_Conversion): Add new local function,
3865 Has_Extra_Accessibility, and call it when determining whether an
3866 accessibility check is needed.
3867 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3868 evaluate to True (without raising an exception).
3870 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3871 saooaaat, update its associated Extra_Accessibility object (if
3872 it has one). This includes an accessibility check.
3873 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3874 a saooaaat, update its Extra_Accessibility object too (if it
3876 (Expand_Call): Replace a couple of calls to Type_Access_Level
3877 with calls to Dynamic_Access_Level to handle cases where
3878 passing a literal (any literal) is incorrect.
3879 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3880 checks associated with "Saooaat := Some_Object'Access;"; this must
3881 be rejected if Some_Object is declared in a more nested scope
3883 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3884 assignment to a saooaaat even if Is_Local_Anonymous_Access
3885 returns False for its type (indicating a 2012-style saooaaat).
3887 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3888 (which is only appropriate for objects, not types) with a call
3889 of Init_Object_Size_Align in order to avoid trashing the
3890 Extra_Accessibility attribute of a rename (the two attributes
3893 (Valid_Conversion) Replace six calls to Type_Access_Level with
3894 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3895 Ada2012 non-library-level saooaaat, the former returns library level
3896 while the latter returns the (static) accessibility level of the
3897 saooaaat. A type conversion to the anonymous type of a saooaaat
3898 can only occur as part of an assignment to the saooaaat, so we
3899 know that such a conversion must be in a lhs context, so Deepest
3900 yields the result that we need. If such a conversion could occur,
3901 say, as the operand of an equality operator, then this might not
3902 be right. Also add a test so that static accessibilty checks are
3903 performed for converting to a saooaaat's type even if
3904 Is_Local_Anonymous_Access yields False for the type.
3906 2011-08-30 Javier Miranda <miranda@adacore.com>
3908 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3909 controls generation of a warning associated with late declaration of
3910 dispatching functions. Required to avoid generating spurious
3913 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3915 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3916 return object has an anonymous access type and the function's type is
3917 a named access type.
3918 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3919 conversions on implicit conversions, since such conversions can occur
3920 for anonymous access cases due to expansion. Issue error for attempt
3921 to rename an anonymous expression as an object of a named access type.
3922 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3923 to indicate whether this function should report errors on invalid
3925 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3926 the expression is of an anonymous access type and the expected type is
3927 a named general access type, rewrite the expression as a type
3928 conversion, unless this is an expression of a membership test.
3929 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3930 calling of Error_Msg_N on new formal Report_Errs.
3931 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3932 calling of Error_Msg_NE on new formal Report_Errs.
3933 (Valid_Conversion): Move declaration of this function to the package
3934 spec, to allow calls from membership test processing. For Ada 2012,
3935 enforce legality restrictions on implicit conversions of anonymous
3936 access values to general access types, disallowing such conversions in
3937 cases where the expression has a dynamic accessibility level (access
3938 parameters, stand-alone anonymous access objects, or a component of a
3939 dereference of one of the first two cases).
3940 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3941 in the context of a named general access expected type.
3942 * exp_ch4.adb Add with and use of Exp_Ch2.
3943 (Expand_N_In): Add processing for membership tests applied to
3944 expressions of an anonymous access type. First, Valid_Conversion is
3945 called to check whether the test is statically False, and then the
3946 conversion is expanded to test that the expression's accessibility
3947 level is no deeper than that of the tested type. In the case of
3948 anonymous access-to-tagged types, a tagged membership test is applied
3950 (Tagged_Membership): Extend to handle access type cases, applying the
3951 test to the designated types.
3952 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3953 accessibility level, and the actual is a 'Access applied to a current
3954 instance, pass the accessibility level of the type of the current
3955 instance rather than applying Object_Access_Level to the prefix. Add a
3956 ??? comment, since this level isn't quite right either (will eventually
3957 need to pass an implicit level parameter to init procs).
3959 2011-08-30 Bob Duff <duff@adacore.com>
3961 * s-taskin.ads: Minor comment fix.
3963 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3965 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3966 component and the selector is a dispatching operation, check if it is
3967 a prefixed call before rewriting as a parameterless function call.
3969 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3971 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3972 tsystem.h into $(RTSDIR) instead of rts.
3974 2011-08-29 Robert Dewar <dewar@adacore.com>
3976 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3978 * gcc-interface/Make-lang.in: Update dependencies.
3980 2011-08-29 Yannick Moy <moy@adacore.com>
3982 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3983 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3984 table to hold dereferences.
3985 (Add_ALFA_Xrefs): Take into account dereferences as special
3986 reads/writes to the variable "HEAP".
3987 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3988 (Generate_Dereference): New procedure to store a read/write dereferencew
3990 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3991 the special "HEAP" var.
3992 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3994 * sem_util.adb (Note_Possible_Modification): Store write dereference
3997 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3999 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4000 ensures that the level of the subpool access type is not deeper than
4001 that of the pool object.
4002 * sem_util.adb (Object_Access_Level): Expand to handle defining
4004 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4005 subpool handle name of a rewritten allocator.
4007 2011-08-29 Robert Dewar <dewar@adacore.com>
4009 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4011 2011-08-29 Thomas Quinot <quinot@adacore.com>
4013 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4014 values, we generate multiple triples of parameters in the TypeCode.
4015 Bump Choice_Index for each such triple so that a subsequent default
4016 choice is associated with the correct index in the typecode.
4018 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4020 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4022 (First, Last): Handle properly an iterator over a null container.
4024 2011-08-29 Bob Duff <duff@adacore.com>
4026 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4027 processing if we run across a node with no Scope. This can happen if
4028 we're with-ing an library-level instance, and that instance got errors
4029 that caused "instantiation abandoned".
4030 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4031 an exception instead of using Assert, so it won't go into an infinite
4032 loop, even when assertions are turned off.
4034 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4036 * a-coorse.adb: Proper handling of empty ordered sets.
4038 2011-08-29 Johannes Kanig <kanig@adacore.com>
4040 * debug.adb: Add comments.
4042 2011-08-29 Thomas Quinot <quinot@adacore.com>
4044 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4047 2011-08-29 Yannick Moy <moy@adacore.com>
4049 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4050 declaration for Itypes in Alfa mode.
4052 2011-08-29 Robert Dewar <dewar@adacore.com>
4054 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4055 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4056 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4059 2011-08-29 Tristan Gingold <gingold@adacore.com>
4061 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4063 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4064 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4067 2011-08-29 Robert Dewar <dewar@adacore.com>
4069 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4071 2011-08-29 Javier Miranda <miranda@adacore.com>
4073 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4074 renamings of formal subprograms when the actual for a formal type is
4077 2011-08-29 Matthew Heaney <heaney@adacore.com>
4079 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4082 2011-08-29 Matthew Heaney <heaney@adacore.com>
4084 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4085 components of record type.
4086 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4089 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4091 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4092 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4095 2011-08-29 Robert Dewar <dewar@adacore.com>
4097 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4100 2011-08-29 Matthew Heaney <heaney@adacore.com>
4102 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4103 components of record type.
4105 2011-08-29 Bob Duff <duff@adacore.com>
4107 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4108 by the termination handler.
4110 2011-08-29 Yannick Moy <moy@adacore.com>
4112 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4113 created in Alfa mode, instead of inserting artificial declarations of
4114 non-Itypes in the tree.
4115 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4116 know if an Itype has a corresponding declaration, as defined in
4119 2011-08-29 Yannick Moy <moy@adacore.com>
4121 * gnat1drv.adb: Minor rewrite.
4123 2011-08-29 Bob Duff <duff@adacore.com>
4125 * s-tasuti.adb (Make_Passive): Work around race condition in
4126 Make_Independent, which can cause Wait_Count to be zero. So instead of
4127 asserting that Wait_Count > 0, and then decrementing it, decrement it
4128 only if Wait_Count > 0.
4129 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4130 should be nonnegative, so declare them Natural instead of Integer.
4132 2011-08-29 Robert Dewar <dewar@adacore.com>
4134 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4135 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4136 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4137 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4138 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4140 2011-08-29 Tristan Gingold <gingold@adacore.com>
4142 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4144 2011-08-29 Vadim Godunko <godunko@adacore.com>
4146 * s-parint.ads: Minor comment clarification.
4148 2011-08-29 Vincent Celier <celier@adacore.com>
4150 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4151 may be used as identifiers.
4153 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4155 * a-coinho.ads: Minor reformating.
4157 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4159 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4160 container of a derived type.
4162 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4164 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4165 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4167 2011-08-29 Pascal Obry <obry@adacore.com>
4169 * exp_disp.adb: Minor comment fix.
4170 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4171 to avoid warnings when compiling with -Wall.
4172 (Make_Disp_Conditional_Select_Body): Likewise.
4173 (Make_Disp_Timed_Select_Body): Likewise.
4175 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4177 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4178 an entity name, generate reference for it.
4180 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4182 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4184 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4185 the class-wide type.
4186 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4188 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4190 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4191 subtype for an object whose type is an unconstrained union.
4193 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4195 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4196 is allowed in a component definition, by AI95-406.
4198 2011-08-29 Matthew Heaney <heaney@adacore.com>
4200 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4202 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4204 * a-except-2005.adb: Alphabetize all routines.
4205 (Triggered_By_Abort): New routine.
4206 * a-except-2005.ads (Triggered_By_Abort): New routine.
4207 * a-except.adb Alphabetize all routines.
4208 (Triggered_By_Abort): New routine.
4209 * a-except.ads (Triggered_By_Abort): New routine.
4210 * exp_ch7.adb: Update all comments involving the detection of aborts in
4212 (Build_Object_Declarations): Do not generate code to detect the
4213 presence of an abort at the start of finalization code, use a runtime
4215 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4217 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4218 allocate a task on a subpool.
4219 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4220 The flag disables all actions related to the maintenance of
4221 Finalize_Address_Table when subpools are not in use.
4222 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4224 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4225 performs costly task locking when subpools are not in use.
4227 2011-08-29 Yannick Moy <moy@adacore.com>
4229 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4230 types and dispatching calls in Alfa mode.
4231 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4232 correspondance between body and spec scopes, to reuse utility functions
4233 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4234 by testing the presence of the library unit for the body
4235 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4236 mode the expansion of accept statements is skipped
4237 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4238 the unique entity corresponding to the one returned by
4239 Unique_Defining_Entity applied to the enclosing declaration of the
4242 2011-08-29 Bob Duff <duff@adacore.com>
4244 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4245 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4246 an alias for pn. ppp is an alias for pt.
4248 2011-08-29 Javier Miranda <miranda@adacore.com>
4250 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4251 aggregate to take a consistent decision on the need to convert into
4252 assignments aggregates that initialize constant objects.
4254 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4256 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4257 Build_Allocate_Deallocate_Proc in order to handle allocation of
4258 non-controlled objects on subpools.
4259 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4260 to be end-user visible.
4261 * s-finmas.adb: Add with and use clause for System.HTable.
4262 Add an instantiation of Simple_HTable which provides a mapping between
4263 the address of a controlled object and the corresponding
4264 Finalize_Address used to clean up the object. The table is used when a
4265 master is operating in heterogeneous mode.
4266 (Attach): Explain why the input node is not verified on being already
4268 (Delete_Finalize_Address): New routine.
4269 (Detach): Add pragma Assert which ensures that a node is already
4271 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4272 since nodes are no longer removed on traversal. Explain why node
4273 detachment is undesirable in this case.
4274 (Get_Finalize_Address): New routine.
4275 (Hash): New routine.
4276 (Is_Empty_List): Removed.
4277 (pm): Renamed to Print_Master. Add output for discriminant
4279 Comment reformatting.
4280 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4281 * s-finmas.ads: Various comments additions / improvements.
4282 Type Finalization_Master has a discriminant which determines the mode of
4284 (Delete_Finalize_Address): New routine.
4285 (Get_Finalize_Address): New routine.
4286 (pm): Renamed to Print_Master.
4287 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4288 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4289 use clause for System.IO.
4290 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4291 Finalize_Address depending on the mode of allocation and the mode of
4293 (Deallocate_Any_Controlled): Remove the relation pair object -
4294 Finalize_Address regardless of the master mode. Add comment explaining
4296 (Detach): Ensure that fields Prev and Next are null after detachment.
4297 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4298 scheme to check whether the list of subpools is empty. There is no
4299 longer need to store the next subpool or advance the current pointer.
4300 (Is_Empty_List): New routine.
4301 (Print_Pool): New routine.
4302 (Print_Subpool): New routine.
4303 * s-stposu.ads: Various comments additions / improvements.
4304 Field Master of type Root_Subpool is now a heterogeneous collection.
4305 (Print_Pool): New routine.
4306 (Print_Subpool): New routine.
4308 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4310 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4311 forms, using aspects of container types.
4312 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4313 Has_Implicit_Dereference flags, that may be set on the partial view.
4314 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4315 container type with an indexing aspect.
4316 (Analyze_Quantified_Expression): Analyze construct with expansion
4317 disabled, because it will be rewritten as a loop during expansion.
4318 (Try_Container_Indexing): The prefix itself may be a container type
4319 with an indexing aspect, as with a vector of vectors.
4320 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4321 the original doamin of iteration, for name capture.
4322 (Analyze_Iterator_Specification): If the domain is an expression that
4323 needs finalization, create a separate declaration for it.
4324 For an iterator with "of" retrieve default iterator info from aspect of
4325 container type. For "in" iterator, retrieve type of Iterate function.
4326 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4327 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4328 analysis, to prevent spurious errors about late attributes.
4329 * sprint.adb: Handle quantified expression with either loop or iterator
4331 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4334 2011-08-29 Vincent Celier <celier@adacore.com>
4336 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4337 Binder or Linker of the main project file.
4339 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4341 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4344 2011-08-29 Yannick Moy <moy@adacore.com>
4346 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4348 2011-08-29 Yannick Moy <moy@adacore.com>
4350 * exp_ch11.adb: Minor expansion of comment.
4352 2011-08-29 Yannick Moy <moy@adacore.com>
4354 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4356 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4358 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4359 interpretation, set the type before resolving the operands, because
4360 legality checks on an exponention operand need to know the type of the
4363 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4365 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4366 cleanups on a master if the instance is within a generic unit.
4367 Complement to the corresponding fix to inline.adb for K520-030.
4369 2011-08-29 Tristan Gingold <gingold@adacore.com>
4371 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4373 * exp_intr.adb: Minor comment fix.
4375 2011-08-29 Bob Duff <duff@adacore.com>
4377 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4378 Delay_Required was used as an uninitialized variable.
4380 2011-08-29 Robert Dewar <dewar@adacore.com>
4382 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4383 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4384 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4386 2011-08-29 Thomas Quinot <quinot@adacore.com>
4388 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4389 Remove unused variables.
4391 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4393 * sem_res.adb: Remove Build_Explicit_Dereference.
4394 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4395 from sem_res.adb, used in analysis of additional constructs.
4396 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4397 expansion of iterators.
4398 (Is_Object_Reference): Recognize variables rewritten as explicit
4399 dereferences in Ada2012.
4400 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4401 Reversible_Iterator names, for expansion of Ada2012 iterators.
4402 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4403 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4404 linked list container.
4405 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4406 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4408 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4410 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4413 2011-08-29 Vincent Celier <celier@adacore.com>
4415 * make.adb (Gnatmake): Get the maximum number of simultaneous
4416 compilation processes after the Builder switches has been scanned, as
4417 there may include -jnn.
4419 2011-08-29 Matthew Heaney <heaney@adacore.com>
4421 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4423 2011-08-29 Tristan Gingold <gingold@adacore.com>
4425 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4426 GNAT_DRIVER_COMMAND_LINE to 255.
4428 2011-08-29 Pascal Obry <obry@adacore.com>
4430 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4431 reformatting and style fix (class attribute casing).
4433 2011-08-29 Yannick Moy <moy@adacore.com>
4435 * exp_ch11.adb: Yet another case where expansion should be common
4436 between CodePeer and Alfa.
4438 2011-08-29 Yannick Moy <moy@adacore.com>
4440 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4442 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4444 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4445 incomplete type and its completion match.
4447 2011-08-29 Yannick Moy <moy@adacore.com>
4449 * exp_ch13.adb: Adjust previous change.
4451 2011-08-29 Robert Dewar <dewar@adacore.com>
4453 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4454 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4457 2011-08-29 Emmanuel Briot <briot@adacore.com>
4459 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4460 initialize aggregated projects.
4462 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4464 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4465 depth of candidates to resolve a potentially spurious ambiguity between
4466 two visible subprograms.
4468 2011-08-29 Yannick Moy <moy@adacore.com>
4470 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4472 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4473 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4476 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4478 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4481 2011-08-29 Thomas Quinot <quinot@adacore.com>
4483 * sem_res.adb: Minor reformatting.
4485 2011-08-29 Johannes Kanig <kanig@adacore.com>
4487 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4489 * gnat1drv.adb (Adjust_Global_Switches): Set
4490 Use_Expressions_With_Actions to False in ALFA mode.
4491 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4494 2011-08-29 Yannick Moy <moy@adacore.com>
4496 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4497 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4498 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4499 tagged types and dispatching calls in Alfa mode.
4501 2011-08-29 Javier Miranda <miranda@adacore.com>
4503 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4504 we do not report an error on an Empty node.
4506 2011-08-29 Geert Bosch <bosch@adacore.com>
4508 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4509 a-nlrear.o and a-nurear.o.
4511 2011-08-29 Robert Dewar <dewar@adacore.com>
4513 * freeze.adb: Minor code reorganization.
4515 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4516 sem_ch6.adb: Minor reformatting
4518 2011-08-29 Tristan Gingold <gingold@adacore.com>
4520 * s-except.ads, s-except.adb: Provide dummy body.
4522 2011-08-29 Yannick Moy <moy@adacore.com>
4524 * sem_warn.adb (Within_Postcondition): Take into account the case of
4525 an Ensures component in a Test_Case.
4527 2011-08-29 Tristan Gingold <gingold@adacore.com>
4529 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4530 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4531 System_Exceptions_Debug
4532 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4533 * a-except.adb: With and use System.Exceptions_Debug instead of
4535 * a-except-2005.adb: Likewise.
4536 * s-assert.adb: Likewise.
4537 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4538 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4539 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4540 s-excdeb. Update dependencies.
4541 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4542 as these no longer need external libraries.
4544 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4546 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4547 exponentiation operator on universal values in a context that requires
4550 2011-08-29 Tristan Gingold <gingold@adacore.com>
4552 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4553 before calling notify_handled_exception.
4554 * a-exextr.adb: Fix comment.
4556 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4558 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4559 Finalize_Address of the access type's finalization master.
4560 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4561 access type's finalization master. Add a guard to prevent
4562 Associated_Storage_Pool from being set on .NET/JVM.
4563 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4564 attribute Finalize_Address of the access type's finalization master.
4565 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4566 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4567 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4569 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4570 use clause for System.IO
4571 (Detach): Relax the assertion, to be reinstated later.
4572 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4573 Relax the assertion on Finalize_Address, to be reinstated later.
4574 (Is_Empty_List): New routine.
4575 (pm): New debug routine.
4576 (Set_Finalize_Address): New routine.
4577 * s-finmas.ads (pm): New debug routine.
4578 (Set_Finalize_Address): New routine.
4579 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4581 2011-08-29 Tristan Gingold <gingold@adacore.com>
4583 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4584 Remove convention C.
4586 2011-08-29 Tristan Gingold <gingold@adacore.com>
4588 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4589 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4590 (Finalize_TCB): Remove its finalization.
4591 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4592 * s-soflin.adb (NT_Exc_Stack): Remove
4593 (Get_Exc_Stack_Addr_NT): Likewise.
4594 (Get_Exc_Stack_Addr_Soft): Likewise.
4595 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4596 (Get_Exc_Stack_Addr): Likewise.
4597 (Get_Exc_Stack_Addr_Soft): Likewise
4598 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4599 (Exc_Stack_Ptr_T): Likewise.
4600 (Private_Data): Remove Exc_Stack_Ptr component.
4602 2011-08-29 Tristan Gingold <gingold@adacore.com>
4604 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4606 2011-08-29 Tristan Gingold <gingold@adacore.com>
4608 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4610 2011-08-29 Geert Bosch <bosch@adacore.com>
4612 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4613 L2_Norm, Swap_Column): New generic subprograms
4614 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4615 L2_Norm, Swap_Column): Implement new subprograms in order to
4616 eliminate dependency on BLAS and LAPACK libraries in
4617 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4618 version. Forward_Eliminate/Back_Substitute can be used to put a
4619 matrix in row echelon or reduced row echelon form using partial
4621 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4622 Swap_Column): Instantiate from System.Generic_Array_Operations.
4623 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4624 (Sqrt): Local function for simple computation of square root without
4625 adding dependencies on Generic_Elementary_Functions.
4626 (Swap): New subprogram to exchange floating point numbers.
4627 (Inverse): Reimplement using Jordan-Gauss elimination.
4628 (Jacobi): New procedure implementing Jacobi's method for computation
4629 of eigensystems, based on Rutishauser's implementation.
4630 (L2_Norm): Implement directly using the inner product.
4631 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4632 decreasing eigenvalue as required by the Ada RM.
4633 (Swap_Column): New helper procedure for Sort_Eigensystem.
4634 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4635 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4638 2011-08-29 Thomas Quinot <quinot@adacore.com>
4640 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4643 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4645 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4646 than the current node.
4647 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4648 Finalization_Master. The list headers have two fields instead of three.
4649 This should fix alignment issue but subpool allocations are now
4650 unusable. Alphabetize subprograms.
4651 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4652 the size of the header when converting the beginning of the object to
4653 a FM_Node. Set the master's Finalize_Address attribute if not already
4655 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4656 header when converting the beginning of the object to a FM_Node.
4658 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4660 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4661 reraise when compiling for CodePeer.
4663 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4665 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4666 now needed by a-convec.adb. Fix warning.
4668 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4670 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4671 processing of TSS routine Finalize_Address when compiling in
4674 2011-08-29 Thomas Quinot <quinot@adacore.com>
4676 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4677 sem_warn.adb: Minor reformatting.
4679 2011-08-29 Emmanuel Briot <briot@adacore.com>
4681 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4682 languages from aggregated projects.
4684 2011-08-29 Yannick Moy <moy@adacore.com>
4686 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4687 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4688 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4689 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4690 for stubs are traversed too when parameter is set
4691 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4692 (Traverse_Declarations_Or_Statements): Do the special traversing for
4693 stubs when required.
4694 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4695 return subprogram or package body from stub.
4696 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4697 stubs without prior subprogram decl.
4699 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4701 * gnat_ugn.texi: Fix typo.
4703 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4705 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4706 which accounts for size vs alignment issues and calculates the size of
4708 (Deallocate_Any_Controlled): Ditto.
4709 (Nearest_Multiple_Rounded_Up): New routine.
4711 2011-08-29 Tristan Gingold <gingold@adacore.com>
4713 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4714 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4715 (Set_Exception_Msg): Ditto.
4716 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4718 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4719 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4720 (Raise_With_Msg): Remove Cleanup_Flag.
4721 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4722 Clean_Flag and Private_Data components.
4724 2011-08-29 Yannick Moy <moy@adacore.com>
4726 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4728 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4729 of an explicitly declared type, so that the base types of the original
4730 type and this generated type are the same, and a "type" (not a subtype
4732 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4733 small" in Alfa mode, like in CodePeer mode.
4734 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4735 clauses in Alfa mode.
4737 2011-08-29 Javier Miranda <miranda@adacore.com>
4739 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4740 function to the package spec.
4741 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4742 internally generated bodies of null procedures locate the internally
4743 generated spec enforcing mode conformance.
4744 (Is_Interface_Conformant): Ensure that the controlling formal of the
4747 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4749 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4750 reject the pragma if it appears to apply to a formal subprogram.
4752 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4754 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4755 inner expression, to prevent double evaluation.
4757 2011-08-29 Tristan Gingold <gingold@adacore.com>
4759 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4761 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4762 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4763 (Raise_Current_Excep): Adjust call.
4764 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4766 2011-08-29 Thomas Quinot <quinot@adacore.com>
4768 * exp_disp.adb: Minor reformatting.
4770 2011-08-29 Tristan Gingold <gingold@adacore.com>
4772 * a-exexpr.adb (Setup_Exception): Removed.
4773 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4774 * a-except.adb (Exception_Propagation): Removed.
4775 * a-except-2005.adb (Setup_Exception): Removed.
4776 (Reraise): Remove call to Setup_Exception.
4777 (Reraise_Occurrence): Ditto.
4778 (Reraise_Occurrence_Always): Ditto.
4779 (Reraise_Occurrence_No_Defer): Ditto.
4780 (Transfer_Occurrence): Ditto.
4781 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4782 (Set_Exception_Msg): Ditto.
4784 2011-08-29 Robert Dewar <dewar@adacore.com>
4786 * a-convec.adb, exp_disp.adb: Minor reformatting.
4788 2011-08-29 Tristan Gingold <gingold@adacore.com>
4790 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4792 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4794 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4795 Exception_Handlers to No_List instead of Empty_List in the case where
4796 there are no handlers.
4798 2011-08-29 Tristan Gingold <gingold@adacore.com>
4800 * gcc-interface/gigi.h (enum standard_datatypes): Add
4801 ADT_reraise_zcx_decl
4802 (reraise_zcx_decl): New macro.
4803 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4804 (gigi): Set reraise_zcx_decl.
4805 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4806 (gnat_to_gnu): Handle N_Raise_Statement.
4808 2011-08-29 Robert Dewar <dewar@adacore.com>
4810 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4811 a-undesu.adb: Minor reformatting.
4813 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4815 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4816 table, accept an unfrozen untagged component if it is an actual for a
4817 formal incomplete type.
4818 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4819 provide new iterator forms over vectors.
4820 Introduce type Iterator in package body to implement operations of
4821 Reversible_Iterator interface.
4822 * a-iteint.ads: Make package pure so it is usable with new container
4823 packages, that are categorized Remote_Types.
4825 2011-08-29 Robert Dewar <dewar@adacore.com>
4827 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4829 2011-08-29 Bob Duff <duff@adacore.com>
4831 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4832 of <>, because this is the routine that checks for dimensionality
4833 errors (for example, for a two-dimensional array, (others => <>) should
4834 be (others => (others => <>)).
4836 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4838 * impunit.adb: Add new run-time units.
4839 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4840 s-stposu.ads, s-stposu.adb: Code clean up.
4841 Handle protected class-wide or task class-wide types
4842 Handle C/C++/CIL/Java types.
4843 * s-spsufi.adb, s-spsufi.ads: New files.
4845 2011-08-29 Yannick Moy <moy@adacore.com>
4847 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4848 library-level subprogram.
4849 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4851 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4853 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4855 * gnat_rm.texi: Update doc for Test_Case pragma.
4857 2011-08-29 Tristan Gingold <gingold@adacore.com>
4859 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4861 (GCC_Exception_Access): New type.
4862 (Unwind_DeleteException): New imported procedure
4863 (Foreign_Exception): Import it.
4864 (GNAT_GCC_Exception): Simply have the occurrence inside.
4865 (To_GCC_Exception): New function.
4866 (To_GNAT_GCC_Exception): New function.
4867 (GNAT_GCC_Exception_Cleanup): New procedure..
4868 (Propagate_GCC_Exception): New procedure.
4869 (Reraise_GCC_Exception): New procedure.
4870 (Setup_Current_Excep): New procedure.
4871 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4872 (Unwind_RaiseException): Ditto.
4873 (Unwind_ForcedUnwind): Ditto.
4875 (Begin_Handler): Change type of parameter.
4876 (End_Handler): Ditto. Now delete the exception if still present.
4877 (Setup_Key): Removed.
4878 (Is_Setup_And_Not_Propagated): Removed.
4879 (Set_Setup_And_Not_Propagated): Ditto.
4880 (Clear_Setup_And_Not_Propagated): Ditto.
4881 (Save_Occurrence_And_Private): Ditto.
4882 (EID_For): Add 'not null' constraint on parameter.
4883 (Setup_Exception): Does nothing.
4884 (Propagate_Exception): Simplified.
4885 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4886 re-raise is not expanded anymore.
4887 * s-except.ads (Foreign_Exception): New exception - placeholder for
4889 * raise-gcc.c (__gnat_setup_current_excep): Declare
4890 (CXX_EXCEPTION_CLASS): Define (not yet used)
4891 (GNAT_EXCEPTION_CLASS): Define.
4892 (is_handled_by): Handle foreign exceptions.
4893 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4895 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4897 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4899 2011-08-29 Thomas Quinot <quinot@adacore.com>
4901 * a-synbar-posix.adb: Minor reformatting.
4903 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4905 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4906 a-exetim-default.ads (Interrupt_Clocks_Supported,
4907 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4908 definitions to be compliant with AI-0171. The target systems do not
4909 support separate account for the execution time of interrupt handlers.
4911 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4913 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4914 in the barrier to put first the easiest to evaluate (and the one which
4915 will be True more often). More efficient.
4917 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4919 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4921 2011-08-29 Bob Duff <duff@adacore.com>
4923 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4924 attributes that are now aspects, as specified by AI05-0229-1.
4925 * sem_ch13.adb (Analyze_Aspect_Specifications,
4926 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4927 pragmas or attribute references, as appropriate.
4929 2011-08-29 Robert Dewar <dewar@adacore.com>
4931 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4932 a-synbar-posix.ads: Minor reformatting.
4934 2011-08-29 Yannick Moy <moy@adacore.com>
4936 * snames.ads-tmpl: Add name Force.
4938 2011-08-29 Pascal Obry <obry@adacore.com>
4940 * prj-nmsc.adb: Minor reformatting.
4942 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4944 * a-exetim.ads (Interrupt_Clocks_Supported,
4945 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4946 definitions to be compliant with AI-0171.
4948 2011-08-29 Robert Dewar <dewar@adacore.com>
4950 * a-ngelfu.adb: Add comments.
4952 2011-08-29 Geert Bosch <bosch@adacore.com>
4954 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4955 the closest machine number to Pi / 2.0.
4957 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4959 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4960 package Ada.Synchronous_Barriers.
4961 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4962 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4963 default implementation using protected objects and another one
4964 a-synbar-posix using POSIX barriers as the underlying support.
4965 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4966 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4967 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4968 Clean up dependencies.
4969 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4971 2011-08-29 Robert Dewar <dewar@adacore.com>
4973 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4974 exp_dist.adb: Minor code reorganization.
4977 2011-08-29 Thomas Quinot <quinot@adacore.com>
4979 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4980 primitive operation must support external streaming if it is not a
4981 controlling access result.
4983 2011-08-29 Thomas Quinot <quinot@adacore.com>
4985 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4987 2011-08-29 Bob Duff <duff@adacore.com>
4989 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4990 restriction on allocators, as required by AI05-0013-1.
4991 * restrict.ads: Minor comment fix.
4993 2011-08-29 Tristan Gingold <gingold@adacore.com>
4995 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4996 (To_Jmpbuf_Address): Ditto
4997 (builtin_longjmp): Ditto
4999 2011-08-29 Thomas Quinot <quinot@adacore.com>
5001 * sem_res.adb: Minor reformatting.
5003 2011-08-29 Vincent Celier <celier@adacore.com>
5005 * make.adb (Gnatmake): Move special processing for VM targets after the
5006 call to Get_Target_Parameters.
5008 2011-08-29 Thomas Quinot <quinot@adacore.com>
5010 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5012 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5014 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5015 where an anonymous access discriminant of a limited designated type
5016 appears in a non-immutably limited discriminated type and issue an
5017 error message. Add local variable Desig_T and replace all occurrences
5020 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5022 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5023 implementation is compliant to RM D.15(15/2) after the modification
5024 imposed by AI05-0094-1 (binding interpretation).
5026 2011-08-29 Robert Dewar <dewar@adacore.com>
5028 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5029 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5031 2011-08-29 Thomas Quinot <quinot@adacore.com>
5033 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5034 the scope name, do not report a missing label as a style violation (it
5035 will be diagnosed as an illegality).
5036 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5037 variant records: Get_Enum_Lit_From_Pos already returns a usage
5038 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5039 on Expr in Integer_Literal case so that it can be used by
5042 2011-08-29 Tristan Gingold <gingold@adacore.com>
5044 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5046 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5047 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5049 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5050 Build_Abort_Block_Handler to build the exception handler. Do not
5051 undefer aborts for the Abort_Signal exception handler if back-end
5052 exception mechanism.
5053 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5054 back_end exceptions for all others and abort_signal.
5055 * s-except.ads (ZCX_By_Default): New constant.
5056 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5057 (Raise_Exception_Always): Ditto.
5058 (Raise_From_Signal_Handler): Ditto.
5059 (Raise_With_Location_And_Msg): Ditto.
5060 (Raise_With_Msg): Ditto.
5062 (Reraise_Occurence): Ditto.
5063 (Reraise_Occurrence_Always): Ditto.
5064 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5065 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5067 2011-08-29 Thomas Quinot <quinot@adacore.com>
5069 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5071 2011-08-29 Robert Dewar <dewar@adacore.com>
5073 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5074 Minor code reorganization.
5076 2011-08-29 Bob Duff <duff@adacore.com>
5078 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5079 2012, not just Ada 2005.
5081 2011-08-29 Vincent Celier <celier@adacore.com>
5083 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5084 with a project file or with gprbuid, if -gnatep= is specified, the
5085 builder may need to be invoked with -x.
5087 2011-08-29 Tristan Gingold <gingold@adacore.com>
5089 * a-exexpr-gcc.adb: Minor comment fix.
5091 2011-08-29 Robert Dewar <dewar@adacore.com>
5093 * sem_ch8.adb: Minor reformatting.
5095 2011-08-29 Bob Duff <duff@adacore.com>
5097 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5098 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5099 treating "some" as unreserved in earlier Ada versions. This is now
5100 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5101 rather than Name_Some, since Tok_Some is now recognized as reserved.
5102 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5104 * scans.ads: Minor comment fixes.
5105 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5106 for other language versions.
5107 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5108 treating "some" as unreserved in earlier Ada versions. This is now
5109 handled in Snames.Is_Keyword_Name.
5110 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5112 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5113 unreserved in earlier Ada versions. This is now handled in
5114 Snames.Is_Keyword_Name.
5115 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5116 words as for other language versions.
5117 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5118 Ada 2012, not just Ada 2005.
5120 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5122 * sem_ch13.adb: Additional semantic checks for aspects involved in
5125 2011-08-29 Matthew Heaney <heaney@adacore.com>
5127 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5128 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5129 Container parameter.
5130 (Ancestor_Find): ditto.
5132 2011-08-29 Thomas Quinot <quinot@adacore.com>
5134 * par-endh.adb: Minor reformatting.
5136 2011-08-29 Tristan Gingold <gingold@adacore.com>
5138 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5139 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5140 (Adjust_N_CLeanups_For): Remove.
5141 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5143 (Propgate_Exception): Adjust.
5144 * raise-gcc.c: Add a few static/const.
5145 (Adjust_N_Cleanups_For): Remove declaration.
5146 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5148 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5150 * sem_ch8.adb: Use type of function return when rewriting as object
5153 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5155 * sem_type.adb: Minor reformatting.
5157 2011-08-29 Robert Dewar <dewar@adacore.com>
5159 * makeutl.adb: Minor reformatting.
5161 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5163 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5164 function call of a limited type, the expansion of the renaming is
5165 complicated by the presence of various temporaries and subtypes that
5166 capture constraints of the renamed object.
5167 Rewrite node as an object declaration, whose expansion is simpler.
5168 Given that the object is limited there is no copy involved and no
5171 2011-08-29 Robert Dewar <dewar@adacore.com>
5173 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5174 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5176 2011-08-29 Tristan Gingold <gingold@adacore.com>
5178 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5179 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5180 system-linux-hppa.ads, system-linux-s390.ads,
5181 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5182 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5183 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5184 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5185 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5186 system-solaris-sparc.ads, system-lynxos-x86.ads,
5187 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5188 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5189 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5190 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5191 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5192 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5193 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5194 * opt.ads: Adjust comment.
5195 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5196 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5197 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5199 2011-08-29 Emmanuel Briot <briot@adacore.com>
5201 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5202 file name is specified on the gnatmake or gprbuild command line, and
5203 before we search for that file in the project.
5205 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5207 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5208 used to determine whether a possible interpretation for an overloadable
5209 entity is declared within the current instantiation and should be
5210 included in the candidate set.
5212 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5214 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5216 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5218 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5219 access subtype is access_to_subprogram, when applying checks for
5222 2011-08-29 Matthew Heaney <heaney@adacore.com>
5224 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5225 for sibling when common parent.
5227 2011-08-29 Thomas Quinot <quinot@adacore.com>
5229 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5232 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5234 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5235 for the return type when in ASIS mode.
5237 2011-08-29 Vincent Celier <celier@adacore.com>
5239 * make.adb (Gnatmake): Get the default search dirs, then the target
5240 parameters after getting the Builder switches, as the Builder switches
5241 may include --RTS= and that could change the default search dirs.
5243 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5245 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5246 Make_Final_Call. Move the processing for class-wide types before the
5247 processing for derivations from [Limited_]Controlled.
5248 (Make_Final_Call): Move the processing for class-wide types before the
5249 processing for derivations from [Limited_]Controlled.
5250 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5251 Add code to account for alignments larger than the list header. Add a
5252 comment illustrating the structure of the allocated object + padding +
5254 (Deallocate_Any_Controlled): Add code to account for alignments larger
5255 than the list header.
5257 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5259 * sinfo.ads, sinfo.adb: New node kind
5260 N_Formal_Incomplete_Type_Definition, related flags.
5261 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5262 Parse formal incomplete types.
5263 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5265 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5266 Formal incomplete types do not need completion.
5267 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5268 Validate_Incomplete_Type_Instance): New procedures to handle formal
5270 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5271 that corresponds to a formal incomplete type.
5272 * sprint.adb: Handle formal incomplete type declarations.
5273 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5276 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5278 * a-fihema.ads, a-fihema.adb: Unit removed.
5279 * a-undesu.ads, a-undesu.adb: New unit implementing
5280 Ada.Unchecked_Deallocate_Subpool.
5281 * einfo.adb: Remove Associated_Collection from the node usage.
5282 Add Finalization_Master to the node usage.
5283 (Associated_Collection): Removed.
5284 (Finalization_Master): New routine.
5285 (Set_Associated_Collection): Removed.
5286 (Set_Finalization_Master): New routine.
5287 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5288 Finalization_Master to the output.
5289 * einfo.ads: Remove attribute Associated_Collection and its uses in
5291 Add new attribute Finalization_Master along with its uses in entitites.
5292 (Associated_Collection): Removed along with its pragma import.
5293 (Finalization_Master): New routine along with a pragma import.
5294 (Set_Associated_Collection): Removed along with its pragma import.
5295 (Set_Finalization_Master): New routine along with a pragma import.
5296 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5297 Build_Finalization_Collection with Build_Finalization_Master.
5298 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5299 before the bodies of the predefined routines. Add comment explaining
5300 this. Replace call to Build_Finalization_Collection with
5301 Build_Finalization_Master.
5302 (Freeze_Type): Replace call to Build_Finalization_Collection with
5303 Build_Finalization_Master.
5304 (Make_Finalize_Address_Body): Comment reformatting.
5305 (Make_Predefined_Primitive_Specs): Code reformatting.
5306 (Stream_Operation_OK): Update comment mentioning finalization
5307 collections. Replace RE_Finalization_Collection with
5308 RE_Finalization_Master.
5309 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5310 Associated_Collection with Finalization_Master. Replace call to
5311 Build_Finalization_Collection with Build_Finalization_Master.
5312 (Expand_Allocator_Expression): Replace call to Associated_Collection
5313 with Finalization_Master. Replace call to Set_Associated_Collection with
5314 Set_Finalization_Master. Remove the generation of
5315 Set_Finalize_Address_Ptr.
5316 (Expand_N_Allocator): Replace call to Associated_Collection with
5317 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5318 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5319 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5320 comment on usage. Replace call to Needs_BIP_Collection with
5321 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5322 BIP_Finalization_Master. Update all comments which mention finalization
5323 collections. Replace Associated_Collection with
5324 Finalization_Master. Replace Build_Finalization_Collection with
5325 Build_Finalization_Master.
5326 (BIP_Formal_Suffix): Update BIP_Collection's case.
5327 (Build_Heap_Allocator): Update the related comment. Rename local
5328 variable Collect to Fin_Mas_Id and update its occurrences. Update
5329 comments which mention finalization collections. Replace
5330 Set_Associated_Collection with Set_Finalization_Master.
5331 (Expand_Call): Update the code which detects a special piece of library
5333 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5334 Add_Collection_Actual_To_Build_In_Place_Call with
5335 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5336 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5337 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5338 Add_Collection_Actual_To_Build_In_Place_Call with
5339 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5340 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5341 Add_Collection_Actual_To_Build_In_Place_Call with
5342 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5343 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5344 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5345 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5346 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5347 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5348 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5349 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5350 Replace the call to Associated_Collection with Finalization_Master.
5351 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5352 Update the way finalization master names are generated. Update the
5353 retrieval of the correct access type which will carry the pool and
5355 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5356 (Make_Finalize_Address_Body): Abstract types do not need
5357 Finalize_Address. Code reformatting.
5358 (Make_Finalize_Address_Stmts): Update comment on usage.
5359 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5360 (Process_Declarations): Update comments.
5361 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5362 Build_Finalization_Master. Update associated comment.
5363 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5364 * exp_ch13.adb: Update comments which mention finalization collections.
5365 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5366 with Finalization_Master.
5367 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5368 create calls to routines Allocate_Any_Controlled and
5369 Deallocate_Any_Controlled.
5370 (Find_Finalize_Address): New routine.
5371 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5373 (Requires_Cleanup_Actions): Update the comment on freeze node
5375 * exp_util.ads: Remove comment on generated code for
5376 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5377 is better to simply look in the body.
5378 * freeze.adb (Freeze_All): Update the comment of finalization
5379 collections. Replace the call to Associated_Collection with
5380 Finalization_Master. Replace the call to Build_Finalization_Collection
5381 with Build_Finalization_Master.
5382 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5383 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5385 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5386 Ada.Finalization. Add processing for children of System.Storage_Pools.
5387 * rtsfind.ads: Remove the naming of second level children of
5389 Remove Ada_Finalization_Heap_Management from the list of units.
5390 Remove subtype Ada_Finalization_Child.
5391 Remove the following subprogram entities:
5395 RE_Finalization_Collection
5396 RE_Finalization_Collection_Ptr
5397 RE_Set_Finalize_Address_Ptr
5399 Add the naming of second level children of System.Storage_Pools.
5400 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5402 Add subtype System_Storage_Pools_Child.
5403 Add the following subprogram entities to System.Finalization_Masters:
5405 RE_Finalization_Master
5406 RE_Finalization_Master_Ptr
5408 Add the following subprogram entities to System.Storage_Pools.Subpools:
5410 RE_Allocate_Any_Controlled
5411 RE_Deallocate_Any_Controlled
5412 RE_Root_Storage_Pool_With_Subpools
5416 Move the following subprogram entities from
5417 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5419 RE_Add_Offset_To_Address
5424 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5425 Set_Associated_Collection with Set_Finalization_Master.
5426 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5427 BIP_Finalization_Master is created.
5428 * s-finmas.adb: New unit System.Finalization_Masters.
5429 * s-finmas.ads: New unit System.Finalization_Masters.
5430 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5431 * s-stposu.ads, s-stposu.adb: New unit implementing
5432 System.Storage_Pools.Subpools.
5434 2011-08-29 Bob Duff <duff@adacore.com>
5436 * tbuild.adb: Add assertion.
5438 2011-08-29 Thomas Quinot <quinot@adacore.com>
5440 * s-pooglo.adb: Minor reformatting.
5442 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5444 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5445 an indexed component of a packed array whose element type is a record
5446 with a representation clause different from that of the right-hand
5447 side, generate a temporary to minimuze the number of bit-field
5448 operations generated.
5450 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5452 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5453 declarations, and thus are likely insertion points for actions.
5455 2011-08-29 Bob Duff <duff@adacore.com>
5457 * einfo.ads: Minor comment fix.
5459 2011-08-29 Robert Dewar <dewar@adacore.com>
5461 * frontend.adb, gnat1drv.adb: Minor reformatting.
5463 2011-08-29 Tristan Gingold <gingold@adacore.com>
5465 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5466 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5467 space in front of the header.
5469 2011-08-29 Johannes Kanig <kanig@adacore.com>
5471 * frontend.adb (Frontend): Exit after creating Standard package when
5472 -gnatd.H is present.
5473 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5476 2011-08-29 Robert Dewar <dewar@adacore.com>
5478 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5479 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5480 snames.ads-tmpl: Minor reformatting.
5482 2011-08-29 Philippe Gil <gil@adacore.com>
5484 * prj.adb (Reset_Units_In_Table): New procedure.
5485 Reset units to avoid access to freed memory.
5487 2011-08-29 Thomas Quinot <quinot@adacore.com>
5489 * get_scos.adb: When reading a P statement SCO without a pragma name
5490 (from an older ALI file), ensure that the Pragma_Name component is set
5491 to Unknown_Pragma (not left uninitialized).
5493 2011-08-29 Vincent Celier <celier@adacore.com>
5495 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5496 modified to compute correctly the object path of a SAL project that is
5497 extending another library project.
5498 (Write_Path_File): New procedure.
5499 * makeutl.ads (Directories): New table moved from Buildgpr
5500 (Get_Directories): New procedure moved from Buildgpr
5501 (Write_Path_File): New procedure
5502 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5503 paths before binding SALs, instead of Set_Ada_Paths.
5504 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5506 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5507 (Current_Source_Path_File_Of): New function
5508 (Set_Current_Object_Path_File_Of): New procedure
5509 (Current_Source_Object_File_Of): New function
5510 (Set_Current_Object_Path_File_Of): New procedure
5511 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5512 (Current_Source_Path_File_Of): New function
5513 (Set_Current_Object_Path_File_Of): New procedure
5514 (Current_Source_Object_File_Of): New function
5515 (Set_Current_Object_Path_File_Of): New procedure
5517 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5519 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5520 packed entity, use a bit-field assignment only if there is no change of
5523 2011-08-29 Thomas Quinot <quinot@adacore.com>
5525 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5526 Is_RTU instead of using Chars comparisons.
5528 2011-08-29 Thomas Quinot <quinot@adacore.com>
5530 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5531 temporary object if the actual is constrained, and the discriminants
5532 read from the stream don't match.
5534 2011-08-29 Tristan Gingold <gingold@adacore.com>
5536 * sem_attr.adb, exp_attr.adb: Add handling of
5537 Attribute_System_Allocator_Alignment
5538 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5539 Attribute_System_Allocator_Alignment.
5540 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5541 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5542 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5543 get_target_system_allocator_alignment.
5545 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5547 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5550 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5552 * exp_ch3.adb (In_Runtime): Fix typo.
5554 2011-08-29 Bob Duff <duff@adacore.com>
5556 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5558 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5560 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5561 and a separate tag assignment is generated, ensure that the tag
5562 assignment is analyzed.
5564 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5566 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5567 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5568 of statement lists that may contain local declarations.
5569 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5570 duplicate the triggering statements needed for the expansion of this
5571 construct, when the trigger is a dispatching call to a synchronized
5574 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5576 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5577 * bindgen.adb: Add comments.
5578 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5581 2011-08-29 Robert Dewar <dewar@adacore.com>
5583 * exp_attr.adb: Minor reformatting.
5584 Minor code reorganization and commenting.
5585 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5588 2011-08-29 Thomas Quinot <quinot@adacore.com>
5590 * get_scos.adb: Ignore chaining indicators not currently supported
5593 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5595 * system.ads: Minor editing.
5597 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5599 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5601 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5602 Attribute_Elab_Subp_Body.
5603 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5604 * sem_util.adb: Update comments.
5606 2011-08-29 Thomas Quinot <quinot@adacore.com>
5608 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5609 pragma name for each SCO statement corresponding to a pragma.
5611 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5613 * opt.ads: Minor editing.
5615 2011-08-29 Yannick Moy <moy@adacore.com>
5617 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5618 that only made sense for CodePeer mode.
5620 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5622 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5623 which is no longer used.
5624 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5625 handling of the 64-bit division check.
5626 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5628 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5631 2011-08-29 Thomas Quinot <quinot@adacore.com>
5633 * get_scos.adb: Minor reformatting.
5635 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5637 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5638 statement list is wrapped in a block, the block is explicitly analyzed
5639 in order to properly redecorate the entities and create a servicing
5642 2011-08-29 Tristan Gingold <gingold@adacore.com>
5644 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5645 (Set_Zero_Cost_Handling): Remove.
5647 2011-08-29 Thomas Quinot <quinot@adacore.com>
5649 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5651 2011-08-29 Geert Bosch <bosch@adacore.com>
5653 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5654 instruction, as the latter may produce -0.0, which is not a valid VAX
5656 (Neg_G): Likewise for VAX F float.
5658 2011-08-29 Robert Dewar <dewar@adacore.com>
5660 * exp_util.adb: Minor reformatting.
5662 2011-08-29 Yannick Moy <moy@adacore.com>
5664 * sem_ch3.adb: Minor comment update.
5666 2011-08-29 Thomas Quinot <quinot@adacore.com>
5668 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5671 2011-08-29 Thomas Quinot <quinot@adacore.com>
5673 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5674 current statement sequence on a generic instantiation or a subprogram
5677 2011-08-29 Robert Dewar <dewar@adacore.com>
5679 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5682 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5684 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5685 Correct the check which involves the freeze node of a controlled or
5686 access-to-controlled type.
5688 2011-08-29 Geert Bosch <bosch@adacore.com>
5690 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5692 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5695 2011-08-29 Yannick Moy <moy@adacore.com>
5697 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5698 for every index type and component type that is not a subtype_mark.
5699 (Process_Subtype): Set Etype of subtype.
5701 2011-08-29 Robert Dewar <dewar@adacore.com>
5703 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5704 reorganization. Minor reformatting.
5706 2011-08-29 Steve Baird <baird@adacore.com>
5708 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5709 for CodePeer and ALFA modes.
5711 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5713 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5714 that comes from an enclosing scope if it is not the renaming of an
5715 actual, to handle properly a spurious ambiguity in an instance.
5717 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5719 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5720 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5721 use it instead of the Esize of the first parameter.
5722 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5724 <Size>: Likewise. Call it for composite types on the RM size.
5726 2011-08-29 Yannick Moy <moy@adacore.com>
5728 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5729 * sem_util.adb (Unique_Name): Correct behaviour for names of
5732 2011-08-29 Yannick Moy <moy@adacore.com>
5734 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5735 verification mode, analyze pragma expression for correctness, for
5736 pre/post on library-level subprogram, as it is not expanded later.
5738 2011-08-29 Yannick Moy <moy@adacore.com>
5740 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5741 in formal verification.
5743 2011-08-29 Thomas Quinot <quinot@adacore.com>
5745 * sem_util.adb: Minor reformatting.
5746 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5748 * par_sco.ads, par_sco.adb: Update comments.
5750 2011-08-29 Yannick Moy <moy@adacore.com>
5752 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5753 associated getter/setter.
5754 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5756 2011-08-29 Vincent Celier <celier@adacore.com>
5758 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5759 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5760 with declarations for Language_Kind and Dependency_Kind for Ada.
5761 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5762 (Process_Compiler): Take into account the new attributes Dependency_Kind
5764 (Check_Configuration): Check if language kind is unit based, not if the
5765 language name is Ada.
5766 (Process_Exceptions_Unit_Based): Ditto
5767 (Add_Language): Remove default additions of language and dependency kind
5768 * prj.ads: Minor comment change
5769 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5771 2011-08-29 Johannes Kanig <kanig@adacore.com>
5773 * debug.adb: Update comments.
5775 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5777 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5778 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5779 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5780 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5781 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5783 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5785 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5786 (GNATLIBCFLAGS_FOR_C): Replace
5787 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5788 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5789 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5790 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5792 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5794 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5796 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5798 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5800 2011-08-05 Nicolas Roche <roche@adacore.com>
5802 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5803 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5805 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5807 2011-08-05 Matthew Heaney <heaney@adacore.com>
5809 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5810 subprogram bodies declared out-of-order.
5812 2011-08-05 Yannick Moy <moy@adacore.com>
5814 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5815 entities directly in package Standard, otherwise skip the standard
5818 2011-08-05 Robert Dewar <dewar@adacore.com>
5820 * a-cbmutr.adb: Minor reformatting
5821 (Allocate_Node): refactor node allocation algorithm
5823 2011-08-05 Robert Dewar <dewar@adacore.com>
5825 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5826 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5828 (Analyze_Pragma, case Check_Policy): Ditto.
5829 * sem_prag.ads (Check_Disabled): New function
5830 * snames.ads-tmpl: Add Name_Disable.
5832 2011-08-05 Robert Dewar <dewar@adacore.com>
5834 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5835 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5837 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5839 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5840 that appears in a generic formal part and applies to a formal
5843 2011-08-05 Robert Dewar <dewar@adacore.com>
5845 * a-cbmutr.ads: Minor reformatting.
5847 2011-08-05 Matthew Heaney <heaney@adacore.com>
5849 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5850 to check count, check sign of value instead.
5851 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5852 (Copy_Subtree): allocate copy of source element
5853 (Equal_Subtree): compare elements, not access objects
5855 2011-08-05 Vincent Celier <celier@adacore.com>
5857 * gnat_ugn.texi: Fix VMS alternative.
5859 2011-08-05 Thomas Quinot <quinot@adacore.com>
5861 * sem_ch11.adb: Add comment.
5863 2011-08-05 Robert Dewar <dewar@adacore.com>
5865 * exp_util.adb: Minor comment fix.
5867 2011-08-05 Robert Dewar <dewar@adacore.com>
5869 * scng.adb (Error_Unterminated_String): Improve flag position when
5872 2011-08-05 Matthew Heaney <heaney@adacore.com>
5874 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5876 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5877 multiway tree containers.
5879 2011-08-05 Robert Dewar <dewar@adacore.com>
5881 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5882 * stylesw.adb: Implement -gnatyC to control comment spacing
5883 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5885 * usage.adb: Add line for -gnatyC.
5887 2011-08-05 Robert Dewar <dewar@adacore.com>
5889 * gnat_ugn.texi: Document -gnatyC.
5890 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5891 synonym for COMMENTS2).
5893 2011-08-05 Robert Dewar <dewar@adacore.com>
5895 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5896 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5897 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5898 a-comutr.ads, lib-xref.adb: Minor reformatting.
5900 2011-08-05 Robert Dewar <dewar@adacore.com>
5902 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5903 warning if there is an exception handler present.
5905 2011-08-05 Pascal Obry <obry@adacore.com>
5907 * a-iteint.ads: Fix copyright year.
5909 2011-08-05 Thomas Quinot <quinot@adacore.com>
5911 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5912 statement SCO for a USE clause or a representation clause.
5914 2011-08-05 Yannick Moy <moy@adacore.com>
5916 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5917 between body and spec for stub.
5918 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5919 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5920 pragma precondition or postcondition, for which the enclosing
5921 subprogram or package in the AST is not the desired one, return empty.
5923 2011-08-05 Thomas Quinot <quinot@adacore.com>
5925 * g-expect.adb: Minor reformatting.
5927 2011-08-05 Bob Duff <duff@adacore.com>
5929 * a-fihema.adb: Comment out OS_Lib.
5931 2011-08-05 Matthew Heaney <heaney@adacore.com>
5933 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5934 (unbounded multiway tree containers) and a-iteint.ads.
5935 * a-comutr.ads, a-comutr.adb:
5936 This is the new Ada 2012 unit for unbounded multiway tree containers
5937 * a-cimutr.ads, a-cimutr.adb
5938 This is the new Ada 2012 unit for indefinite multiway tree containers
5939 * a-iteint.ads: New file.
5941 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5943 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5945 2011-08-05 Bob Duff <duff@adacore.com>
5947 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5949 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5951 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5953 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5954 general indexing aspects of Ada2012. Called when analyzing indexed
5955 components when other interpretations fail.
5956 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5957 in an expression context where overloading is meaningful. This excludes
5958 the occurrence in an aspect specification (efficiency only).
5959 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5960 related to iterators can be set by an attribute specification, but
5962 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5963 Constant_Indexing and Variable_Indexing.
5964 (Check_Indexing_Functions): New procedure to perform legality checks.
5965 Additional semantic checks at end of declarations.
5967 2011-08-05 Sergey Rybin <rybin@adacore.com>
5969 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5970 order of calling Tree_Write/Tree_Read routines made for aspects.
5972 2011-08-05 Bob Duff <duff@adacore.com>
5974 * a-fihema.adb (Finalize): Fix race condition.
5976 2011-08-05 Yannick Moy <moy@adacore.com>
5978 * sem_ch12.adb (Analyze_Package_Instantiation,
5979 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5982 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5984 * sem_type.adb (Specific_Type): in an instance, the type-specific
5985 operand of an equality check that involves null may have a private
5986 type. Use full view to determine legality of construct.
5988 2011-08-05 Vincent Celier <celier@adacore.com>
5990 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5991 delete or close the file when the call to gnatmake was successful.
5993 2011-08-05 Yannick Moy <moy@adacore.com>
5995 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5996 Global_Discard_Names.
5998 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6000 * sinfo.ads: comments on use of entity field for aspect specifications.
6002 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6004 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6005 node is not itself an entity but a selected component, it is a
6006 rewritten parameterless call to an en enclosing synchronized operation,
6007 and this expansion will be performed again in the instance, so there is
6008 no global information to preserve.
6010 2011-08-05 Javier Miranda <miranda@adacore.com>
6012 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6013 for renamings of predefined primitives.
6014 (In_Predef_Prims_DT): New subprogram.
6016 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6018 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6019 possible interpretation of name is a reference type, add an
6020 interpretation that is the designated type of the reference
6021 discriminant of that type.
6022 * sem_res.adb (resolve): If the interpretation imposed by context is an
6023 implicit dereference, rewrite the node as the deference of the
6024 reference discriminant.
6025 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6026 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6027 parent type or base type.
6028 * sem_ch4.adb (Process_Indexed_Component,
6029 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6030 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6031 Check for implicit dereference.
6032 (List_Operand_Interps): Indicate when an implicit dereference is
6034 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6036 2011-08-05 Thomas Quinot <quinot@adacore.com>
6038 * scos.ads: Update documentation of SCO table. Pragma statements can now
6039 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6040 * par_sco.ads, par_sco.adb: Implement the above change.
6041 (Process_Decisions_Defer): Generate a P decision for the first parameter
6042 of a dyadic pragma Debug.
6043 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6045 * put_scos.adb: Code simplification based on above change.
6047 2011-08-05 Robert Dewar <dewar@adacore.com>
6049 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6050 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6051 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6052 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6054 2011-08-05 Bob Duff <duff@adacore.com>
6056 * a-stunau.ads, g-spipat.adb: Update comments.
6058 2011-08-05 Bob Duff <duff@adacore.com>
6060 * a-fihema.ads: Minor comment fix.
6061 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6063 (Attach, Detach): Remove some unnecessary code.
6064 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6066 2011-08-05 Bob Duff <duff@adacore.com>
6068 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6069 allocation for Objects component. This simplifies the code somewhat. It
6070 is also a little more efficient in the not-so-unusual case where there
6071 are no controlled objects allocated.
6072 Make Finalization_Started flag atomic.
6073 (Finalize): Avoid unnecessary detachment of items from the list.
6074 (pcol): Minor cleanup.
6076 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6078 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6079 package whose name is the same as that of the generic unit, or its
6082 2011-08-05 Bob Duff <duff@adacore.com>
6084 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6085 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6086 Minor comment fixes.
6088 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6090 * make.adb (Linking_Phase): No longer need to set source search path
6091 before calling gnatlink in CodePeer mode.
6092 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6093 gcc in CodePeer mode, since the binder generated file no longer has a
6095 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6096 * switch-c.adb: Update comment.
6098 2011-08-05 Thomas Quinot <quinot@adacore.com>
6100 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6102 2011-08-05 Nicolas Roche <roche@adacore.com>
6104 * gnat_ugn.texi: Fix minor syntax error issue.
6106 2011-08-05 Vincent Celier <celier@adacore.com>
6108 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6109 delete or close the file when the call to gnatmake returns a non
6110 successful return code.
6112 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6114 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6115 check, indicate that the copy of the original node does not come from
6116 source, to prevent an infinite recursion of the expansion.
6118 2011-08-05 Johannes Kanig <kanig@adacore.com>
6120 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6121 VC generation for subprogram bodies.
6123 2011-08-05 Yannick Moy <moy@adacore.com>
6126 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6127 the base type with the smallest allowed base type.
6129 2011-08-05 Sergey Rybin <rybin@adacore.com>
6131 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6134 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6136 * sem_ch12.ads: minor comment updates.
6138 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6140 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6141 instantiation and a formal package the compiler generates a package
6142 renaming declaration so that the generic name within the declaration
6143 is interpreted as a renaming of the instance. At the end of a formal
6144 package declaration, this renaming must become invisible.
6146 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6148 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6149 comparison and rely on concrete entities instead.
6151 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6153 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6154 and discriminants, to indicate that the type has an access discriminant
6155 that supports implicit dereference.
6156 * snames.ads-tmpl: Add names of aspects and attributes related to
6157 Ada2012 iterators: constant_indexing, default_iterator,
6158 iterator_element, implicit_dereference, variable_indexing.
6159 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6160 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6161 iterator-related aspects.
6162 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6164 2011-08-05 Sergey Rybin <rybin@adacore.com>
6166 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6167 metrics in gnatmetric to cover new kinds of coupling mentrics.
6169 2011-08-05 Steve Baird <baird@adacore.com>
6171 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6172 of calling the user-defined main subprogram.
6173 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6174 is set) Call_Main_Subprogram ahead of, as opposed to
6176 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6177 generation of a "with" of the user-defined main subprogram.
6178 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6179 (which is now called from Gen_Main instead).
6181 2011-08-05 Emmanuel Briot <briot@adacore.com>
6183 * projects.texi: Added reference to the Makefile package.
6185 2011-08-05 Thomas Quinot <quinot@adacore.com>
6187 * exp_ch7.adb: Minor comment rewording.
6189 2011-08-05 Ed Falis <falis@adacore.com>
6191 * env.c: Fix comment.
6193 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6195 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6196 character comparison and rely on concrete entities instead.
6198 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6200 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6201 suggested by AI95-0068.
6203 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6205 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6206 the two potential initialization calls. This accounts for any
6207 access-before-elaboration checks which may precede the initialization
6209 (Next_Suitable_Statement): New routine. Returns the next real statement
6210 after the input node while skipping generated checks.
6211 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6212 with comment on usage.
6213 Do not generate Elaborate_All when the trigger is a finalization call
6214 coming from a type init proc.
6215 (Check_Elab_Call): Propagate the initialization procedure context to
6216 subsequent calls to Check_A_Call.
6217 (Check_Internal_Call_Continue): Propagate the initialization procedure
6218 context to subsequent calls to Check_Elab_Call.
6219 (Is_Finalization_Procedure): New routine. Returns True if the input
6220 entity denotes a [Deep_]Finalize routine.
6221 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6222 along with comment on usage.
6224 2011-08-05 Vadim Godunko <godunko@adacore.com>
6226 * s-atocou.ads: Add list of supported platforms.
6228 2011-08-05 Yannick Moy <moy@adacore.com>
6230 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6232 * opt.ads (Disable_ALI_File): new Boolean flag
6233 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6235 2011-08-05 Ed Falis <falis@adacore.com>
6237 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6238 environ is properly defined.
6240 2011-08-05 Vincent Celier <celier@adacore.com>
6242 * make.adb (Compilation_Phase): Exit immediately when all objects have
6243 been found up to date, to avoid multiple exit messages.
6244 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6245 same project for languages with no compiler.
6246 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6248 2011-08-05 Robert Dewar <dewar@adacore.com>
6250 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6251 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6252 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6253 s-atocou-builtin.adb: Minor reformatting.
6255 2011-08-05 Yannick Moy <moy@adacore.com>
6257 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6258 if the node to wrap is a pragma check, this node and enclosed
6259 expression are not expanded, so do not apply any transformations here.
6260 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6261 introducing transient scopes.
6263 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6265 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6266 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6267 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6268 routine is available, so we use the default implementation of these
6270 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6271 support for copying attributes on VxWorks 6.
6273 2011-08-05 Yannick Moy <moy@adacore.com>
6275 * debug.adb: Remove use of -gnatd.D.
6276 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6277 * opt.ads: Simplify variables for ALFA mode, to keep one only
6278 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6281 2011-08-05 Vincent Celier <celier@adacore.com>
6283 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6284 Builder'Default_Switches.
6286 2011-08-05 Vincent Celier <celier@adacore.com>
6288 * makeusg.adb: Add lines for --create-map-file switches.
6290 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6292 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6293 profile is incomplete and the full view is available, replace it with
6295 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6296 incomplete, freezing the subprogram is delayed until the full view is
6298 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6299 fixed-point multiplication operator and the predefined operator is
6300 resolved in favor of the user-defined one.
6302 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6304 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6307 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6309 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6310 whether a type lacks user-defined Read or Write operations, or has a
6311 component that lacks them.
6312 * sem_attr.adb (Check_Stream_Attribute): if restriction
6313 No_Default_Stream_Attributes is active, verify that all subcomponent
6314 types of the target have user-defined stream operations, and report
6316 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6317 * exp_strm.adb: Build_Elementary_Input_Call,
6318 Build_Elementary_Write_Call): remove checks for restriction
6319 No_Default_Stream_Attributes, now checked in semantics.
6321 2011-08-04 Vincent Celier <celier@adacore.com>
6323 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6324 switches on the command line, look for all valid --RTS switches in the
6325 Builder switches and for each language use the first runtime name found
6326 to invoke gprconfig.
6327 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6328 command line and there is no auto-configuration.
6329 (Runtime_Name_Set_For): New function.
6331 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6333 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6334 elaborate initialization expression for variable Abort when processing
6335 a package body or a declaration.
6336 (Create_Finalizer): Propagate the package context when creating the
6337 exception-related variables.
6338 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6339 For_Package along with usage comment.
6341 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6343 * gcc-interface/Makefile.in: Clean up targets.
6344 Enable new package for atomic counters and copy-on-write implementation
6345 of unbounded strings on x86 platforms.
6346 * gcc-interface/Make-lang.in: Update dependencies.
6348 2011-08-04 Robert Dewar <dewar@adacore.com>
6350 * exp_ch7.adb: Minor reformatting.
6352 2011-08-04 Robert Dewar <dewar@adacore.com>
6354 * exp_strm.adb: Minor reformatting.
6356 2011-08-04 Vadim Godunko <godunko@adacore.com>
6358 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6359 operations are not supported.
6360 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6361 * s-atocou-x86.adb: New file.
6362 * Makefile.rtl: Add s-atocou.o file
6364 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6366 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6367 (Compilation_Phase): ... here.
6368 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6370 2011-08-04 Thomas Quinot <quinot@adacore.com>
6372 * Make-generated.in: Fix minor typo in comment.
6374 2011-08-04 Thomas Quinot <quinot@adacore.com>
6376 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6379 2011-08-04 Robert Dewar <dewar@adacore.com>
6381 * a-coinho.adb: Minor reformatting.
6383 2011-08-04 Robert Dewar <dewar@adacore.com>
6385 * a-coinho.ads: Minor reformatting.
6387 2011-08-04 Vadim Godunko <godunko@adacore.com>
6389 * s-atocou.ads, s-atocou.adb: New files.
6390 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6391 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6392 direct use of GCC's atomic builtins and replace them by use of new
6393 atomic counter package.
6395 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6397 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6399 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6401 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6402 with a call to Get_External_Tag.
6403 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6404 subprogram usage. Remove the guard against package declarations and
6405 bodies since Build_Cleanup_Statements is no longer invoked in that
6407 (Build_Components): Initialize Tagged_Type_Stmts when the context
6408 contains at least one library-level tagged type.
6409 (Build_Finalizer): New local variables Has_Tagged_Types and
6410 Tagged_Type_Stmts along with associated comments on usage. Update the
6411 logic to include tagged type processing.
6412 (Create_Finalizer): Insert all library-level tagged type unregistration
6413 code before the jump block circuitry.
6414 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6415 (Expand_N_Package_Declaration): Remove the call to
6416 Build_Cleanup_Statements.
6417 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6418 unregister the external tag of a tagged type.
6419 (Processing_Actions): Reimplemented to handle tagged types.
6420 (Process_Declarations): Detect the declaration of a library-level
6421 tagged type and carry out the appropriate actions.
6422 (Unregister_Tagged_Types): Removed. The machinery has been directly
6423 merged with Build_Finalizer.
6425 2011-08-04 Robert Dewar <dewar@adacore.com>
6427 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6428 gnatls.adb, exp_ch3.adb: Minor reformatting.
6430 2011-08-04 Marc Sango <sango@adacore.com>
6432 * sem_attr.adb (Analyze_Attribute): Replace the message
6433 "invisible attribute of}" of the spark restriction violation in
6434 attribute reference by the simple message "invisible attribute of type".
6435 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6436 two insertion characters: '&' and '}'.
6438 2011-08-04 Vadim Godunko <godunko@adacore.com>
6440 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6441 * a-coinho.ads, a-coinho.adb: New file.
6442 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6444 2011-08-04 Nicolas Roche <roche@adacore.com>
6446 * alfa_test.adb: Not all ali files are containing alfa information even
6447 if compiled with -gnatd.F. So suppress warning about missing ALFA
6450 2011-08-04 Yannick Moy <moy@adacore.com>
6452 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6454 * put_alfa.adb: Check that scope name is not empty.
6456 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6458 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6459 Needs_Elementary_Stream_Operation, to determine whether user-defined
6460 Read and Write attributes are available for the elementary components
6461 of the given type. If only the predefined attributes are available,
6462 then when restriction No_Default_Stream_Attributes is active the
6463 predefined stream attributes for the composite type cannot be created.
6465 2011-08-04 Robert Dewar <dewar@adacore.com>
6467 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6468 Put routines in alpha order
6470 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6472 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6473 * gcc-interface/Make-lang.in: Update dependencies.
6475 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6477 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6478 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6481 2011-08-04 Robert Dewar <dewar@adacore.com>
6483 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6484 lib-xref-alfa.adb: Minor reformatting.
6486 2011-08-04 Marc Sango <sango@adacore.com>
6488 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6489 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6490 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6493 2011-08-04 Tristan Gingold <gingold@adacore.com>
6495 * bindgen.adb (Gen_Adainit_C): Remove.
6496 (Gen_Adafinal_C): Ditto.
6497 (Gen_Elab_Externals_C): Ditto.
6498 (Gen_Elab_Calls_C): Ditto.
6499 (Gen_Elab_Order_C): Ditto.
6500 (Gen_Elab_Defs_C): Ditto.
6501 (Gen_Finalize_Library_C): Ditto.
6502 (Gen_Finalize_Library_Defs_C): Ditto.
6503 (Gen_Main_C): Ditto.
6504 (Gen_Output_File_C): Ditto.
6505 (Gen_Restrictions_C): Ditto.
6506 (Gen_Versions_C): Ditto.
6507 (Write_Info_Ada_C): Ditto.
6508 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6509 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6510 Always call Gen_Output_File_Ada.
6511 * gnatlink.adb (Begin_Info): Now a constant.
6513 (Ada_Bind_File): Remove
6514 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6515 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6516 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6517 * opt.ads (Ada_Bind_File): Remove.
6519 2011-08-04 Thomas Quinot <quinot@adacore.com>
6521 * projects.texi: Document target-specific directory in default project
6524 2011-08-04 Thomas Quinot <quinot@adacore.com>
6526 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6529 2011-08-04 Yannick Moy <moy@adacore.com>
6531 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6532 opt.ads, lib-xref.ads: Code clean up.
6534 2011-08-04 Yannick Moy <moy@adacore.com>
6536 * gnat_rm.texi: Update description of Test_Case
6537 * gnat_ugn.texi: Typo.
6539 2011-08-04 Ed Falis <falis@adacore.com>
6541 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6543 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6545 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6546 it is of type Root_Controlled. This action eliminates fields Prev and
6547 Next from type equality.
6549 2011-08-04 Yannick Moy <moy@adacore.com>
6551 * lib-xref-alfa.adb: Correct typo.
6553 2011-08-04 Matthew Heaney <heaney@adacore.com>
6555 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6558 2011-08-04 Yannick Moy <moy@adacore.com>
6560 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6561 (Analyze_Pragma): allow static string expression for name of Test_Case,
6562 instead of simply string literals.
6563 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6566 2011-08-04 Vincent Celier <celier@adacore.com>
6568 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6569 case suffixes to find truncated main sources.
6571 2011-08-04 Tristan Gingold <gingold@adacore.com>
6573 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6574 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6575 (Compute_Current_Task): Ditto.
6577 2011-08-04 Tristan Gingold <gingold@adacore.com>
6579 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6581 2011-08-04 Yannick Moy <moy@adacore.com>
6583 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6584 library-level constant.
6585 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6586 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6587 used as selector of parameter association, in ALFA mode.
6589 2011-08-04 Robert Dewar <dewar@adacore.com>
6591 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6592 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6595 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6597 * make.adb (Linking_Phase): Set source search path before calling
6598 gnatlink in CodePeer mode.
6600 2011-08-04 Javier Miranda <miranda@adacore.com>
6602 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6603 Remove code which takes care of building TSDs.
6604 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6605 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6606 the accessibility check in VM targets.
6607 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6608 (Building_Static_DT): Now returns false for VM targets.
6609 (Build_VM_TSDs): Removed.
6610 (Expand_Interface_Conversion): Generate missing runtime check for
6611 conversions to interface types whose target type is unknown at compile
6613 (Make_VM_TSD): Add missing code to disable the generation of calls to
6614 Check_TSD if the tagged type is not defined at library level, or not
6615 has a representation clause specifying its external tag, or -gnatdQ is
6617 * exp_disp.ads (Build_VM_TSDs): Removed.
6618 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6619 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6620 register primitives in the dispatch tables in VM targets.
6621 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6622 initialization of class-wide interface objects in VM targets.
6623 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6626 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6628 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6629 when dotnet-ld cannot be found.
6631 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6633 * bindgen.adb: Simplify significantly generation of binder body file in
6635 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6636 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6639 2011-08-04 Yannick Moy <moy@adacore.com>
6641 * sem_prag.adb, sem.ads: Code cleanup.
6643 2011-08-04 Tristan Gingold <gingold@adacore.com>
6645 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6646 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6647 results if possible.
6648 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6649 * gnat_ugn.texi: Update dynamic stack usage section.
6651 2011-08-04 Steve Baird <baird@adacore.com>
6653 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6654 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6655 contains only a call to the user-defined main subprogram.
6656 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6657 call the "wrapper" subprogram instead of directly
6658 calling the user-defined main subprogram.
6660 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6662 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6663 alternatives of a case statement for controlled objects. Rename local
6664 variable A to Dead_Alt.
6665 (Expand_N_If_Statement): Check the then and else statements of an if
6666 statement for controlled objects. Check the then statements of all
6667 elsif parts of an if statement for controlled objects.
6668 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6670 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6671 detects a loop associated with the expansion of an array object.
6672 Augment the processing of the loop statements to account for a possible
6673 wrap done by Process_Statements_For_Controlled_Objects.
6674 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6675 statements and abortable part of an asynchronous select for controlled
6677 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6678 conditional entry call for controlled objects.
6679 (Expand_N_Selective_Accept): Check the alternatives of a selective
6680 accept for controlled objects.
6681 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6682 alternatives of a timed entry call for controlled objects.
6683 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6684 exception handler for controlled objects.
6685 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6686 Add formal parameter Nested_Constructs along with its associated
6688 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6689 Requires_Cleanup_Actions.
6690 (Process_Statements_For_Controlled_Objects): New routine.
6691 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6692 routine. Inspect a node which contains a non-handled sequence of
6693 statements for controlled objects. If such an object is found, the
6694 statements are wrapped in a block.
6696 2011-08-04 Bob Duff <duff@adacore.com>
6698 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6699 need to compare with Class_Wide_Type (T2), in order to get at the
6700 original class-wide type node.
6701 * sem_type.ads (Covers): Improve the comment.
6702 * einfo.ads (Class_Wide_Type): Improve the comment.
6703 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6704 the type of the Deref.
6706 2011-08-04 Yannick Moy <moy@adacore.com>
6708 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6709 separate declarations.
6710 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6711 check identifier of pragma argument.
6712 (Chain_TC): check that no other test case associated to the same entity
6713 share the same name.
6714 (Check_Test_Case): disallow test case inside subprogram body
6715 (Analyze_Pragma): correct call to check identifier and not argument
6716 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6717 function gets name from test case pragma.
6719 2011-08-04 Yannick Moy <moy@adacore.com>
6721 * gnat_rm.texi: Document new pragma and aspect.
6722 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6723 (No_Duplicates_Allowed): new constant array defining whether duplicates
6724 aspects of each kind can appear on the same declaration.
6725 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6726 field, which points to a node holding the previous Spec_PPC_List.
6727 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6728 through the indirection with Contract.
6729 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6730 * par-prag.adb (Prag): do nothing on Test_Case pragma
6731 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6733 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6734 component Ensures of Test_Case.
6735 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6736 (Analyze_Generic_Subprogram_Declaration,
6737 Analyze_Subprogram_Instantiation,
6738 Analyze_Abstract_Subprogram_Declaration,
6739 Analyze_Subprogram_Body_Helper,
6740 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6741 insert contract in subprogram node at point of definition
6743 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6744 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6745 corresponding pragma
6746 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6747 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6748 similar to the analysis of pre/post
6749 (Derive_Subprogram): insert contract in subprogram node at point of
6751 * sem_prag.adb, sem_prag.ads
6752 (Check_Arg_Is_String_Literal, Check_Identifier):
6753 new checking procedures to be called in treatment of pragmas
6754 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6755 pragma is well-formed. This does not check currently that 'Result is
6756 used only in the Ensures component of a Test_Case.
6757 (Analyze_Pragma): add case for Test_Case
6758 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6759 components of a Test_Case.
6760 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6761 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6762 pragma, treated as spec expressions.
6763 (Sig_Flags): add value -1 for Test_Case.
6764 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6765 Get_Requires_From_Test_Case_Pragma): getters for both expression
6766 components of a Test_Case.
6767 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6768 indirection between an entry or [generic] subprogram entity and its
6769 pre/post + test-cases.
6770 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6771 get/set for fields of an N_Contract node.
6772 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6773 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6774 names and pragma for Test_Case.
6775 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6777 2011-08-04 Vincent Celier <celier@adacore.com>
6779 * gnat_ugn.texi: Improve documentation of gnatmake switch
6780 --source-info-file=.
6782 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6784 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6785 type). Initialize Atyp to the appropriate type which is later checked
6786 for completion. Rewrite the assertion associated with private type
6789 2011-08-04 Ed Falis <falis@adacore.com>
6791 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6792 initialize the number of CPUs.
6794 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6796 * sem_type.adb (Disambiguate): New subsidiary routine
6797 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6798 equality on an anonymous access type whose designated type is private
6799 does not lead to an ambiguity with the universal access equality
6800 operator in the body or child units of the defining package. The same
6801 is true for a multiplication operator on a private type completed with
6804 2011-08-04 Javier Miranda <miranda@adacore.com>
6806 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6807 (Normalize_Scalars_Config): Removed.
6809 (Register_Opt_Config_Switches): Remove registering config values of
6810 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6811 (Restore_Opt_Config_Switches): Remove code which restores the values of
6812 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6813 Init_Or_Norm_Scalars.
6814 (Save_Opt_Config_Switches): Remove code which saves values of
6815 Init_Or_Norm_Scalars and Normalize_Scalars.
6816 (Set_Opt_Config_Switches): Remove code which restores config values of
6817 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6818 Init_Or_Norm_Scalars.
6820 2011-08-04 Yannick Moy <moy@adacore.com>
6822 * frontend.adb (Frontend): remove previous patch to avoid full
6823 qualification in ALFA mode.
6824 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6825 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6826 unique name for an entity, which could be used to identify the entity
6827 across compilation units.
6829 2011-08-04 Thomas Quinot <quinot@adacore.com>
6832 (Initialize_Default_Project_Path): Add target specific directory
6833 ($prefix/$target/lib/gnat) in front of project path in all cases
6834 (making gnatmake's behaviour consistent with gprbuild).
6835 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6836 Pass target name from Sdefault to project subsystem.
6837 * gnatls.adb: Show new target specific default project directory.
6839 2011-08-04 Johannes Kanig <kanig@adacore.com>
6841 * cstand.adb: Add Information to Identifier in Standard
6842 (Identifer_For): Set Entity to the corresponding entity
6844 2011-08-04 Sergey Rybin <rybin@adacore.com>
6846 * gnat_ugn.texi: Update doc on gnatcheck.
6848 2011-08-04 Yannick Moy <moy@adacore.com>
6850 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6853 2011-08-04 Yannick Moy <moy@adacore.com>
6855 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6856 performing expansion.
6857 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6858 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6859 it is not called in ALFA mode.
6861 2011-08-04 Emmanuel Briot <briot@adacore.com>
6863 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6864 after all, so removed.
6866 2011-08-04 Sergey Rybin <rybin@adacore.com>
6868 * vms_data.ads: Add missing VMS qualifiers.
6870 2011-08-04 Emmanuel Briot <briot@adacore.com>
6872 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6873 the list of files on the command line after processing it through
6876 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6878 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6879 processing for .NET/JVM. These targets can now benefit from
6880 Raise_From_Controlled_Operation and they share the same processing with
6882 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6883 These targets need transient scopes in order to properly finalize short
6884 lived controlled objects.
6885 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6886 NET/JVM. These targets can now benefit from
6887 Raise_From_Controlled_Operation and they share the same processing with
6890 2011-08-04 Geert Bosch <bosch@adacore.com>
6892 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6894 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6896 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6897 Expand_Record_Aggregate, to determine whether aggregate must be
6898 expanded into assignments. This is the case if the ancestor part is
6899 private, regarless of the setting of the flag Has_Private_Ancestor.
6901 2011-08-04 Ed Falis <falis@adacore.com>
6903 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6905 2011-08-04 Bob Duff <duff@adacore.com>
6907 * sinfo.ads: Fix comment.
6909 2011-08-04 Steve Baird <baird@adacore.com>
6911 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6912 choose a package name in much the same way as is
6913 done for JGNAT when VM_Target /= No_VM, except that
6914 a slightly more distinctive prefix string is used.
6916 2011-08-04 Emmanuel Briot <briot@adacore.com>
6918 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6919 gnatmake command line.
6920 This behavior was never documented (and was supported only because of
6921 an early bug in the code). This case might lead to ambiguous cases
6922 (between unit names and truncated base names without suffixes).
6924 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6926 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6927 Remove the external tag of a tagged type from the internal hash table.
6928 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6929 expanded usage of the routine. Strenghten the check for Is_Master. Add
6930 processing for tagged types.
6931 (Build_Finalizer): Create all the necessary lists used in finalizer
6932 creation when the processed context is a package that may contain
6934 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6935 Requires_Cleanup_Actions.
6936 (Expand_N_Package_Body): Package bodies may need clean up code
6937 depending on whether they contain tagged types.
6938 (Expand_N_Package_Declaration): Package declarations may need clean up
6939 code depending on whether they contain tagged types.
6940 (Unregister_Tagged_Types): New routine. Search through a list of
6941 declarations or statements, looking for non-abstract Ada tagged types.
6942 For each such type, generate code to unregister the external tag.
6943 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6944 Requires_Cleanup_Actions.
6945 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6946 through a list of declarations or statements looking for non-abstract
6947 Ada tagged types or controlled objects.
6948 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6949 Requires_Cleanup_Actions.
6950 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6951 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6954 2011-08-04 Vincent Celier <celier@adacore.com>
6956 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6957 has Ada sources, not project Project, because if the root project
6958 Project has no sources of its own, all projects will be deemed without
6961 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6963 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6964 of the No_Param_Proc acc-to-subp type used for initialization of
6965 __gnat_finalize_library_objects so that it's declared at library level
6966 rather than nested inside of the adainit routine.
6968 2011-08-04 Javier Miranda <miranda@adacore.com>
6970 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6971 if the tagged type has a representation clause which specifies its
6974 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6976 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6977 Remove previous procedure with that name.
6978 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6980 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6981 subtype mark, the ancestor cannot have unknown discriminants.
6982 (Resolve_Record_Aggregate): if the type has invisible components
6983 because of a private ancestor, the aggregate is illegal.
6985 2011-08-04 Vincent Celier <celier@adacore.com>
6987 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6988 account switches -gnat2005, -gnat12 and -gnat2012.
6990 2011-08-04 Bob Duff <duff@adacore.com>
6992 * s-tasdeb.ads: Minor comment fix.
6994 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6996 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6998 * switch.ads, switch.adb (Is_Language_Switch): New function.
7000 2011-08-04 Vincent Celier <celier@adacore.com>
7002 * switch-c.adb: Minor comment addition.
7004 2011-08-04 Vincent Celier <celier@adacore.com>
7006 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7007 ending with '=' is followed by a space (missing file name).
7009 2011-08-04 Pascal Obry <obry@adacore.com>
7011 * g-regist.ads: Fix size of HKEY on x86_64-windows.
7013 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7015 * sem_ch12.adb (Analyze_Associations): New routine
7016 Check_Overloaded_Formal_Subprogram to reject a formal package when
7017 there is a named association or a box initialisation for an overloaded
7018 formal subprogram of the corresponding generic.
7020 2011-08-04 Yannick Moy <moy@adacore.com>
7022 * alfa.ads (ALFA_Xref_Record): add component for type of entity
7023 * get_alfa.adb, put_alfa.adb: Read and write new component of
7025 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7027 2011-08-04 Pascal Obry <obry@adacore.com>
7029 * urealp.adb: Minor reformatting.
7031 2011-08-04 Tristan Gingold <gingold@adacore.com>
7033 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7034 Handle the case when Cleanup_Protected_Object returns Empty.
7036 2011-08-04 Yannick Moy <moy@adacore.com>
7038 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7040 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7042 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7043 call, ignore functions.
7045 2011-08-04 Geert Bosch <bosch@adacore.com>
7047 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7050 2011-08-04 Emmanuel Briot <briot@adacore.com>
7052 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7053 as an index for Builder'Switches. This conforms to the documentation.
7054 * make.adb (Insert_Project_Sources): avoid duplicate code
7056 2011-08-04 Emmanuel Briot <briot@adacore.com>
7058 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7059 name on the command line (for instance "../dummy"), never assume it can
7062 2011-08-04 Tristan Gingold <gingold@adacore.com>
7064 * bindgen.adb: Remove code the reference or create the
7065 Break_Start/__gnat_break_start procedure.
7066 * s-stalib.adb (Break_Start): Removed.
7068 2011-08-04 Emmanuel Briot <briot@adacore.com>
7070 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7071 shared with gprbuild.
7073 2011-08-04 Yannick Moy <moy@adacore.com>
7075 * par-ch4.adb (P_Primary): preferentially issue an error message about
7076 a missing parenthesis arount a conditional or case expression in Ada
7077 2012 mode, if we detect that the alignment is not correct for a
7080 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7082 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7083 tag-to-class-wide conversion as needing finalization actions.
7084 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7085 a tag-to-class-wide conversion as needing finalization actions.
7086 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7087 conversion does not need finalization actions.
7088 (Is_Tag_To_CW_Conversion): New routine.
7089 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7090 whether an object is the result of a tag-to-class-wide conversion.
7092 2011-08-04 Yannick Moy <moy@adacore.com>
7094 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7095 the left-hand-side and right-hand-side of a conjunct are inserted when
7096 translating a pre- or postcondition
7097 * sem_ch6.adb: Correct typo in comment
7099 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7101 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7102 Unchecked_Conversion and Unchecked_Deallocation.
7104 2011-08-04 Thomas Quinot <quinot@adacore.com>
7106 * make.adb: Minor reformatting.
7108 2011-08-04 Emmanuel Briot <briot@adacore.com>
7110 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7111 sources in the project and its imported projects, but not in the whole
7114 2011-08-04 Emmanuel Briot <briot@adacore.com>
7116 * make.adb: Remove debug trace.
7118 2011-08-04 Vincent Celier <celier@adacore.com>
7120 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7121 path in canonical form, to be able to compare path names on platforms
7122 such as Windows or Darwin.
7124 2011-08-04 Thomas Quinot <quinot@adacore.com>
7126 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7127 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7128 * scos.ads: Update documentation accordingly.
7129 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7132 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7134 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7135 attribute only if prefix type is scalar.
7137 2011-08-04 Emmanuel Briot <briot@adacore.com>
7139 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7140 in gnatmake for specifying mains on the command line that do not belong
7141 to the main project. These mains must currently all belong to the same
7143 (Ultimate_Extension_Of): removed, since duplicated
7144 Ultimate_Extending_Project.
7146 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7148 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7150 (CodePeer_Mode_String): New.
7151 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7153 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7154 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7155 mode, since no useful elaboration subprogram is needed by CodePeer.
7156 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7157 In this mode, compile binder file with -gnatC and do stop after this
7160 2011-08-04 Vincent Celier <celier@adacore.com>
7162 * exp_ch7.adb: Minor comment fix.
7164 2011-08-04 Robert Dewar <dewar@adacore.com>
7166 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7167 exp_ch4.adb, makeutl.adb: Minor reformatting.
7169 2011-08-04 Emmanuel Briot <briot@adacore.com>
7171 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7172 Create several new subprograms to move code out of Make. This makes the
7173 code more readable, removes code duplication, and is a preparation work
7174 for adding support for aggregate projects.
7176 2011-08-04 Tristan Gingold <gingold@adacore.com>
7178 * s-po32gl.ads, s-po32gl.adb: New files.
7179 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7180 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7181 (Build_Finalization_Collection): Use it.
7182 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7183 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7185 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7186 * gcc-interface/Make-lang.in: Update dependencies.
7188 2011-08-04 Emmanuel Briot <briot@adacore.com>
7190 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7193 2011-08-04 Emmanuel Briot <briot@adacore.com>
7195 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7196 command line is not a file name, also check whether it could be a unit
7199 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7201 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7202 the header of the finalization routine.
7203 If the unit has no finalizer but is a body whose spec has one, then
7204 generate the decrement of the elaboration entity only.
7205 If the unit has a finalizer and is a spec, then do not generate the
7206 decrement of the elaboration entity.
7207 (Gen_Finalize_Library_C): Likewise.
7209 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7211 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7212 (Bounds_Size_Expression): Removed.
7213 (Double_Alignment_Of): New subsidiary routine.
7214 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7215 for a hole in the dope vector of unconstrained arrays due to different
7216 index and element alignments.
7218 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7220 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7221 raise program_error because body has not been seen yet.
7223 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7225 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7228 2011-08-04 Vincent Celier <celier@adacore.com>
7230 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7232 2011-08-04 Yannick Moy <moy@adacore.com>
7234 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7235 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7237 2011-08-04 Thomas Quinot <quinot@adacore.com>
7239 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7240 instantiation in RCI.
7242 2011-08-04 Emmanuel Briot <briot@adacore.com>
7244 * make.adb: Share more code with gprbuild
7246 2011-08-04 Emmanuel Briot <briot@adacore.com>
7248 * projects.texi: Added documentation for the IDE'Gnat project file
7251 2011-08-04 Nicolas Roche <roche@adacore.com>
7253 * gnat_rm.texi: Minor editing.
7255 2011-08-04 Javier Miranda <miranda@adacore.com>
7257 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7258 and the library case for VM targets.
7259 (Gen_Adainit_Ada): Likewise.
7261 2011-08-04 Robert Dewar <dewar@adacore.com>
7263 * g-altive.ads: Minor comment updates.
7264 * prj-nmsc.adb: Minor reformatting.
7266 2011-08-04 Javier Miranda <miranda@adacore.com>
7269 (Normalize_Scalars_Config): Value of the configuration switch set by
7270 pragma Normalize_Scalars when it appears in the gnat.adc file.
7271 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7272 to save and restore settings of this pragma.
7274 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7275 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7277 2011-08-04 Vincent Celier <celier@adacore.com>
7279 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7281 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7283 * makeutl.adb: Minor reformatting.
7285 2011-08-04 Olivier Hainque <hainque@adacore.com>
7287 * g-altive.ads: Update comments to reflect that only the soft
7288 binding is available today.
7290 2011-08-04 Robert Dewar <dewar@adacore.com>
7292 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7293 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7294 * gcc-interface/Make-lang.in: Update dependencies.
7296 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7298 * prj-env.adb: Remove local debug traces.
7300 2011-08-04 Yannick Moy <moy@adacore.com>
7302 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7303 was used instead of Hi_OK, which could cause a read of an uninitialized
7304 value later on. Detected while working on the new warning.
7305 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7307 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7308 in more cases, in order to detect more unreferenced values.
7309 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7310 object for expression, if any.
7312 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7314 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7315 the operand types instead of the Esize.
7317 2011-08-04 Steve Baird <baird@adacore.com>
7319 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7320 enable CodePeer_Mode.
7321 * bindusg.adb (Display): Add help message describing -P binder switch.
7322 * gnat_ugn.texi: Document -P binder switch.
7323 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7324 user-defined main program directly.
7325 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7326 user-defined main program in the context clause of the package body.
7328 2011-08-04 Yannick Moy <moy@adacore.com>
7330 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7331 duplicate of Defining_Entity
7332 (Get_Unique_Entity_For_Decl): rename function into
7333 Unique_Defining_Entity
7334 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7335 (Formal_Proof_On): remove synthesized flag
7336 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7337 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7338 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7339 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7340 Annotate (Formal_Proof)
7342 2011-08-04 Emmanuel Briot <briot@adacore.com>
7344 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7345 source files with non-standard naming schemes, in imported projects
7347 2011-08-04 Emmanuel Briot <briot@adacore.com>
7349 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7350 specified on the gprbuild command line, we need to compile all units
7351 within that file, not just the first one we find
7352 Fix error message for mains that are not found.
7354 2011-08-04 Thomas Quinot <quinot@adacore.com>
7356 * sem_ch6.adb: Update comment.
7357 * sem_ch12.adb: Minor reformatting.
7359 2011-08-04 Bob Duff <duff@adacore.com>
7361 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7362 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7363 race condition whose symptom is to fail to lock Parent. That, in turn,
7364 causes Parent.Awake_Count to be accessed without locking Parent, which
7365 causes another race condition whose symptom is that Parent.Awake_Count
7366 can be off by 1 (either too high or too low). The solution is to lock
7367 Parent unconditionally, and then lock Acceptor, before reading
7368 Acceptor.Terminate_Alternative.
7370 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7372 * debug.adb: Update comment.
7374 2011-08-04 Robert Dewar <dewar@adacore.com>
7376 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7377 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7378 exp_ch6.adb: Minor reformatting.
7380 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7382 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7385 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7387 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7389 2011-08-04 Thomas Quinot <quinot@adacore.com>
7391 * sinfo.ads: Minor reformatting.
7393 2011-08-04 Emmanuel Briot <briot@adacore.com>
7395 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7396 even if there is no location.
7398 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7400 * sem_res.adb, sem_ch4.adb: move check for restriction
7401 No_Task_Hierarchy to resolve_allocator.
7403 2011-08-04 Thomas Quinot <quinot@adacore.com>
7405 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7406 This flag of N_Pragma nodes is not used, remove it as well as all of
7407 the associated circuitry.
7409 2011-08-04 Javier Miranda <miranda@adacore.com>
7411 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7412 runtime check on duplicated externa tags
7413 * debug.adb Document switch -gnatdQ.
7415 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7417 * a-fihema.ads: Minor typo fix.
7419 2011-08-04 Yannick Moy <moy@adacore.com>
7421 * sem_ch10.adb: Minor comment update.
7423 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7425 * einfo.adb: Update the node field usage to reflect the renaming of
7426 Return_Flag to Return_ Flag_Or_Transient_Decl.
7427 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7428 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7429 (Write_Field15_Name): Change Return_Flag to
7430 Return_Flag_Or_Transient_Decl.
7431 * einfo.ads: Rename node field Return_Flag to
7432 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7433 occurrences in entities.
7434 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7435 associated Inline pragma.
7436 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7437 associated Inline pragma.
7438 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7440 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7441 Return_Flag and Set_Return_Flag.
7442 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7443 objects generated for controlled transients declared inside an
7444 Exception_With_Actions. Update the calls to Return_Flag.
7445 (Process_Object_Declaration): Add code to add a null guard for hook
7446 objects generated for controlled transients declared inside an
7447 Exception_With_Actions. Update related comment.
7448 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7449 objects generated for controlled transients declared inside an
7450 Exception_With_Actions. Update the calls to Return_Flag.
7451 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7453 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7455 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7456 positional aggregate.
7458 2011-08-04 Vincent Celier <celier@adacore.com>
7460 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7461 SLOC only for pragmas.
7463 2011-08-04 Emmanuel Briot <briot@adacore.com>
7465 * projects.texi: Minor typo fix.
7467 2011-08-04 Emmanuel Briot <briot@adacore.com>
7469 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7470 on case-sensitive file systems.
7472 2011-08-04 Thomas Quinot <quinot@adacore.com>
7474 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7475 nested in a disabled pragma.
7476 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7477 enclosing pragma, if any, for X decisions.
7479 2011-08-04 Thomas Quinot <quinot@adacore.com>
7481 * sem_prag.adb: Minor reformatting.
7483 2011-08-04 Vincent Celier <celier@adacore.com>
7485 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7486 allowed in no run time mode.
7488 2011-08-04 Vincent Celier <celier@adacore.com>
7490 * make.adb (Check): When -gnatc is used, check for the source file
7491 inside the ALI file with a canonical case file name.
7493 2011-08-04 Emmanuel Briot <briot@adacore.com>
7495 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7496 overriding the separator.
7498 2011-08-04 Robert Dewar <dewar@adacore.com>
7500 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7501 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7503 2011-08-04 Robert Dewar <dewar@adacore.com>
7505 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7507 2011-08-04 Yannick Moy <moy@adacore.com>
7509 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7510 'Result only appears in postcondition of function.
7512 2011-08-04 Thomas Quinot <quinot@adacore.com>
7514 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7515 external tag, include the value of the external tag in the exception
7518 2011-08-04 Yannick Moy <moy@adacore.com>
7520 * sem_attr.adb (Result): modify error message for misplaced 'Result
7522 2011-08-04 Sergey Rybin <rybin@adacore.com>
7524 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7525 clear that the second argument must be an identifier.
7527 2011-08-04 Thomas Quinot <quinot@adacore.com>
7529 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7530 -fpreserve-control-flow, insert an IF statement on the barrier
7531 condition to ensure that a conditional branch instruction is generated.
7533 2011-08-04 Emmanuel Briot <briot@adacore.com>
7535 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7536 (Processing_Flags.Ignore_Missing_With): new flag.
7538 2011-08-04 Emmanuel Briot <briot@adacore.com>
7540 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7541 Source_List_File on case-insensitive systems where the file is actually
7542 on a case-sensitive file system (NFS,...).
7544 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7546 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7547 function return contains a controlled [extension] aggregate and the
7548 return statement is not part of a handled sequence of statements, wrap
7549 the return in a block. This ensures that all controlled temporaries
7550 generated during aggregate resolution will be picked up by the
7551 finalization machinery.
7553 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7555 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7556 components, freeze type before resolution, to ensure that default
7557 initializations are present for all components.
7558 * sem_res.adb (Resolve_Actuals): the designated object of an
7559 accces-to-constant type is a legal actual in a call to an
7560 initialization procedure.
7562 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7564 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7565 N_Unchecked_Type_Conversion to the possible containers of a renamed
7568 2011-08-04 Yannick Moy <moy@adacore.com>
7570 * par-ch13.adb (Aspect_Specifications_Present): recognize
7571 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7572 is issued in Strict mode.
7573 * par.adb: Fix typos in comments.
7575 2011-08-04 Yannick Moy <moy@adacore.com>
7577 * sem_attr.adb (Result): modify error message to take into account Post
7578 aspect when compiling Ada 2012 (or newer) code.
7580 2011-08-04 Nicolas Roche <roche@adacore.com>
7582 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7583 remove need for GCC exceptions.
7585 2011-08-04 Vincent Celier <celier@adacore.com>
7587 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7588 project, not the source file name.
7589 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7590 excluded, continue looking. This excluded source will only be returned
7591 if there is no other source with the same base name that is not locally
7594 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7596 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7597 private and one of the operands is a real literal, use a qualified
7598 expression rather than a conversion which is not meaningful to the
7601 2011-08-04 Yannick Moy <moy@adacore.com>
7603 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7604 corresponding aspect X'Class are allowed, proceed with analysis of the
7605 aspect instead of skipping it.
7607 2011-08-04 Tristan Gingold <gingold@adacore.com>
7609 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7610 This will allow to have an Ada implementation for the subprogram.
7612 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7614 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7615 completion and aspects are present, apply them to the entity for the
7616 type which is currently the partial view, but which is the one that
7618 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7619 applies to a partial view, indicate that the full view has predicates
7620 and delayed aspects.
7621 (Replace_Type_Reference): Handle properly predicates that apply to the
7622 full view of a private completion.
7624 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7626 * layout.adb (Layout_Type): For composite types, do not set Esize.
7627 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7629 (Size_Known): Look at the RM size of components instead of the Esize.
7630 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7631 issue warning and activate Implicit_Packing.
7632 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7633 if the Esize is not known.
7634 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7635 for elementary types only.
7636 (Analyze_Record_Representation_Clause): Look at the RM size instead
7637 of the Esize to issue errors.
7638 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7640 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7642 Look at the RM size instead of the Esize for types if the latter is
7644 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7646 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7648 * sem_type.adb: proper handling of equality not involving anonymous
7651 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7653 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7654 Vis_Decls. When creating a library-level finalizer for a package spec,
7655 both the declaration and body of the finalizer are inserted either in
7656 the visible or private declarations of the package spec.
7658 2011-08-04 Javier Miranda <miranda@adacore.com>
7660 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7661 use of the full-view of a type when invoking Is_Ancestor.
7662 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7663 the full-view of private parents is requested, then use also the
7664 full-view of the parent of the first derivation.
7666 2011-08-04 Tristan Gingold <gingold@adacore.com>
7668 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7669 instead of the locally imported procedure.
7670 * s-taprop-mingw.adb (Enter_Task): Ditto.
7671 * s-valrea.adb (Scan_Real): Ditto.
7672 * s-imgrea.adb (Set_Image_Real): Ditto.
7673 * s-flocon.ads: Make the package pure.
7675 2011-08-04 Thomas Quinot <quinot@adacore.com>
7677 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7678 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7679 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7680 New subprogram, moved here from...
7681 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7682 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7683 rewriting of the last argument into a procedure call statement here...
7684 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7687 2011-08-04 Thomas Quinot <quinot@adacore.com>
7689 * par_sco.adb: Minor reformatting.
7691 2011-08-04 Robert Dewar <dewar@adacore.com>
7693 * erroutc.adb: Minor reformatting.
7695 2011-08-04 Thomas Quinot <quinot@adacore.com>
7697 * par_sco.adb: Comment update.
7699 2011-08-04 Tristan Gingold <gingold@adacore.com>
7701 * s-flocon.ads: New file.
7702 * g-flocon.ads: Now a renaming of s-flocon.
7703 * Makefile.rtl: Add s-flocon.o
7705 2011-08-04 Javier Miranda <miranda@adacore.com>
7707 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7708 constrained, do not attempt to build a subtype of it.
7710 2011-08-04 Yannick Moy <moy@adacore.com>
7712 * errout.ads Change comments: remove 'R'M as an example where quotes
7713 are needed; add ALFA as another case where quotes are not needed
7714 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7715 case where quotes are not needed.
7716 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7717 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7718 Remove all occurrences of 'A'L'F'A
7720 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7722 * sem_ch13.adb: check legality of invariant pragma.
7724 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7726 * bindgen.adb: Add comments.
7728 2011-08-04 Yannick Moy <moy@adacore.com>
7730 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7732 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7733 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7735 2011-08-04 Robert Dewar <dewar@adacore.com>
7737 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7738 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7739 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7741 2011-08-04 Thomas Quinot <quinot@adacore.com>
7743 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7745 2011-08-04 Thomas Quinot <quinot@adacore.com>
7748 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7751 2011-08-04 Robert Dewar <dewar@adacore.com>
7753 * einfo.ads, exp_ch4.adb: Minor reformatting.
7755 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7757 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7759 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7761 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7762 type in all cases to compute list of primitive operations, because full
7763 view may be an itype that is not attached to the list of declarations.
7765 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7767 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7768 library has already been finalized.
7769 (Gen_Adafinal_C): Likewise.
7770 (Gen_Adainit_Ada): Generate an early return if the library has
7771 already been elaborated.
7772 (Gen_Adainit_C): Likewise.
7773 (Gen_Output_File_Ada): Generate an elaboration flag.
7774 (Gen_Output_File_C): Likewise.
7776 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7778 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7779 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7780 built in the first place.
7781 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7782 for CodePeer because Finalize_Address was not built to begin with.
7783 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7785 2011-08-04 Pascal Obry <obry@adacore.com>
7787 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7788 filenames, this ensures unicity of filenames across processes.
7790 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7792 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7793 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7794 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7795 Add False as the actual to From_Abort in the generated call to
7796 Raise_From_Controlled_Operation.
7798 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7800 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7801 so that the ali file name can be retrieved from outside of this package.
7802 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7803 doing nothing in the general case, but used to update the object file
7804 timestamp if directly generated by the backend.
7805 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7806 to a later time than the ali file one.
7808 2011-08-04 Yannick Moy <moy@adacore.com>
7810 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7811 entities whose body contains an Annotate pragma which forces formal
7813 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7814 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7815 Mark_Non_ALFA_Subprogram to pass in a message and node.
7816 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7817 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7818 surrounding subprogram.
7819 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7820 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7821 as not in ALFA is annotated with Formal_Proof being On, then an error
7822 is issued based on the additional parameters for message and node.
7823 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7824 * gcc-interface/Make-lang.in: Update dependencies.
7826 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7828 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7829 Finalize_Address when CodePeer is enabled.
7831 2011-08-04 Pascal Obry <obry@adacore.com>
7833 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7834 the latter returns a pointer to a static buffer which is deallocated
7835 at the end of the routine.
7837 2011-08-04 Yannick Moy <moy@adacore.com>
7839 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7840 after index creation; mark unconstrained base array type generated as
7841 being in/not in ALFA as well
7842 (Make_Index): mark subtype created as in/not in ALFA
7843 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7844 over a loop as in/not in ALFA, depending on its type and form of loop
7847 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7849 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7850 directly to False on .NET and JVM.
7852 2011-08-04 Yannick Moy <moy@adacore.com>
7854 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7855 constraint that subtype must come from source code to be in ALFA, so
7856 that anonymous subtypes can be in ALFA too.
7858 2011-08-04 Yannick Moy <moy@adacore.com>
7860 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7861 reference for ALFA mode.
7862 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7863 procedure public so as to use it from formal verification back-end.
7865 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7867 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7868 invalid checks of the Parameter, making Remove_Switch not working
7871 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7873 * targparm.ads: Update header: no run-time exception is needed on this
7876 2011-08-04 Vincent Celier <celier@adacore.com>
7878 * a-fihema.adb: Use System.IO instead of GNAT.IO
7880 2011-08-04 Thomas Quinot <quinot@adacore.com>
7882 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7883 are forbidden in Compiler_Unit mode.
7885 2011-08-04 Robert Dewar <dewar@adacore.com>
7887 * sem_util.adb: Minor reformatting.
7889 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7891 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7892 library-level finalizers.
7893 (Gen_Finalize_Library_C): Update the import string for library-level
7895 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7896 library-level finalizer.
7897 * exp_ch7.adb: Remove with and use clauses for Stringt.
7898 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7899 Spec_Decl. Add local variable Body_Id. The names of library-level
7900 finalizers are now manually fully qualified and are no longer external.
7901 A single name is now capable of servicing .NET, JVM and non-VM targets.
7902 Pragma Export is no longer required to provide visibility for the name.
7903 (Create_Finalizer_String): Removed.
7904 (New_Finalizer_Name): New routine which mimics New_..._Name.
7906 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7908 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7909 elaboration counter to Standard_Short_Integer.
7910 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7911 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7912 (Gen_Elab_Externals_C): Likewise.
7914 2011-08-04 Ed Falis <falis@adacore.com>
7916 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7917 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7918 system-vxworks-mips.ads, system-vxworks-x86.ads
7919 (Always_Compatible_Rep): set to False for all VxWorks targets.
7921 2011-08-04 Robert Dewar <dewar@adacore.com>
7923 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7924 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7925 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7926 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7927 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7928 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7929 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7930 Minor reformatting and code reorganization.
7932 2011-08-04 Emmanuel Briot <briot@adacore.com>
7934 * projects.texi: Added doc for aggregate projects.
7936 2011-08-04 Emmanuel Briot <briot@adacore.com>
7938 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7939 Add support for overriding the Project_Path in aggregate projects.
7941 2011-08-04 Robert Dewar <dewar@adacore.com>
7943 * a-cofove.ads: Minor reformatting.
7945 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7947 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7948 on the generated code.
7949 (Build_Finalize_Statements): Update the comment on the generated code.
7950 (Build_Initialize_Statements): Update the comment on the generated code.
7951 (Build_Object_Declarations): Add local variable Result. The object
7952 declarations are now built in sequence.
7953 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7956 2011-08-04 Robert Dewar <dewar@adacore.com>
7958 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7960 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7962 * einfo.ads (Elaboration_Entity): Document new definition and use.
7963 (Elaboration_Entity_Required): Adjust to above change.
7964 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7965 * exp_ch12.adb: And with and use for Snames.
7966 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7967 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7968 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7969 <Check_Unit_Name>: Deal with N_Expanded_Name.
7970 <Attribute_Elaborated>: Extend to all unit names.
7971 * sem_elab.adb: And with and use for Uintp.
7972 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7973 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7974 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7975 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7976 from Gen_Adainit_Ada.
7977 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7978 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7979 case, do not call System.Standard_Library.Adafinal; instead call
7980 finalize_library if needed.
7981 (Gen_Adafinal_C): Likewise.
7982 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7983 non-main program case.
7984 (Gen_Adainit_C): Generate a couple of external declarations here.
7985 In the main program case, set SSL.Finalize_Library_Objects.
7986 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7987 (Gen_Elab_Calls_C): Likewise.
7988 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7989 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7990 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7992 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7993 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7995 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7996 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7997 of external declarations. Call Gen_Finalize_Library_C.
7999 2011-08-04 Emmanuel Briot <briot@adacore.com>
8001 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8002 Compute_Compilation_Phases): new subprogram.
8003 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8004 The number of mains as well as the various compilation phases that
8005 need to be run are now project tree specific, since various
8006 aggregated trees might have different requirements. In particular,
8007 they do not all require bind or link phases.
8009 2011-08-04 Emmanuel Briot <briot@adacore.com>
8011 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8012 (Project_Tree_Appdata): New type.
8013 It is now possible to associate application-specific data to a project
8014 tree. In particular, this is used in the gprbuild builder to avoid a
8015 number of global tables and htables, especially now that there can be
8016 several project trees loaded at once because of aggregate projects.
8017 (Debug_Name): new procedure.
8018 * projects.texi: Clarify syntax of "**" for Source_Dirs
8020 2011-08-03 Emmanuel Briot <briot@adacore.com>
8022 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8023 the "roots" for a main.
8024 (Fill_From_Project): add support for aggregate projects. Main units
8025 in aggregated projects are now automatically added in the list of
8026 files to build (although this fails later on in gprbuild, because
8027 these files are not using the root proejct tree, so this needs
8029 * gcc-interface/Make-lang.in: Update dependencies.
8031 2011-08-03 Yannick Moy <moy@adacore.com>
8033 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8034 conditional expression in ALFA.
8035 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8036 expressions as not in ALFA.
8038 2011-08-03 Robert Dewar <dewar@adacore.com>
8040 * a-cofove.adb: Minor reformatting.
8042 2011-08-03 Emmanuel Briot <briot@adacore.com>
8044 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8045 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8047 These packages are more logically placed in the Queue package, since
8048 they manipulate the queue. It is also likely that they can be adapted
8049 for gnatmake, thus sharing more code.
8050 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8051 that we could move the above.
8053 2011-08-03 Emmanuel Briot <briot@adacore.com>
8055 * errutil.adb (Finalize): clean up the list of error messages on exit.
8056 Calling this subprogram multiple times will no longer show duplicate
8057 error messages on stderr.
8059 2011-08-03 Emmanuel Briot <briot@adacore.com>
8061 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8062 Getopt_Switches when we have already define a command line
8065 2011-08-03 Yannick Moy <moy@adacore.com>
8067 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8068 in ALFA. Instead, they are considered as assertions to prove.
8069 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8070 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8071 if they have no ELSE part, or if they occur in pre- and postconditions,
8072 where the Condition cannot have side-effects in ALFA
8073 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8074 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8075 Instead, include type conversion between scalar types in ALFA.
8076 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8077 if-and-only-if its type is in ALFA.
8079 2011-08-03 Thomas Quinot <quinot@adacore.com>
8081 * scos.adb, get_scos.adb, put_scos.adb
8082 New code letter for decisions: G (entry guard)
8084 (Traverse_Subprogram_Body): Rename to...
8085 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8086 (Traverse_Protected_Body): New subprogram
8087 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8088 protected bodies and entry bodies.
8090 2011-08-03 Yannick Moy <moy@adacore.com>
8092 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8093 entities with get/set subprograms, which is set on procedure entities
8094 generated by the compiler for a postcondition.
8095 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8096 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8097 entity for a declaration
8098 (Get_Unique_Entity_For_Decl): new function returning an entity which
8099 represents a declaration, so that matching spec and body have the same
8102 2011-08-03 Robert Dewar <dewar@adacore.com>
8104 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8105 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8107 2011-08-03 Yannick Moy <moy@adacore.com>
8109 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8110 library-level because retriction No_Implicit_Dynamic_Code in the
8111 front-end prevents its definition as a local subprogram
8112 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8113 for reuse in other contexts
8114 (Traverse_Declarations_Or_Statements,
8115 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8116 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8117 procedures take a callback parameter to be called on all declarations
8119 (Traverse_All_Compilation_Units): new generic function to traverse a
8120 compilation unit and call a callback parameter on all declarations
8122 2011-08-03 Javier Miranda <miranda@adacore.com>
8124 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8125 in Java since they are always enclosed in a namespace that
8126 differentiates them, and overloaded entities are supported by the VM.
8128 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8130 * checks.adb (Determine_Range): If a computed bound of an operation is
8131 outside the range of the base type of the expression, and overflow
8132 checks are enabled, the result is unknown and cannot be used for any
8133 subsequent constant folding.
8134 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8135 unknown, so is the result of the comparison.
8137 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8139 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8140 From_Abort. When finalization was triggered by an abort, propagate
8141 Standard'Abort_Signal rather than Program_Error.
8142 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8144 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8145 From_Abort. When finalization was triggered by an abort, propagate
8146 Standard'Abort_Signal rather than Program_Error.
8147 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8149 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8150 Abort_Id. Update the calls to Build_Object_Declarations and
8151 Build_Raise_Statement to include Abort_Id.
8152 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8153 calls to Build_Object_Declarations and Build_Raise_Statement to include
8155 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8156 calls to Build_Object_Declarations and Build_Raise_Statement to include
8158 (Build_Components): Create an entity for Abort_Id when exceptions are
8159 allowed on the target.
8160 (Build_Finalizer): New local variable Abort_Id.
8161 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8162 calls to Build_Object_Declarations and Build_Raise_Statement to include
8164 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8165 declaration of flag Abort_Id to preserve the original abort status
8166 before finalization code is executed.
8167 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8168 runtime routine Raise_From_Controlled_Operation.
8169 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8170 Abort_Id. Update the call to Build_Object_Declarations to include
8171 Abort_Id. Update the layout of the finalizer body.
8172 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8173 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8174 clunky code to create all flags and objects related to
8175 exception propagation and replace it with a call to
8176 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8178 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8179 Add new formal Abort_Id and associated comment on its use.
8180 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8182 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8183 Remove the clunky code to create all flags and objects related to
8184 exception propagation and replace it with a call to
8185 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8187 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8189 * s-tassta.adb: Fix minor typos.
8191 2011-08-03 Robert Dewar <dewar@adacore.com>
8193 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8194 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8196 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8198 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8199 to packages. This ensures that the finalizer body will not end up
8200 inside the freeze node.
8201 (Process_Declarations): Add code to detect whether a freeze node has a
8202 nested finalization collection.
8204 2011-08-03 Pascal Obry <obry@adacore.com>
8206 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8207 (Current_Session): Return a not null access to Session_Type.
8208 (Default_Session): Likewise.
8210 2011-08-03 Robert Dewar <dewar@adacore.com>
8212 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8213 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8215 2011-08-03 Pascal Obry <obry@adacore.com>
8217 * g-awk.ads: Minor comment fix.
8219 2011-08-03 Sergey Rybin <rybin@adacore.com>
8221 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8222 the tree structure related to discriminant constraints.
8223 Original_Discriminant cannot be used any more for computing the
8224 defining name for the reference to a discriminant.
8226 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8228 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8229 function is not visibly tagged, this is not a dispatching call and
8230 therfore is not Tag_Indeterminate, even if the function is marked as
8231 dispatching on result.
8233 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8235 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8236 (Expand_N_Free_Statement): Add a guard to protect against run-times
8237 which do not support controlled types.
8238 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8239 against run-times which do not support controlled types.
8240 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8241 against run-times which do not support controlled types.
8242 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8243 against run-times which do not support controlled types.
8244 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8245 protect against run-times which do not support controlled types.
8247 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8249 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8250 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8252 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8254 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8255 modified in the source, to prevent spurious warnings when compiling
8258 2011-08-03 Thomas Quinot <quinot@adacore.com>
8260 * a-except-2005.adb: Minor reformatting.
8262 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8264 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8265 is a renaming declaration in the private part of a package, do not emit
8266 a warning that the with_clause could be moved because the renaming may
8267 be used in the body or in a child unit.
8269 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8271 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8272 Propagate the Comes_From_Source attribute from the original return
8273 object to the renaming.
8275 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8277 * exp_ch7.adb (Build_Raise_Statement): Do not call
8278 Raise_From_Controlled_Operation when this routine is not present in
8279 the run-time library.
8280 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8281 libraries (Ravenscar), tasks are non-terminating, and protected objects
8282 and tasks can only appear at library level, so we do not want
8283 finalization of protected objects nor tasks.
8284 * exp_intr.adb: Minor clarification in comment.
8285 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8286 Gen_Output_File_C): Remove references to finalization of library-level
8287 objects when using restricted run-time libraries.
8289 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8291 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8292 Original_Discriminant only if the parent type is a generic formal.
8294 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8296 * exp_ch13.adb: Add with and use clause for Targparm;
8297 (Expand_N_Free_Statement): Prevent the generation of a custom
8298 Deallocate on .NET/JVM targets since this requires pools and address
8300 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8301 .NET/JVM targets, attach the newly allocated object to the access
8302 type's finalization collection. Do not generate a call to
8303 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8304 exist in the runtime.
8305 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8306 create a custom Allocate for object that do not require initialization.
8307 Attach a newly allocated object to the access type's finalization
8308 collection on .NET/JVM.
8309 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8310 assignment of controlled types on .NET/JVM. The two hidden pointers
8311 Prev and Next and stored and later restored after the assignment takes
8313 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8314 kludge for .NET/JVM to recognize a particular piece of code coming from
8315 Heap_Management and change the call to Finalize into Deep_Finalize.
8316 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8317 finalization collections on .NET/JVM only for types derived from
8318 Controlled. Separate the association of storage pools with a collection
8319 and only allow it on non-.NET/JVM targets.
8320 (Make_Attach_Call): New routine.
8321 (Make_Detach_Call): New routine.
8322 (Process_Object_Declarations): Suppress the generation of
8323 build-in-place return object clean up code on .NET/JVM since it uses
8325 * exp_ch7.ads (Make_Attach_Call): New routine.
8326 (Make_Detach_Call): New routine.
8327 * exp_intr.adb Add with and use clause for Targparm.
8328 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8329 on .NET/JVM targets.
8330 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8331 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8332 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8333 names used in finalization.
8335 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8337 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8338 (Attach, Detach): Lock the current task when chaining an object onto a
8341 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8343 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8344 Rewritten to create the message strings when the exception is not
8345 raised by an abort during finalization.
8346 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8347 Raise_From_Controlled_Operation and update its associated comment.
8348 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8349 Ada.Finalization.Heap_Management provides key functionality
8350 associated with controlled objects on the heap, their creation,
8351 finalization and reclamation. Type Finalization_Collection is
8352 effectively a wrapper which sits ontop of a storage pool and performs
8353 all necessary bookkeeping for all the objects it contains. Each
8354 access-to-controlled or access-to-class-wide type receives a collection
8355 as part of its expansion. The compiler generates buffer code and
8356 invokes Allocate / Deallocate to create and destroy allocated
8358 * a-finali.adb ("="): Removed.
8359 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8360 fields Prev and Next.
8361 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8362 A library unit with at least one controlled object on the library level
8363 has a special finalizer which is invoked by the binder. To signal this,
8364 ali files carry field PF.
8365 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8366 associated comment on field usage.
8367 * a-tags.adb (Get_RC_Offset): Removed.
8368 (Needs_Finalization): New routine.
8369 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8370 Dispatch tables now carry field Needs_Finalization which provides
8371 runtime indication whether a type is controlled or has controlled
8372 components or both. Remove field RC_Offset.
8373 (Get_RC_Offset): Removed along with its associated pragma Export.
8374 Since tagged types with controlled components no longer carry hidden
8375 field _controller, the special mechanism to retrieve its location is no
8377 (Needs_Finalization): New routine.
8378 * atree.ads, atree.adb (Elist24): New routine.
8379 (Set_Elist24): New routine.
8380 * atree.h: Add a define clause for Elist24.
8381 * bindgen.adb New library-level variable Lib_Final_Built.
8382 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8383 presence of a VM target, the routine generates calls to the proper
8384 library finalization routine.
8385 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8386 targets. Set the correct library finalization routine depending on
8387 whether the library has controlled objects or this is a VM compilation.
8388 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8389 to library-level finalizers of compiled units in reverse order of
8390 elaboration. It also produces exception management code and reraises a
8391 potential exception after all units have been finalized.
8392 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8393 library-level finalizers of compiled units in reverse order of
8395 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8396 definitions of all library-level finalizers available to the compilation
8397 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8399 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8400 System.Standard_Library.Adafinal directly. If the library needs
8401 finalization actions, create the sequence of finalization calls.
8402 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8403 Generate a with clause for System.Soft_Links when compiling for a VM.
8404 Remove the code which imports System.Standard_Library.Adafinal as
8405 Do_Finalize. Generate the library finalization routine.
8406 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8407 If the library needs finalization actions, create all the definitions
8408 of library- level finalizers.
8409 (Has_Finalizer): New routine. Determines whether at least one compiled
8410 unit has a library-level finalizer.
8411 Add type Qualification_Mode.
8412 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8413 * einfo.adb: New usage of field 15 as Return_Flag.
8414 Remove Finalization_Chain_Entity from the usages of field 19.
8415 Remove Associated_Final_Chain from the usages of field 23.
8416 New usage of field 23 as Associated_Collection.
8417 New usage of field 24 as Finalizer.
8418 New usage of flag 252 as Is_Processed_Transient.
8419 (Associated_Final_Chain): Removed.
8420 (Associated_Collection): New routine.
8421 (Finalization_Chain_Entity): Removed.
8422 (Finalizer): New routine.
8423 (Is_Finalizer): New routine.
8424 (Is_Processed_Transient): New routine.
8425 (Return_Flag): New routine.
8426 (Set_Associated_Final_Chain): Removed.
8427 (Set_Associated_Collection): New routine.
8428 (Set_Finalization_Chain_Entity): Removed.
8429 (Set_Finalizer): New routine.
8430 (Set_Is_Processed_Transient): New routine.
8431 (Set_Return_Flag): New routine.
8432 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8434 (Write_Field8_Name): Alphabetize the output.
8435 (Write_Field11_Name): Alphabetize the output.
8436 (Write_Field12_Name): Alphabetize the output.
8437 (Write_Field13_Name): Alphabetize the output.
8438 (Write_Field14_Name): Alphabetize the output.
8439 (Write_Field15_Name): Alphabetize the output.
8440 (Write_Field16_Name): Alphabetize the output.
8441 (Write_Field17_Name): Alphabetize the output.
8442 (Write_Field18_Name): Alphabetize the output.
8443 (Write_Field19_Name): Alphabetize the output. Remove the output of
8444 Finalization_Chain_Entity.
8445 (Write_Field20_Name): Alphabetize the output.
8446 (Write_Field21_Name): Alphabetize the output.
8447 (Write_Field22_Name): Alphabetize the output.
8448 (Write_Field23_Name): Alphabetize the output. Remove the output of
8449 Associated_Final_Chain. Add output for Associated_Collection.
8450 (Write_Field24_Name): Alphabetize the output.
8451 (Write_Field25_Name): Add output for Finalizer.
8452 (Write_Field26_Name): Alphabetize the output.
8453 (Write_Field27_Name): Alphabetize the output.
8454 (Write_Field28_Name): Alphabetize the output.
8455 * einfo.ads: Add new field description for Associated_Collection and
8457 Remove Associated_Final_Chain and its uses in nodes.
8458 Remove Finalization_Chain_Entity and its uses in nodes.
8459 Add new field description for Finalizer and its uses in nodes.
8460 Add new synthesized attribute Is_Finalizer.
8461 Add new flag description for Is_Processed_Transient and its uses in
8463 Add new field description for Return_Flag and its uses in nodes.
8464 (Associated_Final_Chain): Removed along with its pragma Inline.
8465 (Associated_Collection): New routine and pragma Inline.
8466 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8467 (Finalizer): New routine and pragma Inline.
8468 (Is_Finalizer): New routine and pragma Inline.
8469 (Is_Processed_Transient): New routine and pragma Inline.
8470 (Return_Flag): New routine and pragma Inline.
8471 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8472 (Set_Associated_Collection): New routine and pragma Inline.
8473 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8474 (Set_Finalizer): New routine and pragma Inline.
8475 (Set_Is_Processed_Transient): New routine and pragma Inline.
8476 (Set_Return_Flag): New routine and pragma Inline.
8477 * exp_aggr.adb: Alphabetize subprograms.
8478 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8479 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8480 associated comments. Remove local variables External_Final_List and
8482 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8483 Ancestor. Remove the retrieval of finalization lists. Update the call to
8485 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8486 lists. Update the call to Late_Expansion.
8487 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8488 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8489 (Gen_Assign): Remove the retrieval of the finalization list used to
8490 build the assignment. Update the calls to Make_Init_Call and
8492 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8493 Remove the mechanism to determine attachment levels and finalization
8494 list retrieval. Remove the processing for coextensions.
8495 (Init_Controller): Removed. Controllers no longer exist.
8496 (Late_Expansion): Remove formals Flist and Obj along with their
8497 associated comments. Update the calls to Build_Record_Aggr_Code and
8498 Build_Array_Aggr_Code.
8499 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8500 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8501 appear in entry bodies, protected subprograms and task bodies.
8502 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8503 * exp_ch3.adb (Add_Final_Chain): Removed.
8504 (Build_Array_Init_Proc): Alphabetize local variables.
8505 (Build_Assignment): Alphabetize local variables. Update the call to
8507 (Build_Class_Wide_Master): Rename local variables to better reflect
8509 (Build_Discriminant_Assignments): Code reformatting.
8510 (Build_Init_Call_Thru): Code reformatting.
8511 (Build_Init_Procedure): Code reformatting. Generate a special version
8512 of Deep_Finalize which is capable of finalizing all initialized
8513 components and ignore the rest.
8514 (Build_Init_Statements): Rename local variables to better reflect their
8516 Reimplement the mechanism to include the creation and update of an index
8517 variable called a "counter". It is used as a bookmark for tracing
8518 initialized and non-initialized components.
8519 (Build_Initialization_Call): Remove local variable Controller_Typ.
8520 Alphabetize all local variables. Remove the initialization of the
8521 record controller and update the call to Make_Init_Call.
8522 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8523 New local variable Counter.
8524 (Constrain_Array): Alphabetize.
8525 (Expand_Freeze_Array_Type): Create a collection instead of a
8527 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8528 Finalize_Address which is used in conjunction with allocated controlled
8530 (Expand_N_Object_Declaration): Remove the creation of a finalization
8531 list for anonymous access types. Update the calls to Make_Init_Call and
8533 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8534 retrieval of finalization lists. Remove the expansion of the record
8535 controller. Create TSS primitive Finalize_Address used in conjunction
8536 with controlled objects on the heap. Create finalization collections
8537 for access-to-controlled record components.
8538 (Expand_Record_Controller): Removed.
8539 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8540 class-wide types now requires additional processing. Create
8541 finalization collections for access-to-controlled types.
8542 (Increment_Counter): New routine.
8543 (Make_Counter): New routine.
8544 (Make_Eq_If): Remove the mention of Name_uController.
8545 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8546 types coming from System.Finalization_Root.
8547 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8548 (Predefined_Primitive_Bodies): There is no longer need to skip types
8549 coming from System.Finalization_Root.
8550 (Stream_Operation_OK): Do not generate stream routines for
8551 type Ada.Finalization.Heap_Management.Finalization_Collection.
8552 * exp_ch3.ads: Alphabetize subprograms.
8553 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8554 Add with and use clause for Lib.
8555 (Complete_Coextension_Finalization): Removed.
8556 (Complete_Controlled_Allocation): New routine. Create a finalization
8557 collection for anonymous access-to-controlled types. Create a custom
8558 Allocate which interfaces with the back end and the machinery in
8560 (Expand_Allocator_Expression): Add necessary calls to
8561 Complete_Controlled_Allocation. Remove the retrieval of finalization
8562 lists. Update the calls to Make_Adjust_Call. Generate a call to
8563 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8564 the associated collection.
8565 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8566 Code clean up. Remove the retrieval of finalization lists and
8568 Update the call to Make_Init_Call. Generate a call to
8569 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8570 the associated collection.
8571 (Get_Allocator_Final_List): Removed. Finalization lists are not
8573 (Suitable_Element): Remove the mention of Name_uController.
8574 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8575 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8576 the left hand side, carry out the assignment and adjust the left hand
8578 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8579 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8580 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8581 BIP_Collection and BIPcollection.
8582 (Build_Heap_Allocator): New routine used to allocate the return object
8583 of a build-in-place function onto a collection.
8584 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8585 (Expand_Call): Do not replace direct calls to Deep routines with their
8587 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8588 and update their occurrences. Add a special return flag to monitor the
8589 [ab]normal execution of the function. The flag is set right before the
8591 Rewrite the mechanism used to allocate a build-in-place return object
8592 on the heap or on a storage pool.
8593 (Is_Direct_Deep_Call): New routine.
8594 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8595 build-in-place function call instead of a final list. Build a call to
8596 Set_Finalize_Address_Ptr to decorate the associated collection.
8597 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8598 order to name the build-in-place function call's result for later
8599 finalization. Add a collection to a build-in-place function call
8600 instead of a final list.
8601 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8602 build-in-place function call instead of a final list. Remove the code
8603 which moves one final list and transforms it into the actual in a
8604 nested build-in-place call.
8605 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8606 build-in-place function call instead of a final list.
8607 (Move_Final_List): Removed.
8608 (Needs_BIP_Collection): New routine.
8609 (Needs_BIP_Final_List): Removed.
8610 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8611 enumeration type BIP_Formal_Kind.
8612 Update the related comment.
8613 (Needs_BIP_Collection): New routine.
8614 (Needs_BIP_Final_List): Removed.
8615 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8616 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8617 majority of subprograms in this unit. Add Name_Finalize_Address to
8618 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8619 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8620 statements for an array type.
8621 (Build_Adjust_Statements): Create the adjust statements for a record
8623 (Build_Cleanup_Statements): New routine. A procedure which given any
8624 construct containing asynchronous calls, references to _master, or is a
8625 task body, a task allocation or a protected body produces the necessary
8626 runtime calls to clean up these constructs.
8627 (Build_Exception_Handler): New routine.
8628 (Build_Final_List): Removed.
8629 (Build_Finalization_Collection): New routine. A core procedure which
8630 creates a collection to service heap allocated controlled objects
8631 associated with an access-to-controlled type.
8632 (Build_Finalize_Statements): Create the finalization statements for a
8634 (Build_Finalizer): New routine. A core procedure which given any
8635 construct with declarations and/or statements detects all objects which
8636 need any type of clean up (controlled objects, protected objects) and
8637 generates all necessary code to clean up the said objects in the proper
8639 (Build_Finalizer_Call): New routine.
8640 (Build_Initialize_Statements): Create the initialization statements for
8641 an array type. The generated routine contains code to finalize partially
8643 (Build_Object_Declarations): New routine.
8644 (Build_Raise_Statement): New routine.
8645 (Clean_Simple_Protected_Objects): Removed.
8646 (Controller_Component): Removed.
8647 (Enclosing_Function): New routine.
8648 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8649 either declarations or statements or both.
8650 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8651 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8653 (Find_Final_List): Removed.
8654 (Global_Flist_Ref): Removed.
8655 (In_Finalization_Root): Removed.
8656 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8657 scope in terms of tree nodes. Process all transient variables within
8659 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8660 generated after the adjust.
8661 (Make_Attach_Call): Removed.
8662 (Make_Call): New routine.
8663 (Make_Clean): Removed.
8664 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8666 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8668 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8670 (Make_Final_Call): Modified to simply create a call to either
8671 Deep_Finalize or Finalize.
8672 (Make_Finalize_Address_Body): New routine.
8673 (Make_Finalize_Address_Stmts): New routine. A function which produces
8674 TSS primitive Finalize_Address used in conjunction with heap allocated
8676 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8677 (Make_Init_Call): Rewritten. There is no longer an attach call
8678 generated after initialization.
8679 (Make_Local_Deep_Finalize): New routine.
8680 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8681 (Make_Transient_Block): Remove the finalization list retrieval and
8683 (Needs_Finalization): Moved to Exp_Util.
8684 (Parent_Field_Type): New routine.
8685 (Preprocess_Components): New routine.
8686 (Process_Transient_Objects): New routine.
8687 (Wrap_HSS_In_Block): New routine.
8688 (Wrap_Transient_Declaration): Remove finalization list management and
8689 controller insertion.
8690 (Wrap_Transient_Expression): Code reformatting.
8691 (Wrap_Transient_Statement): Code reformatting.
8692 * exp_ch7.ads (Build_Final_List): Removed.
8693 (Build_Finalization_Collection): New routine.
8694 (Build_Raise_Statement): New routine.
8695 (Controller_Component): Removed.
8696 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8697 (Find_Final_List): Removed.
8698 (In_Finalization_Root): Removed.
8699 (Is_Simple_Protected_Type): Update related comment.
8700 (Make_Adjust_Call): New parameter profile and associated comments.
8701 (Make_Attach_Call): Removed.
8702 (Make_Final_Call): New parameter profile and associated comments.
8703 (Make_Finalize_Address_Body): New routine.
8704 (Make_Init_Call): New parameter profile and associated comments.
8705 (Make_Local_Deep_Finalize): New routine.
8706 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8707 (Needs_Finalization): Moved to Exp_Util.
8708 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8709 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8710 (Find_Protection_Type): Moved to Exp_Util.
8711 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8712 (Make_DT): Update sequence of dispatch table initialization. Remove the
8713 initialization of field RC_Offset. Add initialization of field Needs_
8715 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8716 Reimplement how an object is first finalized, then deallocated.
8717 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8719 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8720 Register TSS_Finalize_Address with type TSS_Names.
8721 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8722 procedure provides the interface between an allocation / deallocation
8723 and the support machinery in Ada.Finalization.Heap_Management.
8724 (Find_Init_Call): Code reformatting.
8725 (Find_Init_Call_In_List): Code reformatting.
8726 (Find_Protection_Type): Moved from Exp_Ch9.
8727 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8728 (Has_Controlled_Coextensions): Removed.
8729 (Has_Controlled_Objects): New routine.
8730 (In_Library_Level_Package_Body): New routine.
8731 (Insert_Action_After): New routine.
8732 (Is_Finalizable_Transient): New routine. This predicate determines
8733 whether an object declaration is one of the many variants of controlled
8735 (Is_Null_Access_BIP_Func_Call): New routine.
8736 (Is_Non_BIP_Func_Call): New routine.
8737 (Is_Related_To_Func_Return): New routine.
8738 (Needs_Finalization): Moved from Exp_Ch7.
8739 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8740 (Find_Protection_Type): Moved from Exp_Ch9.
8741 (Has_Controlled_Coextensions): Removed.
8742 (Has_Controlled_Objects): New routine.
8743 (In_Library_Level_Package_Body): New routine.
8744 (Insert_Action_After): New routine.
8745 (Is_Finalizable_Transient): New routine.
8746 (Is_Null_Access_BIP_Func_Call): New routine.
8747 (Is_Non_BIP_Func_Call): New routine.
8748 (Is_Related_To_Func_Return): New routine.
8749 (Needs_Finalization): Moved from Exp_ch7.
8750 * expander.adb (Expand): Add a case for N_Free_Statement.
8751 * freeze.adb (Freeze_All): Replace the generation of a finalization
8752 list with a collection for access-to-controlled types.
8753 (Freeze_Entity): Code reformatting.
8754 (Freeze_Record_Type): Remove the freezing of a record controller
8756 (Freeze_Subprogram): Code reformatting.
8757 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8759 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8760 has a library-level finalizer.
8761 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8762 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8763 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8764 files. Add a-fihema to the list of object files.
8766 Alphabetize the associations in type Is_Parameterless_Attribute.
8767 * rtsfind.ads: Ada.Finalization_List.Controller and
8768 System.Finalization_Implementation are no longer a GNAT unit.
8769 Update the range of type Ada_Finalization_Child. Remove the following
8770 recoverable entities:
8772 RE_Attach_To_Final_List
8776 RE_Finalizable_Ptr_Ptr
8777 RE_Global_Final_List
8778 RE_Limited_Record_Controller
8781 RE_Record_Controller
8782 RE_Simple_List_Controller
8784 Add the following recoverable entities:
8786 RE_Add_Offset_To_Address
8790 RE_Exception_Identity
8791 RE_Finalization_Collection
8792 RE_Finalization_Collection_Ptr
8793 RE_Needs_Finalization
8794 RE_Save_Library_Occurrence
8795 RE_Set_Finalize_Address_Ptr
8796 RE_Set_Storage_Pool_Ptr
8798 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8800 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8801 (First_Stored_Discriminant): Remove the mention of Name_uController.
8802 * sem_aux.ads: Comment reformatting.
8803 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8804 to redecorate an already existing class-wide type.
8805 (Decorate_Tagged_Type): New parameter profile and associated comment.
8806 Create a "shadow class-wide type" for a shadow entity.
8807 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8808 of the final chain along with the associated comment.
8809 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8810 Full_Desig and set it to the full view of the designated type.
8811 Initialize the finalization collection to empty.
8812 (Build_Derived_Record_Type): Alphabetize local variables. Code
8814 (Collect_Fixed_Components): Remove the mention of Name_uController.
8815 (Create_Constrained_Components): Remove the mention of Name_uController.
8816 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8817 class-wide type of a shadow entity.
8818 (Process_Full_View): Update the machinery which marks type
8819 Limited_Controlled's entity as limited.
8820 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8821 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8822 list, instead make a collection build-in-place formal.
8823 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8824 a designated type in order to establish a match between the renaming
8825 and the renamed entity.
8826 (Find_Selected_Component): Add guard to prevent spurious exceptions
8827 from being raised on .NET/JVM.
8828 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8829 to the list of primitive that need special processing. Update arrays
8830 C_Names and D_Names.
8831 (Replace_Types): Handle class-wide types.
8832 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8833 different parameter profile, look at the first formal.
8834 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8835 use clauses for Exp_Util.
8836 * sem_res.adb: Remove with and use clauses for Elists.
8837 (Propagate_Coextensions): Removed.
8838 (Resolve_Allocator): Do not propagate the list of coextensions from one
8839 allocator to another.
8840 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8841 Deaccessed_T to Desig_Typ.
8842 (Enter_Name): Remove the mention of Name_uController.
8843 (Gather_Components): Remove the mention of Name_uController.
8844 (Incomplete_Or_Private_View): New routine.
8845 (Is_Coextension_Root): Removed.
8846 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8847 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8848 (Is_Coextension_Root): Removed.
8849 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8850 Controlled types are now derived from a null tagged record. Remove
8851 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8852 * sinfo.adb (Coextensions): Removed.
8853 (Set_Coextensions): Removed.
8854 * sinfo.ads: Remove Coextensions from the explanation of node fields
8855 and its uses in nodes.
8856 Update the field usage of N_Allocator.
8857 (Coextensions): Removed along with its pragma Inline.
8858 (Set_Coextensions): Removed along with its pragma Inline.
8859 * snames.ads-tmpl: Remove names
8864 Name_uLocal_Final_List
8865 Name_Finalization_Root
8872 Name_Finalize_Address
8873 * s-pooglo.adb (Allocate): Add overriding indicator.
8874 (Deallocate): Add overriding indicator.
8875 (Storage_Size): Add overriding indicator.
8876 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8877 than Finalize_Global_List.
8878 (Null_Finalize_Global_List): Removed.
8879 (Save_Library_Occurrence): New routine.
8880 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8881 initialization. Add variable Finalize_Library_Objects along with its
8882 pragma Export. Add variables Library_Exception and
8883 Library_Exception_Set along with their pragma Export.
8884 (Null_Finalize_Global_List): Removed.
8885 (Save_Library_Occurrence): New routine.
8886 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8887 rather than Finalize_Global_List.
8888 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8889 of the constructed node.
8891 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8893 * link.c: Include "auto-host.h" before system headers.
8895 2011-08-03 Vincent Celier <celier@adacore.com>
8897 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8898 that are not extended. Do not check if a library project that is
8899 extended should be regenerated. Do not add to table Library_Paths the
8900 libraries that are in extended projects. Link only with libraries that
8901 are in libray projects that are not extended.
8902 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8903 for a library project that is extended.
8905 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8907 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8908 conforming subprogram renamings that appear to be completions if they
8909 are not fully conformant.
8910 Such renamings are homographs but not completions.
8911 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8912 names in a subprogram renaming that appears in an instance.
8914 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8916 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8917 not immutably limited, build actual subtype from expression to provide
8918 proper bounds to caller.
8920 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8922 * sem_ch8.adb: Minor comment correction.
8924 2011-08-03 Thomas Quinot <quinot@adacore.com>
8926 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8927 returning a limited array, use an extended return statement.
8929 2011-08-03 Vincent Celier <celier@adacore.com>
8931 * make.adb (Initialize): If --subdirs= is used, but no project file is
8932 specified, attempt to create the specify subdir if it does not already
8933 exist and use it as the object directory as if -D had been specified.
8935 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8937 * s-tpopsp-vms.adb: New file.
8938 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8939 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8941 2011-08-03 Emmanuel Briot <briot@adacore.com>
8943 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8946 2011-08-03 Yannick Moy <moy@adacore.com>
8948 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8949 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8950 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8951 detect that an array has static bounds.
8953 2011-08-03 Thomas Quinot <quinot@adacore.com>
8955 * exp_dist.adb: Minor reformatting.
8957 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8959 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8960 (ATCB_Key): Removed, not always used.
8962 2011-08-03 Emmanuel Briot <briot@adacore.com>
8964 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8965 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8966 most remaining global variables.
8968 2011-08-03 Robert Dewar <dewar@adacore.com>
8970 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8971 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8974 2011-08-03 Javier Miranda <miranda@adacore.com>
8976 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8977 that must be passed by copy in VM targets.
8979 2011-08-03 Emmanuel Briot <briot@adacore.com>
8981 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8982 duplicates a similar htable now in the project tree.
8984 2011-08-03 Claire Dross <dross@adacore.com>
8986 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8987 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8988 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8989 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8990 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8991 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8992 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8995 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8997 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8998 (ATCB_Key): Removed, not always used.
8999 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9001 * s-tpopsp-tls.adb: New file.
9002 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9003 x86/x64/ia64/powerpc/sparc Linux.
9005 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9007 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9008 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9010 2011-08-03 Thomas Quinot <quinot@adacore.com>
9012 * rtsfind.ads, exp_dist.adb, exp_dist.ads
9013 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9014 Fix type selection for mapping integer types to PolyORB types.
9016 2011-08-03 Bob Duff <duff@adacore.com>
9018 * sem_ch7.adb: Minor comment clarification.
9020 2011-08-03 Bob Duff <duff@adacore.com>
9022 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9023 an error analyzing a choice, skip further processing. Further
9024 processing could cause a crash or cascade errors.
9026 2011-08-03 Emmanuel Briot <briot@adacore.com>
9028 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9029 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9030 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9031 prj-env.ads (Shared_Project_Tree_Data): new type
9032 An aggregate project and its aggregated trees need to share the common
9033 data structures used for lists of strings, packages,... This makes the
9034 code simpler since otherwise we have to pass the root tree (also used
9035 for the configuration file data) in addition to the current project
9036 tree. This also avoids ambiguities as to which tree should be used.
9037 And finally this saves a bit of memory.
9038 (For_Every_Project_Imported): new parameter Tree.
9039 Since aggregated projects are using a different tree, we need to let
9040 the caller know which tree to use to manipulate the returned project.
9042 2011-08-03 Robert Dewar <dewar@adacore.com>
9044 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9045 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9046 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9047 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9049 2011-08-03 Javier Miranda <miranda@adacore.com>
9051 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9052 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9054 2011-08-03 Bob Duff <duff@adacore.com>
9056 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9059 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9061 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9062 g-sehash.ads: Fix typo. Update header.
9064 2011-08-03 Thomas Quinot <quinot@adacore.com>
9066 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9069 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9071 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9072 prefixes of private types along with records, since the selector may be
9074 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9075 private types along with records, since the selector may be a
9078 2011-08-03 Emmanuel Briot <briot@adacore.com>
9080 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9082 2011-08-03 Javier Miranda <miranda@adacore.com>
9084 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9085 Tagged_Type_Expansion.
9087 2011-08-03 Yannick Moy <moy@adacore.com>
9089 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9090 violation when the argument of concatenation is the name of a
9093 2011-08-03 Emmanuel Briot <briot@adacore.com>
9095 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9096 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9097 (Process_Declarative_Items): new parameter Child_Env.
9099 2011-08-03 Yannick Moy <moy@adacore.com>
9101 * alfa.ads: Update format of ALFA section in ALI file in order to
9102 add a mapping from bodies to specs when both are present.
9103 (ALFA_Scope_Record): Add components for spec file/scope.
9104 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9106 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9107 collected, fill in the spec information when relevant.
9108 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9111 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9113 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9114 code unit to decide whether to add internally generated subprograms.
9116 2011-08-03 Javier Miranda <miranda@adacore.com>
9118 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9119 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9120 be handled by copy in VM targets.
9122 2011-08-03 Emmanuel Briot <briot@adacore.com>
9124 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9125 code with Makeutl.Get_Switches.
9126 * prj-tree.adb: Update comment.
9128 2011-08-03 Thomas Quinot <quinot@adacore.com>
9130 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9131 subprogram with a limited formal that does not support external
9134 2011-08-03 Yannick Moy <moy@adacore.com>
9136 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9138 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9139 not from current unit in two phases, because it is not possible to
9140 change the table while iterating over its content.
9141 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9143 2011-08-03 Sergey Rybin <rybin@adacore.com>
9145 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9146 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9148 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9150 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9151 and the component type is composite, this is ambiguous for predefined
9152 concatenation, but if the node is not overloaded and the entity is a use
9153 -defined function its profile can be used to resolve that aggregate.
9155 2011-08-03 Robert Dewar <dewar@adacore.com>
9157 * exp_ch4.adb: Minor code cleanup.
9159 2011-08-03 Thomas Quinot <quinot@adacore.com>
9161 * exp_dist.adb: Do not generate distribution stubs if serious errors
9162 have been diagnosed.
9164 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9166 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9167 the first formal of a primitive operation, go to the base type to
9168 handle properly an access to a derived type with constrained
9170 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9171 user-defined function that is only use-visible.
9173 2011-08-03 Robert Dewar <dewar@adacore.com>
9175 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9176 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9177 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9178 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9179 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9180 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9181 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9182 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9184 2011-08-03 Robert Dewar <dewar@adacore.com>
9186 * repinfo.adb (List_Mechanism): Add handling of
9187 Convention_Ada_Pass_By_XXX.
9188 * sem_mech.adb (Set_Mechanism): Ditto.
9189 * sem_prag.adb (Process_Convention): Add entries for
9190 Convention_Ada_Pass_By_XXX.
9191 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9193 2011-08-03 Pascal Obry <obry@adacore.com>
9195 * makeutl.adb: Minor reformatting.
9197 2011-08-03 Vincent Celier <celier@adacore.com>
9200 (Get_File_Name) If the file cannot be found when there are no config
9201 pragmas file and May_Fail is True, return No_File instead of the file
9202 name, to be consistent.
9204 2011-08-03 Pascal Obry <obry@adacore.com>
9206 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9209 2011-08-03 Javier Miranda <miranda@adacore.com>
9212 (Same_Representation): In VM targets the representation of arrays with
9213 aliased components differs from arrays with non-aliased components.
9215 2011-08-03 Emmanuel Briot <briot@adacore.com>
9217 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9218 not systematically lower case attribute indexes that contain no "."
9219 Fix definition of several Naming attributes, which take
9220 a unit name as index and therefore should be case insensitive.
9221 Minor refactoring (reduce length of variable names).
9223 2011-08-03 Emmanuel Briot <briot@adacore.com>
9225 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9227 2011-08-03 Emmanuel Briot <briot@adacore.com>
9229 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9230 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9231 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9232 prj-tree.ads (Prj.Tree.Environment): new type.
9234 2011-08-03 Emmanuel Briot <briot@adacore.com>
9236 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9237 prj-tree.adb, prj-tree.ads (Environment): new type.
9239 2011-08-03 Emmanuel Briot <briot@adacore.com>
9241 * prj-tree.ads: Remove unused variable.
9243 2011-08-03 Yannick Moy <moy@adacore.com>
9245 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9246 issuing messages related to SPARK restriction violation.
9248 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9250 * sem_ch6.adb: guard against error nodes in return statements.
9252 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9254 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9255 a warning can only appear on a configuration file, so emit warning
9256 without further checks.
9258 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9260 * s-interr.ads: add overriding keyword.
9262 2011-08-03 Geert Bosch <bosch@adacore.com>
9264 * exp_attr.adb: Fix minor typo.
9266 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9268 * par-ch4.adb: improve error recovery.
9270 2011-08-03 Emmanuel Briot <briot@adacore.com>
9272 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9273 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9276 2011-08-03 Emmanuel Briot <briot@adacore.com>
9278 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9279 "external" as an attribute name in aggregate projects.
9281 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9283 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9284 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9285 from 0, so we need to adjust.
9287 2011-08-03 Emmanuel Briot <briot@adacore.com>
9289 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9290 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9292 2011-08-03 Yannick Moy <moy@adacore.com>
9294 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9295 restriction on overloaded entity if the entity is not an operator.
9297 2011-08-03 Yannick Moy <moy@adacore.com>
9299 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9300 restrict.ads: Rename remaining Check_Formal_Restriction* into
9301 Check_SPARK_Restriction*.
9303 2011-08-03 Emmanuel Briot <briot@adacore.com>
9305 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9306 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9308 (Project_Empty): removed
9309 (Empty_Project): new parameter Qualifier
9310 This is used to have fields specific to aggregate projects, cleaner
9311 New field to store the list of aggregated projects.
9312 (Check_Aggregate_Project): removed
9313 (Process_Aggregated_Projects, Free): new subprograms.
9315 2011-08-03 Olivier Hainque <hainque@adacore.com>
9317 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9319 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9321 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9322 explicit dereference of an unconstrained type, create a constrained
9323 subtype for it, as is done for function calls that return an
9326 2011-08-03 Thomas Quinot <quinot@adacore.com>
9328 * g-pehage.adb (Finalize): Avoid possible double-free.
9330 2011-08-03 Steve Baird <baird@adacore.com>
9332 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9333 Elab_Spec/Body attrs in CodePeer_Mode.
9335 2011-08-03 Javier Miranda <miranda@adacore.com>
9337 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9338 low bound is not known at compile time but they have no others choice.
9339 Done because in this case the bounds can be obtained directly from the
9342 2011-08-03 Ed Falis <falis@adacore.com>
9344 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9345 on VxWorks SMP. Remove unusable constant ANY_CPU.
9347 2011-08-03 Emmanuel Briot <briot@adacore.com>
9349 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9350 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9351 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9352 Prj.Env.Initialize_Empty): new subprograms
9353 (Get_Env, Find_Project): remove parameter Target_Name.
9355 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9357 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9358 as a condition for the delayed call to Derived_Subprograms done for the
9359 case of the rewriting of a derived type that constrains the
9360 discriminants of its parent type.
9361 Avoids redundant subprogram derivations for private subtype derivations.
9363 2011-08-03 Javier Miranda <miranda@adacore.com>
9365 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9366 Build_Record_Aggr_Code.
9367 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9368 discriminants in extension aggregates.
9370 2011-08-03 Emmanuel Briot <briot@adacore.com>
9372 * prj-pp.adb (Print): also output project qualifiers, since in
9373 particular "aggregate" is mandatory in an aggregate project.
9375 2011-08-03 Emmanuel Briot <briot@adacore.com>
9377 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9378 (Debug_Output): new function.
9380 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9382 * gnat_ugn.texi: Document -Wstack-usage.
9383 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9385 2011-08-03 Thomas Quinot <quinot@adacore.com>
9387 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9388 have keyword LIMITED.
9390 2011-08-03 Yannick Moy <moy@adacore.com>
9392 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9393 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9394 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9395 section (does not happen in compiler, only if code directly calls
9397 * get_alfa.adb, get_alfa.ads: New files.
9398 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9400 * lib-xref-alfa.adb: New file.
9401 * lib-xref.adb, lib-xref.ads
9402 (Xref_Entry): redefine information needed in cross-references for ALFA.
9403 Push ALFA treatments in separated local package.
9404 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9405 identifiers. Return entity of package body instead of spec. Return
9406 Empty for a scope with no location.
9407 (Generate_Reference): adapt to new components for ALFA information.
9408 Remove the need for D references on definitions.
9409 (Is_Local_Reference): moved to ALFA local package
9410 (Output_References): extract subfunction as Extract_Source_Name
9411 (Output_Local_References): remove procedure, replaced by filtering of
9412 cross-references in package ALFA and printing in Put_ALFA.
9413 (Write_Entity_Name): remove procedure
9414 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9415 print exact name of entity as it appears in source file
9416 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9417 * put_alfa.adb, put_alfa.ads: New files.
9418 * xref_lib.adb (Search_Xref): protect read of cross-references against
9419 reading other sections of the ALI file, in gnatxref
9420 (Search): protect read of cross-references against reading other
9421 sections of the ALI file, in gnatfind.
9422 * gcc-interface/Make-lang.in: Update dependencies.
9424 2011-08-03 Thomas Quinot <quinot@adacore.com>
9426 * sem_ch3.adb: Minor reformatting.
9428 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9430 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9431 raising an exception.
9433 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9435 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9436 type, always use 1 as the lower bound or string, even if lower bound of
9437 context is not static, to handle properly null strings in a non-static
9440 2011-08-03 Bob Duff <duff@adacore.com>
9442 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9443 always legal on the right-hand side of an assignment statement; there
9444 is always an applicable index constraint in this case. Therefore, the
9445 check for Pkind = N_Assignment_Statement is now unconditional -- it
9446 doesn't depend on whether Is_Constrained (Typ).
9448 2011-08-03 Robert Dewar <dewar@adacore.com>
9450 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9452 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9454 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9455 for an itype created within a generic unit.
9457 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9459 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9460 suppresses all inlining.
9462 2011-08-03 Robert Dewar <dewar@adacore.com>
9464 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9465 exp_aggr.adb: Minor reformatting.
9467 2011-08-03 Thomas Quinot <quinot@adacore.com>
9469 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9470 tagged assignment when discriminant checks are suppressed. This is
9471 useless and extremely costly in terms of static stack usage.
9473 2011-08-03 Bob Duff <duff@adacore.com>
9475 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9476 of generics, because this leads to the wrong entity in the wrong scope,
9477 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9479 (Process_Interface_Name): Follow Alias for instances of generics, to
9480 correct for the above change.
9482 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9484 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9485 is an integer literal it is always safe to replace the reference. In
9486 addition, if the reference appears in the generated code for an object
9487 declaration it is necessary to copy because otherwise the reference
9488 might be to the uninitilized value of the discriminant of the object
9491 2011-08-03 Pascal Obry <obry@adacore.com>
9493 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9494 ACL used, in this case we want to check for ending .exe, not .exe
9495 anywhere in the path.
9497 2011-08-03 Sergey Rybin <rybin@adacore.com>
9499 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9500 the tree structure (semantic decoration of references to record
9503 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9505 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9506 choices of a named array aggregate, bail out when any choices are
9507 marked as Errors_Posted.
9509 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9511 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9512 in which entity is frozen, to handle properly loop variables in
9515 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9517 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9518 subtype is not static, compute the upper bound using attributes, to
9519 handle properly index types that are not integer types.
9521 2011-08-03 Bob Duff <duff@adacore.com>
9523 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9524 Update copyright notice.
9526 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9528 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9529 Original_Discriminant if within an instance.
9530 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9532 2011-08-03 Thomas Quinot <quinot@adacore.com>
9534 * einfo.ads: Minor reformatting.
9536 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9538 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9539 composite type with an unfrozen subcomponent, in the profile of a
9540 primitive operation.
9542 2011-08-03 Robert Dewar <dewar@adacore.com>
9544 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9546 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9548 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9549 unconstrained type with discriminants is initialized with an aggregate,
9550 use the constrained subtype of the aggregate as the type of the object,
9551 because it is immutable, and this allows the back-end to generate no
9552 code for the object declaration.
9554 2011-08-03 Robert Dewar <dewar@adacore.com>
9556 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9557 comparison operand is variable, and turns out to be zero or negative.
9559 2011-08-03 Javier Miranda <miranda@adacore.com>
9562 (Expand_Dispatching_Constructor_Call): Disable expansion of
9563 code required for native targets. Done to avoid generating
9564 references to unavailable runtime entities in VM targets.
9566 (Expand_N_Object_Declaration): Add missing support to handle
9567 the explicit initialization of class-wide interface objects.
9570 2011-08-03 Matthew Heaney <heaney@adacore.com>
9572 * a-cobove.adb (Merge): Move source onto target, instead of using
9575 2011-08-03 Matthew Heaney <heaney@adacore.com>
9577 * a-cbdlli.adb (Splice): Move source items from first to last.
9579 2011-08-03 Yannick Moy <moy@adacore.com>
9581 * sem_util.ads: Add comment.
9583 2011-08-03 Javier Miranda <miranda@adacore.com>
9586 (Expand_Record_Aggregate): In VM targets disable the expansion into
9587 assignments of aggregates whose type is not known at compile time.
9589 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9591 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9592 protected entries and task entries, to build the proper renaming
9593 declaration for entry formals, used in debugging.
9594 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9595 parameters in the same way.
9597 2011-08-02 Robert Dewar <dewar@adacore.com>
9599 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9600 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9601 code reorganization.
9603 2011-08-02 Robert Dewar <dewar@adacore.com>
9605 * debug.adb: Debug flag d.P to suppress length comparison optimization
9606 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9607 comparison of Length by comparing First/Last instead.
9609 2011-08-02 Matthew Heaney <heaney@adacore.com>
9611 * a-cobove.ads: Code clean up.
9613 2011-08-02 Vincent Celier <celier@adacore.com>
9615 * adaint.c (file_names_case_sensitive_cache): New static int.
9616 (__gnat_get_file_names_case_sensitive): Cache the return value in
9617 file_names_case_sensitive_cache at the first invocation, to avoid
9618 multiple calls to getenv.
9620 2011-08-02 Bob Duff <duff@adacore.com>
9622 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9624 2011-08-02 Yannick Moy <moy@adacore.com>
9626 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9627 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9628 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9629 indicate that we are in a precondition or postcondition. This is used in
9630 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9631 decide whether to flag the spec or body of the current subprogram as
9634 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9636 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9638 * a-extiin.ads: New file.
9640 2011-08-02 Bob Duff <duff@adacore.com>
9642 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9643 now raises Name_Error instead of Use_Error in certain cases. The other
9644 parts of this AI were already implemented properly.
9646 2011-08-02 Vincent Celier <celier@adacore.com>
9648 * link.c: Only import "auto-host.h" when building the gnattools.
9650 2011-08-02 Yannick Moy <moy@adacore.com>
9652 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9653 which calls a local subprogram, so extract subprogram
9654 from Mark_Non_ALFA_Subprogram_Body.
9656 2011-08-02 Javier Miranda <miranda@adacore.com>
9659 (Extract_Dispatching_Call): If the type of the dispatching object is an
9660 access type then return an explicit dereference in the Object out-mode
9663 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9665 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9666 compatibility checks for all indexes of an array subtype, not just the
9667 first. Reset Has_Dynamic_Range_Check on the subtype before each
9668 potential check to ensure that Insert_Range_Checks will not elide any
9669 of the dynamic checks.
9671 2011-08-02 Yannick Moy <moy@adacore.com>
9673 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9674 SPARK restriction at parsing time.
9675 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9676 directive only if the SPARK restriction is set for this unit.
9678 2011-08-02 Yannick Moy <moy@adacore.com>
9680 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9681 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9682 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9683 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9684 Mark_Non_ALFA_Subprogram_Body.
9685 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9688 2011-08-02 Yannick Moy <moy@adacore.com>
9690 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9693 2011-08-02 Robert Dewar <dewar@adacore.com>
9695 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9696 exp_ch3.adb: Minor reformatting.
9698 2011-08-02 Emmanuel Briot <briot@adacore.com>
9700 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9701 files, not any regular file.
9702 (__gnat_locate_file_with_predicate): new subprogram.
9704 2011-08-02 Yannick Moy <moy@adacore.com>
9706 * sinfo.adb, sinfo.ads: Restrict the use of flags
9707 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9708 nodes, plus N_Subtype_Declaration for the 2nd one.
9710 2011-08-02 Sergey Rybin <rybin@adacore.com>
9712 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9713 - fix bugs in the description of Source_Trace;
9714 - get rid of UNIT_NAME;
9716 2011-08-02 Javier Miranda <miranda@adacore.com>
9719 (Build_Dispatching_Requeue): Adding support for VM targets
9720 since we cannot directly reference the Tag entity.
9721 * exp_sel.adb (Build_K): Adding support for VM targets.
9722 (Build_S_Assignment): Adding support for VM targets.
9724 (Default_Prim_Op_Position): In VM targets do not restrict availability
9725 of predefined interface primitives to compiling in Ada 2005 mode.
9726 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9727 restricted to compiling in Ada 2005 mode.
9728 (Make_VM_TSD): Generate code that declares and initializes the OSD
9729 record. Needed to support dispatching calls through synchronized
9732 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9733 primitives associated with synchronized interfaces.
9734 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9735 primitives associated with synchronized interfaces.
9737 2011-08-02 Yannick Moy <moy@adacore.com>
9739 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9740 statements hidden in SPARK if preceded by the HIDE directive
9741 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9742 exception handlers as hidden in SPARK if preceded by the HIDE directive
9743 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9744 if starting with the HIDE directive
9745 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9746 starting with the HIDE directive; mark the declarations in a private
9747 part as hidden in SPARK if the private part starts with the HIDE
9749 * restrict.adb, restrict.ads
9750 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9751 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9752 argument node belongs to a part which is hidden in SPARK
9753 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9754 parts in SPARK; protect the possibly costly call to
9755 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9756 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9757 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9758 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9760 (Scan): recognize special comment starting with '#' and followed by
9761 SPARK keyword "hide" as a HIDE directive.
9763 2011-08-02 Yannick Moy <moy@adacore.com>
9765 * types.ads, erroutc.ads: Minor reformatting.
9767 2011-08-02 Vincent Celier <celier@adacore.com>
9769 * link.c: Add response file support for cross platforms.
9771 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9773 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9774 in an association, set parent field of copy before partial analysis.
9775 * sem_res.adb (Resolve_Slice): create reference to itype only when
9776 expansion is enabled.
9778 2011-08-02 Yannick Moy <moy@adacore.com>
9780 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9781 for new flag denoting which subprogram bodies are in ALFA
9782 * restrict.adb, sem_ch7.adb: Update comment
9783 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9784 sem_ch9.adb, sem_res.adb: Add calls to
9785 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9786 * sem_ch6.adb (Analyze_Function_Return): add calls to
9787 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9788 middle of the body, and extended return.
9789 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9790 False when missing return.
9791 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9792 to True for subprograms whose spec is in ALFA. Remove later on the flag
9793 on the entity used for a subprogram body when there exists a separate
9795 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9796 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9797 False, otherwise do nothing.
9799 2011-08-02 Robert Dewar <dewar@adacore.com>
9801 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9803 2011-08-02 Yannick Moy <moy@adacore.com>
9805 * sem_ch4.ads: minor formatting.
9807 2011-08-02 Yannick Moy <moy@adacore.com>
9809 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9810 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9811 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9812 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9813 opt.ads: cleanup of SPARK mode
9815 2011-08-02 Yannick Moy <moy@adacore.com>
9817 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9819 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9820 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9822 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9823 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9824 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9825 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9827 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9829 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9830 functions whose return type is not in ALFA.
9831 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9833 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9834 parameter's type is not in ALFA.
9835 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9840 * sem_ch6 (Analyze_Expression_Function): treat the function as
9841 Inline_Always, and introduce a subprogram declaration for it when it is
9843 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9844 expression functions, so that the back-end can determine whether they
9845 can in fact be inlined.
9846 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9847 a function body comes from an expression function.
9849 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9851 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9852 null exclusions to test Can_Never_Be_Null on the anonymous access types
9853 of the formals rather than testing the formals themselves. Exclude this
9854 check in cases where the Old_Formal is marked as a controlling formal,
9855 to avoid issuing spurious errors for bodies completing dispatching
9856 operations (due to the flag not getting set on controlling access
9857 formals in body specs).
9858 (Find_Corresponding_Spec): When checking full and subtype conformance of
9859 subprogram bodies in instances, pass Designated and E in that order, for
9860 consistency with the expected order of the formals (New_Id followed by
9863 2011-08-02 Robert Dewar <dewar@adacore.com>
9865 * sem_ch8.adb: Minor reformatting.
9867 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9869 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9870 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9871 primitive operations of class-wide actuals.
9873 2011-08-02 Javier Miranda <miranda@adacore.com>
9875 * exp_atag.ads, exp_atag.adb
9876 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9877 since its value is implicitly passed in argument Typ.
9878 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9879 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9880 Build_Common_Dispatching_Select_Statements.
9882 2011-08-02 Robert Dewar <dewar@adacore.com>
9884 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9885 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9888 2011-08-02 Robert Dewar <dewar@adacore.com>
9890 * sem_res.adb: Minor reformatting.
9891 * sem_prag.adb: Minor reformatting.
9893 2011-08-02 Javier Miranda <miranda@adacore.com>
9895 * exp_atag.adb, exp_atags.ads
9896 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9897 by the tagged type Entity. Required to use this routine in the VM
9898 targets since we do not have available the Tag entity in the VM
9901 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9902 Ada.Tags has not been previously loaded.
9904 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9905 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9907 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9908 view of enclosing scopes. Required to handle enclosing scopes that
9909 are synchronized types whose full view is a task type.
9911 (Build_VM_TSDs): Minor code improvement to avoid generating and
9912 analyzing lists with empty nodes.
9913 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9914 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9915 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9916 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9917 (Make_Select_Specific_Data_Table): Add support for VM targets.
9918 (Make_VM_TSD): Generate code to initialize the SSD structure of
9921 2011-08-02 Yannick Moy <moy@adacore.com>
9923 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9924 cross-references section in ALI.
9925 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9926 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9928 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9929 subprogram or package entity of a node
9930 (Is_Local_Reference_Type): new function returns True for references
9931 selected in local cross-references.
9932 (Lt): function extracted from Lt in Output_References
9933 (Write_Entity_Name): function extracted from Output_References
9934 (Generate_Definition): generate reference with type 'D' for definition
9935 of objects (object declaration and parameter specification), with
9936 appropriate locations and units, for use in local cross-references.
9937 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9938 references of type 'I' for initialization in object definition.
9939 (Output_References): move part of function Lt and procedure
9940 Write_Entity_Name outside of the body. Ignore references of types 'D'
9941 and 'I' introduced for local cross-references.
9942 (Output_Local_References): new procedure to output the local
9943 cross-references sections.
9944 (Lref_Entity_Status): new array defining whether an entity is a local
9945 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9946 with 'I' type when initialization expression is present.
9947 * get_scos.adb, get_scos.ads: Correct comments and typos
9949 2011-08-02 Javier Miranda <miranda@adacore.com>
9951 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9953 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9955 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9958 2011-08-02 Vincent Celier <celier@adacore.com>
9960 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9961 (No_Space_Img): New function
9962 (Find_Excluded_Sources): When reading from a file, record the file name
9963 and the line number for each excluded source.
9964 (Mark_Excluded_Sources): When reporting an error, if the excluded
9965 sources were read from a file, include file name and line number in
9968 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9970 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9972 2011-08-02 Robert Dewar <dewar@adacore.com>
9974 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9976 2011-08-02 Javier Miranda <miranda@adacore.com>
9978 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9979 generation of TSDs to the DOTNET compiler.
9980 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9981 generation of TSDs to the DOTNET compiler.
9983 2011-08-02 Javier Miranda <miranda@adacore.com>
9985 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9986 record of all the tagged types declared inside library level package
9987 declarations, library level package bodies or library level subprograms.
9988 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9989 associated with a given tagged type.
9990 (Build_VM_TSDs): New subprogram.
9991 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9992 compilation units that are subprograms.
9993 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9994 compilation units that are package bodies.
9995 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9996 units that are a package declaration or a package instantiation.
9997 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9998 reorganization to improve the error generated by the frontend when the
9999 function Ada.Tags.Secondary_Tag is not available.
10000 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10001 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10003 2011-08-02 Javier Miranda <miranda@adacore.com>
10005 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10007 2011-08-02 Robert Dewar <dewar@adacore.com>
10009 * s-imenne.ads: Minor reformatting.
10011 2011-08-02 Robert Dewar <dewar@adacore.com>
10013 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10014 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10015 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10017 2011-08-02 Robert Dewar <dewar@adacore.com>
10019 * einfo.ads (Materialize_Entity): Document this is only for renamings
10020 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10021 required debug information in the case where we transform the object
10022 declaration into a renaming declaration.
10023 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10025 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10026 Materialize_Entity.
10028 2011-08-02 Robert Dewar <dewar@adacore.com>
10030 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10031 Suppress_Init_Procs.
10032 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10033 Suppress_Initialization/Initialization_Suppressed.
10034 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10035 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10036 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10037 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10039 2011-08-02 Robert Dewar <dewar@adacore.com>
10041 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10042 Minor reformatting.
10044 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10046 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10047 only have inheritable classwide pre/postconditions.
10049 2011-08-02 Javier Miranda <miranda@adacore.com>
10051 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10052 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10053 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10054 checks if the external tag of a type is the same as the external tag
10055 of some other declaration.
10057 2011-08-02 Thomas Quinot <quinot@adacore.com>
10059 * s-taskin.ads: Minor reformatting.
10061 2011-08-02 Emmanuel Briot <briot@adacore.com>
10063 * g-comlin.adb (Display_Help): swap the order in which it prints the
10064 short help and the general usage.
10066 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10068 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10069 the aspect declarations and attach them to the generic copy for
10070 subsequent analysis.
10071 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10072 declarations of the generic tree to the new subprogram declarations.
10073 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10074 conditions that apply to a subprogram instance.
10076 2011-08-02 Robert Dewar <dewar@adacore.com>
10078 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10080 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10082 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10083 private type with a tagged full view is not derived in the immediate
10084 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10086 2011-08-02 Robert Dewar <dewar@adacore.com>
10088 * exp_ch4.adb: Minor reformatting.
10090 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10092 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10093 Ada2012 iterator, the loop will be rewritten during expansion into a
10094 while loop with a cursor and an element declaration. Do not analyze the
10095 body in this case, because if the container is for indefinite types the
10096 actual subtype of the elements will only be determined when the cursor
10097 declaration is analyzed.
10099 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10101 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10102 size/alignment related attributes in CodePeer_Mode.
10104 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10106 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10107 Prepend_Element, since this can result in the operation getting the
10108 wrong slot in the full type's dispatch table if the full type has
10109 inherited operations. The incomplete type's operation will get added
10110 to the proper position in the full type's primitives
10111 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10112 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10113 dispatching operations, since there are cases where nonprimitive
10114 subprograms can get added to the list of incomplete dependents (such
10115 as subprograms in nested packages).
10116 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10117 private part when determining whether to add a primitive with a
10118 parameter of a tagged incomplete type to the Private_Dependents list.
10119 Such primitives can also occur in the visible part, and should not have
10120 been excluded from being private dependents.
10121 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10122 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10123 list of a Taft-amendment incomplete type is a primitive before issuing
10124 an error that the full type must appear in the same unit. There are
10125 cases where nonprimitives can be in the list (such as subprograms in
10127 * sem_disp.adb (Derives_From): Use correct condition for checking that
10128 a formal's type is derived from the type of the corresponding formal in
10129 the parent subprogram (the condition was completely wrong). Add
10130 checking that was missing for controlling result types being derived
10131 from the result type of the parent operation.
10133 2011-08-02 Yannick Moy <moy@adacore.com>
10135 * errout.adb (First_Node): minor renaming
10136 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10139 2011-08-02 Yannick Moy <moy@adacore.com>
10141 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10142 before accessing operands.
10143 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10144 decide whether an initialization expression respects SPARK rules, as
10145 the plain node is the expanded one. This allows for more valid warnings
10147 * gnat_rm.texi: Minor update.
10149 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10151 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10154 2011-08-02 Robert Dewar <dewar@adacore.com>
10156 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10158 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10160 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10161 loop statements and the element renaming declaration with a block when
10162 the element type is controlled.
10164 2011-08-02 Yannick Moy <moy@adacore.com>
10166 * sinfo.ads: Minor formatting.
10168 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10170 * sem_aggr.adb (Add_Association): if the association has a box and no
10171 expression, use the Sloc of the aggregate itself for the new
10173 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10176 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10178 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10179 When a container is provided via a function call, generate a renaming
10180 of the function result. This avoids the creation of a transient scope
10181 and the premature finalization of the container.
10182 * exp_ch7.adb (Is_Container_Cursor): Removed.
10183 (Wrap_Transient_Declaration): Remove the supression of the finalization
10184 of the list controller when the declaration denotes a container cursor,
10187 2011-08-02 Yannick Moy <moy@adacore.com>
10189 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10190 node is from source, instead of the original node being from source.
10192 (Resolve_Array_Aggregate): refine the check for a static expression, to
10193 recognize also static ranges
10194 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10195 Array_Type_Declaration): postpone the test for the type being a subtype
10196 mark after the type has been resolved, so that component-selection and
10197 expanded-name are discriminated.
10198 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10199 to distinguish the case of an iteration scheme, so that an error is
10200 issed on a non-static range in SPARK except in an iteration scheme.
10201 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10202 In_Iter_Schm = True.
10203 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10204 user-defined operators so that they are allowed in renaming
10206 (Find_Selected_Component): refine the check for prefixing of operators
10207 so that they are allowed in renaming. Move the checks for restrictions
10208 on selector name after analysis discriminated between
10209 component-selection and expanded-name.
10210 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10211 concatenation argument of string type if it is static.
10212 * sem_util.adb, sem_util.ads
10213 (Check_Later_Vs_Basic_Declarations): add a new function
10214 Is_Later_Declarative_Item to decice which declarations are allowed as
10215 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10216 mode, add that renamings are considered as later items.
10217 (Enclosing_Package): new function to return the enclosing package
10218 (Enter_Name): correct the rule for homonyms in SPARK
10219 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10220 from source (result of expansion) to avoid issuing wrong warnings.
10222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10224 * errout.adb: On anything but an expression First_Node returns its
10227 2011-08-02 Pascal Obry <obry@adacore.com>
10229 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10231 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10233 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10234 Set the associated loop as the related expression of internally
10236 * exp_ch7.adb (Is_Container_Cursor): New routine.
10237 (Wrap_Transient_Declaration): Supress the finalization of the list
10238 controller when the declaration denotes a container cursor.
10240 2011-08-02 Yannick Moy <moy@adacore.com>
10242 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10244 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10245 expression is a simple expression. This check cannot be performed in
10246 the semantics, so just drop it.
10247 (P_Index_Or_Discriminant_Constraint): move check that the index or
10248 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10249 semantics. Other cases were previously checked in the semantics.
10250 * par-ch4.adb (P_Name): move checks that a selector name is not
10251 character literal or an operator symbol to Find_Selected_Component in
10253 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10254 declarations are not placed after later declarations in a separate
10255 procedure in Sem_Util (possibly not the best choice?), to be used both
10256 during parsing, for Ada 83 mode, and during semantic analysis, for
10258 * par-endh.adb (Check_End): move check that end label is not missing
10259 to Process_End_Label in the semantics
10260 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10261 the special case for SPARK restriction
10262 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10263 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10264 parameter Force to issue the error message even on internal node (used
10265 for generated end label). Call Check_Restriction to check when an error
10266 must be issued. In SPARK mode, issue an error message even if the
10267 restriction is not set.
10268 (Check_Restriction): new procedure with an additional out parameter to
10269 inform the caller that a message has been issued
10270 * sem_aggr.adb: Minor modification of message
10271 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10272 instead of issuing an error message directly
10273 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10274 declarations are not placed after later declarations, by calling
10275 Check_Later_Vs_Basic_Declarations
10276 (Analyze_Subtype_Declaration): move here the check that an index or
10277 discriminant constraint must be a subtype mark. Change the check that
10278 a subtype of String must start at one so that it works on subtype marks.
10279 * sem_ch4.adb (Analyze_Call): move here the check that a named
10280 association cannot follow a positional one in a call
10281 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10282 instead of issuing an error message directly
10283 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10284 selector name is not a character literal or an operator symbol. Move
10285 here the check that the prefix of an expanded name cannot be a
10286 subprogram or a loop statement.
10287 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10288 procedure called from parsing and semantics to check that basic
10289 declarations are not placed after later declarations
10290 (Process_End_Label): move here the check that end label is not missing
10292 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10294 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10295 representation clause in codepeer mode, since it confuses CodePeer and
10296 does not bring useful info.
10298 2011-08-02 Ed Falis <falis@adacore.com>
10300 * init.c: initialize fp hw on MILS.
10302 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10304 * errout.adb (First_Node): for bodies, return the node itself (small
10305 optimization). For other nodes, do not check source_unit if the node
10306 comes from Standard.
10308 2011-08-02 Robert Dewar <dewar@adacore.com>
10310 * exp_ch3.adb: Minor comment additions.
10311 * sem_ch13.adb: Minor reformatting.
10313 2011-08-02 Pascal Obry <obry@adacore.com>
10315 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10317 2011-08-02 Robert Dewar <dewar@adacore.com>
10319 * sem_attr.adb: Minor reformatting.
10321 2011-08-02 Robert Dewar <dewar@adacore.com>
10323 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10324 (Has_Default_Component_Value): Removed
10325 * einfo.ads Comment updates
10326 (Has_Default_Aspect): Replaces Has_Default_Value
10327 (Has_Default_Component_Value): Removed
10329 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10331 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10332 (Get_Simple_Init_Val): Handle Default_Value aspect
10333 (Needs_Simple_Initialization): Handle Default_Value aspect
10334 * exp_ch3.ads: Needs_Simple_Initialization
10335 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10336 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10338 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10339 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10340 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10342 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10344 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10345 package containing iteration primitives.
10346 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10348 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10350 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10351 "of", pre-analyze expression in case it is a function call with
10352 finalization actions that must be placed ahead of the loop.
10353 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10354 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10356 2011-08-02 Geert Bosch <bosch@adacore.com>
10358 * cstand.adb (Create_Float_Types): Only consider C's long double for
10359 Long_Long_Float, in addition to double.
10361 2011-08-02 Robert Dewar <dewar@adacore.com>
10363 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10364 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10365 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10366 Minor reformatting.
10368 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10370 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10373 2011-08-02 Javier Miranda <miranda@adacore.com>
10375 * einfo.ads, einfo.adb
10376 (Original_Access_Type): Move this attribute to Node26 since there was
10377 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10378 which causes conflicts and breaks the generation of the .NET compiler.
10379 (Interface_Name): Add missing documentation on JGNAT only uses of
10382 2011-08-02 Geert Bosch <bosch@adacore.com>
10384 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10385 (Find_Back_End_Float_Type): Likewise
10386 (Create_Back_End_Float_Types): Likewise
10387 (Create_Float_Types): Likewise
10388 (Register_Float_Type): Likewise
10389 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10390 Nlist and split out type selection in new local Find_Base_Type function.
10391 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10393 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10395 2011-08-02 Robert Dewar <dewar@adacore.com>
10397 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10399 * opt.ads: Minor comment change.
10400 * sem_ch12.adb: Minor code reorganization.
10402 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10404 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10405 subtype's list of rep items to the list on the full subtype in the case
10406 where the lists are the same.
10408 2011-08-02 Geert Bosch <bosch@adacore.com>
10410 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10411 using the one from System.Strings, which also deallocates all strings.
10413 2011-08-02 Geert Bosch <bosch@adacore.com>
10415 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10417 * gcc-interface/Make-lang.in: Update dependencies.
10419 2011-08-02 Olivier Hainque <hainque@adacore.com>
10421 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10424 2011-08-02 Javier Miranda <miranda@adacore.com>
10426 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10427 associated with anonymous access to subprograms.
10429 2011-08-02 Geert Bosch <bosch@adacore.com>
10432 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10433 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10434 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10435 (Add_Symbol_Definition): Move to switch-c.adb
10436 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10437 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10438 (Add_Symbol_Definition): Move to switch-c.adb.
10439 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10441 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10442 Move to warnsw.adb.
10443 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10444 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10445 Move to warnsw.adb.
10446 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10447 (Add_Symbol_Definition): Moved from Prepcomp.
10448 * switch-c.ads: Update copyright notice. Use String_List instead of
10449 Argument_List, removing dependency on System.OS_Lib.
10451 2011-08-02 Yannick Moy <moy@adacore.com>
10453 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10454 mode on initialization expression which does not respect SPARK
10456 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10457 if the tree referenced by its argument represents an initialization
10458 expression in SPARK, suitable for initializing an object in an object
10461 2011-08-02 Javier Miranda <miranda@adacore.com>
10463 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10464 internally generated access to subprogram with its associated protected
10466 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10468 2011-08-02 Geert Bosch <bosch@adacore.com>
10470 * cstand.adb (Register_Float_Type): Print information about type to
10471 register, if the Debug_Flag_Dot_B is set.
10472 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10473 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10474 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10475 with a requested precision of more than Max_Digits digits and no more
10476 than Max_Base_Digits digits, if a range specification is present and the
10477 Predefined_Float_Types list has a suitable type to derive from.
10478 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10479 case of type completion with pragma Import
10481 (Process_Import_Predefined_Type): Processing to complete a type
10482 with pragma Import. Currently supports floating point types only.
10483 (Set_Convention_From_Pragma): Do nothing without underlying type.
10484 (Process_Convention): Guard against absence of underlying type,
10485 which may happen when importing incomplete types.
10486 (Process_Import_Or_Interface): Handle case of importing predefined
10487 types. Tweak error message.
10489 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10491 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10492 functions to previous change. Reorganize code slightly.
10494 2011-08-02 Geert Bosch <bosch@adacore.com>
10496 * back_end.ads (Register_Type_Proc): New call back procedure type for
10497 allowing the back end to provide information about available types.
10498 (Register_Back_End_Types): New procedure to register back end types.
10499 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10501 * cstand.adb (Back_End_Float_Types): New list for floating point types
10502 supported by the back end.
10503 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10504 (Copy_Float_Type): New procedure to make new copies of predefined types.
10505 (Register_Float_Type): New call back procedure to populate the BEFT list
10506 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10507 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10508 (Create_Float_Types): New procedure to create entities for floating
10509 point types predefined in Standard, and put these and any remaining
10510 BEFTs on the Predefined_Float_Types list.
10511 * stand.ads (Predefined_Float_Types): New list for predefined floating
10512 point types that do not have declarations in package Standard.
10514 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10516 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10517 entity node for the unit containing the parameter.
10518 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10519 (Add_Inlined_Subprogram): Likewise.
10520 * gcc-interface/Make-lang.in: Update dependencies.
10522 2011-08-02 Thomas Quinot <quinot@adacore.com>
10524 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10527 2011-08-02 Geert Bosch <bosch@adacore.com>
10529 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10531 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10533 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10534 computed value of Base_Type.
10536 2011-08-02 Yannick Moy <moy@adacore.com>
10538 * restrict.adb (Check_Restriction): issue an error for any use of
10539 class-wide, even if the No_Dispatch restriction is not set.
10540 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10541 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10542 when completing a private extension, the type named in the private part
10543 is not the same as that named in the visible part.
10544 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10545 of an inherited primitive operations of a tagged type or type extension
10546 that returns the tagged type.
10547 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10548 function which returns True for an implicit operation inherited by the
10549 derived type declaration for the argument type.
10550 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10553 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10555 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10556 Process_Bounds, to perform analysis with expansion of a range or an
10557 expression that is the iteration scheme for a loop.
10558 (Analyze_Iterator_Specification): If domain of iteration is given by a
10559 function call with a controlled result, as is the case if call returns
10560 a predefined container, ensure that finalization actions are properly
10562 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10564 2011-08-02 Javier Miranda <miranda@adacore.com>
10566 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10567 * gcc-interface/Make-lang.in: Update dependencies.
10569 2011-08-02 Javier Miranda <miranda@adacore.com>
10571 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10572 determine if the analysis is performed using N or Original_Node (N).
10573 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10574 functionality of routine Is_Variable avoids code duplication.
10575 * checks.adb (Determine_Range): Handle temporaries generated by
10576 Remove_Side_Effects.
10578 2011-08-02 Javier Miranda <miranda@adacore.com>
10580 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10581 expansion of the condition. Required since the previous analysis was
10582 done with expansion disabled (see Resolve_Quantified_Expression) and
10583 hence checks were not inserted and record comparisons have not been
10586 2011-08-02 Ed Falis <falis@adacore.com>
10588 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10591 2011-08-02 Bob Duff <duff@adacore.com>
10593 * opt.ads: Minor comment fix.
10595 2011-08-02 Bob Duff <duff@adacore.com>
10597 * sem_ch12.adb (Analyze_Package_Instantiation,
10598 Analyze_Subprogram_Instantiation): Turn off style checking while
10599 analyzing an instance. Whatever style checks that apply to the generic
10600 unit should apply, so it makes no sense to apply them in an instance.
10601 This was causing trouble when compiling an instance of a runtime
10602 unit that violates the -gnatyO switch.
10603 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10604 one of the two case statements, causing spurious errors.
10606 2011-08-02 Robert Dewar <dewar@adacore.com>
10608 * uname.adb: Minor reformatting.
10609 * gnatcmd.adb: Minor reformatting.
10610 * exp_attr.adb: Minor reformatting.
10612 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10614 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10615 No_Dispatching_Calls, do not look for the Assign primitive, because
10616 predefined primitives are not created in this case.
10618 2011-08-02 Bob Duff <duff@adacore.com>
10620 * stylesw.ads: Minor comment fixes.
10622 2011-08-02 Robert Dewar <dewar@adacore.com>
10624 * freeze.adb (Add_To_Result): New procedure.
10626 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10628 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10629 time, if the specific run-time routines for handling streams of strings
10630 are not available, use the default mechanism.
10632 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10634 * s-regpat.ads: Fix typo.
10636 2011-08-02 Vincent Celier <celier@adacore.com>
10638 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10639 not null, call it to create the in memory config project file without
10640 parsing an existing default config project file.
10642 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10644 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10646 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10648 * sem_elim.adb: an abstract subprogram does not need an eliminate
10649 pragma for its descendant to be eliminable.
10651 2011-08-02 Ed Falis <falis@adacore.com>
10653 * init.c: revert to handling before previous checkin for VxWorks
10654 * s-intman-vxworks.adb: delete unnecessary declarations related to
10655 using Ada interrupt facilities for handling signals.
10656 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10657 * s-intman-vxworks.ads: Import __gnat_install_handler as
10658 Initialize_Interrupts.
10659 * s-taprop-vxworks.adb: Delete Signal_Mask.
10660 (Abort_Handler): change construction of mask to unblock exception
10663 2011-08-02 Jerome Guitton <guitton@adacore.com>
10665 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10666 Debug_Raise_Exception before propagation starts.
10668 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10670 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10671 to Restriction_Check_Required.
10672 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10673 * sem_res.adb (Resolve_Call): Likewise.
10674 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10676 2011-08-02 Bob Duff <duff@adacore.com>
10678 * stylesw.ads: Update comment.
10679 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10680 * errout.ads: Remove obsolete comment.
10682 2011-08-02 Javier Miranda <miranda@adacore.com>
10684 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10685 (Set_Is_Safe_To_Reevaluate): new procedure.
10686 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10687 assignment is allowed on safe-to-reevaluate variables.
10688 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10689 temporary created to remove side effects in expressions that use
10690 the secondary stack as safe-to-reevaluate.
10691 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10692 variables that are not true constants.
10694 2011-08-02 Robert Dewar <dewar@adacore.com>
10696 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10697 sem_res.adb, sem_ch6.adb: Minor reformatting.
10699 2011-08-02 Jerome Guitton <guitton@adacore.com>
10701 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10703 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10705 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10706 not set Overridden_Operation if subprogram is an initialization
10709 2011-08-02 Yannick Moy <moy@adacore.com>
10711 * par-ch6.adb: Correct obsolete name in comments
10712 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10713 which takes two message arguments (existing function takes one), with
10714 second message used for continuation.
10715 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10716 block statements that originate from a source block statement, not
10717 generated block statements
10718 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10719 symmetry with procedure case
10720 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10721 function to issue an error in formal mode if a package specification
10722 contains more than one tagged type or type extension.
10723 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10724 parameters matching formals of tagged types are objects (or ancestor
10725 type conversions of objects), not general expressions. Issue an error
10726 on view conversions that are not involving ancestor conversion of an
10728 (Resolve_Type_Conversion): in formal mode, issue an error on the
10729 operand of an ancestor type conversion which is not an object
10730 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10731 procedure so that it works also for actuals of function calls
10732 (Is_Actual_Tagged_Parameter): new function which determines if its
10733 argument is an actual parameter of a formal of tagged type in a
10735 (Is_SPARK_Object_Reference): new function which determines if the tree
10736 referenced by its argument represents an object in SPARK
10738 2011-08-02 Robert Dewar <dewar@adacore.com>
10740 * sem_ch3.adb: Minor reformatting
10741 Minor comment addition
10742 Minor error msg text change
10744 2011-08-02 Javier Miranda <miranda@adacore.com>
10746 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10747 function. Used to be more precise when we generate a variable plus one
10748 assignment to remove side effects in the evaluation of the Bound
10750 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10751 of the bound expression to force its re-analysis and thus expand the
10752 associated transient scope (if required). Code cleanup replacing the
10753 previous code that declared the constant entity by an invocation to
10754 routine Force_Evaluation which centralizes this work in the frontend.
10756 2011-08-02 Robert Dewar <dewar@adacore.com>
10758 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10759 (Base_Type): Now uses improved Is_Base_Type function
10760 * einfo.ads (Base_Type): Inline this function
10762 2011-08-02 Robert Dewar <dewar@adacore.com>
10764 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10765 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10767 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10769 * gcc-interface/Make-lang.in: Update dependencies.
10770 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10773 2011-08-02 Yannick Moy <moy@adacore.com>
10775 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10776 non-simple expression used in delta constraint
10777 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10778 index constraint which is not a subtype mark
10779 * par.adb: With and use Restrict
10780 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10781 mode on component type which is not a subtype mark and default
10782 expression on component
10783 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10784 of string which does not have a lower index bound equal to 1
10785 (Array_Type_Declaration): issue an error in formal mode on index or
10786 component type which is not a subtype mark, and on aliased keyword on
10788 (Derived_Type_Declaration): issue an error in formal mode on interface,
10789 limited or abstract type
10790 (Record_Type_Declaration): issue an error in formal mode on interface
10791 (Record_Type_Definition): issue an error in formal mode on tagged types
10792 and type extensions not declared in the specification of a library unit
10793 package; on null non-tagged record; on variant part
10795 2011-08-02 Vincent Celier <celier@adacore.com>
10797 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10798 not declared for qualified library project when Library_Name is not
10799 declared, but Library_Dir is.
10801 2011-08-02 Robert Dewar <dewar@adacore.com>
10803 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10804 pragmas (affects aspects [Component_]Default_Value
10805 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10806 component type for the resolution
10808 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10810 * einfo.adb (Base_Type): Tune implementation for speed.
10812 2011-08-02 Robert Dewar <dewar@adacore.com>
10814 * freeze.adb: Minor reformatting.
10816 2011-08-02 Thomas Quinot <quinot@adacore.com>
10818 * scos.ads: Update comments.
10820 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10822 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10823 base type, because the parent may be a subtype of a private type whose
10824 convention is established in a private part.
10826 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10828 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10829 statement in a block when the expansion of the return expression has
10830 created a finalization chain.
10831 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10832 with the parent node.
10833 Add N_Extended_Return_Statement to handle the case where a transient
10834 object declaration appears in the Return_Object_Declarations list of
10835 an extended return statement.
10837 2011-08-02 Matthew Gingell <gingell@adacore.com>
10839 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10840 unused parameter 'name'.
10842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10844 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10845 inherited operation, check whether its alias, which is the source
10846 operastion that it renames, has been marked eliminated.
10848 2011-08-02 Javier Miranda <miranda@adacore.com>
10850 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10851 in-mode parameter whose type is an access type since it can be used to
10852 modify its designated object. Enforce code that handles as safe an
10853 access type that is not access-to-constant but it is the result of a
10854 previous removal of side-effects.
10855 (Remove_Side_Effects): Minor code reorganization of cases which require
10856 no action. Done to incorporate documentation on new cases uncovered
10857 working in this ticket: no action needed if this routine was invoked
10858 too early and the nodes are not yet decorated.
10859 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10860 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10861 were issued with actuals that are implicitly provided by
10864 2011-08-02 Robert Dewar <dewar@adacore.com>
10866 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10868 2011-08-02 Yannick Moy <moy@adacore.com>
10870 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10871 to issue an error in formal mode on attribute not supported in this mode
10872 (Analyze_Attribute): issue errors on standard attributes not supported
10874 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10875 comment, and issue error in formal mode on modulus which is not a power
10877 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10879 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10881 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10882 operator on modular type (except 'not').
10884 2011-08-02 Robert Dewar <dewar@adacore.com>
10886 * gnat_rm.texi: Minor reformatting.
10888 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10890 * s-osinte-linux.ads: Minor comment update and reformatting.
10891 * i-cexten.ads: Make this unit pure, as for its parent.
10892 Will allow its usage in more contexts if needed.
10894 2011-08-02 Robert Dewar <dewar@adacore.com>
10896 * s-utf_32.ads: Minor comment fix.
10898 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10900 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10901 operation of a tagged synchronized type, handle the case where the
10902 controlling argument is overloaded.
10904 2011-08-02 Yannick Moy <moy@adacore.com>
10906 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10907 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10908 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10909 SPARK mode and formal verification mode on processing SPARK restriction
10910 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10911 requiring consistency checking.
10913 2011-08-02 Robert Dewar <dewar@adacore.com>
10915 * sem_res.adb: Minor reformatting.
10917 2011-08-02 Robert Dewar <dewar@adacore.com>
10919 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10920 a-cforse.ads: Remove unneeded with of Ada.Containers
10921 Remove commented out pragma Inline's
10922 Move specifications of new subprograms to the actual specs
10924 2011-08-02 Yannick Moy <moy@adacore.com>
10926 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10927 a-cforse.ads: Update comments.
10929 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10931 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10933 2011-08-02 Robert Dewar <dewar@adacore.com>
10935 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10936 a-cforse.ads, a-cofove.ads: Minor reformatting.
10938 2011-08-02 Claire Dross <dross@adacore.com>
10940 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10941 a-cofove.ads: Add comments.
10943 2011-08-02 Yannick Moy <moy@adacore.com>
10945 * gnat_rm.texi: Document formal containers.
10947 2011-08-02 Emmanuel Briot <briot@adacore.com>
10949 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10950 are empty sections.
10952 2011-08-02 Robert Dewar <dewar@adacore.com>
10954 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10957 2011-08-02 Robert Dewar <dewar@adacore.com>
10959 * aspects.adb: New aspects Default_Value and Default_Component_Value
10960 New format of Aspect_Names table checks for omitted entries
10961 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10962 handling of boolean aspects for derived types.
10963 New aspects Default_Value and Default_Component_Value
10964 New format of Aspect_Names table checks for omitted entries
10965 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10966 (Has_Default_Value): New flag
10967 (Has_Default_Component_Value): New flag
10968 (Has_Default_Value): New flag
10969 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10971 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10972 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10973 Default_Value and Default_Component_Value
10974 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10975 New aspects Default_Value and Default_Component_Value
10976 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10977 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10979 2011-08-02 Vincent Celier <celier@adacore.com>
10981 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10982 inherit library kind.
10984 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10986 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10987 Minor reformatting.
10989 2011-08-02 Robert Dewar <dewar@adacore.com>
10991 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10993 2011-08-02 Yannick Moy <moy@adacore.com>
10995 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10997 2011-08-02 Robert Dewar <dewar@adacore.com>
10999 * impunit.adb: Add comment.
11001 2011-08-02 Yannick Moy <moy@adacore.com>
11003 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11004 qualification of aggregates in formal mode
11005 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11007 (Resolve_Aggregate): complete the test that an aggregate is adequately
11008 qualified in formal mode
11010 2011-08-02 Pascal Obry <obry@adacore.com>
11012 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11013 * mlib-prj.adb: Supress warning when compiling binder generated file.
11014 (Build_Library): Supress all warnings when compiling the binder
11017 2011-08-02 Yannick Moy <moy@adacore.com>
11019 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11021 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11022 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11023 Add with/use clauses to make Check_Formal_Restriction visible
11025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11027 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11028 in-parameters when type of the generic formal is private in the generic
11029 spec and non-private in the body.
11031 2011-08-02 Claire Dross <dross@adacore.com>
11033 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11034 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11035 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11036 * impunit.adb, Makefile.rtl: Take new files into account.
11038 2011-08-02 Robert Dewar <dewar@adacore.com>
11040 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11041 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11043 2011-08-02 Yannick Moy <moy@adacore.com>
11045 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11047 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11048 matching static array bounds, taking into account the special case of
11050 * sem_ch3.adb: Typo in comment.
11052 2011-08-02 Yannick Moy <moy@adacore.com>
11054 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11055 which issues an error in formal mode if its argument node is originally
11057 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11058 has a discriminant specification so that it does not include the case
11060 (Derived_Type_Declaration): move here the test that a derived type has a
11061 discriminant specification
11062 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11063 first element of a component association before accessing its choices
11064 (presence of component association is not enough)
11065 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11066 declaration is a library item before accessing the next element in a
11067 list, as library items are not member of lists
11068 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11069 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11070 Check_Formal_Restriction whenever possible.
11072 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11074 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11075 reference when needed.
11077 2011-08-02 Bob Duff <duff@adacore.com>
11079 * gnat_ugn.texi: Fix typo.
11081 2011-08-02 Vincent Celier <celier@adacore.com>
11083 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11084 archive file name. Do not use the full path name of archives for Open
11087 2011-08-02 Robert Dewar <dewar@adacore.com>
11089 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11090 Analyze_Aspect_Specifications
11092 (Analyze_Aspect_Specifications): New handling for boolean aspects
11093 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11094 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11095 sequence for Analyze_Aspect_Specifications
11096 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11097 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11099 2011-08-02 Robert Dewar <dewar@adacore.com>
11101 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11102 aspects, since these no longer exist.
11104 2011-08-02 Robert Dewar <dewar@adacore.com>
11106 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11107 semicolon, do not try to see if there are aspects following it.
11108 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11111 2011-08-02 Robert Dewar <dewar@adacore.com>
11113 * sem_ch8.adb, aspects.ads: Minor reformatting.
11115 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11117 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11118 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11120 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11122 2011-08-02 Yannick Moy <moy@adacore.com>
11124 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11125 mode on subprogram declaration outside of package specification, unless
11126 it is followed by a pragma Import
11127 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11128 Access_Type_Declaration): issue error in formal mode on access type
11129 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11131 (Analyze_Object_Declaration): issue error in formal mode on object
11132 declaration which does not respect SPARK restrictions
11133 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11134 declaration which does not respect SPARK restrictions
11135 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11136 error in formal mode on digits or delta constraint
11137 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11138 decimal fixed point type
11139 (Derived_Type_Declaration): issue error in formal mode on derived type
11140 other than type extensions of tagged record types
11141 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11142 with check on access definition
11143 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11144 mode on protected definition.
11145 (Analyze_Task_Definition): issue error in formal mode on task definition
11147 2011-08-02 Robert Dewar <dewar@adacore.com>
11149 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11151 2011-08-02 Javier Miranda <miranda@adacore.com>
11153 * sem_ch6.adb (Can_Override_Operator): New function.
11154 (Verify_Overriding_Indicator): Add missing code to check overriding
11155 indicator in operators. Fixes regression.
11156 (Check_Overriding_Indicator): Minor reformating after replacing the
11157 code that evaluates if the subprogram can override an operator by
11158 invocations to the above new function.
11160 (Write_Field26_Name): Add missing code to ensure that, following
11161 the documentation in einfo.ads, this field is not shown as attribute
11162 "Static_Initialization" on non-dispatching functions.
11164 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11166 * sem_res.adb (Resolve_Call): A call to
11167 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11168 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11169 i.e., when the second parameter is of type Time_Span.
11171 2011-08-02 Vincent Celier <celier@adacore.com>
11173 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11174 with an archive instead of -L<library dir> -l<library name>.
11176 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11178 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11179 mark the base types In_Use in addition to making the operations
11182 2011-08-02 Ed Falis <falis@adacore.com>
11184 * init.c: add and setup __gnat_signal_mask for the exception signals
11185 * s-inmaop-vxworks.adb: new file.
11186 * s-intman-vxworks.adb: remove unnecessary initializations and
11188 * s-intman-vxworks.ads: remove unnecessary variable
11189 * s-taprop-vxworks.adb: simplify signal initialization
11191 2011-08-02 Robert Dewar <dewar@adacore.com>
11193 * sem_ch8.adb: Minor code reorganization, comment updates.
11195 2011-08-02 Robert Dewar <dewar@adacore.com>
11197 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11198 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11200 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11201 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11203 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11205 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11206 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11207 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11208 use_type_clauses, to handle more efficiently use_type and use_all_type
11210 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11211 Ada2012 Use_All_Type clause.
11212 (Use_Class_Wide_Operations): new procedure.
11214 2011-08-02 Robert Dewar <dewar@adacore.com>
11216 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11217 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11218 expression to expression function.
11220 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11222 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11223 if types are compatible.
11225 2011-08-02 Yannick Moy <moy@adacore.com>
11227 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11228 returns True if its argument array types have same dimension and same
11229 static bounds at each index.
11230 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11231 OUT or IN OUT paramaters which are not view conversions in SPARK.
11232 (Resolve_Arithmetic_Op): issue an error in formal mode on
11233 multiplication or division with operands of fixed point types which are
11234 not qualified or explicitly converted.
11235 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11236 Boolean or array type (except String) operands.
11237 (Resolve_Equality_Op): issue an error in formal mode on equality
11238 operators for array types other than String with non-matching static
11240 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11241 for array types with non-matching static bounds. Factorize the code in
11242 Matching_Static_Array_Bounds.
11243 (Resolve_Qualified_Expression): issue an error in formal mode on
11244 qualified expressions for array types with non-matching static bounds.
11245 (Resolve_Type_Conversion): issue an error in formal mode on type
11246 conversion for array types with non-matching static bounds
11248 2011-08-02 Robert Dewar <dewar@adacore.com>
11250 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11252 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11254 * par-ch9.adb: save location of entry for proper error message.
11256 2011-08-02 Javier Miranda <miranda@adacore.com>
11258 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11259 (Use_Full_View) which permits this routine to climb through the
11260 ancestors using the full-view of private parents.
11261 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11262 Use_Full_View to true in calls to Is_Ancestor.
11263 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11264 true in call to Is_Ancestor.
11265 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11266 Use_Full_View to true in call to Is_Ancestor.
11267 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11268 call to Is_Ancestor.
11269 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11270 Use_Full_View to true in calls to Is_Ancestor.
11271 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11272 Make_Select_Specific_Data_Table, Register_Primitive,
11273 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11274 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11275 to true in call to Is_Ancestor.
11276 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11277 Use_Full_View to true in calls to Is_Ancestor.
11279 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11280 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11282 2011-08-02 Robert Dewar <dewar@adacore.com>
11284 * gnat_rm.texi: Minor reformatting.
11285 * sem_prag.adb: Minor reformatting.
11287 2011-08-02 Tristan Gingold <gingold@adacore.com>
11289 * vms_data.ads: Add VMS qualifier for -gnateP.
11291 2011-08-02 Robert Dewar <dewar@adacore.com>
11293 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11294 * par-ch7.adb (P_Package): Proper placement of aspects for package
11295 decl/instantiation.
11296 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11297 (End_Statements): Add Is_Sloc parameterr
11298 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11299 (Check_End): Ad Is_Sloc parameter
11300 (End_Statements): Add Is_Sloc parameterr
11302 2011-08-02 Vincent Celier <celier@adacore.com>
11304 * ug_words: Add VMS qualifier equivalent to -gnateP:
11305 /SYMBOL_PREPROCESSING.
11307 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11309 * gnat-style.texi: For hexadecimal numeric literals the typical
11310 grouping of digits is 4 to represent 2 bytes.
11311 A procedure spec which is split into several lines is indented two
11314 2011-08-02 Yannick Moy <moy@adacore.com>
11316 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11317 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11318 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11320 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11321 choice in array aggregate
11322 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11324 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11325 positional and named aggregate for record, or others in record
11326 aggregate, or multiple choice in record aggregate
11327 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11328 array operands to logical operations AND, OR and XOR do not have the
11329 same static lower and higher bounds
11330 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11332 2011-08-01 Robert Dewar <dewar@adacore.com>
11334 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11335 Replaces Last_Source_Node_In_Sequence.
11336 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11337 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11338 parens and blank in string (this was inconsistently implemented).
11340 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11341 blank in string (this was inconsistently implemented).
11343 (Set_Global_Switches): Set formal mode switches appropriately
11344 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11346 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11347 call Set_Error_Msg_Lang to set "spark" as language name.
11348 * par.adb: Remove unnecessary call to set formal language for errout
11349 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11350 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11352 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11353 calls to it, moved after resolution so that types are known
11354 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11355 result of concatenation is not of type String
11356 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11357 concatenation is not properly restricted
11358 * gnat_rm.texi: Add doc on pragma Spark_95.
11359 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11360 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11361 * gcc-interface/Make-lang.in: Update dependencies.
11363 2011-08-01 Javier Miranda <miranda@adacore.com>
11365 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11366 condition that detects if the overridden operation must replace an
11369 2011-08-01 Javier Miranda <miranda@adacore.com>
11371 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11372 code declarations inserted by Insert_Actions in each alternative of the
11373 N_Case_Expression node.
11375 2011-08-01 Robert Dewar <dewar@adacore.com>
11377 * sem_ch6.adb: Minor code reorganization.
11378 * sem_util.adb: Minor reformatting.
11380 2011-08-01 Pascal Obry <obry@adacore.com>
11382 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11383 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11385 2011-08-01 Yannick Moy <moy@adacore.com>
11387 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11388 literal or operator symbol which is prefixed
11389 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11390 mode on access attributes.
11391 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11392 that concatenation operands are properly restricted in formal mode
11393 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11394 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11395 result of the concatenation has a type different from String.
11396 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11397 Analyze_Quantified_Expression, Analyze_Slice,
11398 Analyze_Null): issue an error in formal mode on unsupported constructs
11400 (Analyze_Block_Statement): only issue error on source block statement
11401 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11402 function which returns the last node in a list of nodes for which
11403 Comes_From_Source returns True, if any
11404 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11405 Last_Source_Node_In_Sequence
11406 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11407 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11408 mode on unsupported constructs
11409 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11410 rest of the actions may be needed later on since the error is marked as
11412 * sinfo.ads: Typos in comments.
11414 2011-08-01 Pascal Obry <obry@adacore.com>
11416 * projects.texi: Minor editing.
11418 2011-08-01 Yannick Moy <moy@adacore.com>
11420 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11421 insertion character ~~
11422 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11423 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11424 with insertion character ~~
11425 (Set_Msg_Text): treat insertion character ~~
11426 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11427 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11428 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11429 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11430 errors related to the formal language restriction not serious
11431 (insertion character |).
11432 * par.adb (Par): set formal language for error messages if needed
11433 * sem_ch6.adb (Check_Missing_Return): take into account possible
11434 generated statements at the end of the function
11435 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11436 enumeration value to define a new pragma SPARK_95
11437 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11438 SPARK_Version): new type and variables to store the SPARK version
11440 (SPARK_Mode): return True when SPARK_Version is set
11441 * par-prag.adb: Correct indentation
11442 (Prag): take Pragma_SPARK_95 into account
11443 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11446 2011-08-01 Robert Dewar <dewar@adacore.com>
11448 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11449 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11450 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11452 2011-08-01 Pascal Obry <obry@adacore.com>
11454 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11455 Target_Name to Get_Path call.
11456 (Parse_Single_Project): Likewise.
11457 (Post_Parse_Context_Clause): Likewise.
11458 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11459 Call Initialise_Project_Path with the proper Target_Name.
11460 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11462 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11463 with the proper Target_Name.
11464 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11465 Part.Parse routine.
11466 (Parse_Project_And_Apply_Config): Likewise.
11467 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11468 This is fine as this part of the code is supporting only native
11470 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11471 is fine as this part of the code is supporting only native compilation.
11473 2011-08-01 Yannick Moy <moy@adacore.com>
11475 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11476 of homonym, unless the homonym is one of the cases allowed in SPARK
11477 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11478 package declaration occurring after a body.
11480 2011-08-01 Robert Dewar <dewar@adacore.com>
11482 * checks.adb, exp_ch4.adb: Minor reformatting.
11484 2011-08-01 Javier Miranda <miranda@adacore.com>
11486 * einfo.ads (Access_Disp_Table): Fix documentation.
11487 (Dispatch_Table_Wrappers): Fix documentation.
11489 2011-08-01 Pascal Obry <obry@adacore.com>
11491 * prj-env.adb, prj-env.ads: Minor reformatting.
11493 2011-08-01 Yannick Moy <moy@adacore.com>
11495 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11496 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11497 procedures out of these packages.
11498 * errout.ads, errout.adb
11499 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11500 procedures in of this package
11501 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11502 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11503 on misplaced later vs initial declarations, like in Ada 83
11504 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11505 formal mode on attribute of private type whose full type declaration
11507 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11508 package declaration inside a package specification
11509 (Analyze_Full_Type_Declaration): issue error in formal mode on
11510 controlled type or discriminant type
11511 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11512 user-defined operator means that it should come from the source
11513 (New_Overloaded_Entity): issue error in formal mode on overloaded
11515 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11517 2011-08-01 Thomas Quinot <quinot@adacore.com>
11519 * atree.adb: Minor reformatting.
11520 * checks.adb: Minor reformatting.
11522 2011-08-01 Vincent Celier <celier@adacore.com>
11524 * s-parame-vms-ia64.ads: Fix typo in comment
11526 * s-parame-vms-restrict.ads: Removed, unused.
11528 2011-08-01 Javier Miranda <miranda@adacore.com>
11531 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11533 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11534 * sem_ch3.ads, sem_ch3.adb
11535 (Is_Constant_Bound): New extended version of the subprogram that was
11536 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11537 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11538 * sem_aux.ads (Constant_Value): Fix typo in comment.
11539 * checks.adb (Generate_Index_Checks): New implementation which, for
11540 array objects with constant bounds, generates the runtime check
11541 referencing the bounds of the array type. For other cases this routine
11542 provides its previous behavior obtaining such values from the array
11544 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11546 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11547 we cannot have semantic interpretations of the new node.
11549 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11551 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11554 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11556 * sem_ch8.adb: Minor code editing.
11557 * s-vxwext.adb: Remove trailing space.
11558 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11559 consistency with other files.
11561 2011-08-01 Thomas Quinot <quinot@adacore.com>
11563 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11565 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11567 * par-ch10.adb: reject parameterized expressions as compilation unit.
11568 * sem_ch4.adb: handle properly conditional expression with overloaded
11569 then_clause and no else_clause.
11571 2011-08-01 Tristan Gingold <gingold@adacore.com>
11573 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11574 like done by System.Aux_DEC.
11575 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11577 2011-08-01 Yannick Moy <moy@adacore.com>
11579 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11580 missing label at end of declaration (subprogram or package)
11581 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11582 of positional and named parameter association
11583 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11584 Error_Msg_SP which adds a prefix to the error message giving the name
11585 of the formal language analyzed
11586 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11587 access result type in subprogram, unconstrained array as result type,.
11588 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11590 * sem_ch8.adb: Code clean up.
11592 2011-08-01 Javier Miranda <miranda@adacore.com>
11594 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11595 * einfo.ads (Access_Disp_Table): Fix documentation.
11596 (Dispatch_Table_Wrappers): Fix documentation.
11597 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11598 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11599 to enforce the documentation of this attribute.
11600 (Set_Is_Interface): Cleanup the assertion.
11601 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11602 the Underlying_Type entity before reading attribute Access_Disp_Table.
11603 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11604 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11605 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11606 the Underlying_Type entity before reading attribute Access_Disp_Table.
11607 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11608 Locate the Underlying_Type entity before reading attribute
11611 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11613 * s-poosiz.ads: Additional overriding indicators.
11615 2011-08-01 Yannick Moy <moy@adacore.com>
11617 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11619 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11620 parameter specification does not include a subtype mark.
11621 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11622 formal mode on abstract subprogram.
11623 (Analyze_Subprogram_Specification): issue error in formal mode on
11624 user-defined operator.
11625 (Process_Formals): issue error in formal mode on access parameter and
11626 default expression.
11627 * sem_ch9.adb (Analyze_Abort_Statement,
11628 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11629 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11630 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11631 Analyze_Requeue, Analyze_Selective_Accept,
11632 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11633 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11634 issue error in formal mode on user-defined raise statement.
11636 2011-08-01 Thomas Quinot <quinot@adacore.com>
11638 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11639 declaration being hidden when overriding an implicit inherited
11641 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11642 (-gnats), do not complain about a source file that contains only a
11645 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11647 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11648 variable if already set.
11650 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11652 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11653 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11654 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11655 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11656 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11657 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11658 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11659 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11660 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11661 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11662 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11663 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11664 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11665 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11666 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11667 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11668 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11669 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11670 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11671 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11672 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11673 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11674 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11675 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11676 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11677 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11678 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11679 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11680 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11681 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11682 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11683 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11684 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11685 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11686 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11687 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11688 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11689 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11690 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11691 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11692 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11693 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11694 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11695 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11696 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11697 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11698 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11699 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11700 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11701 Use GNAT instead of GNARL.
11703 2011-08-01 Bob Duff <duff@adacore.com>
11705 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11706 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11707 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11710 2011-08-01 Yannick Moy <moy@adacore.com>
11712 * debug.adb (d.D) reverve flag for the SPARK mode
11713 (d.E) reverve flag for SPARK generation mode
11714 (d.F) reverve flag for Why generation mode
11715 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11716 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11717 functions which return True when the corresponding modes are set
11718 (Formal_Language): return "spark" or "alfa" when in formal verification
11720 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11721 Error_Msg to prefix the error message with a tag giving the formal
11723 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11724 message with a tag giving the formal language
11725 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11727 (Analyze_Case_Statement): issue error in formal mode on case statement
11728 with a single "others" case alternative
11729 (Analyze_Exit_Statement): issue errors in formal mode on exit
11730 statements which do not respect SPARK restrictions
11731 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11732 (Check_Unreachable_Code): always issue an error (not a warning) in
11733 formal mode on unreachable code (concerns both code after an infinite
11734 loop and after an unconditional jump, both not allowed in SPARK)
11735 * sem_ch6.adb (Analyze_Return_Statement): add call to
11736 Set_Return_Present for a procedure containing a return statement
11737 (already done for functions in Analyze_Function_Return)
11738 (Analyze_Function_Return): issue error in formal mode on extended
11739 return or if return is not last statement in function
11740 (Check_Missing_Return): issue error in formal mode if function does
11741 not end with return or if procedure contains a return
11742 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11743 function to detect if there is an inner scope of its parameter S which
11746 2011-08-01 Thomas Quinot <quinot@adacore.com>
11748 * sem_ch6.ads: Minor reformatting.
11750 2011-08-01 Javier Miranda <miranda@adacore.com>
11752 * sem_util.adb (Abstract_Interface_List): Complete condition when
11753 processing private type declarations to avoid reading unavailable
11755 (Is_Synchronized_Tagged_Type): Complete condition when processing
11756 private extension declaration nodes to avoid reading unavailable
11759 2011-08-01 Thomas Quinot <quinot@adacore.com>
11761 * sem_ch3.adb: Minor reformatting.
11763 2011-08-01 Thomas Quinot <quinot@adacore.com>
11765 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11766 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11767 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11768 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11769 for VMS, instead parametrize the common implementation with
11770 System.Parameters declarations.
11772 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11774 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11776 2011-08-01 Tristan Gingold <gingold@adacore.com>
11778 * seh_init.c: Fix SEH handler installation on win64.
11780 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11782 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11783 double analysis of an anonymous access to subprogram, because it can
11784 lead to improper sharing of profiles and a back-end crash.
11786 2011-08-01 Robert Dewar <dewar@adacore.com>
11788 * make.adb, sem_ch4.adb: Minor reformatting.
11789 * gcc-interface/Make-lang.in: Update dependencies.
11790 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11792 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11794 * gnat_rm.texi: Fix definition of Long_Integer.
11796 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11798 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11799 to prevent storage exhaustion.
11800 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11801 finalized is a function body, insert the cleanup code before the final
11802 return statement, to prevent spurious warnings.
11803 * s-pooglo.ads: add overriding indicator.
11805 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11807 * sem_ch4.adb (Operator_Check): improve error message when both a
11808 with_clause and a use_clause are needed to make operator usage legal.
11809 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11810 determine whether a compilation unit is visible within an other,
11811 either through a with_clause in the current unit, or a with_clause in
11812 its library unit or one one of its parents.
11814 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11816 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11817 over an arbitrary expression of an array or container type.
11818 * lib-xref.adb: clarify comment.
11820 2011-08-01 Bob Duff <duff@adacore.com>
11822 * einfo.ads: Minor reformatting.
11823 * debug.adb: Minor comment improvement.
11825 2011-08-01 Javier Miranda <miranda@adacore.com>
11827 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11828 consider hidden subprograms as valid candidates.
11830 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11832 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11834 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11836 * gnat_ugn.texi: Fix typo.
11838 2011-08-01 Robert Dewar <dewar@adacore.com>
11840 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11841 lib-xref.adb: Minor reformatting
11843 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11845 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11846 when to generate a call to Move_Final_List.
11847 (Has_Controlled_Parts): Remove this function.
11849 2011-08-01 Geert Bosch <bosch@adacore.com>
11851 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11852 "," in choice list.
11854 2011-08-01 Thomas Quinot <quinot@adacore.com>
11856 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11857 explicit raise of a predefined exception as Comes_From_Source if the
11858 original N_Raise_Statement comes from source.
11860 2011-08-01 Robert Dewar <dewar@adacore.com>
11862 * sinfo.ads: Add comment.
11863 * sem_ch6.adb: Minor reformatting.
11865 2011-08-01 Robert Dewar <dewar@adacore.com>
11867 * freeze.adb (Freeze_Entity): Refine check for bad component size
11868 clause to avoid rejecting confirming clause when atomic/aliased present.
11870 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11872 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11873 better determine whether an entity reference is a write.
11874 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11876 * lib-xref.adb (Output_References): Do no suppress a read reference at
11877 the same location as an immediately preceeding modify-reference, to
11878 handle properly in-out actuals.
11880 2011-08-01 Tristan Gingold <gingold@adacore.com>
11882 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11884 2011-08-01 Quentin Ochem <ochem@adacore.com>
11886 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11887 heap to compute the result.
11889 2011-08-01 Robert Dewar <dewar@adacore.com>
11891 * atree.ads: Minor reformatting.
11893 2011-08-01 Emmanuel Briot <briot@adacore.com>
11895 * g-expect.adb (Get_Command_Output): Fix memory leak.
11897 2011-08-01 Geert Bosch <bosch@adacore.com>
11899 * cstand.adb (P_Float_Type): New procedure to print the definition of
11900 predefined fpt types.
11901 (P_Mixed_Name): New procedure to print a name using mixed case
11902 (Print_Standard): Use P_Float_Type for printing floating point types
11903 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11904 precision IEEE float.
11906 2011-08-01 Thomas Quinot <quinot@adacore.com>
11908 * sem_ch3.adb: Minor reformatting.
11910 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11912 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11913 the completion of a generic function, insert the new body rather than
11914 rewriting the original.
11916 2011-08-01 Yannick Moy <moy@adacore.com>
11918 * sinfo.ads, errout.ads: Typos in comments.
11920 2011-08-01 Robert Dewar <dewar@adacore.com>
11922 * par-endh.adb: Minor reformatting.
11924 2011-08-01 Robert Dewar <dewar@adacore.com>
11926 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11927 (Pre_Post_Aspects): New subtype.
11928 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11929 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11930 * par-ch7.adb (P_Package): Remove Decl parameter
11931 (P_Package): Handle new syntax for aspects (before IS)
11932 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11934 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11935 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11936 (P_Package): Remove Decl parameter
11937 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11939 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11941 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11942 * sinfo.ads: Document new syntax for aspects in packages etc.
11943 * sprint.adb: Handle new syntax of aspects before IS in package
11945 2011-08-01 Thomas Quinot <quinot@adacore.com>
11947 * atree.ads: Minor reformatting.
11948 * sem_prag.adb: Minor reformatting.
11950 2011-08-01 Robert Dewar <dewar@adacore.com>
11952 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11953 case expr alternative.
11955 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11957 * sem_ch12.adb: Fix typo.
11959 2011-08-01 Geert Bosch <bosch@adacore.com>
11961 * sem_prag.adb (Check_No_Link_Name): New procedure.
11962 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11963 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11964 instead of Standard_Long_Long_Float_Size global. Preparation for
11965 eventual removal of per type constants.
11966 * exp_util.ads (Get_Stream_Size): New function returning the stream
11967 size value of subtype E.
11968 * exp_util.adb (Get_Stream_Size): Implement new function.
11969 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11971 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11973 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11975 2011-08-01 Geert Bosch <bosch@adacore.com>
11977 * cstand.adb: Fix comments.
11978 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11979 count of arguments.
11981 2011-08-01 Robert Dewar <dewar@adacore.com>
11983 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11985 2011-08-01 Geert Bosch <bosch@adacore.com>
11987 * atree.ads: Fix comment.
11989 2011-08-01 Robert Dewar <dewar@adacore.com>
11991 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11992 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11993 * par.adb: Add with for Namet.Sp.
11994 * par-tchk.adb: Minor reformatting.
11996 2011-08-01 Vincent Celier <celier@adacore.com>
11998 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11999 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12000 of the init procedure of a SAL.
12001 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12004 2011-08-01 Thomas Quinot <quinot@adacore.com>
12006 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12009 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12011 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12013 2011-08-01 Thomas Quinot <quinot@adacore.com>
12015 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12016 conformant with its spec (return True only for types that have
12017 an overriding Initialize primitive operation that prevents them from
12018 having preelaborable initialization).
12019 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12020 initialization for controlled types in Ada 2005 or later mode.
12022 2011-08-01 Robert Dewar <dewar@adacore.com>
12024 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12026 (Same_Aspect): New function.
12027 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12028 Type_Invariant, Precondition, Postcondition.
12029 * snames.ads-tmpl: Add Name_Type_Invariant.
12031 2011-08-01 Robert Dewar <dewar@adacore.com>
12033 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12035 (Freeze_All_Ent): Fix error in handling inherited aspects.
12036 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12037 already analyzed, but don't skip entire processing of a declaration,
12038 that's wrong in some cases of declarations being rewritten.
12039 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12040 Don't delay for integer, string literals
12041 Treat predicates in usual manner for delay, remove special case code,
12043 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12044 (Build_Predicate_Function): Update saved expression in aspect
12045 (Build_Invariant_Procedure): Update saved expression in aspect
12046 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12047 of replacement of discriminant references if the reference is simple.
12049 2011-08-01 Robert Dewar <dewar@adacore.com>
12051 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12052 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12053 Static_Predicate and Dynamic_Predicate.
12054 (Build_Predicate_Function): Add processing for Static_Predicate
12055 and Dynamic_Predicate.
12056 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12057 (From_Static_Predicate): New flag
12058 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12060 2011-08-01 Robert Dewar <dewar@adacore.com>
12062 * usage.adb: Documentation cleanup for Ada version modes in usage.
12063 * expander.adb: Minor reformatting.
12065 2011-08-01 Robert Dewar <dewar@adacore.com>
12067 * atree.ads: Minor comment fix.
12068 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12069 a-witeio.ads, sem_prag.adb: Minor reformatting.
12071 2011-08-01 Doug Rupp <rupp@adacore.com>
12073 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12074 pointers. Use descrip.h header file for convenience. Add some
12077 2011-08-01 Robert Dewar <dewar@adacore.com>
12079 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12080 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12081 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12083 (Check_Aspect_At_End_Of_Declarations): New procedure
12084 (Analye_Aspect_Specification): Minor changes for above procedures
12085 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12086 specification node as well.
12088 2011-08-01 Pascal Obry <obry@adacore.com>
12090 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12091 Windows files. Use GetFilesAttributes() in this case to check for file
12092 existence instead of returning with an error code.
12094 2011-08-01 Vincent Celier <celier@adacore.com>
12096 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12097 High is above Source length.
12099 2011-08-01 Robert Dewar <dewar@adacore.com>
12101 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12103 2011-08-01 Robert Dewar <dewar@adacore.com>
12105 * aspects.ads (Boolean_Aspects): New subtype.
12106 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12107 for derived types in cases where the parent type and derived type have
12109 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12110 with aspects when parent type also has aspects.
12111 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12112 boolean expression at this point).
12113 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12114 accordance with final decision on the Ada 2012 feature.
12115 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12117 2011-08-01 Matthew Heaney <heaney@adacore.com>
12119 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12121 2011-08-01 Pascal Obry <obry@adacore.com>
12123 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12124 Fix Replace_Slice when High is above current string size.
12125 (Replace_Slice): Fix DL computation when High is above current
12128 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12130 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12132 2011-08-01 Matthew Heaney <heaney@adacore.com>
12134 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12137 2011-08-01 Pascal Obry <obry@adacore.com>
12139 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12142 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12144 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12145 access to protected subprograms in generic bodies.
12146 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12147 protected type, indicate that the convention of the subprogram is
12148 Convention_Protected, because it may be used in subsequent declarations
12149 within the protected declaration.
12151 2011-08-01 Vincent Celier <celier@adacore.com>
12153 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12154 and "final" procedures when the name of the library is "ada", to avoid
12155 duplicate symbols "adainit" and "adafinal" in executables.
12157 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12159 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12160 quantified expression that appears within a postcondition and uses the
12161 Ada2012 'Result attribute.
12163 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12165 * init.c (__gnat_error_handler): Cast reason to int.
12166 (__gnat_install_handler): Explain sa_sigaction use.
12168 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12170 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12171 subprogram has copy-in copy-out parameters, try to promote the mode of
12172 the return type if it is passed in registers.
12174 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12176 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12177 left operand as addressable.
12179 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12181 * gcc-interface/gigi.h (build_function_stub): Remove.
12182 (build_return_expr): Likewise.
12183 (convert_vms_descriptor): Declare.
12184 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12185 (build_function_stub): Move to...
12186 * gcc-interface/utils2.c (build_return_expr): Move to...
12187 * gcc-interface/trans.c (build_function_stub): ...here.
12188 (build_return_expr): ...here.
12189 (Subprogram_Body_to_gnu): Add local variable for language_function.
12190 Disconnect the parameter attributes cache, if any, once done with it.
12191 Call end_subprog_body only after setting the end_locus.
12192 Build the stub associated with the function, if any, at the very end.
12193 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12194 variables and streamline control flow.
12196 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12199 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12200 g-trasym-dwarf.adb.
12202 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12205 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12206 Assign to act.sa_sigaction.
12207 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12208 current->return_address to char * before arithmetic.
12210 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12212 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12213 Correct argument types.
12214 Extract code from reason.
12215 (__gnat_install_handler): Assign to act.sa_sigaction.
12217 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12219 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12220 (GNAT1_OBJS): ...here.
12222 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12225 * g-socthi-mingw.adb (Fill): Fix formatting.
12227 * gcc-interface/gigi.h: Move around comment.
12229 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12232 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12234 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12237 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12239 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12241 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12242 range comparison if Pmode is SImode.
12244 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12245 Eric Botcazou <ebotcazou@adacore.com>
12247 * adadecode.c: Wrap up in extern "C" block.
12248 * adadecode.h: Likewise.
12249 * adaint.c: Likewise. Remove 'const' keyword.
12250 * adaint.h: Likewise.
12251 * argv.c: Likewise.
12252 * atree.h: Likewise.
12254 * cstreams.c: Likewise.
12256 * exit.c: Likewise.
12258 * final.c: Likewise.
12259 * init.c: Likewise.
12260 * initialize.c: Likewise.
12261 * link.c: Likewise.
12262 * namet.h: Likewise.
12263 * nlists.h: Likewise.
12264 * raise.c: Likewise.
12265 * raise.h: Likewise.
12266 * repinfo.h: Likewise.
12267 * seh_init.c: Likewise.
12268 * targext.c: Likewise.
12269 * tracebak.c: Likewise.
12270 * uintp.h: Likewise.
12271 * urealp.h: Likewise.
12272 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12273 * xsinfo.adb: Likewise.
12274 * xsnamest.adb: Likewise.
12275 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12276 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12277 * gcc-interface/misc.c: Likewise.
12278 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12279 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12280 ada/targext.o here...
12281 (GNAT_ADA_OBJS): ...and not here.
12282 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12283 (GNATBIND_OBJS): Reorder.
12285 2011-07-07 Richard Henderson <rth@redhat.com>
12287 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12288 dwarf2out_frame_init.
12290 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12292 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12294 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12297 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12299 2011-07-06 Richard Guenther <rguenther@suse.de>
12301 * gcc-interface/misc.c (gnat_init): Merge calls to
12302 build_common_tree_nodes and build_common_tree_nodes_2.
12303 Re-initialize boolean_false_node.
12305 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12306 Olivier Hainque <hainque@adacore.com>
12307 Nicolas Setton <setton@adacore.com>
12309 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12310 the type according to the ARTIFICIAL_P parameter.
12311 (create_type_decl): Likewise.
12312 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12314 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12316 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12317 (gnatbind): Likewise.
12319 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12321 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12323 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12325 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12326 local variable throughout. Remove useless call to Base_Type.
12327 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12328 Take it also into account for the volatileness of the field. Set the
12329 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12331 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12333 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12334 on a dereference built for a by-ref object if it has an address clause.
12336 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12338 * einfo.ads (Address_Taken): Document use for the second argument of
12339 Asm_Input and Asm_Output attributes.
12340 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12341 argument is an entity name, then set Address_Taken on it.
12342 <Attribute_Asm_Output>: Likewise.
12343 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12344 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12345 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12346 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12348 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12350 PR middle-end/46500
12351 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12353 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12355 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12356 (ada/utils.o): Update dependencies.
12357 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12358 ../../../libcpp/libcpp.a.
12359 * gcc-interface/utils.c: Include common/common-target.h.
12360 (process_attributes): Use targetm_common.have_named_sections.
12362 2011-06-07 Richard Guenther <rguenther@suse.de>
12364 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12367 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12369 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12370 TREE_THIS_NOTRAP flag.
12372 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12374 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12377 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12379 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12380 constants whose full view has discriminants specially.
12382 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12384 * gcc-interface/utils.c: Include diagnostic.h.
12385 (gnat_write_global_declarations): Output debug information for all
12386 global type declarations before finalizing the compilation unit.
12387 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12389 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12391 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12393 2011-05-25 Kai Tietz <ktietz@redhat.com>
12395 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12396 initialization instead of const/none-const pointer assignment.
12398 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12400 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12401 $(EXTRA_GNAT1_OBJS).
12402 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12403 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12404 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12405 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12406 libcommon-target.a instead of prefix.o.
12408 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12411 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12413 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12415 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12416 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12417 instead of version.o.
12419 2011-05-18 Kai Tietz <ktietz@redhat.com>
12421 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12422 boolean_false_node instead of integer_zero_node.
12423 (convert_with_check): Likewise.
12424 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12426 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12428 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12429 type of the parameter is an unconstrained array, convert the actual to
12430 the type of the formal in the In Out and Out cases as well.
12432 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12434 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12435 call build_function_type_array or build_varargs_function_type_array
12437 (create_subprog_type): Don't call build_function_type; call
12438 build_function_type_vec instead.
12440 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12442 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12443 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12444 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12446 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12448 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12450 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12451 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12453 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12455 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12457 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12459 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12460 instead of accessing TYPE_ARG_TYPES directly.
12461 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12463 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12466 * gcc-interface/gigi.h (get_variant_part): Declare.
12467 * gcc-interface/decl.c (get_variant_part): Make global.
12468 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12469 types have the same constant size, are record types and T1 has a
12470 variant part while T2 doesn't.
12472 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12474 * gcc-interface/utils.c (begin_subprog_body): Do not call
12476 (end_subprog_body): Likewise.
12478 2011-05-04 Richard Guenther <rguenther@suse.de>
12480 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12482 (pos_to_constructor): Likewise.
12484 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12485 Eric Botcazou <ebotcazou@adacore.com>
12487 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12488 of build_function_type. Adjust calls to...
12489 (build_raise_check): ...this. Do not take a void_tree parameter.
12490 Call build_function_type_list instead of build_function_type.
12491 Fix head comment and swap couple of conditional blocks.
12493 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12495 * gnatvsn.ads (Library_Version): Bump to 4.7.
12496 (Current_Year): Bump to 2011.
12498 2011-04-29 Michael Matz <matz@suse.de>
12500 * gcc-interface/misc.c (gnat_handle_option): Set
12501 warn_maybe_uninitialized.
12503 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12505 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12506 the Watson/McCabe paper.
12508 2011-04-23 Jim Meyering <meyering@redhat.com>
12510 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12512 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12514 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12517 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12519 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12521 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12522 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12523 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12524 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12525 <all>: Do not set flags on the reused DECL node coming from an alias.
12526 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12527 don't need debug info here...
12528 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12529 (gigi): Adjust calls to create_subprog_decl.
12530 (build_raise_check): Likewise.
12531 (establish_gnat_vms_condition_handler): Likewise.
12532 (Compilation_Unit_to_gnu): Likewise.
12533 (gnat_to_gnu): Likewise.
12535 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12537 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12538 (NO_REORDER_ADAFLAGS): New variable.
12539 (EXTRA_GNATTOOLS): Always define.
12540 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12541 Clean up and adjust list of files compiled with special options.
12542 * gcc-interface/Make-lang.in: Likewise.
12543 (ada/decl.o): Cosmetical change.
12544 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12546 2011-04-20 Jim Meyering <meyering@redhat.com>
12548 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12550 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12552 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12553 $(CFLAGS) on the link line.
12555 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12557 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12558 padded type built for the return type if it is unconstrained.
12560 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12562 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12564 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12566 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12567 before calling TREE_CHAIN.
12568 * gcc-interface/misc.c (gnat_init_ts): New function.
12569 (LANG_HOOKS_INIT_TS): Define.
12571 2011-04-12 Martin Jambor <mjambor@suse.cz>
12573 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12574 instead of cgraph_node.
12576 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12578 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12579 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12582 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12584 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12585 of aggregate types that contain a placeholder.
12587 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12589 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12591 (handle_type_generic_attribute): Likewise.
12593 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12596 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12598 2011-04-04 Kai Tietz <ktietz@redhat.com>
12601 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12604 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12606 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12607 type case, do not strip a padding type around the array type.
12609 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12611 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12614 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12616 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12617 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12618 code for -feliminate-unused-debug-types.
12619 (gnat_post_options): Likewise.
12621 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12623 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12624 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12627 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12629 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12630 DECL_ARTIFICIAL flag on enumeration types.
12632 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12634 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12635 fat pointer types artificial unconditionally.
12636 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12639 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12641 * gcc-interface/gigi.h (get_dummy_type): Declare.
12642 (build_dummy_unc_pointer_types): Likewise.
12643 (finish_fat_pointer_type): Likewise.
12644 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12645 fat pointer type has been built, complete it in place.
12646 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12647 and thin pointers. Remove useless variable.
12648 (finish_fat_pointer_type): Make global and move to...
12649 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12650 (get_dummy_type): New function.
12651 (build_dummy_unc_pointer_types): Likewise.
12652 (gnat_pushdecl): Propage the name to the anonymous variants only.
12653 (update_pointer_to): Only adjust the pointer types in the unconstrained
12656 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12658 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12659 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12660 if this is a Taft amendment type and the full declaration is available.
12661 * gcc-interface/trans.c (process_type): Likewise.
12662 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12663 (process_freeze_entity): Likewise.
12664 * gcc-interface/utils.c (dummy_global): New static variable.
12665 (gnat_write_global_declarations): If there are types declared as used
12666 at the global level, insert them in the global hash table.
12668 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12670 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12671 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12672 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12674 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12675 flag of the type accordingly.
12676 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12678 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12680 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12681 finalizing types when updating the pointers to the designated type.
12682 <all>: Finalize the deferred types even if we didn't defer processing
12683 of incomplete types in this invocation.
12685 2011-04-01 Olivier Hainque <hainque@adacore.com>
12686 Nicolas Setton <setton@adacore.com>
12687 Eric Botcazou <ebotcazou@adacore.com>
12689 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12690 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12692 2011-03-28 Kai Tietz <ktietz@redhat.com>
12694 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12696 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12697 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12699 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12701 2011-03-28 Tristan Gingold <gingold@adacore.com>
12704 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12705 Use ada output of gnatbind.
12706 (ada/b_gnatb.adb): Ditto.
12707 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12708 (ada.mostlyclean, ada.stage1)
12709 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12710 (ada.stagefeedback): Adjust.
12711 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12712 Use ada output of gnatbind.
12713 (b_gnatm.adb): Ditto.
12714 (b_gnatl.o, b_gnatm.o): New rules.
12716 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12718 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12719 for the padded type built to support a specified size or alignment.
12721 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12723 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12725 unconditionally to the end of the unit when the designated type is
12727 <all>: Rename local variable. Attempt to un-defer types only and do it
12728 for limited_with'ed types as well.
12729 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12730 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12731 consistently and remove redundant call to finalize_from_with_types.
12733 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12735 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12736 subprograms without a previous spec declared in the same unit.
12737 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12738 subprograms at the end of the unit instead of at the beginning.
12739 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12740 isn't public for the special handling of non-inline functions nested
12741 inside inline external functions.
12743 2011-03-25 Jeff Law <law@redhat.com>
12745 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12747 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12749 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12750 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12751 to compute Set_Size_Depends_On_Discriminant.
12752 (Layout_Type): Call it on array types in back-end layout mode.
12753 * sem_util.adb (Requires_Transient_Scope): Return true for array
12754 types only if the size depends on the value of discriminants.
12755 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12756 type if the RHS is a call to a function that returns an unconstrained
12757 type with default discriminant.
12759 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12761 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12762 non-conversion to the nominal result type at the end.
12764 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12766 * gcc-interface/trans.c (create_temporary): New function taken from...
12767 (create_init_temporary): ...here. Call it.
12768 (call_to_gnu): Create the temporary for the return value early, if any.
12769 Create it for a function with copy-in/copy-out parameters if there is
12770 no target; in other cases of copy-in/copy-out, use another temporary.
12771 Push the new binding level lazily. Add and rename local variables.
12773 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12775 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12777 (set_rm_size): Likewise.
12779 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12781 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12782 for the padded type built in order to support a specified alignment.
12783 Fix incorrect formatting.
12785 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12788 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12790 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12792 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12793 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12794 to the end of the list. Adjust recursive call. Rename local variable.
12795 If REORDER is true, reorder components of the record type.
12796 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12797 components_to_record and adjust the parameter list.
12799 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12801 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12802 disabled, use the variable for bounds of loop iteration scheme.
12804 2011-03-21 Kai Tietz <ktietz@redhat.com>
12807 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12809 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12811 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12812 out whether the expression is read-only. Short-circuit placeholder
12813 case and rename a couple of local variables.
12815 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12817 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12818 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12819 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12820 (convert): Deal with conversions from a smaller form type specially.
12822 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12824 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12825 its argument, except for the special -I- switch.
12827 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12829 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12832 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12834 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12836 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12838 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12840 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12841 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12842 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12843 Do not generate the check directly, instead instantiate the template
12844 check present in the descriptor.
12845 (make_descriptor_field): Move around.
12846 (build_vms_descriptor32): Build a template check in the POINTER field.
12847 (build_vms_descriptor): Remove useless suffixes.
12848 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12850 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12853 * targext.c: Include target files if IN_RTS is defined.
12855 2011-01-26 Richard Guenther <rguenther@suse.de>
12858 * targext.c: Include config.h.
12859 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12862 2011-01-04 Pascal Obry <obry@adacore.com>
12863 Eric Botcazou <ebotcazou@adacore.com>
12865 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12867 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12869 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12870 end-of-case on the end label and its associated gotos, if any.
12872 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12874 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12875 expressions of the parameter cache within the statement group of
12876 the CICO mechanism.
12878 2011-01-04 Olivier Hainque <hainque@adacore.com>
12879 Eric Botcazou <ebotcazou@adacore.com>
12881 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12882 (set_end_locus_from_node): New function.
12883 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12884 make and the function end_locus.
12885 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12886 for the elaboration subprogram.
12887 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12888 set the end_locus of the expression as well.
12890 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12893 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12894 variables that are referenced in exception handlers volatile.
12898 Copyright (C) 2011 Free Software Foundation, Inc.
12900 Copying and distribution of this file, with or without modification,
12901 are permitted in any medium without royalty provided the copyright
12902 notice and this notice are preserved.
12904 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12905 - fix bugs in the description of Source_Trace;
12906 - get rid of UNIT_NAME;
12908 2011-08-02 Javier Miranda <miranda@adacore.com>
12911 (Build_Dispatching_Requeue): Adding support for VM targets
12912 since we cannot directly reference the Tag entity.
12913 * exp_sel.adb (Build_K): Adding support for VM targets.
12914 (Build_S_Assignment): Adding support for VM targets.
12916 (Default_Prim_Op_Position): In VM targets do not restrict availability
12917 of predefined interface primitives to compiling in Ada 2005 mode.
12918 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12919 restricted to compiling in Ada 2005 mode.
12920 (Make_VM_TSD): Generate code that declares and initializes the OSD
12921 record. Needed to support dispatching calls through synchronized
12924 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12925 primitives associated with synchronized interfaces.
12926 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12927 primitives associated with synchronized interfaces.
12929 2011-08-02 Yannick Moy <moy@adacore.com>
12931 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12932 statements hidden in SPARK if preceded by the HIDE directive
12933 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12934 exception handlers as hidden in SPARK if preceded by the HIDE directive
12935 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12936 if starting with the HIDE directive
12937 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12938 starting with the HIDE directive; mark the declarations in a private
12939 part as hidden in SPARK if the private part starts with the HIDE
12941 * restrict.adb, restrict.ads
12942 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12943 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12944 argument node belongs to a part which is hidden in SPARK
12945 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12946 parts in SPARK; protect the possibly costly call to
12947 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12948 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12949 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12950 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12952 (Scan): recognize special comment starting with '#' and followed by
12953 SPARK keyword "hide" as a HIDE directive.
12955 2011-08-02 Yannick Moy <moy@adacore.com>
12957 * types.ads, erroutc.ads: Minor reformatting.
12959 2011-08-02 Vincent Celier <celier@adacore.com>
12961 * link.c: Add response file support for cross platforms.
12963 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12965 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12966 in an association, set parent field of copy before partial analysis.
12967 * sem_res.adb (Resolve_Slice): create reference to itype only when
12968 expansion is enabled.
12970 2011-08-02 Yannick Moy <moy@adacore.com>
12972 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12973 for new flag denoting which subprogram bodies are in ALFA
12974 * restrict.adb, sem_ch7.adb: Update comment
12975 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12976 sem_ch9.adb, sem_res.adb: Add calls to
12977 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12978 * sem_ch6.adb (Analyze_Function_Return): add calls to
12979 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12980 middle of the body, and extended return.
12981 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12982 False when missing return.
12983 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12984 to True for subprograms whose spec is in ALFA. Remove later on the flag
12985 on the entity used for a subprogram body when there exists a separate
12987 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12988 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12989 False, otherwise do nothing.
12991 2011-08-02 Robert Dewar <dewar@adacore.com>
12993 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12995 2011-08-02 Yannick Moy <moy@adacore.com>
12997 * sem_ch4.ads: minor formatting.
12999 2011-08-02 Yannick Moy <moy@adacore.com>
13001 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13002 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13003 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13004 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13005 opt.ads: cleanup of SPARK mode
13007 2011-08-02 Yannick Moy <moy@adacore.com>
13009 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13011 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13012 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13014 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13015 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13016 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13017 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13019 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13021 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13022 functions whose return type is not in ALFA.
13023 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13025 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13026 parameter's type is not in ALFA.
13027 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13030 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13032 * sem_ch6 (Analyze_Expression_Function): treat the function as
13033 Inline_Always, and introduce a subprogram declaration for it when it is
13035 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13036 expression functions, so that the back-end can determine whether they
13037 can in fact be inlined.
13038 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13039 a function body comes from an expression function.
13041 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13043 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13044 null exclusions to test Can_Never_Be_Null on the anonymous access types
13045 of the formals rather than testing the formals themselves. Exclude this
13046 check in cases where the Old_Formal is marked as a controlling formal,
13047 to avoid issuing spurious errors for bodies completing dispatching
13048 operations (due to the flag not getting set on controlling access
13049 formals in body specs).
13050 (Find_Corresponding_Spec): When checking full and subtype conformance of
13051 subprogram bodies in instances, pass Designated and E in that order, for
13052 consistency with the expected order of the formals (New_Id followed by
13055 2011-08-02 Robert Dewar <dewar@adacore.com>
13057 * sem_ch8.adb: Minor reformatting.
13059 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13061 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13062 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13063 primitive operations of class-wide actuals.
13065 2011-08-02 Javier Miranda <miranda@adacore.com>
13067 * exp_atag.ads, exp_atag.adb
13068 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13069 since its value is implicitly passed in argument Typ.
13070 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13071 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13072 Build_Common_Dispatching_Select_Statements.
13074 2011-08-02 Robert Dewar <dewar@adacore.com>
13076 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13077 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13078 Minor reformatting.
13080 2011-08-02 Robert Dewar <dewar@adacore.com>
13082 * sem_res.adb: Minor reformatting.
13083 * sem_prag.adb: Minor reformatting.
13085 2011-08-02 Javier Miranda <miranda@adacore.com>
13087 * exp_atag.adb, exp_atags.ads
13088 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13089 by the tagged type Entity. Required to use this routine in the VM
13090 targets since we do not have available the Tag entity in the VM
13093 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13094 Ada.Tags has not been previously loaded.
13096 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13097 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13099 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13100 view of enclosing scopes. Required to handle enclosing scopes that
13101 are synchronized types whose full view is a task type.
13103 (Build_VM_TSDs): Minor code improvement to avoid generating and
13104 analyzing lists with empty nodes.
13105 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13106 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13107 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13108 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13109 (Make_Select_Specific_Data_Table): Add support for VM targets.
13110 (Make_VM_TSD): Generate code to initialize the SSD structure of
13113 2011-08-02 Yannick Moy <moy@adacore.com>
13115 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13116 cross-references section in ALI.
13117 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13118 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13120 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13121 subprogram or package entity of a node
13122 (Is_Local_Reference_Type): new function returns True for references
13123 selected in local cross-references.
13124 (Lt): function extracted from Lt in Output_References
13125 (Write_Entity_Name): function extracted from Output_References
13126 (Generate_Definition): generate reference with type 'D' for definition
13127 of objects (object declaration and parameter specification), with
13128 appropriate locations and units, for use in local cross-references.
13129 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13130 references of type 'I' for initialization in object definition.
13131 (Output_References): move part of function Lt and procedure
13132 Write_Entity_Name outside of the body. Ignore references of types 'D'
13133 and 'I' introduced for local cross-references.
13134 (Output_Local_References): new procedure to output the local
13135 cross-references sections.
13136 (Lref_Entity_Status): new array defining whether an entity is a local
13137 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13138 with 'I' type when initialization expression is present.
13139 * get_scos.adb, get_scos.ads: Correct comments and typos
13141 2011-08-02 Javier Miranda <miranda@adacore.com>
13143 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13145 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13147 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13150 2011-08-02 Vincent Celier <celier@adacore.com>
13152 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13153 (No_Space_Img): New function
13154 (Find_Excluded_Sources): When reading from a file, record the file name
13155 and the line number for each excluded source.
13156 (Mark_Excluded_Sources): When reporting an error, if the excluded
13157 sources were read from a file, include file name and line number in
13160 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13162 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13164 2011-08-02 Robert Dewar <dewar@adacore.com>
13166 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13168 2011-08-02 Javier Miranda <miranda@adacore.com>
13170 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13171 generation of TSDs to the DOTNET compiler.
13172 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13173 generation of TSDs to the DOTNET compiler.
13175 2011-08-02 Javier Miranda <miranda@adacore.com>
13177 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13178 record of all the tagged types declared inside library level package
13179 declarations, library level package bodies or library level subprograms.
13180 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13181 associated with a given tagged type.
13182 (Build_VM_TSDs): New subprogram.
13183 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13184 compilation units that are subprograms.
13185 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13186 compilation units that are package bodies.
13187 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13188 units that are a package declaration or a package instantiation.
13189 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13190 reorganization to improve the error generated by the frontend when the
13191 function Ada.Tags.Secondary_Tag is not available.
13192 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13193 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13195 2011-08-02 Javier Miranda <miranda@adacore.com>
13197 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13199 2011-08-02 Robert Dewar <dewar@adacore.com>
13201 * s-imenne.ads: Minor reformatting.
13203 2011-08-02 Robert Dewar <dewar@adacore.com>
13205 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13206 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13207 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13209 2011-08-02 Robert Dewar <dewar@adacore.com>
13211 * einfo.ads (Materialize_Entity): Document this is only for renamings
13212 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13213 required debug information in the case where we transform the object
13214 declaration into a renaming declaration.
13215 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13217 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13218 Materialize_Entity.
13220 2011-08-02 Robert Dewar <dewar@adacore.com>
13222 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13223 Suppress_Init_Procs.
13224 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13225 Suppress_Initialization/Initialization_Suppressed.
13226 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13227 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13228 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13229 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13231 2011-08-02 Robert Dewar <dewar@adacore.com>
13233 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13234 Minor reformatting.
13236 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13238 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13239 only have inheritable classwide pre/postconditions.
13241 2011-08-02 Javier Miranda <miranda@adacore.com>
13243 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13244 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13245 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13246 checks if the external tag of a type is the same as the external tag
13247 of some other declaration.
13249 2011-08-02 Thomas Quinot <quinot@adacore.com>
13251 * s-taskin.ads: Minor reformatting.
13253 2011-08-02 Emmanuel Briot <briot@adacore.com>
13255 * g-comlin.adb (Display_Help): swap the order in which it prints the
13256 short help and the general usage.
13258 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13260 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13261 the aspect declarations and attach them to the generic copy for
13262 subsequent analysis.
13263 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13264 declarations of the generic tree to the new subprogram declarations.
13265 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13266 conditions that apply to a subprogram instance.
13268 2011-08-02 Robert Dewar <dewar@adacore.com>
13270 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13272 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13274 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13275 private type with a tagged full view is not derived in the immediate
13276 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13278 2011-08-02 Robert Dewar <dewar@adacore.com>
13280 * exp_ch4.adb: Minor reformatting.
13282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13284 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13285 Ada2012 iterator, the loop will be rewritten during expansion into a
13286 while loop with a cursor and an element declaration. Do not analyze the
13287 body in this case, because if the container is for indefinite types the
13288 actual subtype of the elements will only be determined when the cursor
13289 declaration is analyzed.
13291 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13293 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13294 size/alignment related attributes in CodePeer_Mode.
13296 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13298 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13299 Prepend_Element, since this can result in the operation getting the
13300 wrong slot in the full type's dispatch table if the full type has
13301 inherited operations. The incomplete type's operation will get added
13302 to the proper position in the full type's primitives
13303 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13304 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13305 dispatching operations, since there are cases where nonprimitive
13306 subprograms can get added to the list of incomplete dependents (such
13307 as subprograms in nested packages).
13308 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13309 private part when determining whether to add a primitive with a
13310 parameter of a tagged incomplete type to the Private_Dependents list.
13311 Such primitives can also occur in the visible part, and should not have
13312 been excluded from being private dependents.
13313 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13314 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13315 list of a Taft-amendment incomplete type is a primitive before issuing
13316 an error that the full type must appear in the same unit. There are
13317 cases where nonprimitives can be in the list (such as subprograms in
13319 * sem_disp.adb (Derives_From): Use correct condition for checking that
13320 a formal's type is derived from the type of the corresponding formal in
13321 the parent subprogram (the condition was completely wrong). Add
13322 checking that was missing for controlling result types being derived
13323 from the result type of the parent operation.
13325 2011-08-02 Yannick Moy <moy@adacore.com>
13327 * errout.adb (First_Node): minor renaming
13328 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13331 2011-08-02 Yannick Moy <moy@adacore.com>
13333 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13334 before accessing operands.
13335 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13336 decide whether an initialization expression respects SPARK rules, as
13337 the plain node is the expanded one. This allows for more valid warnings
13339 * gnat_rm.texi: Minor update.
13341 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13343 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13346 2011-08-02 Robert Dewar <dewar@adacore.com>
13348 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13350 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13352 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13353 loop statements and the element renaming declaration with a block when
13354 the element type is controlled.
13356 2011-08-02 Yannick Moy <moy@adacore.com>
13358 * sinfo.ads: Minor formatting.
13360 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13362 * sem_aggr.adb (Add_Association): if the association has a box and no
13363 expression, use the Sloc of the aggregate itself for the new
13365 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13368 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13370 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13371 When a container is provided via a function call, generate a renaming
13372 of the function result. This avoids the creation of a transient scope
13373 and the premature finalization of the container.
13374 * exp_ch7.adb (Is_Container_Cursor): Removed.
13375 (Wrap_Transient_Declaration): Remove the supression of the finalization
13376 of the list controller when the declaration denotes a container cursor,
13379 2011-08-02 Yannick Moy <moy@adacore.com>
13381 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13382 node is from source, instead of the original node being from source.
13384 (Resolve_Array_Aggregate): refine the check for a static expression, to
13385 recognize also static ranges
13386 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13387 Array_Type_Declaration): postpone the test for the type being a subtype
13388 mark after the type has been resolved, so that component-selection and
13389 expanded-name are discriminated.
13390 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13391 to distinguish the case of an iteration scheme, so that an error is
13392 issed on a non-static range in SPARK except in an iteration scheme.
13393 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13394 In_Iter_Schm = True.
13395 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13396 user-defined operators so that they are allowed in renaming
13398 (Find_Selected_Component): refine the check for prefixing of operators
13399 so that they are allowed in renaming. Move the checks for restrictions
13400 on selector name after analysis discriminated between
13401 component-selection and expanded-name.
13402 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13403 concatenation argument of string type if it is static.
13404 * sem_util.adb, sem_util.ads
13405 (Check_Later_Vs_Basic_Declarations): add a new function
13406 Is_Later_Declarative_Item to decice which declarations are allowed as
13407 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13408 mode, add that renamings are considered as later items.
13409 (Enclosing_Package): new function to return the enclosing package
13410 (Enter_Name): correct the rule for homonyms in SPARK
13411 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13412 from source (result of expansion) to avoid issuing wrong warnings.
13414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13416 * errout.adb: On anything but an expression First_Node returns its
13419 2011-08-02 Pascal Obry <obry@adacore.com>
13421 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13423 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13425 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13426 Set the associated loop as the related expression of internally
13428 * exp_ch7.adb (Is_Container_Cursor): New routine.
13429 (Wrap_Transient_Declaration): Supress the finalization of the list
13430 controller when the declaration denotes a container cursor.
13432 2011-08-02 Yannick Moy <moy@adacore.com>
13434 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13436 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13437 expression is a simple expression. This check cannot be performed in
13438 the semantics, so just drop it.
13439 (P_Index_Or_Discriminant_Constraint): move check that the index or
13440 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13441 semantics. Other cases were previously checked in the semantics.
13442 * par-ch4.adb (P_Name): move checks that a selector name is not
13443 character literal or an operator symbol to Find_Selected_Component in
13445 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13446 declarations are not placed after later declarations in a separate
13447 procedure in Sem_Util (possibly not the best choice?), to be used both
13448 during parsing, for Ada 83 mode, and during semantic analysis, for
13450 * par-endh.adb (Check_End): move check that end label is not missing
13451 to Process_End_Label in the semantics
13452 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13453 the special case for SPARK restriction
13454 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13455 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13456 parameter Force to issue the error message even on internal node (used
13457 for generated end label). Call Check_Restriction to check when an error
13458 must be issued. In SPARK mode, issue an error message even if the
13459 restriction is not set.
13460 (Check_Restriction): new procedure with an additional out parameter to
13461 inform the caller that a message has been issued
13462 * sem_aggr.adb: Minor modification of message
13463 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13464 instead of issuing an error message directly
13465 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13466 declarations are not placed after later declarations, by calling
13467 Check_Later_Vs_Basic_Declarations
13468 (Analyze_Subtype_Declaration): move here the check that an index or
13469 discriminant constraint must be a subtype mark. Change the check that
13470 a subtype of String must start at one so that it works on subtype marks.
13471 * sem_ch4.adb (Analyze_Call): move here the check that a named
13472 association cannot follow a positional one in a call
13473 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13474 instead of issuing an error message directly
13475 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13476 selector name is not a character literal or an operator symbol. Move
13477 here the check that the prefix of an expanded name cannot be a
13478 subprogram or a loop statement.
13479 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13480 procedure called from parsing and semantics to check that basic
13481 declarations are not placed after later declarations
13482 (Process_End_Label): move here the check that end label is not missing
13484 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13486 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13487 representation clause in codepeer mode, since it confuses CodePeer and
13488 does not bring useful info.
13490 2011-08-02 Ed Falis <falis@adacore.com>
13492 * init.c: initialize fp hw on MILS.
13494 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13496 * errout.adb (First_Node): for bodies, return the node itself (small
13497 optimization). For other nodes, do not check source_unit if the node
13498 comes from Standard.
13500 2011-08-02 Robert Dewar <dewar@adacore.com>
13502 * exp_ch3.adb: Minor comment additions.
13503 * sem_ch13.adb: Minor reformatting.
13505 2011-08-02 Pascal Obry <obry@adacore.com>
13507 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13509 2011-08-02 Robert Dewar <dewar@adacore.com>
13511 * sem_attr.adb: Minor reformatting.
13513 2011-08-02 Robert Dewar <dewar@adacore.com>
13515 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13516 (Has_Default_Component_Value): Removed
13517 * einfo.ads Comment updates
13518 (Has_Default_Aspect): Replaces Has_Default_Value
13519 (Has_Default_Component_Value): Removed
13521 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13523 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13524 (Get_Simple_Init_Val): Handle Default_Value aspect
13525 (Needs_Simple_Initialization): Handle Default_Value aspect
13526 * exp_ch3.ads: Needs_Simple_Initialization
13527 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13528 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13530 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13531 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13532 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13534 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13536 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13537 package containing iteration primitives.
13538 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13540 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13542 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13543 "of", pre-analyze expression in case it is a function call with
13544 finalization actions that must be placed ahead of the loop.
13545 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13546 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13548 2011-08-02 Geert Bosch <bosch@adacore.com>
13550 * cstand.adb (Create_Float_Types): Only consider C's long double for
13551 Long_Long_Float, in addition to double.
13553 2011-08-02 Robert Dewar <dewar@adacore.com>
13555 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13556 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13557 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13558 Minor reformatting.
13560 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13562 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13565 2011-08-02 Javier Miranda <miranda@adacore.com>
13567 * einfo.ads, einfo.adb
13568 (Original_Access_Type): Move this attribute to Node26 since there was
13569 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13570 which causes conflicts and breaks the generation of the .NET compiler.
13571 (Interface_Name): Add missing documentation on JGNAT only uses of
13574 2011-08-02 Geert Bosch <bosch@adacore.com>
13576 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13577 (Find_Back_End_Float_Type): Likewise
13578 (Create_Back_End_Float_Types): Likewise
13579 (Create_Float_Types): Likewise
13580 (Register_Float_Type): Likewise
13581 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13582 Nlist and split out type selection in new local Find_Base_Type function.
13583 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13585 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13587 2011-08-02 Robert Dewar <dewar@adacore.com>
13589 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13591 * opt.ads: Minor comment change.
13592 * sem_ch12.adb: Minor code reorganization.
13594 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13596 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13597 subtype's list of rep items to the list on the full subtype in the case
13598 where the lists are the same.
13600 2011-08-02 Geert Bosch <bosch@adacore.com>
13602 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13603 using the one from System.Strings, which also deallocates all strings.
13605 2011-08-02 Geert Bosch <bosch@adacore.com>
13607 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13609 * gcc-interface/Make-lang.in: Update dependencies.
13611 2011-08-02 Olivier Hainque <hainque@adacore.com>
13613 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13616 2011-08-02 Javier Miranda <miranda@adacore.com>
13618 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13619 associated with anonymous access to subprograms.
13621 2011-08-02 Geert Bosch <bosch@adacore.com>
13624 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13625 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13626 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13627 (Add_Symbol_Definition): Move to switch-c.adb
13628 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13629 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13630 (Add_Symbol_Definition): Move to switch-c.adb.
13631 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13633 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13634 Move to warnsw.adb.
13635 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13636 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13637 Move to warnsw.adb.
13638 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13639 (Add_Symbol_Definition): Moved from Prepcomp.
13640 * switch-c.ads: Update copyright notice. Use String_List instead of
13641 Argument_List, removing dependency on System.OS_Lib.
13643 2011-08-02 Yannick Moy <moy@adacore.com>
13645 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13646 mode on initialization expression which does not respect SPARK
13648 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13649 if the tree referenced by its argument represents an initialization
13650 expression in SPARK, suitable for initializing an object in an object
13653 2011-08-02 Javier Miranda <miranda@adacore.com>
13655 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13656 internally generated access to subprogram with its associated protected
13658 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13660 2011-08-02 Geert Bosch <bosch@adacore.com>
13662 * cstand.adb (Register_Float_Type): Print information about type to
13663 register, if the Debug_Flag_Dot_B is set.
13664 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13665 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13666 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13667 with a requested precision of more than Max_Digits digits and no more
13668 than Max_Base_Digits digits, if a range specification is present and the
13669 Predefined_Float_Types list has a suitable type to derive from.
13670 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13671 case of type completion with pragma Import
13673 (Process_Import_Predefined_Type): Processing to complete a type
13674 with pragma Import. Currently supports floating point types only.
13675 (Set_Convention_From_Pragma): Do nothing without underlying type.
13676 (Process_Convention): Guard against absence of underlying type,
13677 which may happen when importing incomplete types.
13678 (Process_Import_Or_Interface): Handle case of importing predefined
13679 types. Tweak error message.
13681 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13683 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13684 functions to previous change. Reorganize code slightly.
13686 2011-08-02 Geert Bosch <bosch@adacore.com>
13688 * back_end.ads (Register_Type_Proc): New call back procedure type for
13689 allowing the back end to provide information about available types.
13690 (Register_Back_End_Types): New procedure to register back end types.
13691 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13693 * cstand.adb (Back_End_Float_Types): New list for floating point types
13694 supported by the back end.
13695 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13696 (Copy_Float_Type): New procedure to make new copies of predefined types.
13697 (Register_Float_Type): New call back procedure to populate the BEFT list
13698 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13699 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13700 (Create_Float_Types): New procedure to create entities for floating
13701 point types predefined in Standard, and put these and any remaining
13702 BEFTs on the Predefined_Float_Types list.
13703 * stand.ads (Predefined_Float_Types): New list for predefined floating
13704 point types that do not have declarations in package Standard.
13706 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13708 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13709 entity node for the unit containing the parameter.
13710 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13711 (Add_Inlined_Subprogram): Likewise.
13712 * gcc-interface/Make-lang.in: Update dependencies.
13714 2011-08-02 Thomas Quinot <quinot@adacore.com>
13716 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13719 2011-08-02 Geert Bosch <bosch@adacore.com>
13721 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13723 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13725 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13726 computed value of Base_Type.
13728 2011-08-02 Yannick Moy <moy@adacore.com>
13730 * restrict.adb (Check_Restriction): issue an error for any use of
13731 class-wide, even if the No_Dispatch restriction is not set.
13732 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13733 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13734 when completing a private extension, the type named in the private part
13735 is not the same as that named in the visible part.
13736 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13737 of an inherited primitive operations of a tagged type or type extension
13738 that returns the tagged type.
13739 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13740 function which returns True for an implicit operation inherited by the
13741 derived type declaration for the argument type.
13742 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13745 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13747 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13748 Process_Bounds, to perform analysis with expansion of a range or an
13749 expression that is the iteration scheme for a loop.
13750 (Analyze_Iterator_Specification): If domain of iteration is given by a
13751 function call with a controlled result, as is the case if call returns
13752 a predefined container, ensure that finalization actions are properly
13754 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13756 2011-08-02 Javier Miranda <miranda@adacore.com>
13758 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13759 * gcc-interface/Make-lang.in: Update dependencies.
13761 2011-08-02 Javier Miranda <miranda@adacore.com>
13763 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13764 determine if the analysis is performed using N or Original_Node (N).
13765 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13766 functionality of routine Is_Variable avoids code duplication.
13767 * checks.adb (Determine_Range): Handle temporaries generated by
13768 Remove_Side_Effects.
13770 2011-08-02 Javier Miranda <miranda@adacore.com>
13772 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13773 expansion of the condition. Required since the previous analysis was
13774 done with expansion disabled (see Resolve_Quantified_Expression) and
13775 hence checks were not inserted and record comparisons have not been
13778 2011-08-02 Ed Falis <falis@adacore.com>
13780 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13783 2011-08-02 Bob Duff <duff@adacore.com>
13785 * opt.ads: Minor comment fix.
13787 2011-08-02 Bob Duff <duff@adacore.com>
13789 * sem_ch12.adb (Analyze_Package_Instantiation,
13790 Analyze_Subprogram_Instantiation): Turn off style checking while
13791 analyzing an instance. Whatever style checks that apply to the generic
13792 unit should apply, so it makes no sense to apply them in an instance.
13793 This was causing trouble when compiling an instance of a runtime
13794 unit that violates the -gnatyO switch.
13795 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13796 one of the two case statements, causing spurious errors.
13798 2011-08-02 Robert Dewar <dewar@adacore.com>
13800 * uname.adb: Minor reformatting.
13801 * gnatcmd.adb: Minor reformatting.
13802 * exp_attr.adb: Minor reformatting.
13804 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13806 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13807 No_Dispatching_Calls, do not look for the Assign primitive, because
13808 predefined primitives are not created in this case.
13810 2011-08-02 Bob Duff <duff@adacore.com>
13812 * stylesw.ads: Minor comment fixes.
13814 2011-08-02 Robert Dewar <dewar@adacore.com>
13816 * freeze.adb (Add_To_Result): New procedure.
13818 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13820 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13821 time, if the specific run-time routines for handling streams of strings
13822 are not available, use the default mechanism.
13824 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13826 * s-regpat.ads: Fix typo.
13828 2011-08-02 Vincent Celier <celier@adacore.com>
13830 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13831 not null, call it to create the in memory config project file without
13832 parsing an existing default config project file.
13834 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13836 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13840 * sem_elim.adb: an abstract subprogram does not need an eliminate
13841 pragma for its descendant to be eliminable.
13843 2011-08-02 Ed Falis <falis@adacore.com>
13845 * init.c: revert to handling before previous checkin for VxWorks
13846 * s-intman-vxworks.adb: delete unnecessary declarations related to
13847 using Ada interrupt facilities for handling signals.
13848 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13849 * s-intman-vxworks.ads: Import __gnat_install_handler as
13850 Initialize_Interrupts.
13851 * s-taprop-vxworks.adb: Delete Signal_Mask.
13852 (Abort_Handler): change construction of mask to unblock exception
13855 2011-08-02 Jerome Guitton <guitton@adacore.com>
13857 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13858 Debug_Raise_Exception before propagation starts.
13860 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13862 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13863 to Restriction_Check_Required.
13864 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13865 * sem_res.adb (Resolve_Call): Likewise.
13866 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13868 2011-08-02 Bob Duff <duff@adacore.com>
13870 * stylesw.ads: Update comment.
13871 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13872 * errout.ads: Remove obsolete comment.
13874 2011-08-02 Javier Miranda <miranda@adacore.com>
13876 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13877 (Set_Is_Safe_To_Reevaluate): new procedure.
13878 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13879 assignment is allowed on safe-to-reevaluate variables.
13880 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13881 temporary created to remove side effects in expressions that use
13882 the secondary stack as safe-to-reevaluate.
13883 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13884 variables that are not true constants.
13886 2011-08-02 Robert Dewar <dewar@adacore.com>
13888 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13889 sem_res.adb, sem_ch6.adb: Minor reformatting.
13891 2011-08-02 Jerome Guitton <guitton@adacore.com>
13893 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13895 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13897 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13898 not set Overridden_Operation if subprogram is an initialization
13901 2011-08-02 Yannick Moy <moy@adacore.com>
13903 * par-ch6.adb: Correct obsolete name in comments
13904 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13905 which takes two message arguments (existing function takes one), with
13906 second message used for continuation.
13907 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13908 block statements that originate from a source block statement, not
13909 generated block statements
13910 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13911 symmetry with procedure case
13912 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13913 function to issue an error in formal mode if a package specification
13914 contains more than one tagged type or type extension.
13915 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13916 parameters matching formals of tagged types are objects (or ancestor
13917 type conversions of objects), not general expressions. Issue an error
13918 on view conversions that are not involving ancestor conversion of an
13920 (Resolve_Type_Conversion): in formal mode, issue an error on the
13921 operand of an ancestor type conversion which is not an object
13922 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13923 procedure so that it works also for actuals of function calls
13924 (Is_Actual_Tagged_Parameter): new function which determines if its
13925 argument is an actual parameter of a formal of tagged type in a
13927 (Is_SPARK_Object_Reference): new function which determines if the tree
13928 referenced by its argument represents an object in SPARK
13930 2011-08-02 Robert Dewar <dewar@adacore.com>
13932 * sem_ch3.adb: Minor reformatting
13933 Minor comment addition
13934 Minor error msg text change
13936 2011-08-02 Javier Miranda <miranda@adacore.com>
13938 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13939 function. Used to be more precise when we generate a variable plus one
13940 assignment to remove side effects in the evaluation of the Bound
13942 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13943 of the bound expression to force its re-analysis and thus expand the
13944 associated transient scope (if required). Code cleanup replacing the
13945 previous code that declared the constant entity by an invocation to
13946 routine Force_Evaluation which centralizes this work in the frontend.
13948 2011-08-02 Robert Dewar <dewar@adacore.com>
13950 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13951 (Base_Type): Now uses improved Is_Base_Type function
13952 * einfo.ads (Base_Type): Inline this function
13954 2011-08-02 Robert Dewar <dewar@adacore.com>
13956 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13957 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13959 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13961 * gcc-interface/Make-lang.in: Update dependencies.
13962 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13965 2011-08-02 Yannick Moy <moy@adacore.com>
13967 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13968 non-simple expression used in delta constraint
13969 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13970 index constraint which is not a subtype mark
13971 * par.adb: With and use Restrict
13972 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13973 mode on component type which is not a subtype mark and default
13974 expression on component
13975 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13976 of string which does not have a lower index bound equal to 1
13977 (Array_Type_Declaration): issue an error in formal mode on index or
13978 component type which is not a subtype mark, and on aliased keyword on
13980 (Derived_Type_Declaration): issue an error in formal mode on interface,
13981 limited or abstract type
13982 (Record_Type_Declaration): issue an error in formal mode on interface
13983 (Record_Type_Definition): issue an error in formal mode on tagged types
13984 and type extensions not declared in the specification of a library unit
13985 package; on null non-tagged record; on variant part
13987 2011-08-02 Vincent Celier <celier@adacore.com>
13989 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13990 not declared for qualified library project when Library_Name is not
13991 declared, but Library_Dir is.
13993 2011-08-02 Robert Dewar <dewar@adacore.com>
13995 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13996 pragmas (affects aspects [Component_]Default_Value
13997 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13998 component type for the resolution
14000 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14002 * einfo.adb (Base_Type): Tune implementation for speed.
14004 2011-08-02 Robert Dewar <dewar@adacore.com>
14006 * freeze.adb: Minor reformatting.
14008 2011-08-02 Thomas Quinot <quinot@adacore.com>
14010 * scos.ads: Update comments.
14012 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14014 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14015 base type, because the parent may be a subtype of a private type whose
14016 convention is established in a private part.
14018 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14020 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14021 statement in a block when the expansion of the return expression has
14022 created a finalization chain.
14023 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14024 with the parent node.
14025 Add N_Extended_Return_Statement to handle the case where a transient
14026 object declaration appears in the Return_Object_Declarations list of
14027 an extended return statement.
14029 2011-08-02 Matthew Gingell <gingell@adacore.com>
14031 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14032 unused parameter 'name'.
14034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14036 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14037 inherited operation, check whether its alias, which is the source
14038 operastion that it renames, has been marked eliminated.
14040 2011-08-02 Javier Miranda <miranda@adacore.com>
14042 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14043 in-mode parameter whose type is an access type since it can be used to
14044 modify its designated object. Enforce code that handles as safe an
14045 access type that is not access-to-constant but it is the result of a
14046 previous removal of side-effects.
14047 (Remove_Side_Effects): Minor code reorganization of cases which require
14048 no action. Done to incorporate documentation on new cases uncovered
14049 working in this ticket: no action needed if this routine was invoked
14050 too early and the nodes are not yet decorated.
14051 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14052 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14053 were issued with actuals that are implicitly provided by
14056 2011-08-02 Robert Dewar <dewar@adacore.com>
14058 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14060 2011-08-02 Yannick Moy <moy@adacore.com>
14062 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14063 to issue an error in formal mode on attribute not supported in this mode
14064 (Analyze_Attribute): issue errors on standard attributes not supported
14066 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14067 comment, and issue error in formal mode on modulus which is not a power
14069 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14071 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14073 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14074 operator on modular type (except 'not').
14076 2011-08-02 Robert Dewar <dewar@adacore.com>
14078 * gnat_rm.texi: Minor reformatting.
14080 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14082 * s-osinte-linux.ads: Minor comment update and reformatting.
14083 * i-cexten.ads: Make this unit pure, as for its parent.
14084 Will allow its usage in more contexts if needed.
14086 2011-08-02 Robert Dewar <dewar@adacore.com>
14088 * s-utf_32.ads: Minor comment fix.
14090 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14092 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14093 operation of a tagged synchronized type, handle the case where the
14094 controlling argument is overloaded.
14096 2011-08-02 Yannick Moy <moy@adacore.com>
14098 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14099 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14100 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14101 SPARK mode and formal verification mode on processing SPARK restriction
14102 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14103 requiring consistency checking.
14105 2011-08-02 Robert Dewar <dewar@adacore.com>
14107 * sem_res.adb: Minor reformatting.
14109 2011-08-02 Robert Dewar <dewar@adacore.com>
14111 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14112 a-cforse.ads: Remove unneeded with of Ada.Containers
14113 Remove commented out pragma Inline's
14114 Move specifications of new subprograms to the actual specs
14116 2011-08-02 Yannick Moy <moy@adacore.com>
14118 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14119 a-cforse.ads: Update comments.
14121 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14123 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14125 2011-08-02 Robert Dewar <dewar@adacore.com>
14127 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14128 a-cforse.ads, a-cofove.ads: Minor reformatting.
14130 2011-08-02 Claire Dross <dross@adacore.com>
14132 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14133 a-cofove.ads: Add comments.
14135 2011-08-02 Yannick Moy <moy@adacore.com>
14137 * gnat_rm.texi: Document formal containers.
14139 2011-08-02 Emmanuel Briot <briot@adacore.com>
14141 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14142 are empty sections.
14144 2011-08-02 Robert Dewar <dewar@adacore.com>
14146 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14149 2011-08-02 Robert Dewar <dewar@adacore.com>
14151 * aspects.adb: New aspects Default_Value and Default_Component_Value
14152 New format of Aspect_Names table checks for omitted entries
14153 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14154 handling of boolean aspects for derived types.
14155 New aspects Default_Value and Default_Component_Value
14156 New format of Aspect_Names table checks for omitted entries
14157 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14158 (Has_Default_Value): New flag
14159 (Has_Default_Component_Value): New flag
14160 (Has_Default_Value): New flag
14161 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14163 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14164 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14165 Default_Value and Default_Component_Value
14166 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14167 New aspects Default_Value and Default_Component_Value
14168 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14169 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14171 2011-08-02 Vincent Celier <celier@adacore.com>
14173 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14174 inherit library kind.
14176 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14178 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14179 Minor reformatting.
14181 2011-08-02 Robert Dewar <dewar@adacore.com>
14183 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14185 2011-08-02 Yannick Moy <moy@adacore.com>
14187 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14189 2011-08-02 Robert Dewar <dewar@adacore.com>
14191 * impunit.adb: Add comment.
14193 2011-08-02 Yannick Moy <moy@adacore.com>
14195 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14196 qualification of aggregates in formal mode
14197 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14199 (Resolve_Aggregate): complete the test that an aggregate is adequately
14200 qualified in formal mode
14202 2011-08-02 Pascal Obry <obry@adacore.com>
14204 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14205 * mlib-prj.adb: Supress warning when compiling binder generated file.
14206 (Build_Library): Supress all warnings when compiling the binder
14209 2011-08-02 Yannick Moy <moy@adacore.com>
14211 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14213 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14214 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14215 Add with/use clauses to make Check_Formal_Restriction visible
14217 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14219 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14220 in-parameters when type of the generic formal is private in the generic
14221 spec and non-private in the body.
14223 2011-08-02 Claire Dross <dross@adacore.com>
14225 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14226 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14227 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14228 * impunit.adb, Makefile.rtl: Take new files into account.
14230 2011-08-02 Robert Dewar <dewar@adacore.com>
14232 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14233 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14235 2011-08-02 Yannick Moy <moy@adacore.com>
14237 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14239 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14240 matching static array bounds, taking into account the special case of
14242 * sem_ch3.adb: Typo in comment.
14244 2011-08-02 Yannick Moy <moy@adacore.com>
14246 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14247 which issues an error in formal mode if its argument node is originally
14249 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14250 has a discriminant specification so that it does not include the case
14252 (Derived_Type_Declaration): move here the test that a derived type has a
14253 discriminant specification
14254 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14255 first element of a component association before accessing its choices
14256 (presence of component association is not enough)
14257 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14258 declaration is a library item before accessing the next element in a
14259 list, as library items are not member of lists
14260 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14261 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14262 Check_Formal_Restriction whenever possible.
14264 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14266 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14267 reference when needed.
14269 2011-08-02 Bob Duff <duff@adacore.com>
14271 * gnat_ugn.texi: Fix typo.
14273 2011-08-02 Vincent Celier <celier@adacore.com>
14275 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14276 archive file name. Do not use the full path name of archives for Open
14279 2011-08-02 Robert Dewar <dewar@adacore.com>
14281 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14282 Analyze_Aspect_Specifications
14284 (Analyze_Aspect_Specifications): New handling for boolean aspects
14285 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14286 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14287 sequence for Analyze_Aspect_Specifications
14288 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14289 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14291 2011-08-02 Robert Dewar <dewar@adacore.com>
14293 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14294 aspects, since these no longer exist.
14296 2011-08-02 Robert Dewar <dewar@adacore.com>
14298 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14299 semicolon, do not try to see if there are aspects following it.
14300 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14303 2011-08-02 Robert Dewar <dewar@adacore.com>
14305 * sem_ch8.adb, aspects.ads: Minor reformatting.
14307 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14309 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14310 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14312 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14314 2011-08-02 Yannick Moy <moy@adacore.com>
14316 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14317 mode on subprogram declaration outside of package specification, unless
14318 it is followed by a pragma Import
14319 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14320 Access_Type_Declaration): issue error in formal mode on access type
14321 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14323 (Analyze_Object_Declaration): issue error in formal mode on object
14324 declaration which does not respect SPARK restrictions
14325 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14326 declaration which does not respect SPARK restrictions
14327 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14328 error in formal mode on digits or delta constraint
14329 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14330 decimal fixed point type
14331 (Derived_Type_Declaration): issue error in formal mode on derived type
14332 other than type extensions of tagged record types
14333 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14334 with check on access definition
14335 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14336 mode on protected definition.
14337 (Analyze_Task_Definition): issue error in formal mode on task definition
14339 2011-08-02 Robert Dewar <dewar@adacore.com>
14341 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14343 2011-08-02 Javier Miranda <miranda@adacore.com>
14345 * sem_ch6.adb (Can_Override_Operator): New function.
14346 (Verify_Overriding_Indicator): Add missing code to check overriding
14347 indicator in operators. Fixes regression.
14348 (Check_Overriding_Indicator): Minor reformating after replacing the
14349 code that evaluates if the subprogram can override an operator by
14350 invocations to the above new function.
14352 (Write_Field26_Name): Add missing code to ensure that, following
14353 the documentation in einfo.ads, this field is not shown as attribute
14354 "Static_Initialization" on non-dispatching functions.
14356 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14358 * sem_res.adb (Resolve_Call): A call to
14359 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14360 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14361 i.e., when the second parameter is of type Time_Span.
14363 2011-08-02 Vincent Celier <celier@adacore.com>
14365 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14366 with an archive instead of -L<library dir> -l<library name>.
14368 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14370 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14371 mark the base types In_Use in addition to making the operations
14374 2011-08-02 Ed Falis <falis@adacore.com>
14376 * init.c: add and setup __gnat_signal_mask for the exception signals
14377 * s-inmaop-vxworks.adb: new file.
14378 * s-intman-vxworks.adb: remove unnecessary initializations and
14380 * s-intman-vxworks.ads: remove unnecessary variable
14381 * s-taprop-vxworks.adb: simplify signal initialization
14383 2011-08-02 Robert Dewar <dewar@adacore.com>
14385 * sem_ch8.adb: Minor code reorganization, comment updates.
14387 2011-08-02 Robert Dewar <dewar@adacore.com>
14389 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14390 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14392 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14393 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14395 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14397 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14398 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14399 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14400 use_type_clauses, to handle more efficiently use_type and use_all_type
14402 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14403 Ada2012 Use_All_Type clause.
14404 (Use_Class_Wide_Operations): new procedure.
14406 2011-08-02 Robert Dewar <dewar@adacore.com>
14408 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14409 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14410 expression to expression function.
14412 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14414 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14415 if types are compatible.
14417 2011-08-02 Yannick Moy <moy@adacore.com>
14419 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14420 returns True if its argument array types have same dimension and same
14421 static bounds at each index.
14422 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14423 OUT or IN OUT paramaters which are not view conversions in SPARK.
14424 (Resolve_Arithmetic_Op): issue an error in formal mode on
14425 multiplication or division with operands of fixed point types which are
14426 not qualified or explicitly converted.
14427 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14428 Boolean or array type (except String) operands.
14429 (Resolve_Equality_Op): issue an error in formal mode on equality
14430 operators for array types other than String with non-matching static
14432 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14433 for array types with non-matching static bounds. Factorize the code in
14434 Matching_Static_Array_Bounds.
14435 (Resolve_Qualified_Expression): issue an error in formal mode on
14436 qualified expressions for array types with non-matching static bounds.
14437 (Resolve_Type_Conversion): issue an error in formal mode on type
14438 conversion for array types with non-matching static bounds
14440 2011-08-02 Robert Dewar <dewar@adacore.com>
14442 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14444 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14446 * par-ch9.adb: save location of entry for proper error message.
14448 2011-08-02 Javier Miranda <miranda@adacore.com>
14450 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14451 (Use_Full_View) which permits this routine to climb through the
14452 ancestors using the full-view of private parents.
14453 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14454 Use_Full_View to true in calls to Is_Ancestor.
14455 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14456 true in call to Is_Ancestor.
14457 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14458 Use_Full_View to true in call to Is_Ancestor.
14459 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14460 call to Is_Ancestor.
14461 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14462 Use_Full_View to true in calls to Is_Ancestor.
14463 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14464 Make_Select_Specific_Data_Table, Register_Primitive,
14465 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14466 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14467 to true in call to Is_Ancestor.
14468 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14469 Use_Full_View to true in calls to Is_Ancestor.
14471 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14472 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14474 2011-08-02 Robert Dewar <dewar@adacore.com>
14476 * gnat_rm.texi: Minor reformatting.
14477 * sem_prag.adb: Minor reformatting.
14479 2011-08-02 Tristan Gingold <gingold@adacore.com>
14481 * vms_data.ads: Add VMS qualifier for -gnateP.
14483 2011-08-02 Robert Dewar <dewar@adacore.com>
14485 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14486 * par-ch7.adb (P_Package): Proper placement of aspects for package
14487 decl/instantiation.
14488 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14489 (End_Statements): Add Is_Sloc parameterr
14490 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14491 (Check_End): Ad Is_Sloc parameter
14492 (End_Statements): Add Is_Sloc parameterr
14494 2011-08-02 Vincent Celier <celier@adacore.com>
14496 * ug_words: Add VMS qualifier equivalent to -gnateP:
14497 /SYMBOL_PREPROCESSING.
14499 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14501 * gnat-style.texi: For hexadecimal numeric literals the typical
14502 grouping of digits is 4 to represent 2 bytes.
14503 A procedure spec which is split into several lines is indented two
14506 2011-08-02 Yannick Moy <moy@adacore.com>
14508 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14509 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14510 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14512 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14513 choice in array aggregate
14514 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14516 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14517 positional and named aggregate for record, or others in record
14518 aggregate, or multiple choice in record aggregate
14519 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14520 array operands to logical operations AND, OR and XOR do not have the
14521 same static lower and higher bounds
14522 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14524 2011-08-01 Robert Dewar <dewar@adacore.com>
14526 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14527 Replaces Last_Source_Node_In_Sequence.
14528 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14529 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14530 parens and blank in string (this was inconsistently implemented).
14532 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14533 blank in string (this was inconsistently implemented).
14535 (Set_Global_Switches): Set formal mode switches appropriately
14536 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14538 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14539 call Set_Error_Msg_Lang to set "spark" as language name.
14540 * par.adb: Remove unnecessary call to set formal language for errout
14541 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14542 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14544 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14545 calls to it, moved after resolution so that types are known
14546 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14547 result of concatenation is not of type String
14548 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14549 concatenation is not properly restricted
14550 * gnat_rm.texi: Add doc on pragma Spark_95.
14551 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14552 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14553 * gcc-interface/Make-lang.in: Update dependencies.
14555 2011-08-01 Javier Miranda <miranda@adacore.com>
14557 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14558 condition that detects if the overridden operation must replace an
14561 2011-08-01 Javier Miranda <miranda@adacore.com>
14563 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14564 code declarations inserted by Insert_Actions in each alternative of the
14565 N_Case_Expression node.
14567 2011-08-01 Robert Dewar <dewar@adacore.com>
14569 * sem_ch6.adb: Minor code reorganization.
14570 * sem_util.adb: Minor reformatting.
14572 2011-08-01 Pascal Obry <obry@adacore.com>
14574 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14575 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14577 2011-08-01 Yannick Moy <moy@adacore.com>
14579 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14580 literal or operator symbol which is prefixed
14581 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14582 mode on access attributes.
14583 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14584 that concatenation operands are properly restricted in formal mode
14585 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14586 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14587 result of the concatenation has a type different from String.
14588 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14589 Analyze_Quantified_Expression, Analyze_Slice,
14590 Analyze_Null): issue an error in formal mode on unsupported constructs
14592 (Analyze_Block_Statement): only issue error on source block statement
14593 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14594 function which returns the last node in a list of nodes for which
14595 Comes_From_Source returns True, if any
14596 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14597 Last_Source_Node_In_Sequence
14598 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14599 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14600 mode on unsupported constructs
14601 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14602 rest of the actions may be needed later on since the error is marked as
14604 * sinfo.ads: Typos in comments.
14606 2011-08-01 Pascal Obry <obry@adacore.com>
14608 * projects.texi: Minor editing.
14610 2011-08-01 Yannick Moy <moy@adacore.com>
14612 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14613 insertion character ~~
14614 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14615 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14616 with insertion character ~~
14617 (Set_Msg_Text): treat insertion character ~~
14618 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14619 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14620 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14621 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14622 errors related to the formal language restriction not serious
14623 (insertion character |).
14624 * par.adb (Par): set formal language for error messages if needed
14625 * sem_ch6.adb (Check_Missing_Return): take into account possible
14626 generated statements at the end of the function
14627 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14628 enumeration value to define a new pragma SPARK_95
14629 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14630 SPARK_Version): new type and variables to store the SPARK version
14632 (SPARK_Mode): return True when SPARK_Version is set
14633 * par-prag.adb: Correct indentation
14634 (Prag): take Pragma_SPARK_95 into account
14635 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14638 2011-08-01 Robert Dewar <dewar@adacore.com>
14640 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14641 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14642 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14644 2011-08-01 Pascal Obry <obry@adacore.com>
14646 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14647 Target_Name to Get_Path call.
14648 (Parse_Single_Project): Likewise.
14649 (Post_Parse_Context_Clause): Likewise.
14650 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14651 Call Initialise_Project_Path with the proper Target_Name.
14652 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14654 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14655 with the proper Target_Name.
14656 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14657 Part.Parse routine.
14658 (Parse_Project_And_Apply_Config): Likewise.
14659 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14660 This is fine as this part of the code is supporting only native
14662 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14663 is fine as this part of the code is supporting only native compilation.
14665 2011-08-01 Yannick Moy <moy@adacore.com>
14667 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14668 of homonym, unless the homonym is one of the cases allowed in SPARK
14669 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14670 package declaration occurring after a body.
14672 2011-08-01 Robert Dewar <dewar@adacore.com>
14674 * checks.adb, exp_ch4.adb: Minor reformatting.
14676 2011-08-01 Javier Miranda <miranda@adacore.com>
14678 * einfo.ads (Access_Disp_Table): Fix documentation.
14679 (Dispatch_Table_Wrappers): Fix documentation.
14681 2011-08-01 Pascal Obry <obry@adacore.com>
14683 * prj-env.adb, prj-env.ads: Minor reformatting.
14685 2011-08-01 Yannick Moy <moy@adacore.com>
14687 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14688 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14689 procedures out of these packages.
14690 * errout.ads, errout.adb
14691 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14692 procedures in of this package
14693 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14694 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14695 on misplaced later vs initial declarations, like in Ada 83
14696 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14697 formal mode on attribute of private type whose full type declaration
14699 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14700 package declaration inside a package specification
14701 (Analyze_Full_Type_Declaration): issue error in formal mode on
14702 controlled type or discriminant type
14703 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14704 user-defined operator means that it should come from the source
14705 (New_Overloaded_Entity): issue error in formal mode on overloaded
14707 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14709 2011-08-01 Thomas Quinot <quinot@adacore.com>
14711 * atree.adb: Minor reformatting.
14712 * checks.adb: Minor reformatting.
14714 2011-08-01 Vincent Celier <celier@adacore.com>
14716 * s-parame-vms-ia64.ads: Fix typo in comment
14718 * s-parame-vms-restrict.ads: Removed, unused.
14720 2011-08-01 Javier Miranda <miranda@adacore.com>
14723 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14725 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14726 * sem_ch3.ads, sem_ch3.adb
14727 (Is_Constant_Bound): New extended version of the subprogram that was
14728 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14729 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14730 * sem_aux.ads (Constant_Value): Fix typo in comment.
14731 * checks.adb (Generate_Index_Checks): New implementation which, for
14732 array objects with constant bounds, generates the runtime check
14733 referencing the bounds of the array type. For other cases this routine
14734 provides its previous behavior obtaining such values from the array
14736 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14738 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14739 we cannot have semantic interpretations of the new node.
14741 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14743 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14746 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14748 * sem_ch8.adb: Minor code editing.
14749 * s-vxwext.adb: Remove trailing space.
14750 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14751 consistency with other files.
14753 2011-08-01 Thomas Quinot <quinot@adacore.com>
14755 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14757 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14759 * par-ch10.adb: reject parameterized expressions as compilation unit.
14760 * sem_ch4.adb: handle properly conditional expression with overloaded
14761 then_clause and no else_clause.
14763 2011-08-01 Tristan Gingold <gingold@adacore.com>
14765 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14766 like done by System.Aux_DEC.
14767 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14769 2011-08-01 Yannick Moy <moy@adacore.com>
14771 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14772 missing label at end of declaration (subprogram or package)
14773 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14774 of positional and named parameter association
14775 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14776 Error_Msg_SP which adds a prefix to the error message giving the name
14777 of the formal language analyzed
14778 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14779 access result type in subprogram, unconstrained array as result type,.
14780 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14782 * sem_ch8.adb: Code clean up.
14784 2011-08-01 Javier Miranda <miranda@adacore.com>
14786 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14787 * einfo.ads (Access_Disp_Table): Fix documentation.
14788 (Dispatch_Table_Wrappers): Fix documentation.
14789 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14790 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14791 to enforce the documentation of this attribute.
14792 (Set_Is_Interface): Cleanup the assertion.
14793 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14794 the Underlying_Type entity before reading attribute Access_Disp_Table.
14795 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14796 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14797 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14798 the Underlying_Type entity before reading attribute Access_Disp_Table.
14799 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14800 Locate the Underlying_Type entity before reading attribute
14803 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14805 * s-poosiz.ads: Additional overriding indicators.
14807 2011-08-01 Yannick Moy <moy@adacore.com>
14809 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14811 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14812 parameter specification does not include a subtype mark.
14813 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14814 formal mode on abstract subprogram.
14815 (Analyze_Subprogram_Specification): issue error in formal mode on
14816 user-defined operator.
14817 (Process_Formals): issue error in formal mode on access parameter and
14818 default expression.
14819 * sem_ch9.adb (Analyze_Abort_Statement,
14820 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14821 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14822 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14823 Analyze_Requeue, Analyze_Selective_Accept,
14824 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14825 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14826 issue error in formal mode on user-defined raise statement.
14828 2011-08-01 Thomas Quinot <quinot@adacore.com>
14830 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14831 declaration being hidden when overriding an implicit inherited
14833 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14834 (-gnats), do not complain about a source file that contains only a
14837 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14839 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14840 variable if already set.
14842 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14844 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14845 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14846 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14847 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14848 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14849 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14850 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14851 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14852 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14853 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14854 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14855 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14856 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14857 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14858 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14859 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14860 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14861 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14862 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14863 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14864 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14865 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14866 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14867 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14868 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14869 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14870 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14871 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14872 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14873 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14874 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14875 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14876 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14877 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14878 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14879 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14880 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14881 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14882 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14883 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14884 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14885 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14886 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14887 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14888 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14889 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14890 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14891 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14892 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14893 Use GNAT instead of GNARL.
14895 2011-08-01 Bob Duff <duff@adacore.com>
14897 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14898 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14899 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14902 2011-08-01 Yannick Moy <moy@adacore.com>
14904 * debug.adb (d.D) reverve flag for the SPARK mode
14905 (d.E) reverve flag for SPARK generation mode
14906 (d.F) reverve flag for Why generation mode
14907 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14908 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14909 functions which return True when the corresponding modes are set
14910 (Formal_Language): return "spark" or "alfa" when in formal verification
14912 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14913 Error_Msg to prefix the error message with a tag giving the formal
14915 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14916 message with a tag giving the formal language
14917 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14919 (Analyze_Case_Statement): issue error in formal mode on case statement
14920 with a single "others" case alternative
14921 (Analyze_Exit_Statement): issue errors in formal mode on exit
14922 statements which do not respect SPARK restrictions
14923 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14924 (Check_Unreachable_Code): always issue an error (not a warning) in
14925 formal mode on unreachable code (concerns both code after an infinite
14926 loop and after an unconditional jump, both not allowed in SPARK)
14927 * sem_ch6.adb (Analyze_Return_Statement): add call to
14928 Set_Return_Present for a procedure containing a return statement
14929 (already done for functions in Analyze_Function_Return)
14930 (Analyze_Function_Return): issue error in formal mode on extended
14931 return or if return is not last statement in function
14932 (Check_Missing_Return): issue error in formal mode if function does
14933 not end with return or if procedure contains a return
14934 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14935 function to detect if there is an inner scope of its parameter S which
14938 2011-08-01 Thomas Quinot <quinot@adacore.com>
14940 * sem_ch6.ads: Minor reformatting.
14942 2011-08-01 Javier Miranda <miranda@adacore.com>
14944 * sem_util.adb (Abstract_Interface_List): Complete condition when
14945 processing private type declarations to avoid reading unavailable
14947 (Is_Synchronized_Tagged_Type): Complete condition when processing
14948 private extension declaration nodes to avoid reading unavailable
14951 2011-08-01 Thomas Quinot <quinot@adacore.com>
14953 * sem_ch3.adb: Minor reformatting.
14955 2011-08-01 Thomas Quinot <quinot@adacore.com>
14957 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14958 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14959 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14960 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14961 for VMS, instead parametrize the common implementation with
14962 System.Parameters declarations.
14964 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14966 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14968 2011-08-01 Tristan Gingold <gingold@adacore.com>
14970 * seh_init.c: Fix SEH handler installation on win64.
14972 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14974 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14975 double analysis of an anonymous access to subprogram, because it can
14976 lead to improper sharing of profiles and a back-end crash.
14978 2011-08-01 Robert Dewar <dewar@adacore.com>
14980 * make.adb, sem_ch4.adb: Minor reformatting.
14981 * gcc-interface/Make-lang.in: Update dependencies.
14982 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14984 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14986 * gnat_rm.texi: Fix definition of Long_Integer.
14988 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14990 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14991 to prevent storage exhaustion.
14992 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14993 finalized is a function body, insert the cleanup code before the final
14994 return statement, to prevent spurious warnings.
14995 * s-pooglo.ads: add overriding indicator.
14997 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14999 * sem_ch4.adb (Operator_Check): improve error message when both a
15000 with_clause and a use_clause are needed to make operator usage legal.
15001 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15002 determine whether a compilation unit is visible within an other,
15003 either through a with_clause in the current unit, or a with_clause in
15004 its library unit or one one of its parents.
15006 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15008 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15009 over an arbitrary expression of an array or container type.
15010 * lib-xref.adb: clarify comment.
15012 2011-08-01 Bob Duff <duff@adacore.com>
15014 * einfo.ads: Minor reformatting.
15015 * debug.adb: Minor comment improvement.
15017 2011-08-01 Javier Miranda <miranda@adacore.com>
15019 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15020 consider hidden subprograms as valid candidates.
15022 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15024 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15026 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15028 * gnat_ugn.texi: Fix typo.
15030 2011-08-01 Robert Dewar <dewar@adacore.com>
15032 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15033 lib-xref.adb: Minor reformatting
15035 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15037 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15038 when to generate a call to Move_Final_List.
15039 (Has_Controlled_Parts): Remove this function.
15041 2011-08-01 Geert Bosch <bosch@adacore.com>
15043 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15044 "," in choice list.
15046 2011-08-01 Thomas Quinot <quinot@adacore.com>
15048 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15049 explicit raise of a predefined exception as Comes_From_Source if the
15050 original N_Raise_Statement comes from source.
15052 2011-08-01 Robert Dewar <dewar@adacore.com>
15054 * sinfo.ads: Add comment.
15055 * sem_ch6.adb: Minor reformatting.
15057 2011-08-01 Robert Dewar <dewar@adacore.com>
15059 * freeze.adb (Freeze_Entity): Refine check for bad component size
15060 clause to avoid rejecting confirming clause when atomic/aliased present.
15062 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15064 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15065 better determine whether an entity reference is a write.
15066 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15068 * lib-xref.adb (Output_References): Do no suppress a read reference at
15069 the same location as an immediately preceeding modify-reference, to
15070 handle properly in-out actuals.
15072 2011-08-01 Tristan Gingold <gingold@adacore.com>
15074 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15076 2011-08-01 Quentin Ochem <ochem@adacore.com>
15078 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15079 heap to compute the result.
15081 2011-08-01 Robert Dewar <dewar@adacore.com>
15083 * atree.ads: Minor reformatting.
15085 2011-08-01 Emmanuel Briot <briot@adacore.com>
15087 * g-expect.adb (Get_Command_Output): Fix memory leak.
15089 2011-08-01 Geert Bosch <bosch@adacore.com>
15091 * cstand.adb (P_Float_Type): New procedure to print the definition of
15092 predefined fpt types.
15093 (P_Mixed_Name): New procedure to print a name using mixed case
15094 (Print_Standard): Use P_Float_Type for printing floating point types
15095 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15096 precision IEEE float.
15098 2011-08-01 Thomas Quinot <quinot@adacore.com>
15100 * sem_ch3.adb: Minor reformatting.
15102 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15104 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15105 the completion of a generic function, insert the new body rather than
15106 rewriting the original.
15108 2011-08-01 Yannick Moy <moy@adacore.com>
15110 * sinfo.ads, errout.ads: Typos in comments.
15112 2011-08-01 Robert Dewar <dewar@adacore.com>
15114 * par-endh.adb: Minor reformatting.
15116 2011-08-01 Robert Dewar <dewar@adacore.com>
15118 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15119 (Pre_Post_Aspects): New subtype.
15120 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15121 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15122 * par-ch7.adb (P_Package): Remove Decl parameter
15123 (P_Package): Handle new syntax for aspects (before IS)
15124 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15126 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15127 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15128 (P_Package): Remove Decl parameter
15129 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15131 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15133 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15134 * sinfo.ads: Document new syntax for aspects in packages etc.
15135 * sprint.adb: Handle new syntax of aspects before IS in package
15137 2011-08-01 Thomas Quinot <quinot@adacore.com>
15139 * atree.ads: Minor reformatting.
15140 * sem_prag.adb: Minor reformatting.
15142 2011-08-01 Robert Dewar <dewar@adacore.com>
15144 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15145 case expr alternative.
15147 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15149 * sem_ch12.adb: Fix typo.
15151 2011-08-01 Geert Bosch <bosch@adacore.com>
15153 * sem_prag.adb (Check_No_Link_Name): New procedure.
15154 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15155 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15156 instead of Standard_Long_Long_Float_Size global. Preparation for
15157 eventual removal of per type constants.
15158 * exp_util.ads (Get_Stream_Size): New function returning the stream
15159 size value of subtype E.
15160 * exp_util.adb (Get_Stream_Size): Implement new function.
15161 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15163 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15165 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15167 2011-08-01 Geert Bosch <bosch@adacore.com>
15169 * cstand.adb: Fix comments.
15170 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15171 count of arguments.
15173 2011-08-01 Robert Dewar <dewar@adacore.com>
15175 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15177 2011-08-01 Geert Bosch <bosch@adacore.com>
15179 * atree.ads: Fix comment.
15181 2011-08-01 Robert Dewar <dewar@adacore.com>
15183 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15184 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15185 * par.adb: Add with for Namet.Sp.
15186 * par-tchk.adb: Minor reformatting.
15188 2011-08-01 Vincent Celier <celier@adacore.com>
15190 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15191 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15192 of the init procedure of a SAL.
15193 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15196 2011-08-01 Thomas Quinot <quinot@adacore.com>
15198 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15201 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15203 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15205 2011-08-01 Thomas Quinot <quinot@adacore.com>
15207 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15208 conformant with its spec (return True only for types that have
15209 an overriding Initialize primitive operation that prevents them from
15210 having preelaborable initialization).
15211 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15212 initialization for controlled types in Ada 2005 or later mode.
15214 2011-08-01 Robert Dewar <dewar@adacore.com>
15216 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15218 (Same_Aspect): New function.
15219 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15220 Type_Invariant, Precondition, Postcondition.
15221 * snames.ads-tmpl: Add Name_Type_Invariant.
15223 2011-08-01 Robert Dewar <dewar@adacore.com>
15225 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15227 (Freeze_All_Ent): Fix error in handling inherited aspects.
15228 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15229 already analyzed, but don't skip entire processing of a declaration,
15230 that's wrong in some cases of declarations being rewritten.
15231 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15232 Don't delay for integer, string literals
15233 Treat predicates in usual manner for delay, remove special case code,
15235 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15236 (Build_Predicate_Function): Update saved expression in aspect
15237 (Build_Invariant_Procedure): Update saved expression in aspect
15238 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15239 of replacement of discriminant references if the reference is simple.
15241 2011-08-01 Robert Dewar <dewar@adacore.com>
15243 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15244 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15245 Static_Predicate and Dynamic_Predicate.
15246 (Build_Predicate_Function): Add processing for Static_Predicate
15247 and Dynamic_Predicate.
15248 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15249 (From_Static_Predicate): New flag
15250 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15252 2011-08-01 Robert Dewar <dewar@adacore.com>
15254 * usage.adb: Documentation cleanup for Ada version modes in usage.
15255 * expander.adb: Minor reformatting.
15257 2011-08-01 Robert Dewar <dewar@adacore.com>
15259 * atree.ads: Minor comment fix.
15260 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15261 a-witeio.ads, sem_prag.adb: Minor reformatting.
15263 2011-08-01 Doug Rupp <rupp@adacore.com>
15265 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15266 pointers. Use descrip.h header file for convenience. Add some
15269 2011-08-01 Robert Dewar <dewar@adacore.com>
15271 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15272 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15273 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15275 (Check_Aspect_At_End_Of_Declarations): New procedure
15276 (Analye_Aspect_Specification): Minor changes for above procedures
15277 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15278 specification node as well.
15280 2011-08-01 Pascal Obry <obry@adacore.com>
15282 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15283 Windows files. Use GetFilesAttributes() in this case to check for file
15284 existence instead of returning with an error code.
15286 2011-08-01 Vincent Celier <celier@adacore.com>
15288 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15289 High is above Source length.
15291 2011-08-01 Robert Dewar <dewar@adacore.com>
15293 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15295 2011-08-01 Robert Dewar <dewar@adacore.com>
15297 * aspects.ads (Boolean_Aspects): New subtype.
15298 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15299 for derived types in cases where the parent type and derived type have
15301 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15302 with aspects when parent type also has aspects.
15303 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15304 boolean expression at this point).
15305 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15306 accordance with final decision on the Ada 2012 feature.
15307 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15309 2011-08-01 Matthew Heaney <heaney@adacore.com>
15311 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15313 2011-08-01 Pascal Obry <obry@adacore.com>
15315 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15316 Fix Replace_Slice when High is above current string size.
15317 (Replace_Slice): Fix DL computation when High is above current
15320 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15322 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15324 2011-08-01 Matthew Heaney <heaney@adacore.com>
15326 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15329 2011-08-01 Pascal Obry <obry@adacore.com>
15331 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15334 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15336 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15337 access to protected subprograms in generic bodies.
15338 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15339 protected type, indicate that the convention of the subprogram is
15340 Convention_Protected, because it may be used in subsequent declarations
15341 within the protected declaration.
15343 2011-08-01 Vincent Celier <celier@adacore.com>
15345 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15346 and "final" procedures when the name of the library is "ada", to avoid
15347 duplicate symbols "adainit" and "adafinal" in executables.
15349 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15351 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15352 quantified expression that appears within a postcondition and uses the
15353 Ada2012 'Result attribute.
15355 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15357 * init.c (__gnat_error_handler): Cast reason to int.
15358 (__gnat_install_handler): Explain sa_sigaction use.
15360 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15362 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15363 subprogram has copy-in copy-out parameters, try to promote the mode of
15364 the return type if it is passed in registers.
15366 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15368 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15369 left operand as addressable.
15371 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15373 * gcc-interface/gigi.h (build_function_stub): Remove.
15374 (build_return_expr): Likewise.
15375 (convert_vms_descriptor): Declare.
15376 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15377 (build_function_stub): Move to...
15378 * gcc-interface/utils2.c (build_return_expr): Move to...
15379 * gcc-interface/trans.c (build_function_stub): ...here.
15380 (build_return_expr): ...here.
15381 (Subprogram_Body_to_gnu): Add local variable for language_function.
15382 Disconnect the parameter attributes cache, if any, once done with it.
15383 Call end_subprog_body only after setting the end_locus.
15384 Build the stub associated with the function, if any, at the very end.
15385 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15386 variables and streamline control flow.
15388 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15391 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15392 g-trasym-dwarf.adb.
15394 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15397 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15398 Assign to act.sa_sigaction.
15399 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15400 current->return_address to char * before arithmetic.
15402 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15404 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15405 Correct argument types.
15406 Extract code from reason.
15407 (__gnat_install_handler): Assign to act.sa_sigaction.
15409 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15411 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15412 (GNAT1_OBJS): ...here.
15414 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15417 * g-socthi-mingw.adb (Fill): Fix formatting.
15419 * gcc-interface/gigi.h: Move around comment.
15421 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15424 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15426 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15429 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15431 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15433 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15434 range comparison if Pmode is SImode.
15436 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15437 Eric Botcazou <ebotcazou@adacore.com>
15439 * adadecode.c: Wrap up in extern "C" block.
15440 * adadecode.h: Likewise.
15441 * adaint.c: Likewise. Remove 'const' keyword.
15442 * adaint.h: Likewise.
15443 * argv.c: Likewise.
15444 * atree.h: Likewise.
15446 * cstreams.c: Likewise.
15448 * exit.c: Likewise.
15450 * final.c: Likewise.
15451 * init.c: Likewise.
15452 * initialize.c: Likewise.
15453 * link.c: Likewise.
15454 * namet.h: Likewise.
15455 * nlists.h: Likewise.
15456 * raise.c: Likewise.
15457 * raise.h: Likewise.
15458 * repinfo.h: Likewise.
15459 * seh_init.c: Likewise.
15460 * targext.c: Likewise.
15461 * tracebak.c: Likewise.
15462 * uintp.h: Likewise.
15463 * urealp.h: Likewise.
15464 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15465 * xsinfo.adb: Likewise.
15466 * xsnamest.adb: Likewise.
15467 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15468 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15469 * gcc-interface/misc.c: Likewise.
15470 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15471 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15472 ada/targext.o here...
15473 (GNAT_ADA_OBJS): ...and not here.
15474 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15475 (GNATBIND_OBJS): Reorder.
15477 2011-07-07 Richard Henderson <rth@redhat.com>
15479 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15480 dwarf2out_frame_init.
15482 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15484 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15486 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15489 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15491 2011-07-06 Richard Guenther <rguenther@suse.de>
15493 * gcc-interface/misc.c (gnat_init): Merge calls to
15494 build_common_tree_nodes and build_common_tree_nodes_2.
15495 Re-initialize boolean_false_node.
15497 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15498 Olivier Hainque <hainque@adacore.com>
15499 Nicolas Setton <setton@adacore.com>
15501 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15502 the type according to the ARTIFICIAL_P parameter.
15503 (create_type_decl): Likewise.
15504 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15506 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15508 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15509 (gnatbind): Likewise.
15511 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15513 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15515 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15517 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15518 local variable throughout. Remove useless call to Base_Type.
15519 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15520 Take it also into account for the volatileness of the field. Set the
15521 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15523 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15525 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15526 on a dereference built for a by-ref object if it has an address clause.
15528 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15530 * einfo.ads (Address_Taken): Document use for the second argument of
15531 Asm_Input and Asm_Output attributes.
15532 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15533 argument is an entity name, then set Address_Taken on it.
15534 <Attribute_Asm_Output>: Likewise.
15535 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15536 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15537 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15538 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15540 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15542 PR middle-end/46500
15543 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15545 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15547 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15548 (ada/utils.o): Update dependencies.
15549 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15550 ../../../libcpp/libcpp.a.
15551 * gcc-interface/utils.c: Include common/common-target.h.
15552 (process_attributes): Use targetm_common.have_named_sections.
15554 2011-06-07 Richard Guenther <rguenther@suse.de>
15556 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15559 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15561 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15562 TREE_THIS_NOTRAP flag.
15564 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15566 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15569 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15571 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15572 constants whose full view has discriminants specially.
15574 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15576 * gcc-interface/utils.c: Include diagnostic.h.
15577 (gnat_write_global_declarations): Output debug information for all
15578 global type declarations before finalizing the compilation unit.
15579 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15581 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15583 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15585 2011-05-25 Kai Tietz <ktietz@redhat.com>
15587 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15588 initialization instead of const/none-const pointer assignment.
15590 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15592 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15593 $(EXTRA_GNAT1_OBJS).
15594 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15595 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15596 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15597 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15598 libcommon-target.a instead of prefix.o.
15600 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15603 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15605 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15607 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15608 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15609 instead of version.o.
15611 2011-05-18 Kai Tietz <ktietz@redhat.com>
15613 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15614 boolean_false_node instead of integer_zero_node.
15615 (convert_with_check): Likewise.
15616 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15618 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15620 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15621 type of the parameter is an unconstrained array, convert the actual to
15622 the type of the formal in the In Out and Out cases as well.
15624 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15626 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15627 call build_function_type_array or build_varargs_function_type_array
15629 (create_subprog_type): Don't call build_function_type; call
15630 build_function_type_vec instead.
15632 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15634 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15635 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15636 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15638 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15640 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15642 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15643 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15645 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15647 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15649 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15651 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15652 instead of accessing TYPE_ARG_TYPES directly.
15653 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15655 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15658 * gcc-interface/gigi.h (get_variant_part): Declare.
15659 * gcc-interface/decl.c (get_variant_part): Make global.
15660 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15661 types have the same constant size, are record types and T1 has a
15662 variant part while T2 doesn't.
15664 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15666 * gcc-interface/utils.c (begin_subprog_body): Do not call
15668 (end_subprog_body): Likewise.
15670 2011-05-04 Richard Guenther <rguenther@suse.de>
15672 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15674 (pos_to_constructor): Likewise.
15676 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15677 Eric Botcazou <ebotcazou@adacore.com>
15679 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15680 of build_function_type. Adjust calls to...
15681 (build_raise_check): ...this. Do not take a void_tree parameter.
15682 Call build_function_type_list instead of build_function_type.
15683 Fix head comment and swap couple of conditional blocks.
15685 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15687 * gnatvsn.ads (Library_Version): Bump to 4.7.
15688 (Current_Year): Bump to 2011.
15690 2011-04-29 Michael Matz <matz@suse.de>
15692 * gcc-interface/misc.c (gnat_handle_option): Set
15693 warn_maybe_uninitialized.
15695 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15697 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15698 the Watson/McCabe paper.
15700 2011-04-23 Jim Meyering <meyering@redhat.com>
15702 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15704 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15706 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15709 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15711 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15713 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15714 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15715 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15716 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15717 <all>: Do not set flags on the reused DECL node coming from an alias.
15718 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15719 don't need debug info here...
15720 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15721 (gigi): Adjust calls to create_subprog_decl.
15722 (build_raise_check): Likewise.
15723 (establish_gnat_vms_condition_handler): Likewise.
15724 (Compilation_Unit_to_gnu): Likewise.
15725 (gnat_to_gnu): Likewise.
15727 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15729 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15730 (NO_REORDER_ADAFLAGS): New variable.
15731 (EXTRA_GNATTOOLS): Always define.
15732 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15733 Clean up and adjust list of files compiled with special options.
15734 * gcc-interface/Make-lang.in: Likewise.
15735 (ada/decl.o): Cosmetical change.
15736 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15738 2011-04-20 Jim Meyering <meyering@redhat.com>
15740 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15742 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15744 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15745 $(CFLAGS) on the link line.
15747 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15749 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15750 padded type built for the return type if it is unconstrained.
15752 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15754 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15756 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15758 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15759 before calling TREE_CHAIN.
15760 * gcc-interface/misc.c (gnat_init_ts): New function.
15761 (LANG_HOOKS_INIT_TS): Define.
15763 2011-04-12 Martin Jambor <mjambor@suse.cz>
15765 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15766 instead of cgraph_node.
15768 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15770 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15771 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15774 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15776 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15777 of aggregate types that contain a placeholder.
15779 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15781 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15783 (handle_type_generic_attribute): Likewise.
15785 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15788 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15790 2011-04-04 Kai Tietz <ktietz@redhat.com>
15793 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15796 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15798 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15799 type case, do not strip a padding type around the array type.
15801 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15803 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15806 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15808 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15809 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15810 code for -feliminate-unused-debug-types.
15811 (gnat_post_options): Likewise.
15813 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15815 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15816 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15819 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15821 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15822 DECL_ARTIFICIAL flag on enumeration types.
15824 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15827 fat pointer types artificial unconditionally.
15828 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15831 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15833 * gcc-interface/gigi.h (get_dummy_type): Declare.
15834 (build_dummy_unc_pointer_types): Likewise.
15835 (finish_fat_pointer_type): Likewise.
15836 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15837 fat pointer type has been built, complete it in place.
15838 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15839 and thin pointers. Remove useless variable.
15840 (finish_fat_pointer_type): Make global and move to...
15841 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15842 (get_dummy_type): New function.
15843 (build_dummy_unc_pointer_types): Likewise.
15844 (gnat_pushdecl): Propage the name to the anonymous variants only.
15845 (update_pointer_to): Only adjust the pointer types in the unconstrained
15848 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15850 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15851 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15852 if this is a Taft amendment type and the full declaration is available.
15853 * gcc-interface/trans.c (process_type): Likewise.
15854 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15855 (process_freeze_entity): Likewise.
15856 * gcc-interface/utils.c (dummy_global): New static variable.
15857 (gnat_write_global_declarations): If there are types declared as used
15858 at the global level, insert them in the global hash table.
15860 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15862 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15863 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15864 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15866 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15867 flag of the type accordingly.
15868 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15870 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15872 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15873 finalizing types when updating the pointers to the designated type.
15874 <all>: Finalize the deferred types even if we didn't defer processing
15875 of incomplete types in this invocation.
15877 2011-04-01 Olivier Hainque <hainque@adacore.com>
15878 Nicolas Setton <setton@adacore.com>
15879 Eric Botcazou <ebotcazou@adacore.com>
15881 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15882 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15884 2011-03-28 Kai Tietz <ktietz@redhat.com>
15886 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15888 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15889 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15891 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15893 2011-03-28 Tristan Gingold <gingold@adacore.com>
15896 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15897 Use ada output of gnatbind.
15898 (ada/b_gnatb.adb): Ditto.
15899 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15900 (ada.mostlyclean, ada.stage1)
15901 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15902 (ada.stagefeedback): Adjust.
15903 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15904 Use ada output of gnatbind.
15905 (b_gnatm.adb): Ditto.
15906 (b_gnatl.o, b_gnatm.o): New rules.
15908 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15910 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15911 for the padded type built to support a specified size or alignment.
15913 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15915 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15916 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15917 unconditionally to the end of the unit when the designated type is
15919 <all>: Rename local variable. Attempt to un-defer types only and do it
15920 for limited_with'ed types as well.
15921 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15922 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15923 consistently and remove redundant call to finalize_from_with_types.
15925 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15927 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15928 subprograms without a previous spec declared in the same unit.
15929 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15930 subprograms at the end of the unit instead of at the beginning.
15931 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15932 isn't public for the special handling of non-inline functions nested
15933 inside inline external functions.
15935 2011-03-25 Jeff Law <law@redhat.com>
15937 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15939 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15941 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15942 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15943 to compute Set_Size_Depends_On_Discriminant.
15944 (Layout_Type): Call it on array types in back-end layout mode.
15945 * sem_util.adb (Requires_Transient_Scope): Return true for array
15946 types only if the size depends on the value of discriminants.
15947 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15948 type if the RHS is a call to a function that returns an unconstrained
15949 type with default discriminant.
15951 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15953 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15954 non-conversion to the nominal result type at the end.
15956 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15958 * gcc-interface/trans.c (create_temporary): New function taken from...
15959 (create_init_temporary): ...here. Call it.
15960 (call_to_gnu): Create the temporary for the return value early, if any.
15961 Create it for a function with copy-in/copy-out parameters if there is
15962 no target; in other cases of copy-in/copy-out, use another temporary.
15963 Push the new binding level lazily. Add and rename local variables.
15965 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15967 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15969 (set_rm_size): Likewise.
15971 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15973 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15974 for the padded type built in order to support a specified alignment.
15975 Fix incorrect formatting.
15977 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15980 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15982 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15984 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15985 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15986 to the end of the list. Adjust recursive call. Rename local variable.
15987 If REORDER is true, reorder components of the record type.
15988 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15989 components_to_record and adjust the parameter list.
15991 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15993 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15994 disabled, use the variable for bounds of loop iteration scheme.
15996 2011-03-21 Kai Tietz <ktietz@redhat.com>
15999 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16001 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16003 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16004 out whether the expression is read-only. Short-circuit placeholder
16005 case and rename a couple of local variables.
16007 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16009 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16010 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16011 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16012 (convert): Deal with conversions from a smaller form type specially.
16014 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
16016 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16017 its argument, except for the special -I- switch.
16019 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
16021 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16024 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16026 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16028 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16030 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16032 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16033 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16034 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16035 Do not generate the check directly, instead instantiate the template
16036 check present in the descriptor.
16037 (make_descriptor_field): Move around.
16038 (build_vms_descriptor32): Build a template check in the POINTER field.
16039 (build_vms_descriptor): Remove useless suffixes.
16040 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16042 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16045 * targext.c: Include target files if IN_RTS is defined.
16047 2011-01-26 Richard Guenther <rguenther@suse.de>
16050 * targext.c: Include config.h.
16051 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16054 2011-01-04 Pascal Obry <obry@adacore.com>
16055 Eric Botcazou <ebotcazou@adacore.com>
16057 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16059 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16061 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16062 end-of-case on the end label and its associated gotos, if any.
16064 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16066 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16067 expressions of the parameter cache within the statement group of
16068 the CICO mechanism.
16070 2011-01-04 Olivier Hainque <hainque@adacore.com>
16071 Eric Botcazou <ebotcazou@adacore.com>
16073 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16074 (set_end_locus_from_node): New function.
16075 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16076 make and the function end_locus.
16077 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16078 for the elaboration subprogram.
16079 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16080 set the end_locus of the expression as well.
16082 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16085 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16086 variables that are referenced in exception handlers volatile.
16090 Copyright (C) 2011 Free Software Foundation, Inc.
16092 Copying and distribution of this file, with or without modification,
16093 are permitted in any medium without royalty provided the copyright
16094 notice and this notice are preserved.