1 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
2 Eric Botcazou <ebotcazou@adacore.com>
5 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
6 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
8 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
11 * gcc-interface/Makefile.in (SYMDEPS): Delete.
12 (LIBICONV): New variable.
13 (LIBICONV_DEP): Likewise.
14 (LIBS): Add $(LIBICONV).
15 (LIBDEPS): Add $(LIBICONV_DEP).
16 (EXTRA_GNATTOOLS_OBJS): Merge into...
17 (TOOLS_LIBS): ...this. Add $(LIBICONV).
19 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
21 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
22 variable. Always create the elaboration variable, if any, as constant.
24 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
26 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
27 make a packable type for fields of union types as well.
28 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
29 (gnat_to_gnu_component_type): Try to make a packable type for fields
30 of union types as well.
31 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
32 (maybe_pad_type): Try to make a packable type for fields of union types
34 (gnat_to_gnu_field): Likewise.
35 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
36 (set_rm_size): Likewise.
38 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
39 * gcc-interface/trans.c (add_decl_expr): Likewise.
40 * gcc-interface/utils.c (finish_record_type): Likewise.
41 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
43 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
45 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
46 declared as atomic. Move around conditionally executed code.
48 2011-10-24 Robert Dewar <dewar@adacore.com>
50 * sem.adb (Initialize): Fix bug that blew up if called a second time.
52 2011-10-24 Robert Dewar <dewar@adacore.com>
54 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
55 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
57 2011-10-24 Robert Dewar <dewar@adacore.com>
59 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
62 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
64 * gnat_rm.texi: Add an entry for restriction No_Finalization.
66 2011-10-24 Ed Schonberg <schonberg@adacore.com>
68 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
69 current instance is within the one that contains the generic,
70 the freeze node for the current one must appear in the current
71 declarative part. Ditto if the current instance is within another
72 package instance. In both of these cases the freeze node of the
73 previous instance is not relevant.
75 2011-10-24 Gary Dismukes <dismukes@adacore.com>
77 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
78 of AAMP-specific switches -univ and -aamp_target.
80 2011-10-24 Robert Dewar <dewar@adacore.com>
82 * a-tienau.adb (Put): Deal properly with limited line length.
84 2011-10-24 Robert Dewar <dewar@adacore.com>
86 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
88 2011-10-24 Tristan Gingold <gingold@adacore.com>
90 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
93 2011-10-24 Ed Schonberg <schonberg@adacore.com>
95 * sem_ch12.adb (Earlier): make available globally. If both
96 nodes have the same sloc, the freeze node that does not come
97 from source is the later one.
98 (True_Parent): Make available globally.
99 (Previous_Instance): Subsidiary of
100 Insert_Freeze_Node_For_Instance, to check whether the generic
101 parent of the current instance is declared within a previous
102 instance in the same unit or declarative part, in which case the
103 freeze nodes of both instances must appear in order to prevent
104 elaboration problems in gigi.
105 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
106 freeze point, and the freeze node of a preceding instantiation
107 must be inserted before it.
109 2011-10-24 Robert Dewar <dewar@adacore.com>
111 * checks.ads, checks.adb: Add handling of Synchronization_Check
112 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
114 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
115 flag Minor code reorganization.
116 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
117 * par-prag.adb: Add dummy entries for pragma
118 Disable/Enable_Atomic_Synchronization.
119 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
120 case of Atomic_Synchronization specially (not suppressed
121 by All_Checks, cannot be set from Source).
122 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
123 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
124 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
125 entry for pragma Disable/Enable_Atomic_Synchronization
126 * switch-c.adb: The -gnatp switch does not disable
127 Atomic_Synchronization Add -gnatep switch to disable
128 Atomic_Synchronization.
129 * types.ads: Add entry for Synchronization_Check
130 * usage.adb: Add line for -gnated switch
131 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
133 2011-10-24 Geert Bosch <bosch@adacore.com>
135 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
138 2011-10-24 Robert Dewar <dewar@adacore.com>
140 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
142 2011-10-24 Robert Dewar <dewar@adacore.com>
144 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
145 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
147 2011-10-24 Emmanuel Briot <briot@adacore.com>
149 * prj-proc.adb (Process_Expression_Variable_Decl): No special
150 handling for Project_Path unless it is an attribute.
152 2011-10-24 Javier Miranda <miranda@adacore.com>
154 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
155 (Install_Hidden_Primitives): New subprogram.
156 (Restore_Hidden_Primitives): New subprogram.
157 (Analyze_Formal_Package_Declaration,
158 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
159 Invoke Check_Hidden_Primitives after every call to
160 Analyze_Associations, and invoke Restore_Hidden_Primitives to
161 restore their visibility after processing the instantiation.
162 (Instantiate_Package_Body): Install visible primitives before
163 analyzing the instantiation and uninstall them to restore their
164 visibility when the instantiation has been analyzed.
165 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
166 (Remove_Suffix): New subprogram
167 * sem_ch3.adb (Derive_Subprogram): When handling
168 a derived subprogram for the instantiation of a formal derived
169 tagged type, inherit the dispatching attributes from the actual
170 subprogram (not from the parent type).
172 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
174 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
176 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
178 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
180 (Build_Discriminant_Assignments): Add local variable D_Loc and update
182 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
183 Var_Loc and update their uses.
184 (Build_Record_Init_Proc): Code reformatting.
185 (Increment_Counter): Add formal parameter Loc.
186 (Make_Counter): Add formal parameter Loc.
188 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
190 * sem_disp.adb (Covers_Some_Interface): Fix typo.
192 2011-10-24 Matthew Heaney <heaney@adacore.com>
194 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
197 2011-10-24 Yannick Moy <moy@adacore.com>
199 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
200 Translate arguments in positional notation into pragma argument
201 association arguments for the generated pragma.
203 2011-10-24 Arnaud Charlet <charlet@adacore.com>
205 * exp_ch5.adb: Fix minor typo.
207 2011-10-24 Ed Schonberg <schonberg@adacore.com>
209 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
210 the case of a component reference in an instance body, when the
211 enclosing type is private.
213 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
215 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
216 driver for getting the project support into gnatelim section.
218 2011-10-24 Robert Dewar <dewar@adacore.com>
220 * gnat_rm.texi: Minor correction to documentation on address clause.
222 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
224 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
225 (Attach_Unprotected): New routine.
226 (Delete_Finalize_Address): Removed.
227 (Delete_Finalize_Address_Unprotected): New routine.
228 (Detach): Synchronize and call the unprotected version.
229 (Detach_Unprotected): Remove locking.
230 (Finalize): Add various comment on synchronization. Lock the critical
231 region and call the unprotected versions of routines.
232 (Finalize_Address): Removed.
233 (Finalize_Address_Unprotected): New routine.
234 (Set_Finalize_Address): Synchronize and call
235 the unprotected version.
236 (Set_Finalize_Address_Unprotected): New routine.
237 (Set_Heterogeneous_Finalize_Address): Removed.
238 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
239 (Set_Is_Heterogeneous): Add comment on synchronization and
241 * s-finmas.ads: Flag Finalization_Started is no longer atomic
242 because synchronization uses task locking / unlocking.
243 (Attach): Add comment on usage.
244 (Attach_Unprotected): New routine.
245 (Delete_Finalize_Address): Renamed to
246 Delete_Finalize_Address_Unprotected.
247 (Detach): Add comment on usage.
248 (Detach_Unprotected): New routine.
249 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
250 (Set_Finalize_Address): Add comment on usage.
251 (Set_Finalize_Address_Unprotected): New routine.
252 (Set_Heterogeneous_Finalize_Address): Renamed to
253 Set_Heterogeneous_Finalize_Address_Unprotected.
254 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
255 Allocation_Locked. Add various comments on synchronization. Lock
256 the critical region and call the unprotected version of
258 (Deallocate_Any_Controlled): Add various comments on
259 synchronization. Lock the critical region and call the unprotected
262 2011-10-24 Ed Schonberg <schonberg@adacore.com>
264 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
265 are universal and must carry the corresponding type.
266 * sem_eval.adb (Check_Non_Static_Context): If the type of the
267 expression is universal real, as may be the case for a fixed point
268 expression with constant operands in the context of a conversion,
269 there is nothing to check.
270 * s-finmas.adb: Minor reformatting
272 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
274 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
276 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
278 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
280 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
281 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
283 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
285 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
286 (unchecked_conversion_nop): Use it.
287 (gnat_to_gnu): Likewise.
289 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
291 * back_end.adb (Call_Back_End): Pass the maximum logical line number
292 instead of the maximum physical line number to gigi.
293 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
295 2011-10-16 Tom Tromey <tromey@redhat.com>
296 Dodji Seketeli <dodji@redhat.com>
298 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
299 public ordinary map interface.
301 2011-10-16 Tristan Gingold <gingold@adacore.com>
303 * link.c (_AIX): Add support for GNU ld.
305 2011-10-16 Fedor Rybin <frybin@adacore.com>
307 * gnat_ugn.texi: Fixing gnattest example names in the doc.
308 Adding explanation to additional tests usage.
310 2011-10-16 Robert Dewar <dewar@adacore.com>
312 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
314 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
316 * a-convec.adb: Fix minor inconsistencies.
318 2011-10-16 Matthew Heaney <heaney@adacore.com>
320 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
321 Implementation): Specify pragma Implementation_Defined.
323 2011-10-15 Nicolas Roche <roche@adacore.com>
325 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
326 either rtp-smp or ravenscar-cert-rtp runtimes.
328 2011-10-15 Bob Duff <duff@adacore.com>
330 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
331 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
333 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
334 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
336 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
337 pool only if RE_Root_Storage_Pool_Ptr is available.
338 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
339 pool actual unless RE_Root_Storage_Pool_Ptr is available.
340 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
341 formal only if RE_Root_Storage_Pool_Ptr is available.
343 2011-10-15 Matthew Heaney <heaney@adacore.com>
345 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
346 type): Specify Priority aspect for protected type.
348 2011-10-14 Ed Schonberg <schonberg@adacore.com>
350 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
351 is a generic actual, it is a subtype of a type that was frozen
352 by the instantiation, and even if not marked frozen it does not
353 affect the construction of the dispatch table.
355 2011-10-14 Robert Dewar <dewar@adacore.com>
357 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
359 * s-rident.ads: Add missing Compiler_Unit pragma.
361 2011-10-14 Gary Dismukes <dismukes@adacore.com>
363 * sem_res.adb: Minor reformatting.
365 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
367 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
368 Code and comment reformatting. Use BIP_Task_Master
369 when creating a _master.
370 (BIP_Formal_Suffix): Code reformatting. Correct the case for
372 (Make_Build_In_Place_Call_In_Object_Declaration): Use
373 BIP_Task_Master when creating a reference to the enclosing
374 function's _master formal.
375 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
377 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
378 (Needs_BIP_Finalization_Master): Alphabetized.
379 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
382 2011-10-14 Ed Schonberg <schonberg@adacore.com>
384 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
385 reject an aliased keyword on the object declaration of an extended
386 return statement. In older versions of the language indicate
387 that this is illegal in the standard.
389 2011-10-14 Pascal Obry <obry@adacore.com>
391 * sem_util.adb, sem_ch4.adb: Minor reformatting.
393 2011-10-14 Ed Schonberg <schonberg@adacore.com>
395 * sem_ch13.adb: Recognize properly procedure calls that are
396 transformed into code statements.
398 2011-10-14 Vincent Celier <celier@adacore.com>
400 * projects.texi: Minor fix in project example.
402 2011-10-14 Ed Schonberg <schonberg@adacore.com>
404 * sem_util.adb: Return objects are aliased if their type is
405 immutably limited as per AI05-0053.
407 2011-10-14 Gary Dismukes <dismukes@adacore.com>
409 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
410 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
411 Short_Circuit_And_Or expansion code (moved to sem_res).
412 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
413 "and" and "or" operators as short-circuit "and then" and "or
414 else", when pragma Short_Circuit_And_Or is active.
416 2011-10-13 Robert Dewar <dewar@adacore.com>
418 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
419 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
421 2011-10-13 Arnaud Charlet <charlet@adacore.com>
423 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
425 2011-10-13 Jerome Guitton <guitton@adacore.com>
427 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
429 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
431 * a-convec.ads (Cursor): Minor reformatting.
432 * a-convec.adb (Next): Fix minor inconsistencies.
433 (Previous): Likewise.
435 2011-10-13 Ed Schonberg <schonberg@adacore.com>
437 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
438 New predicate to determine whether some operations on an array
439 type are available when the full view of its component may differ
440 from the view of the point of the array declaration.
441 * sem_ch4.adb (Find_Equality_Types): Use
442 Available_Full_View_Of_Component.
443 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
445 2011-10-13 Ed Schonberg <schonberg@adacore.com>
447 * sem_ch9.adb: Analyze aspects while discriminants of protected
450 2011-10-13 Geert Bosch <bosch@adacore.com>
452 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
453 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
454 longer depend on an external library.
455 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
456 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
458 * gcc-interface/Make-lang.in: Update dependencies.
460 2011-10-13 Cyrille Comar <comar@adacore.com>
462 * gnat_ugn.texi: Minor editing.
464 2011-10-13 Vincent Celier <celier@adacore.com>
466 * projects.texi: Add documentation on packages and attributes
467 that are inherited from a project being extended into the
470 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
472 * exp_ch3.adb (Build_Master): Rewritten.
473 (Expand_N_Full_Type_Declaration): Reformat the declarative
474 region. Update the call to Build_Master_Renaming.
475 (Expand_Previous_Access_Type): Rewritten.
476 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
477 Add local constant Result_Subt and update related usage.
478 (Expand_N_Extended_Return_Statement): Add local constant
479 Result_Subt and update related usage.
480 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
481 new context detection mechanism.
482 (Build_Class_Wide_Master):
483 Use Insert_Action to add the renaming into the tree.
484 (Build_Master_Entity): Rewritten to use the new context detection
486 (Build_Master_Renaming): Add formal parameter Ins_Nod
487 and related usage. Use Insert_Action to add the renaming into the
489 (Find_Enclosing_Context): New subsidiary routine. Rather
490 than relying on enclosing scopes, this routine looks at the
491 tree structure to figure out the proper context for a _master
492 or a _chain. This approach eliminates the issues with transient
493 scopes which have not been converted into blocks.
494 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
495 to better reflect the new usage. Update the related comment.
496 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
497 the comment on usage.
498 * sem_ch3.adb (Access_Definition): Update the calls to
499 Build_Master_Entity and Build_Master_Renaming.
500 * sem_ch6.adb (Create_Extra_Formals): Add local variable
501 Full_Subt. Code reformatting.
502 * sem_util.adb (Is_Iterator): Alphabetized.
503 (Is_LHS): Alphabetized.
504 (Is_Limited_Class_Wide_Type): New routine.
505 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
507 2011-10-13 Geert Bosch <bosch@adacore.com>
509 * a-ngrear.adb (Solve): Make generic and move to
510 System.Generic_Array_Operations.
511 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
512 New generic solvers to compute a vector resp. matrix Y such
513 that A * Y = X, approximately.
514 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
515 Implement using Forward_Eliminate and Back_Substitute
516 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
518 * a-ngcoar.ads ("abs"): Fix return type to be real.
520 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
523 * s-linux-alpha.ads: Do not "with" Interfaces.C.
524 * s-linux-sparc.ads: Likewise.
526 2011-10-13 Geert Bosch <bosch@adacore.com>
528 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
530 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
532 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
535 2011-10-13 Geert Bosch <bosch@adacore.com>
537 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
538 move to System.Generic_Array_Operations.
540 2011-10-13 Geert Bosch <bosch@adacore.com>
542 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
543 * s-gearop.ads (L2_Norm): Change profile to be suitable for
545 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
548 2011-10-13 Robert Dewar <dewar@adacore.com>
550 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
551 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
552 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
553 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
554 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
555 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
557 2011-10-13 Geert Bosch <bosch@adacore.com>
559 * s-gearop.adb: Minor comment additions.
561 2011-10-13 Fedor Rybin <frybin@adacore.com>
563 * gnat_ugn.texi: Add gnattest section.
565 2011-10-13 Ed Schonberg <schonberg@adacore.com>
567 * freeze.adb: Do not create body of renaming if declaration has
570 2011-10-13 Olivier Hainque <hainque@adacore.com>
572 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
573 further, to the ppc+kernel case only.
575 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
577 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
578 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
579 Do not create a pool formal on .NET/JVM.
580 (Expand_N_Extended_Return_Statement): Alphabetize local
581 variables. Do not create a renaming of the build-in-place pool
582 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
583 Add the user-defined pool only on non-VM targets.
584 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
585 local variables. Do not add a pool actual on .NET/JVM.
586 * sem_ch6.adb: Add with and use clause for Targparm.
587 (Create_Extra_Formals): Add build-in-place pool formal only on
589 * rtsfind.ads: Alphabetize entries.
591 2011-10-13 Sergey Rybin <rybin@adacore.com>
593 * gnat_ugn.texi: Minor correction.
595 2011-10-13 Ed Schonberg <schonberg@adacore.com>
597 * sem_ch8.adb: Minor error message improvement.
599 2011-10-13 Robert Dewar <dewar@adacore.com>
601 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
603 2011-10-13 Gary Dismukes <dismukes@adacore.com>
605 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
606 of a for loop for an enumeration type with an enumeration rep
607 clause, which involves moving the original loop parameter into
608 a nested block, the loop parameter's entity must be removed from
609 the entity list of the loop scope.
611 2011-10-13 Bob Duff <duff@adacore.com>
613 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
614 that gets passed in the same cases where BIP_Alloc_Form is passed
615 (caller-unknown-size results). BIP_Storage_Pool is used when
616 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
617 to the user-defined storage pool is passed at the call site,
618 and this pool is used in callee to allocate the result.
619 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
620 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
621 the additional BIP_Storage_Pool actual.
622 (Expand_N_Extended_Return_Statement): Allocate the function
623 result using the user-defined storage pool, if BIP_Alloc_Form =
625 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
626 * exp_ch4.adb: Don't overwrite storage pool set by
627 Expand_N_Extended_Return_Statement.
628 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
629 for use in build-in-place function calls within allocators
630 where the access type has a user-defined storage pool.
632 2011-10-13 Sergey Rybin <rybin@adacore.com>
634 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
637 2011-10-13 Nicolas Roche <roche@adacore.com>
639 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
642 2011-10-13 Ed Schonberg <schonberg@adacore.com>
644 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
645 account that an unchecked union type can be limited.
647 2011-10-13 Olivier Hainque <hainque@adacore.com>
649 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
650 the use of the signal trampoline for PPC in the sjlj case as well.
651 Add legitimate casts, preventing compile time warnings on the
652 (sighandler *) profile.
654 2011-10-13 Yannick Moy <moy@adacore.com>
656 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
659 2011-10-13 Ed Schonberg <schonberg@adacore.com>
661 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
662 expressions are legal limited return values if each one of their
663 dependent expressions are legal.
665 2011-10-13 Ed Schonberg <schonberg@adacore.com>
667 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
668 if the prefix of the call is a qualified expression, rewrite as
670 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
671 code statement is legal if it is a rewriting of a procedure call.
673 2011-10-13 Ed Schonberg <schonberg@adacore.com>
675 * exp_aggr.adb (Flatten): If a component association has a box,
676 assume that aggregate is not static.
677 (Safe_Aggregate): If a component association in a non-limited
678 aggregate has a box, assume that it cannot be expanded in place.
680 2011-10-13 Vincent Celier <celier@adacore.com>
682 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
683 Process_Project_Tree_Phase_1 with Packages_To_Check.
684 (Process_Project_And_Apply_Config): Ditto
685 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
686 Remove default for argument Packages_To_Check.
687 * prj-proc.adb (Recursive_Process): New argument
690 (Process_Project_Tree_Phase_1): Ditto.
691 (Recursive_Project.Process_Aggregated_Projects): Call
692 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
694 * prj-proc.ads (Process): New argument Packages_To_Check
695 (Process_Project_Tree_Phase_1): Ditto
697 2011-10-13 Arnaud Charlet <charlet@adacore.com>
699 * gcc-interface/Makefile.in: Fix typo.
701 2011-10-13 Ed Schonberg <schonberg@adacore.com>
703 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
704 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
705 Use sloc of defining identifier of farmal type declaration,
706 as sloc of generated internal entity, to prevent misplaced
709 2011-10-13 Ed Schonberg <schonberg@adacore.com>
711 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
712 is fully defined before checking that it is a numeric type.
714 2011-10-13 Ed Schonberg <schonberg@adacore.com>
716 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
717 association for component X has a box, then X is covered in the
718 aggregate even if there is not default value for X in the type
719 declaration, and X has to be default-initialized.
721 2011-10-13 Ed Schonberg <schonberg@adacore.com>
723 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
724 literals as referenced only if reference is in current source unit.
726 2011-10-13 Matthew Heaney <heaney@adacore.com>
728 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
730 2011-10-13 Olivier Hainque <hainque@adacore.com>
732 * sigtramp.h: New file. Prototype and spec of the signal
733 trampoline to be called by an established handler to provide
734 dwarf call frame info before the real signal processing code.
735 * sigtramp-ppcvxw.c: New file. Implementation of the signal
736 trampoline for ppc-vxworks.
737 * init.c (vxworks section): Use it for ppc.
739 2011-10-13 Thomas Quinot <quinot@adacore.com>
741 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
742 (Check_Future_Identifier): New subprogram,
743 factors duplicated code from Par.Ch2.P_Identifier and
744 Par.Ch3.P_Defining_Identifier.
746 2011-10-13 Thomas Quinot <quinot@adacore.com>
748 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
749 if we fail to initialize CV attributes or CV.
751 2011-10-13 Thomas Quinot <quinot@adacore.com>
753 * s-tasren.adb (Timed_Selective_Wait, case
754 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
755 we know abortion is already deferred.
757 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
759 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
760 (Build_Master_Renaming (function)): Removed.
761 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
762 (Expand_Full_Type_Declaration): Alphabetize
763 variables. Reformatting of code and comments. Rewrite the
764 section on processing of anonymous access-to-task types in
766 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
767 (Build_Master_Renaming): Moved to exp_ch9.
768 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
769 (Build_Master_Entity): Add formal parameter
770 Use_Current. Reformatting of code and comments.
771 (Build_Master_Renaming): Moved from exp_ch3.
772 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
773 exp_ch3. Update comment on usage.
774 (Build_Master_Entity):
775 Add formal parameter Use_Current. Update comment on usage.
776 (Build_Master_Renaming): Moved from exp_ch3.
777 * sem_ch3.adb (Access_Definition): Remove redundant code to
778 create a _master and a renaming.
780 2011-10-13 Ed Schonberg <schonberg@adacore.com>
782 * lib-xref.adb: Do no emit reference to overridden operation,
783 if it is internally generated.
785 2011-10-13 Vincent Celier <celier@adacore.com>
787 * bindgen.adb: Remove any processing related to g-trasym
788 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
789 * mlib-prj.adb: Remove any processing related to g-trasym.
791 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
793 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
794 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
795 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
796 (ADA_FLAGS_TO_PASS): Likewise.
797 (COMMON_FLAGS_TO_PASS): New.
798 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
799 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
800 (gnatlib): Use COMMON_FLAGS_TO_PASS.
801 (ada.install-common): Likewise.
802 (install-gnatlib): Likewise.
803 (install-gnatlib-obj): Likewise.
804 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
805 (gnat-cross): Delete.
806 (gnatboot): Likewise.
807 (gnatboot2): Likewise.
808 (gnatboot3): Likewise.
809 (gnatstage1): Likewise.
810 (gnatstage2): Likewise.
811 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
812 (MOST_ADAFLAGS): Likewise.
813 (LOOSE_CFLAGS): Likewise.
814 (gnat-cross): Likewise.
815 (GNATLIBFLAGS): Add -W -Wall.
816 (GNATLIBCFLAGS_FOR_C): Likewise.
817 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
818 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
820 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
822 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
823 (push_range_check_info): Likewise.
824 (gnat_to_gnu) <N_Code_Statement>: Likewise.
825 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
826 (gnat_invariant_expr): Likewise.
827 * gcc-interface/utils.c (compute_related_constant): Likewise.
828 (max_size): Fix handling of SAVE_EXPR.
829 (remove_conversions): Fix formatting.
831 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
833 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
834 (DECL_INDUCTION_VAR): New macro.
835 (SET_DECL_INDUCTION_VAR): Likewise.
836 * gcc-interface/gigi.h (convert_to_index_type): Declare.
837 (gnat_invariant_expr): Likewise.
838 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
839 parameter, set DECL_LOOP_PARM_P on it.
840 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
841 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
842 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
843 (struct range_check_info_d): New type.
844 (struct loop_info_d): Likewise.
845 (gnu_loop_stack): New stack.
846 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
847 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
848 is set, do not test DECL_RENAMED_OBJECT.
849 (push_range_check_info): New function.
850 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
851 the label. Reference the label and the iteration variable from it.
852 Build the special induction variable in the unsigned version of the
853 size type, if it is larger than the base type. And attach it to the
854 iteration variable if the latter isn't by-ref. In the iteration scheme
855 case, initialize the invariant conditions in front of the loop if
856 deemed profitable. Use gnu_loop_stack.
857 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
858 <N_Raise_Constraint_Error>: Always process the reason. In the range
859 check and related cases, and if loop unswitching is enabled, compute
860 invariant conditions and push this information onto the stack.
861 Do not translate again the condition if it has been already translated.
862 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
863 DECL_LOOP_PARM_P isn't set.
864 (convert_to_index_type): New function.
865 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
866 to convert the index from the base index type to sizetype.
867 (gnat_invariant_expr): New function.
869 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
871 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
872 two parallel arrays to hold standard builtin declarations, and
873 replace it with a function based interface that can support
874 creating builtins on the fly in the future.
875 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
876 (gnat_to_gnu): Ditto.
878 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
881 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
882 * gcc-interface/utils.c (global_context): New variable.
883 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
884 that are either public external or at top level. Use "No" macro.
885 (end_subprog_body): Call decl_function_context.
886 (rest_of_subprog_body_compilation): Likewise.
888 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
890 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
891 (rest_of_subprog_body_compilation): Likewise.
892 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
893 test for useless conversions by means of gnat_useless_type_conversion.
894 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
895 (language_function): Add named_ret_val and other_ret_val.
896 (f_named_ret_val): New macro.
897 (f_other_ret_val): Likewise.
898 (gigi): Call rest_of_subprog_body_compilation.
899 (struct nrv_data): New structure.
900 (is_nrv_p): New predicate.
901 (prune_nrv_r): New helper function.
902 (prune_nrv_in_block): New function.
903 (finalize_nrv_r): New helper function.
904 (finalize_nrv): New function.
905 (return_value_ok_for_nrv_p): New predicate.
906 (build_return_expr): If optimization is enabled, record candidates for
907 the Named Return Value optimization.
908 (build_function_stub): Call rest_of_subprog_body_compilation.
909 (Subprogram_Body_to_gnu): If optimization is enabled and there are
910 candidates, finalize the Named Return Value optimization.
911 Call rest_of_subprog_body_compilation.
912 (call_to_gnu): At the end, if a return value is needed, simplify the
913 result before wrapping it up in a COMPOUND_EXPR.
914 * gcc-interface/utils.c (end_subprog_body): Split into...
915 (rest_of_subprog_body_compilation): ...this. New function.
916 (gnat_useless_type_conversion): Likewise.
918 2011-10-06 Thomas Quinot <quinot@adacore.com>
920 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
921 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
922 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
923 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
924 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
925 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
926 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
927 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
929 2011-10-06 Ed Schonberg <schonberg@adacore.com>
931 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
934 2011-10-06 Matthew Heaney <heaney@adacore.com>
936 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
937 (Dequeue_Only_High_Priority): Protected procedure now implemented.
939 2011-10-06 Vincent Celier <celier@adacore.com>
941 * g-trasym.adb: Replace old implementation with the default
942 implementation that returns list of addresses as "0x...".
943 * g-trasym.ads: Update the list of platforms with the full
944 capability. Indicate that there is a default implementation
946 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
947 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
948 is now a default implementation for all platforms without the full
951 2011-10-06 Robert Dewar <dewar@adacore.com>
953 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
954 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
955 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
956 reorganization (use conditional expressions).
958 2011-10-06 Robert Dewar <dewar@adacore.com>
960 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
961 floating divide by zero.
963 2011-10-06 Ed Schonberg <schonberg@adacore.com>
965 * sem_ch6.adb: Limited interfaces that are not immutably limited
966 are OK in return statements.
968 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
970 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
971 change to powerpc section.
973 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
975 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
978 2011-09-27 Ed Schonberg <schonberg@adacore.com>
980 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
981 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
982 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
984 * a-coorma.ads: Minor reformmating.
985 * einfo.ads: Improve the comment describing the
986 Directly_Designated_Type function.
987 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
989 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
992 2011-09-27 Robert Dewar <dewar@adacore.com>
994 * a-comutr.ads: Minor reformatting.
996 2011-09-27 Ed Schonberg <schonberg@adacore.com>
998 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
999 iterators to multiway trees.
1001 2011-09-27 Yannick Moy <moy@adacore.com>
1003 * debug.adb (d.D): New option for strict Alfa mode.
1004 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1005 permissions as strictly as possible.
1006 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1007 Alfa mode, now, interpret ranges of base types like GNAT does; in
1008 strict mode, simply change the range of the implicit base Itype.
1009 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1011 2011-09-27 Robert Dewar <dewar@adacore.com>
1013 * exp_ch9.adb: Minor comment fixes.
1015 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1017 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1020 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1022 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1023 instead of Directly_Designated_Type in the indirect array case.
1025 2011-09-27 Robert Dewar <dewar@adacore.com>
1027 * exp_util.adb, exp_aggr.adb: Minor reformatting.
1029 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1031 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1032 on subtype declarations.
1033 * exp_aggr.adb: Minor comment update.
1035 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1037 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1038 test in the N_Explicit_Dereference case. Fold double logical
1039 negation in the special loop case and conditionalize it on
1040 Variable_Ref being true.
1042 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1044 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1045 single protected object and the selector is a discriminant or an
1046 entry family, this is a non-overloaded candidate interpretation,
1047 and possible primitive operations of the type must not be
1050 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1052 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1054 2011-09-27 Pascal Obry <obry@adacore.com>
1056 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1057 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1058 Add dummy definitions for pthread_rwlock_t
1059 and pthread_rwlockattr_t on all POSIX platforms.
1060 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1062 (Finalize_Lock): Likewise.
1063 (Write_Lock): Likewise.
1066 2011-09-27 Tristan Gingold <gingold@adacore.com>
1068 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1071 2011-09-27 Pascal Obry <obry@adacore.com>
1073 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1074 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1075 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1076 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1077 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1078 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1079 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1080 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1081 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1082 s-taprop-posix.adb: Revert previous changes.
1083 (Lock): Now a record containing the two possible lock
1084 (mutex and read/write) defined in OS_Interface.
1085 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1087 (Initialize_Protection): Likewise.
1089 (Lock_Read_Only): Likewise.
1092 2011-09-27 Pascal Obry <obry@adacore.com>
1094 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1095 OS_Interface.pthread_rwlock_t.
1097 2011-09-27 Robert Dewar <dewar@adacore.com>
1099 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1100 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1101 sem_ch5.adb, sem_util.adb: Minor reformatting.
1103 2011-09-27 Pascal Obry <obry@adacore.com>
1105 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1106 (Finalize_Lock)[RW_Lock]: Likewise.
1107 (Write_Lock)[RW_Lock]: Likewise.
1108 (Unlock)[RW_Lock]: Likewise.
1109 (Read_Lock): Define L as RW_Lock (instead of Lock).
1110 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1111 routine for r/w lock.
1112 (Finalize_Lock)[RW_Lock]: Likewise.
1113 (Write_Lock)[RW_Lock]: Likewise.
1114 (Unlock)[RW_Lock]: Likewise.
1115 (Read_Lock): Define L as RW_Lock (instead of Lock).
1117 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1118 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1119 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1120 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1121 routine for standard lock.
1122 (Finalize_Lock)[RW_Lock]: Likewise.
1123 (Write_Lock)[RW_Lock]: Likewise.
1124 (Unlock)[RW_Lock]: Likewise.
1125 (Read_Lock): Define L as RW_Lock (instead of Lock).
1126 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1127 in the record definition.
1128 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1129 lock for 'R' locking policy.
1130 (Initialize_Protection): Likewise.
1132 (Lock_Read_Only): Likewise.
1134 * s-taspri-posix.ads (RW_Lock): New type defined as
1135 OS_Interface.pthread_rwlock_t.
1137 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1138 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1139 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1140 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1142 2011-09-27 Pascal Obry <obry@adacore.com>
1144 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1146 2011-09-27 Pascal Obry <obry@adacore.com>
1148 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1149 s-osinte-hpux.ads, s-osinte-irix.ads,
1150 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1152 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1153 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1154 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1155 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1156 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1157 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1159 2011-09-27 Pascal Obry <obry@adacore.com>
1161 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1162 (RE_Id): Add RE_Lock_Read_Only.
1163 (RE_Unit_Table): Likewise.
1164 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1165 to lift restriction on first character. Handle now the
1166 Name_Concurrent_Readers_Locking where policy character is set to
1168 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1170 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1171 read only lock for function in protected object.
1172 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1173 this routine is now used.
1175 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1177 * s-atocou-x86.adb (Decrement): Use %;.
1178 (Increment): Likewise.
1180 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1182 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1183 dereference of the pointer to the storage area. Remove useless type
1184 conversions and factor out common code.
1186 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1188 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1189 variable and use it throughout.
1190 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1191 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1192 first step. Also convert to the unpadded type as a last step.
1194 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1196 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1197 DECL_CHAIN in comment.
1198 * gcc-interface/trans.c (gigi): Likewise.
1199 (Attribute_to_gnu): Likewise.
1200 (build_function_stub): Likewise.
1201 (gnat_to_gnu): Likewise.
1202 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1203 (convert_vms_descriptor64): Likewise.
1204 (convert_vms_descriptor32): Likewise.
1206 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1208 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1209 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1210 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1211 the type of the record is TYPE_READONLY.
1213 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1214 Robert Dewar <dewar@adacore.com>
1216 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1217 OUT formal parameter which is of an null-exclusion access subtype.
1219 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1221 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1222 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1223 (gnat_to_gnu_param): Likewise.
1224 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1225 maybe_unconstrained_array instead of doing the work manually.
1226 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1227 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1228 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1229 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1230 (gnat_stabilize_reference): Likewise.
1232 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1234 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1235 (SET_TYPE_NULL_BOUNDS): Likewise.
1236 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1237 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1238 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1240 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1241 check that the initializer is a valid constant expression for use in
1242 initializing a static variable. Add missing guard.
1243 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1244 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1245 pointer for the bounds.
1246 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1247 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1249 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1251 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1252 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1253 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1254 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1255 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1256 to the indirect case.
1257 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1258 the TREE_THIS_NOTRAP flag.
1260 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1262 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1263 iteration scheme, always generate the do-while form if optimization
1264 is enabled. Use more straightforward test at the end.
1266 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1268 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1269 XNEW instead of xmalloc. Do not build useless pointer type.
1270 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1271 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1272 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1274 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1276 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1277 the alignment if this doesn't prevent BLKmode access to the object.
1279 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1281 * gcc-interface/Makefile.in (darwin): Do not issue the
1282 '-flat_namespace' linker flag during Ada build.
1283 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1284 default shared library options.
1286 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1288 * gcc-interface/decl.c (annotate_value): Look up expression for
1289 insertion in the cache at the end.
1291 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1293 * gcc-interface/Make-lang.in: Update dependencies.
1295 2011-09-19 Steve Baird <baird@adacore.com>
1297 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1298 configuration pragma names so that Is_Configuration_Pragma_Name
1299 will return True for Name_Annotate. Make corresponding change in
1300 Pragma_Id enumeration type. This is needed to allow an Annotate
1301 pragma to occur in a configuration pragma file (typically,
1303 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1304 * gnat_rm.texi: Note that pragma Annotate may be used as a
1305 configuration pragma.
1307 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1309 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1310 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1312 2011-09-19 Yannick Moy <moy@adacore.com>
1314 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1315 for expansion of set membership.
1316 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1317 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1318 visible for use in Alfa expansion.
1319 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1320 variable in Alfa mode.
1322 2011-09-19 Thomas Quinot <quinot@adacore.com>
1324 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1326 2011-09-19 Thomas Quinot <quinot@adacore.com>
1328 * exp_ch9.adb: Minor reformatting.
1330 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1332 * freeze.adb (Build_Renamed_Body): Generic subprograms
1333 instantiations cannot be poperly inlined by the compiler, do
1334 not set the Body_To_Inline attribute in such cases.
1335 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1336 inlining-related flags from the generic subprogram declaration.
1338 2011-09-19 Thomas Quinot <quinot@adacore.com>
1340 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1341 (Build_Stub_Type): Remove, instead copy components from
1342 System.Partition_Interface.RACW_Stub_Type.
1343 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1344 (Copy_Component_List): New subprogram.
1346 2011-09-19 Yannick Moy <moy@adacore.com>
1348 * lib-xref.adb (Generate_Reference): Ignore references to
1349 constants in Standard.
1351 2011-09-19 Robert Dewar <dewar@adacore.com>
1353 * err_vars.ads, errout.ads: Minor reformatting.
1355 2011-09-19 Robert Dewar <dewar@adacore.com>
1357 * aspects.ads (Impl_Defined_Aspects): New array
1358 * lib-writ.adb (No_Dependences): New name for No_Dependence
1359 * restrict.adb (No_Dependences): New name for No_Dependence
1360 (Check_Restriction_No_Specification_Of_Aspect): New
1362 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1363 (Restricted_Profile_Result): New variable
1364 (No_Specification_Of_Aspects): New variable
1365 (No_Specification_Of_Aspect_Warning): New variable
1366 * restrict.ads (No_Dependences): New name for No_Dependence
1367 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1368 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1369 * s-rident.ads: Add restriction
1370 No_Implementation_Aspect_Specifications, this is also added to
1371 the No_Implementation_Extensions profile.
1372 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1373 No_Implementation_Defined_Aspects
1374 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1375 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1376 No_Implementation_Aspects
1377 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1378 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1380 2011-09-19 Yannick Moy <moy@adacore.com>
1382 * lib-xref.adb (Generate_Reference): Take into account multiple
1383 renamings for Alfa refs.
1385 2011-09-19 Thomas Quinot <quinot@adacore.com>
1387 * g-socthi-mingw.adb: Minor reformatting.
1389 2011-09-19 Yannick Moy <moy@adacore.com>
1391 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1392 expansion to False in mode Alfa
1394 2011-09-19 Pascal Obry <obry@adacore.com>
1396 * mingw32.h: Remove obsolete code needed for old versions
1399 2011-09-19 Robert Dewar <dewar@adacore.com>
1401 * errout.ads: Minor reformatting.
1403 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1405 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1406 function is transformed into a declaration and a body, insert
1407 body at the end of the declarative part, to prevent premature
1408 freeze actions, and preserve original specification in the
1409 subprogram declaration.
1411 2011-09-19 Vincent Celier <celier@adacore.com>
1413 * projects.texi: Minor editing.
1415 2011-09-19 Robert Dewar <dewar@adacore.com>
1417 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1418 exp_aggr.adb: Minor reformatting.
1420 2011-09-19 Yannick Moy <moy@adacore.com>
1422 * lib-xref.adb (Generate_Reference): Change entity referenced
1423 to underlying object if any, or else reference to the HEAP.
1425 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1427 * gcc-interface/Make-lang.in: Update dependencies.
1429 2011-09-15 Robert Dewar <dewar@adacore.com>
1431 * tree_io.ads: Minor reformatting.
1432 * a-intnam.ads: Fix bad header.
1434 2011-09-15 Thomas Quinot <quinot@adacore.com>
1436 * a-exexpr-gcc.adb: Minor reformatting.
1438 2011-09-15 Yannick Moy <moy@adacore.com>
1440 * sem_ch6.adb: Propagate information that an expression function comes
1441 from source (otherwise references to this entity are not stored).
1443 2011-09-15 Robert Dewar <dewar@adacore.com>
1445 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1446 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1447 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1449 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1451 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1452 if the expression function is not a completion, create a
1453 new specification for the generated declaration, and keep the
1454 original specification in the generated body. Shorter code also
1455 ensures that proper warnings are generated for unused formals
1458 2011-09-15 Sergey Rybin <rybin@adacore.com>
1460 * tree_io.ads: Update ASIS_Version_Number because of the changes
1461 in the tree structures for expression functions.
1463 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1465 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1466 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1467 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1468 (CLOCK_REALTIME): Fix wrong value on some OSes.
1469 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1471 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1473 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1474 to unconstrained array case, deal with each branch of a COND_EXPR.
1475 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1476 a COND_EXPR in the initializer, if present.
1478 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1480 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1481 of an addressable type.
1482 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1483 Deal with those cases for which creating a temporary is mandatory.
1485 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1487 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1488 this is a real formal parameter before testing whether it is by ref.
1490 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1492 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1493 (build_call_1_expr): Likewise.
1494 (build_call_2_expr): Likewise.
1495 (build_call_n_expr): New prototype.
1496 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1497 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1498 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1499 (Exception_Handler_to_gnu_zcx): Likewise.
1500 (gnat_to_gnu): Likewise.
1501 (build_binary_op_trapv): Likewise.
1502 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1503 (build_call_1_expr): Likewise.
1504 (build_call_2_expr): Likewise.
1505 (build_call_n_expr): New function.
1506 (build_call_raise): Use build_call_n_expr.
1507 (build_call_raise_range): Likewise.
1508 (build_call_raise_column): Likewise.
1509 (build_call_alloc_dealloc_proc): Likewise.
1510 (maybe_wrap_malloc): Likewise.
1511 (maybe_wrap_free): Likewise.
1513 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1515 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1517 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1518 the result type is null if ENABLE_CHECKING. Set operation_type at the
1519 end unconditionally if not set in the previous cases.
1520 Use build2 and void_type_node for MODIFY_EXPR.
1521 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1523 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1525 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1526 precision when converting to or from an integral type whose precision
1527 is not equal to its size.
1529 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1531 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1533 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1535 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1537 * system-darwin-ppc64.ads: New file.
1539 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1541 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1544 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1546 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1547 size switches to the link phase for shared libs.
1549 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1551 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1552 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1554 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1556 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1557 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1558 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1560 (TOOLS_FLAGS_TO_PASS): New.
1561 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1563 2011-09-06 Robert Dewar <dewar@adacore.com>
1565 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1566 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1568 2011-09-06 Robert Dewar <dewar@adacore.com>
1570 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1571 * s-rident.ads: New restriction No_Implementation_Units
1572 (this restriction is also part of the profile
1573 No_Implementation_Extensions)
1574 * sem_ch10.adb (Analyze_With_Clause): Add check for
1575 No_Implementation_Units restriction.
1577 2011-09-06 Jerome Guitton <guitton@adacore.com>
1579 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1582 2011-09-06 Thomas Quinot <quinot@adacore.com>
1584 * s-solita.adb: Minor reformatting.
1586 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1588 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1589 is a rewriting of an expression function does not freeze previous
1592 2011-09-06 Robert Dewar <dewar@adacore.com>
1594 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1596 2011-09-06 Tristan Gingold <gingold@adacore.com>
1598 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1599 powerpc-wrs-vxworksae.
1601 2011-09-06 Thomas Quinot <quinot@adacore.com>
1603 * s-os_lib.ads (Spawn): Minor documentation clarification,
1604 Success is True for a zero exit status.
1606 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1608 * sem_ch5.adb: Add message for common iterator error.
1610 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1612 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1613 selected component discriminated by a current instance, replace
1614 the constraint with a reference to the target object, regardless
1615 of whether the context is an init_proc.
1617 2011-09-06 Robert Dewar <dewar@adacore.com>
1619 * exp_attr.adb: Descriptor_Size is never static.
1621 2011-09-06 Robert Dewar <dewar@adacore.com>
1623 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1625 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1627 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1630 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1632 * sem_res.adb (Resolve): An expression that is the body of an
1633 expression function does not freeze.
1635 2011-09-06 Matthew Heaney <heaney@adacore.com>
1637 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1638 a-cuprqu.adb: Changed copyright notice to indicate current
1641 2011-09-06 Vincent Celier <celier@adacore.com>
1643 * prj.adb: Minor spelling error fix in comment
1644 * sem_res.adb: Minor reformatting
1646 2011-09-06 Pascal Obry <obry@adacore.com>
1648 * sysdep.c (winflush_nt): Removed as not needed anymore.
1649 (winflush_95): Likewise.
1650 (winflush_init): Likewise.
1651 (winflush_function): Likewise.
1652 (getc_immediate_common): Remove call to winflush_function.
1654 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1656 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1657 processing for Descriptor_Size.
1658 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1659 to account for its broader usage.
1660 * sem_attr.adb (Analyze_Attribute): Change the error detection
1661 circuitry for Descriptor_Size as the attribute is now applicable
1664 2011-09-06 Robert Dewar <dewar@adacore.com>
1666 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1668 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1670 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1671 in a parameter association must not set the Referenced flag on
1673 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1675 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1677 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1679 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1681 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1682 gnatlink-re): Speed up by using -j0.
1684 2011-09-06 Yannick Moy <moy@adacore.com>
1686 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1687 Set_Corresponding_Aspect when creating pragma from aspect.
1688 (Add_Predicates): Use new field Corresponding_Aspect.
1689 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1690 name when present, for the purpose of issuing error messages;
1691 remove local procedure Error_Pragma_Arg_Alternate_Name.
1692 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1694 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1697 2011-09-06 Robert Dewar <dewar@adacore.com>
1699 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1701 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1703 * exp_ch6.adb (Build_Heap_Allocator): Add new
1704 local variable Desig_Typ. Code and comment reformatting. Add
1705 machinery to ensure that the allocation uses a fat pointer when
1706 the type of the return object is a constrained array and the
1707 function return type is an unconstrained array.
1709 2011-09-06 Vincent Celier <celier@adacore.com>
1711 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1712 parameters in subprograms.
1714 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1716 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1718 2011-09-06 Thomas Quinot <quinot@adacore.com>
1720 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1721 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1723 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1724 is null, destroy task specific data, to make API consistent with
1725 other platforms, and thus compatible with the shared version
1727 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1728 Document the above assumption.
1730 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1732 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1733 variable for type of return value when return type is
1734 unconstrained and context is an assignment.
1736 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1738 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1739 class-wide operation if expansion is not enabled.
1741 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1743 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1746 2011-09-06 Yannick Moy <moy@adacore.com>
1748 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1749 Aspect_Invariant): Do not issue error at this point on illegal
1750 pragma placement, as this is checked later on when analyzing
1751 the corresponding pragma.
1752 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1753 similar to Error_Pragma_Arg, except the source name of the
1754 aspect/pragma to use in warnings may be equal to parameter
1755 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1756 message to distinguish source name of pragma/aspect, and whether
1757 the illegality resides in the type being public, or being private
1758 without a public declaration
1760 2011-09-06 Thomas Quinot <quinot@adacore.com>
1762 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1763 size check (fd_set is implemented differently on that platform).
1765 2011-09-06 Thomas Quinot <quinot@adacore.com>
1767 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1768 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1769 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1770 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1771 (ATCB_Allocation): New subpackage of
1772 System.Tasking.Primitive_Operations, shared across all targets
1773 with full tasking runtime.
1774 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1776 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1777 taking care of establishing a local temporary ATCB if the one
1778 being deallocated is Self, to avoid a reference to the freed
1779 ATCB in Abort_Undefer.
1781 2011-09-06 Thomas Quinot <quinot@adacore.com>
1783 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1784 terminated, mark it for deallocation upon termination.
1785 (Terminate_Task): Call Free_Task again if the task is marked
1786 for automatic deallocation upon termination.
1788 2011-09-06 Robert Dewar <dewar@adacore.com>
1790 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1791 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1792 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1793 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1794 a-intnam-solaris.ads, a-intnam-tru64.ads,
1795 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1796 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1797 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1798 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1799 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1800 Add new profile No_Implementation_Extensions
1801 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1802 profile No_Implementation_Extensions
1803 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1804 Check violation of restriction No_Implementation_Identifiers
1805 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1806 Add entry for Name_No_Implementation_Extensions
1808 2011-09-06 Robert Dewar <dewar@adacore.com>
1810 * impunit.ads: Minor reformatting.
1812 2011-09-06 Robert Dewar <dewar@adacore.com>
1814 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1816 2011-09-06 Pascal Obry <obry@adacore.com>
1818 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1821 2011-09-06 Robert Dewar <dewar@adacore.com>
1823 * g-socket.adb: Minor reformatting
1825 2011-09-06 Javier Miranda <miranda@adacore.com>
1827 * ali.adb (Scan_ALI): Add missing support to load references of
1828 entities imported from other languages.
1829 * ali.ads (Xref_Record): Adding new fields to store the language and
1830 name of an imported entity.
1831 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1834 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1836 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1837 is allowed on a full type declaration if it is the completion of
1838 a private declarations.
1839 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1840 aspect is allowed on a full type declaration in the private part
1843 2011-09-06 Robert Dewar <dewar@adacore.com>
1845 * sem_ch8.ads: Minor reformatting
1847 2011-09-06 Thomas Quinot <quinot@adacore.com>
1849 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1850 Guard against socket values that are not in [0;FD_SETSIZE[
1852 2011-09-06 Robert Dewar <dewar@adacore.com>
1854 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1857 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1859 * s-linux-alpha.ads: Minor reformatting
1860 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1861 Use sizeof instead of corresponding C defines in s-oscons template.
1863 2011-09-06 Vadim Godunko <godunko@adacore.com>
1865 * a-convec.ads, a-iteint.ads: Minor reformatting.
1867 2011-09-06 Vincent Celier <celier@adacore.com>
1869 * projects.texi: Add menus and @node lines.
1871 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1873 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1874 where the return type is an unconstrained array and the context
1875 is an assignment. Optimize the case when the target of the
1876 assignment is a selected component.
1878 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1880 * s-solita.adb: Update comments.
1882 2011-09-06 Pascal Obry <obry@adacore.com>
1884 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1885 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1886 * s-oscons-tmplt.c: Add support for generating pthread related
1887 types size on GNU/Linux as done for Darwin.
1888 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1890 2011-09-06 Robert Dewar <dewar@adacore.com>
1892 * exp_ch6.adb: Fix minor typo.
1894 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1896 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1897 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1898 (Double_Size_Of): Alphabetized. Update the comment on usage.
1899 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1900 (Nearest_Multiple_Rounded_Up): New routine.
1901 (Size_Of): Update comment on usage. The generated expression now
1902 accounts for alignment gaps by rounding the size of the type to the
1903 nearest multiple rounded up of the type's alignment.
1905 2011-09-06 Robert Dewar <dewar@adacore.com>
1907 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1909 2011-09-06 Steve Baird <baird@adacore.com>
1911 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1912 derived subprograms in checking for presence of an
1913 Extra_Accessibility_Of_Result formal parameter.
1914 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1915 checking for presence of an Extra_Accessibility_Of_Result formal
1917 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1918 case where the Parameter_Associatiations attribute is already set,
1919 but set to an empty list.
1920 (Needs_Result_Accessibility_Level):
1921 Unconditionally return False. This is a temporary
1922 change, disabling the Extra_Accessibility_Of_Result
1924 (Expand_Simple_Function_Return): Check for
1925 Extra_Accessibility_Of_Result parameter's presence instead of
1926 testing Ada_Version when generating a runtime accessibility
1927 check which makes use of the parameter.
1929 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1931 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1932 expression in a given case alternative must be attached to the
1933 statement list of the ccrresponding case statement alternative
1934 They cannot be propagated ahead of the case statement, because
1935 the validity of the expression that generated the action may
1936 hold only for that alternative.
1938 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1940 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1941 (Alignment_Of): Remove the code for strict alignment targets.
1942 (Double_Alignment_Of): Removed.
1943 (Double_Size_Of): New routine.
1944 (Make_Finalize_Address_Stmts): Change the
1945 calculation of the dope's size. Update relevant comments.
1946 (Size_Of): New routine.
1948 2011-09-06 Steve Baird <baird@adacore.com>
1950 * einfo.ads (Extra_Accessibility): Update associated comment to use
1951 the term "present" correctly ("present" just means that it is not
1952 an error to query the value of the attribute - it does not imply
1953 that the value must be non-null).
1954 (Extra_Constrained): Ditto.
1955 (Is_Visible_Formal): Ditto.
1956 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1957 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1958 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1959 * exp_ch6.adb (Expand_Call): The callee may require an
1960 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1961 < Ada_2012. This can occur if the callee is exported from a Gnat
1962 runtimes unit. Also improve a comment.
1964 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1966 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1967 (Alignment_Of): Rename formal parameter Some_Typ
1968 to Typ, update related comment. Use the allocator alignment on
1969 strict alignment targets such as SPARC.
1970 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1973 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1975 * sem_ch9.adb (Check_Interfaces): Test
1976 Is_Limited_Type rather than Is_Limited_Record when checking that
1977 the partial view of a synchronized full view must be limited.
1979 2011-09-06 Emmanuel Briot <briot@adacore.com>
1981 * g-comlin.adb (Free): Fix memory leak.
1983 2011-09-06 Robert Dewar <dewar@adacore.com>
1985 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1987 2011-09-06 Steve Baird <baird@adacore.com>
1989 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1990 (Ada2012) cases described in AI05-0234 where the accessibility
1991 level of a function result is "determined by the point of
1992 call", an implicit parameter representing that accessibility
1993 level is passed in. Extra_Accessibilty_Of_Result yields this
1994 additional formal parameter. Extra_Accessibility_Of_Result
1995 is analogous to the existing Extra_Accessibility
1996 function used in the implementation of access parameters.
1997 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1998 Extra_Accessibility_Of_Result attribute.
1999 * einfo.adb (Extra_Accessibility_Of_Result): New function.
2000 (Set_Extra_Accessibility_Of_Result): New procedure.
2001 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2002 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2003 an accessibility level literal to Natural; introduce a nested
2004 function, Make_Level_Literal, to do this.
2005 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2006 determines whether a given function (or access-to-function
2007 type) needs to have an implicitly-declared accessibility-level
2008 parameter added to its profile.
2009 (Add_Extra_Actual_To_Call): Export an existing procedure which was
2010 previously declared in the body of Exp_Ch6.
2011 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2013 (Has_Unconstrained_Access_Discriminants): New Function; a
2014 predicate on subtype entities which returns True if the given
2015 subtype is unconstrained and has one or more access discriminants.
2016 (Expand_Call): When expanding a call to a function which takes an
2017 Extra_Accessibility_Of_Result parameter, pass in the appropriate
2018 actual parameter value. In the case of a function call which is
2019 used to initialize an allocator, this may not be possible because
2020 the Etype of the allocator may not have been set yet. In this
2021 case, we defer passing in the parameter and handle it later in
2022 Expand_Allocator_Expression.
2023 (Expand_Simple_Function_Return): When returning from a function which
2024 returns an unconstrained subtype having at least one access
2025 discriminant, generate the accessibility check needed to ensure that
2026 the function result will not outlive any objects designated by its
2028 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2030 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2031 is used to initialize an allocator, we may need to pass in "the
2032 accessibility level determined by the point of call" (AI05-0234)
2033 to the function. Expand_Call, where such actual parameters are
2034 usually generated, is too early in this case because the Etype of
2035 the allocator (which is used in determining the level to be passed
2036 in) may not have been set yet when Expand_Call executes. Instead,
2037 we generate code to pass in the appropriate actual parameter
2038 in Expand_Allocator_Expression.
2039 * sem_ch6.adb (Create_Extra_Formals): Create
2040 the new Extra_Accessibility_Of_Result formal if
2041 Needs_Result_Accessibility_Level returns True. This includes the
2042 introduction of a nested procedure, Check_Against_Result_Level.
2044 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2046 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2049 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2051 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2052 for the synchronization. Move the test for null from
2053 s-stposu.Allocate_Any_Controlled to this routine since the check
2054 needs to be protected too.
2055 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2056 synchronization code.
2057 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2058 explaining the context in which this routine is used.
2059 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2060 to s-finmas.Set_Finalize_Address.
2062 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2064 * einfo.ads: Document that itypes have no parent field.
2066 2011-09-05 Robert Dewar <dewar@adacore.com>
2068 * rtsfind.adb (Check_CRT): Check for overloaded entity
2069 * rtsfind.ads: Document that entities to be found by rtsfind
2070 cannot be overloaded
2071 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2072 (Lock_Entries_With_Status): New name for Lock_Entries with two
2073 arguments (changed to meet rtsfind no overloading rule).
2075 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2077 * s-finmas.adb (Set_Finalize_Address (Address,
2078 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2079 (Set_Finalize_Address (in out Finalization_Master,
2080 Finalize_Address_Ptr): Add synchronization code.
2081 * s-finmas.ads (Set_Finalize_Address (Address,
2082 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2083 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2084 Set_Finalize_Address for the heterogeneous case.
2086 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2088 * sem_ch3.adb: Undo previous change, not suitable after all.
2090 2011-09-05 Robert Dewar <dewar@adacore.com>
2092 * einfo.ads: Minor comment clarification.
2094 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2096 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2097 no longer needs to search through the entities of the return
2098 statement scope to find the _chain.
2099 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2100 (Analyze_Block_Statement): Add local variable
2101 Is_BIP_Return_Statement. Add machinery to install all entities
2102 produced by the expansion of the return object declaration.
2103 (Install_Return_Entities): New routine.
2104 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2106 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2108 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2109 of subunit is incomplete.
2110 (Analyze_Proper_Body): If parent spec is not available, do not
2113 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2115 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2116 interface type conversions, that are expanded into dereferences.
2118 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2120 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2121 Examine the parameter and return profile of a subprogram and swap
2122 any incomplete types coming from a limited context with their
2123 corresponding non-limited views.
2124 (Exchange_Limited_Views): New routine.
2126 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2128 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2129 of internal entity to the subtype declaration, so that when
2130 entities are subsequently exchanged in a package body, the tree
2131 remains properly formatted for ASIS.
2133 2011-09-05 Johannes Kanig <kanig@adacore.com>
2135 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2137 (Display_Help): display the user given help message, if available.
2139 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2141 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2142 is legal if the original node is an identifier that is a
2143 parameterless function call.
2145 2011-09-05 Pascal Obry <obry@adacore.com>
2147 * prj-nmsc.adb: Minor reformatting.
2148 Add support for standalone aggregate library.
2149 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2150 * projects.texi: Fix documentation for aggregate library projects.
2152 2011-09-05 Robert Dewar <dewar@adacore.com>
2154 * sem_ch6.adb: Minor reformatting.
2156 2011-09-05 Matthew Gingell <gingell@adacore.com>
2158 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2159 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2160 the bottom of the stack is not overwritten.
2162 2011-09-05 Thomas Quinot <quinot@adacore.com>
2164 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2166 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2168 * sem_ch3.adb (Access_Definition): If an access type declaration
2169 appears in a child unit, the scope of whatever anonymous type
2170 may be generated is the child unit itself.
2172 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2174 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2175 Comes_From_Source on rewritten body.
2176 (Analyze_Subprogram_Body_Helper): Check that the original node for
2177 the body comes from source, when determining whether expansion
2178 of a protected operation is needed.
2180 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2182 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2183 a selected component and the right-hand side is a self-referential
2184 access, the proper prefix of the rewritten attribute is a copy
2185 of the left-hand side, not of its prefix.
2187 2011-09-05 Robert Dewar <dewar@adacore.com>
2189 * sem_ch5.adb: Minor reformatting.
2190 * sem_ch3.adb: Minor code clean up.
2192 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2194 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2195 restriction No_Dynamic_Attachment is in effect or not should
2196 not influence the default priority associated to a protected
2197 object. With this change, when the restriction is in effect (as
2198 is the case for the Ravenscar profile) the default priority of
2199 a protected object with an interrupt handler is in the range of
2200 interrupt priorities (Default_Interrupt_Priority) as required
2203 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2205 * a-iteint.ads: Fix header.
2207 2011-09-05 Vincent Celier <celier@adacore.com>
2209 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2210 with a directory separator to avoid output such as:
2211 "/path/to/objauto.cgpr" has been deleted.
2213 2011-09-05 Robert Dewar <dewar@adacore.com>
2215 * sem_ch3.adb: Minor reformatting.
2217 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2219 * sem_ch5.adb: Better error message.
2221 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2223 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2224 (Expand_Array_Aggregate): Detect a special case of an aggregate
2225 which contains tasks in the context of an unexpanded return
2226 statement of a build-in-place function.
2227 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2228 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2229 which contains tasks and expand it now that the original simple
2230 return statement has been rewritten.
2231 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2232 reformatting. Do not create a chain for an extended return
2233 statement if one is already available.
2234 (Has_Activation_Chain): New routine.
2236 2011-09-05 Marc Sango <sango@adacore.com>
2238 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2239 the wrong test and add the correct test to detect the violation
2240 of illegal use of unconstrained string type in SPARK mode.
2242 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2244 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2245 message on an iterator over an array.
2247 2011-09-05 Robert Dewar <dewar@adacore.com>
2249 * lib-xref-alfa.adb: Minor reformatting.
2251 2011-09-05 Robert Dewar <dewar@adacore.com>
2253 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2254 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2256 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2258 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2260 2011-09-05 Johannes Kanig <kanig@adacore.com>
2262 * lib-xref-alfa.adb: Update comments.
2264 2011-09-05 Thomas Quinot <quinot@adacore.com>
2266 * sem_res.adb: Minor reformatting
2268 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2270 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2271 present, create them now. Needed in case the return type was
2272 a limited view in the function declaration.
2273 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2274 tasks, build the activation chain for it. Pass a reference to
2275 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2276 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2277 with build_in_place calls.
2278 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2279 incomplete, inatialize its Corresponding_Record_Type component.
2280 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2283 2011-09-05 Johannes Kanig <kanig@adacore.com>
2285 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2288 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2290 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2291 appears within a package specification and the token after "IS"
2292 is not a parenthesis, assume that this is an unparenthesized
2293 expression function, even if the token appears in a line by
2295 * par.adb: Clarify use of Labl field of scope stack in error
2298 2011-09-05 Bob Duff <duff@adacore.com>
2300 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2301 conversions instead of normal type conversions in all cases where a
2302 type conversion would be illegal. In particular, use unchecked
2303 conversions when the operand types are private.
2305 2011-09-05 Johannes Kanig <kanig@adacore.com>
2307 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2308 objects of task type or protected type.
2310 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2312 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2313 function comes from source, indicate that so does its rewriting,
2314 so it is compatible with any subsequent expansion of the
2315 subprogram body (e.g. when it is a protected operation).
2316 * sem_ch4.adb: minor reformatting
2318 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2320 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2321 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2322 may lead to wrong ancestor package in the case of instantiated subunit
2323 bodies. If a subunit is instantiated, follow the chain of instantiations
2324 rather than the stub structure.
2326 2011-09-02 Robert Dewar <dewar@adacore.com>
2328 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2329 * gcc-interface/Make-lang.in: Update dependencies.
2331 2011-09-02 Marc Sango <sango@adacore.com>
2333 * sem_ch3.adb (Analyze_Object_Declaration): Change
2334 comment and add additional check to differentiate constant of
2335 type string from others unconstrained type.
2337 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2339 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2340 present in incomplete type declarations to refine the error
2341 message the full declaration is in the same unit.
2342 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2343 an incomplete type, set the Premature_Use for additional message.
2344 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2345 and Premature_Use is set, place additional information at the
2346 point of premature use.
2348 2011-09-02 Bob Duff <duff@adacore.com>
2350 * sem_ch6.adb: (Check_Post_State): Suppress warning
2351 "postcondition refers only to pre-state" when the expression has not
2352 yet been analyzed, because it causes false alarms. This can happen when
2353 the postcondition contains a quantified expression, because those are
2354 analyzed later. This is a temporary/partial fix.
2355 (Process_Post_Conditions): Minor: change wording of warning.
2357 2011-09-02 Marc Sango <sango@adacore.com>
2359 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2360 illegal use of unconstrained string type in SPARK mode.
2361 * sem_res.adb (Analyze_Operator_Symbol): Set the
2362 right place where the string operand of concatenation should be
2363 violate in SPARK mode.
2365 2011-09-02 Robert Dewar <dewar@adacore.com>
2367 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2368 exp_ch3.adb: Minor reformatting.
2370 2011-09-02 Vincent Celier <celier@adacore.com>
2372 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2373 as the compiler driver so Is_Compilable returns True for sources.
2374 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2377 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2379 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2380 condition, a reference to a controlling formal must be interpreted
2381 as having the class-wide type (or an access to such) so that the
2382 inherited condition can be properly applied to any overriding
2383 operation (see ARM12 6.6.1 (7)).
2385 2011-09-02 Tristan Gingold <gingold@adacore.com>
2387 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2390 2011-09-02 Javier Miranda <miranda@adacore.com>
2392 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2393 initializing expression of a class-wide interface object declaration
2394 if its type is limited.
2396 2011-09-02 Johannes Kanig <kanig@adacore.com>
2398 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2399 literals, take into account the type name; the type is *not*
2400 the scope for an enumeration literal.
2402 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2404 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2405 to reject an overriding indicator on a user-defined Adjust
2406 subprogram for a limited controlled type.
2408 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2410 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2411 for an actual that is a function call returning an unconstrained
2412 limited controlled type.
2414 2011-09-02 Tristan Gingold <gingold@adacore.com>
2416 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2418 2011-09-02 Johannes Kanig <kanig@adacore.com>
2420 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2421 from "HEAP" to __HEAP Change comment that refers to that variable
2422 * put_alfa.adb: Change comment that refers to that variable
2424 2011-09-02 Robert Dewar <dewar@adacore.com>
2426 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2428 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2430 * exp_util.adb (Extract_Renamed_Object): Renamed to
2431 Find_Renamed_Object. This routine has been reimplemented and now uses
2432 tree traversal to locate a renamed object.
2433 (Is_Aliased): Replace call to Extract_Renamed_Object with
2434 Find_Renamed_Object.
2436 2011-09-02 Tristan Gingold <gingold@adacore.com>
2438 * init.c: (__gnat_is_vms_v7): New function.
2440 2011-09-02 Olivier Hainque <hainque@adacore.com>
2442 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2443 that have a misaligned backchain, necessarily bogus.
2445 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2447 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2448 TSS routine Finalize_Address when compiling in Alfa mode.
2449 (Expand_Freeze_Record_Type): Do not create TSS routine
2450 Finalize_Address when compiling in Alfa mode.
2451 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2452 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2454 (Expand_N_Allocator): Do not produce a call to
2455 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2456 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2457 produce a call to primitive Set_Finalize_Address in Alfa mode because
2458 Finalize_Address is not built.
2459 * exp_ch7.adb (Build_Finalization_Master): Do not create
2460 finalization masters in Afa mode since they are not needed.
2461 (Build_Finalizer): Do not create scope and library-level
2462 finalizers in Alfa mode since they are not needed.
2463 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2464 "new" and "free" when applied to controlled objects in Alfa mode since
2467 2011-09-02 Vincent Celier <celier@adacore.com>
2469 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2470 only library names with the syntax of Ada identifiers, to avoid errors
2471 when compiling the binder generated files.
2472 * projects.texi: Document restriction on SAL library names
2474 2011-09-02 Thomas Quinot <quinot@adacore.com>
2476 * a-chtgbo.adb: Minor comment fix.
2478 2011-09-02 Robert Dewar <dewar@adacore.com>
2480 * lib-xref.adb: Minor reformatting
2482 2011-09-02 Vincent Celier <celier@adacore.com>
2484 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2485 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2486 --version and --help in usage.
2487 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2489 2011-09-02 Bob Duff <duff@adacore.com>
2491 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2492 compilers don't understand it.
2494 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2496 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2497 underlying subtype rather than its base type on the call to
2498 Build_Record_Or_Elementary_Input_Function, so that any
2499 constraints on a discriminated subtype will be available for
2500 doing the check required by AI05-0192.
2501 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2502 If the prefix subtype of the 'Input attribute is a constrained
2503 discriminated subtype, then check each constrained discriminant value
2504 against the corresponding value read from the stream.
2506 2011-09-02 Yannick Moy <moy@adacore.com>
2508 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2509 warnings on suspicious contracts, and enable them with -gnatwa.
2511 2011-09-02 Robert Dewar <dewar@adacore.com>
2513 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2516 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2518 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2519 which ensure that restriction No_Dynamic_Attachment has not been
2521 (Make_Initialize_Protection): Protected types with attach or
2522 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2523 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2524 which ensures that restriction No_Dynamic_Attachment has not been
2526 * sem_attr.adb: (Eval_Attribute): Transform
2527 VAX_Float_Type'First and 'Last into references to
2528 the temporaries which store the corresponding bounds. The
2529 transformation is needed since the back end cannot evaluate
2530 'First and 'Last on VAX.
2531 (Is_VAX_Float): New routine.
2533 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2535 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2536 generic unit is not intrinsic and has an explicit convention,
2537 the instance inherits it.
2539 2011-09-02 Robert Dewar <dewar@adacore.com>
2541 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2542 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2544 2011-09-02 Thomas Quinot <quinot@adacore.com>
2546 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2547 Guard against a prefix that is an N_Has_Entity but has no
2550 2011-09-02 Yannick Moy <moy@adacore.com>
2552 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2555 2011-09-02 Yannick Moy <moy@adacore.com>
2557 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2558 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2560 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2561 procedure looking for suspicious postconditions.
2562 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2563 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2564 options -gnatw.t and -gnatw.T.
2566 2011-09-02 Pascal Obry <obry@adacore.com>
2568 * prj.adb: Minor code refactoring. Move check for null project in
2570 * projects.texi: Fix minor typos.
2572 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2574 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2575 of iteration is an expression, its value must be captured in a
2576 renaming declaration, so that modification of the elements is
2577 propagated to the original container.
2579 2011-09-02 Pascal Obry <obry@adacore.com>
2581 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2582 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2583 prj-tree.adb: Minor reformatting and style fixes.
2585 2011-09-02 Robert Dewar <dewar@adacore.com>
2587 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2588 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2589 No_Implicit_Aliasing
2590 (Analyze_Attribute, case Address): ditto
2591 (Analyze_Attribute, case Unrestricted_Access): ditto
2592 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2593 No_Implicit_Aliasing restriction.
2594 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2596 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2598 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2599 is an unchecked conversion, apply test to its expression.
2601 2011-09-02 Javier Miranda <miranda@adacore.com>
2603 * sem_ch3.adb (Check_Abstract_Overriding): When
2604 traversing the chain of aliased subprograms avoid reporting a
2605 redundant error on the current entity.
2607 2011-09-02 Sergey Rybin <rybin@adacore.com>
2609 * gnat_ugn.texi: Minor clean up.
2611 2011-09-02 Bob Duff <duff@adacore.com>
2613 * s-htable.adb (Set_If_Not_Present): Use renaming
2614 instead of ":=", because the type Key is limited in the generic (even
2615 if not in the instances).
2617 2011-09-02 Robert Dewar <dewar@adacore.com>
2619 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2620 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2623 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2625 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2626 inherited component with the enclosing derived type. Code reformatting.
2628 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2630 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2631 return done when overflow checks are enabled, since comparisons against
2632 Lor and Hir should not be done when OK1 is False.
2634 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2636 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2637 Add new formal Master_Exp. When present, add that expression to the
2638 call as an extra actual.
2639 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2640 Fmaster_Actual and in the case of a BIP call initializing a return
2641 object of an enclosing BIP function set it to a
2642 new reference to the implicit finalization master
2643 formal of the enclosing function. Fmaster_Actual is
2644 then passed to the new formal Master_Exp on the call to
2645 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2646 initializations of Enclosing_Func to its declaration.
2648 2011-09-02 Thomas Quinot <quinot@adacore.com>
2650 * csets.ads: Minor reformatting
2652 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2654 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2655 the full view of a private type coming from an instantiation.
2656 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2657 loop to iterate over the declarations rather than use the
2658 First_Entity / Next_Entity scheme.
2660 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2662 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2663 X'range (N) into X'First (N) .. X'Last (N), do not share the
2664 dimension indicator N, if present. Even though it is a static
2665 constant, its source location may be modified when printing
2666 expanded code under -gnatDL, and node sharing will lead to chaos
2667 in Sprint on large files, by generating a sloc value that does
2668 not correspond to any source file.
2670 2011-09-02 Bob Duff <duff@adacore.com>
2672 * einfo.adb: (Has_Xref_Entry): Do not call
2673 Implementation_Base_Type. Lib.Xref has been
2674 rewritten to avoid the need for it, and it was costly.
2675 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2676 functions in support of efficient xref.
2677 * lib-xref-alfa.adb: Misc changes related to Key component of
2679 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2680 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2681 no longer does. This is the one place where it is needed.
2683 2011-09-02 Johannes Kanig <kanig@adacore.com>
2685 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2686 similar interface as the other Getopt function.
2688 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2690 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2691 a call to Set_Finalize_Address if there is no allocator available.
2692 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2693 a case of allocator expansion where the allocator is not expanded but
2694 needs a custom allocate routine. Code reformatting.
2695 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2696 Ren_Obj. Code reformatting.
2697 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2698 through the use of 'reference.
2699 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2700 as part of build-in-place expansion. They are intentionally marked as
2701 coming from source, but their parents are not.
2703 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2705 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2706 is the generated subprogram declaration for a child unit body
2707 that acts as spec, use the original body in the with_clause,
2708 to prevent binding errors.
2710 2011-09-02 Vincent Celier <celier@adacore.com>
2712 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2713 qualifier /MULTI_UNIT_INDEX=
2715 2011-09-02 Johannes Kanig <kanig@adacore.com>
2717 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2718 instead of calling the callback function
2720 2011-09-02 Robert Dewar <dewar@adacore.com>
2722 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2723 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2725 2011-09-02 Vincent Celier <celier@adacore.com>
2727 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2728 explicitly declared in an extending project, do not warn if a source
2729 for an inherited naming exception is not found.
2731 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2733 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2734 expansion is inactive.
2736 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2738 * sem_util.adb (Note_Possible_Modification): If the entity
2739 being modified is the renaming generated for an Ada2012 iterator
2740 element, the enclosing container or array is modified as well.
2742 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2744 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2745 Initialize): Define and initialize the
2746 mutex attributes and condition variable attributes locally.
2748 2011-09-02 Vincent Celier <celier@adacore.com>
2750 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2751 exception replaced in an extending project.
2752 (Check_Object): No error when the other source is locally removed.
2754 2011-09-02 Yannick Moy <moy@adacore.com>
2756 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2759 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2761 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2763 * gcc-interface/Make-lang.in: Update dependencies.
2765 2011-09-01 Robert Dewar <dewar@adacore.com>
2767 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2769 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2771 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2772 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2773 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2774 specific for systems where their glibc version does not define the
2775 routines to handle dynamically allocated CPU sets.
2777 2011-09-01 Vincent Celier <celier@adacore.com>
2779 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2780 prj-env.adb: Implement inheritance of naming exceptions in extending
2783 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2785 * gnatls.adb: Display simple message instead of content of
2788 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2790 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2791 access discriminant and anonymous access component scopes.
2792 (Inherit_Component): Reuse the itype of an access discriminant
2793 or anonymous access component by copying it in order to set the proper
2794 scope. This is done only when the parent and the derived type
2795 are in different scopes.
2796 (Set_Anonymous_Etype): New routine.
2798 2011-09-01 Robert Dewar <dewar@adacore.com>
2800 * a-convec.adb: Minor reformatting throughout.
2802 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2804 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2805 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2806 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2807 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2808 CPU_SET_S respectively because we are now using dynamically allocated
2809 CPU sets which are more portable across different glibc versions.
2810 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2811 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2812 masks dynamically according to the number of processors in the target
2814 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2815 respectively, so we need to pass the size of the masks as
2817 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2818 created cpu_set_t masks
2819 with the number of processors available in the target platform,
2820 instead of static bit arrays. It enhances portability because
2821 it uses the information from the target platform.
2822 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2823 are using a restricted run-time library, use the flag
2824 Configurable_Run_Time_Mode instead of Restricted_Profile.
2826 2011-09-01 Vincent Celier <celier@adacore.com>
2828 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2829 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2831 2011-09-01 Nicolas Roche <roche@adacore.com>
2833 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2834 on VxWorks in kernel mode.
2836 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2838 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2839 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2840 directly the bit array.
2841 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2842 the linux macros with the same name.
2843 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2844 wrappers around the CPU_ZERO and CPU_SET linux macros.
2846 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2848 * exp_ch7.adb (Find_Insertion_List): Removed.
2849 (Process_Transient_Objects): Insert the declarations of the hook
2850 access type and the hook object before the associated transient object.
2852 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2854 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2855 package System.Aux_Dec when using restricted run-time libraries which
2856 do not have this package.
2858 2011-09-01 Tristan Gingold <gingold@adacore.com>
2860 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2862 2011-09-01 Bob Duff <duff@adacore.com>
2864 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2865 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2867 2011-09-01 Thomas Quinot <quinot@adacore.com>
2869 * exp_ch5.adb: Minor reformatting
2870 * gnat_ugn.texi: Fix minor typos.
2871 * gcc-interface/Make-lang.in: Update dependencies.
2873 2011-09-01 Robert Dewar <dewar@adacore.com>
2875 * inline.adb, sem_aggr.adb: Minor reformatting.
2877 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2879 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2881 2011-09-01 Robert Dewar <dewar@adacore.com>
2883 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2885 2011-09-01 Bob Duff <duff@adacore.com>
2887 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2888 body" the same as "in inlined body", because visibility shouldn't
2891 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2893 * inline.adb (Add_Inlined_Body): Refine previous change.
2895 2011-09-01 Gary Dismukes <dismukes@adacore.com>
2897 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2898 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2899 Test for case where call
2900 initializes an object of a return statement before testing for
2901 a constrained call, to ensure that all such cases get handled
2902 by simply passing on the caller's parameters. Also, in that
2903 case call Needs_BIP_Alloc_Form to determine whether to pass on
2904 the BIP_Alloc_Form parameter of the enclosing function rather
2905 than testing Is_Constrained. Add similar tests for the return
2906 of a BIP call to later processing to ensure consistent handling.
2907 (Needs_BIP_Alloc_Form): New utility function.
2908 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2909 a BIP_Alloc_Form formal with call to new utility function
2910 Needs_BIP_Alloc_Form.
2912 2011-09-01 Pascal Obry <obry@adacore.com>
2914 * prj-part.adb: Minor reformatting.
2916 2011-09-01 Vincent Celier <celier@adacore.com>
2918 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2919 half character in the unit name.
2921 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2923 * exp_ch4.adb: Minor code and comment reformatting.
2925 2011-09-01 Thomas Quinot <quinot@adacore.com>
2927 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2928 for Is_Limited_Type and Is_Tagged_Type in condition checking
2929 for by-reference type.
2930 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2931 subprograms may have a completion because of a previous
2932 Inline_Always clause, but the enclosing package must be marked
2933 inlined for the subprogram body to become visible to the backend.
2935 2011-09-01 Thomas Quinot <quinot@adacore.com>
2937 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2939 2011-09-01 Pascal Obry <obry@adacore.com>
2941 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2943 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2945 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2946 the formals of a subprogram stub that acts as a spec.
2948 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2950 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2951 type, declare a renaming for it, not an object declaration.
2953 2011-09-01 Yannick Moy <moy@adacore.com>
2955 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2956 Ignore_Errors to ignore failures to read ALI files when True.
2958 2011-09-01 Javier Miranda <miranda@adacore.com>
2960 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2961 constructor calls associated with non-tagged record types.
2963 2011-09-01 Robert Dewar <dewar@adacore.com>
2965 * g-socthi-vms.adb: Minor reformatting.
2967 2011-09-01 Nicolas Roche <roche@adacore.com>
2969 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2970 in order to avoid impact of imcompatible changes.
2971 * cstreams.c: Likewise
2973 * aux-io.c: Likewise
2975 2011-09-01 Yannick Moy <moy@adacore.com>
2977 * lib-writ.adb (Write_With_Lines): Always output complete information
2978 on "with" line in Alfa mode, as this is required by formal verification
2981 2011-09-01 Tristan Gingold <gingold@adacore.com>
2983 * g-socthi-vms.adb: Add comments.
2985 2011-09-01 Pascal Obry <obry@adacore.com>
2987 * prj.ads: Minor reformatting.
2989 2011-09-01 Vincent Celier <celier@adacore.com>
2991 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2992 exceptions in the config pragmas file.
2994 2011-09-01 Tristan Gingold <gingold@adacore.com>
2996 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2998 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3000 * exp_ch7.adb (Find_Insertion_List): New routine.
3001 (Process_Transient_Objects): Add code to handle the abnormal
3002 finalization of a controlled transient associated with a subprogram
3003 call. Since transients are cleaned up right after the associated
3004 context, an exception raised during a subprogram call may bypass the
3007 2011-09-01 Robert Dewar <dewar@adacore.com>
3009 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3012 2011-09-01 Robert Dewar <dewar@adacore.com>
3014 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3016 2011-09-01 Robert Dewar <dewar@adacore.com>
3018 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3020 2011-09-01 Thomas Quinot <quinot@adacore.com>
3022 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3023 GNATRTL_NONTASKING_OBJS.
3025 2011-09-01 Robert Dewar <dewar@adacore.com>
3027 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3028 possibility of this flag being set for formals in Ada 2012 mode.
3029 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3031 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3033 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3035 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3038 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3040 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3041 insertion node in a tree of nested Expression_With_Actions nodes.
3042 (Process_Transient_Object): In the case where a complex if statement
3043 has been converted into nested Expression_With_Actions nodes, the
3044 "hook" object and the associated access type must be inserted before
3045 the top most Expression_With_Actions.
3047 2011-09-01 Robert Dewar <dewar@adacore.com>
3049 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3050 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3052 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3054 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3056 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3058 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3060 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3061 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3062 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3063 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3064 Dispatching_Domains_Frozen): Move this local data to package
3065 System.Tasking because with the CPU aspect we need to have access
3066 to this data when creating the task in System.Tasking.Stages.Create_Task
3067 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3068 Move these variables from the body of
3069 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3070 we need to have access to this data when creating the task in
3071 System.Tasking.Stages.Create_Task.
3072 * s-taskin.adb (Initialize): Signal the allocation of the environment
3073 task to a CPU, if any, so that we know whether the CPU can be
3074 transferred to a different dispatching domain.
3075 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3076 is being allocated belongs to the dispatching domain where the task
3077 lives. Signal the allocation of the task to a CPU, if any, so that we
3078 know whether the CPU can be transferred to a different dispatching
3081 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3083 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3084 attributes Same_Storage and Overlaps_Storage.
3086 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3088 * exp_strm.adb: Remove with and use clause for Opt.
3089 (Build_Array_Input_Function): Remove the version-dependent generation
3090 of the return statement. The Ada 2005 tree is now the default.
3092 2011-09-01 Yannick Moy <moy@adacore.com>
3094 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3095 it is never empty when compiling in Alfa mode.
3097 2011-09-01 Robert Dewar <dewar@adacore.com>
3099 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3100 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3101 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3102 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3104 2011-09-01 Matthew Heaney <heaney@adacore.com>
3106 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3107 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3108 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3109 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3110 unbounded queue container.
3111 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3112 bounded queue container.
3113 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3114 unbounded priority queue container.
3115 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3116 bounded priority queue container.
3118 2011-08-31 Pascal Obry <obry@adacore.com>
3120 * a-direct.adb: Do not try to create an UNC path on Windows.
3121 (Create_Path): Skip leading computer name in UNC path if any.
3123 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3125 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3126 version-dependent generation of the return statement. The Ada 2005 tree
3129 2011-08-31 Thomas Quinot <quinot@adacore.com>
3131 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3132 types Stream_Element_Offset and Storage_Offset have a different native
3133 type depending on whether the platform is 32 or 64 bits. When
3134 exchanging them, always convert to 64 bits.
3136 2011-08-31 Yannick Moy <moy@adacore.com>
3138 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3139 --force-alfa to gnat2why.
3141 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3143 * sem_ch12.adb (Save_References): If the node has aspects, save
3144 references within the corresponding expressions in a separate step,
3145 because the aspects are not directly in the tree for the declaration
3146 to which they belong.
3148 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3150 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3151 in CodePeer mode, since representation clauses are partially ignored.
3152 * gcc-interface/Make-lang.in: Update dependencies.
3154 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3156 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3157 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3158 to any dispatching domain.
3160 2011-08-31 Thomas Quinot <quinot@adacore.com>
3162 * exp_ch4.adb: Minor reformatting.
3164 2011-08-31 Bob Duff <duff@adacore.com>
3166 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3167 on nodes for which it is not defined.
3168 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3171 2011-08-31 Bob Duff <duff@adacore.com>
3173 * sem_ch3.adb (Process_Full_View): Disable legality check if
3174 In_Instance, to avoid spurious errors.
3175 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3176 if In_Instance, to avoid spurious errors.
3178 2011-08-31 Pascal Obry <obry@adacore.com>
3180 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3181 directory speparators.
3182 (Compose): Use Dir_Seps to handle both forms.
3183 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3185 (Extension): Use Dir_Seps to handle both forms.
3187 2011-08-31 Pascal Obry <obry@adacore.com>
3189 * prj-conf.adb: Minor reformatting.
3191 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3193 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3194 dispatching domain aspect.
3195 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3197 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3198 Dispatching_Domain aspect in a similar way as we do for the Priority
3200 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3201 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3203 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3204 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3205 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3206 Dispatching_Domain and add it to the task definition.
3207 (Sig_Flags): Add Pragma_Dispatching_Domain.
3208 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3209 support to find the types Dispatching_Domain and
3210 Dispatching_Domain_Access.
3211 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3212 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3213 query the availability of a pragma Dispatching_Domain.
3214 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3215 the expander to pass the Dispatching_Domain when creating a task.
3216 (Name_Dispatching_Domain): Add this new name for a pragma.
3217 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3218 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3219 task has been allocated at creation time.
3220 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3221 Ravenscar is always null.
3222 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3223 the task has been allocated at creation time.
3224 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3225 a specific dispatching domain.
3226 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3227 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3228 and CPU are specified for the task, and the CPU value is not contained
3229 within the range of processors for the domain.
3231 2011-08-31 Vincent Celier <celier@adacore.com>
3233 * make.adb (Original_Gcc) : New constant String_Access.
3234 (Gnatmake): For VM targets, do not use VM version of the compiler if
3235 --GCC= has been specified.
3237 2011-08-31 Thomas Quinot <quinot@adacore.com>
3239 * sem_ch5.adb: Minor reformatting.
3241 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3243 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3246 2011-08-31 Bob Duff <duff@adacore.com>
3248 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3249 the access type is private; we don't care about privacy in expansion.
3251 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3253 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3254 subcomponents tnat may be limited, because they originate in view
3255 conflicts. If the original aggregate is legal and the actuals are
3256 legal, the aggregate itself is legal.
3258 2011-08-31 Matthew Heaney <heaney@adacore.com>
3260 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3263 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3265 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3268 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3270 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3271 Interrupt_Priority aspects, force the analysis of the aspect expression
3272 (when building the equivalent pragma). Otherwise, its analysis is done
3273 too late, after the task or protected object has been created.
3274 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3275 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3276 to the object declaration because they are needed in the type
3279 2011-08-31 Robert Dewar <dewar@adacore.com>
3281 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3282 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3285 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3287 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3288 if the corresponding type is malformed due to restriction violations.
3290 2011-08-31 Robert Dewar <dewar@adacore.com>
3292 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3294 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3296 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3297 would cause the generation of Set_Finalize_Address if the target is a
3298 VM and the designated type is not derived from [Limited_]Controlled.
3300 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3302 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3304 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3305 case of a compilation error.
3307 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3309 * init.c (__gnat_error_handler): Standardize the stack overflow or
3310 erroneous memory access message.
3311 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3312 or erroneous memory access message.
3314 2011-08-31 Robert Dewar <dewar@adacore.com>
3316 * sem_ch4.adb: Minor reformatting.
3317 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3319 2011-08-31 Thomas Quinot <quinot@adacore.com>
3321 * scos.ads: Minor documentation clarification.
3322 * put_scos.adb: Do not generate SCO unit header line for a unit that
3325 2011-08-31 Robert Dewar <dewar@adacore.com>
3327 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3329 2011-08-31 Tristan Gingold <gingold@adacore.com>
3331 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3332 hold variables between these following subprograms.
3333 (Build_Exception_Handler, Build_Object_Declarations,
3334 Build_Raise_Statement): Use the above type as parameter.
3335 Make the above adjustments.
3336 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3338 2011-08-31 Pascal Obry <obry@adacore.com>
3340 * projects.texi: Minor reformatting.
3342 2011-08-31 Tristan Gingold <gingold@adacore.com>
3344 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3345 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3347 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3349 * exp_ch5.adb: Minor code cleanup.
3350 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3351 prevent cascaded errors.
3352 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3353 variable of an iterator specification in current scope.
3354 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3355 postconditions on the stack, as they contain no return statements.
3357 2011-08-31 Yannick Moy <moy@adacore.com>
3359 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3360 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3361 call Qualify_Entity_Names.
3362 (Expand_Alfa): call Qualify_Entity_Names in more cases
3363 * lib-xref-alfa.adb: Take into account system package.
3364 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3365 CodePeer mode in which we are interested in finding bugs even if
3366 compiler cannot compile source.
3367 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3370 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3372 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3373 denoted by the subtype mark to ensure getting the concurrent type in
3374 the case where the subtype mark denotes a private subtype of a
3375 concurrent type (needed when using -gnatc).
3376 (Process_Subtype): For the processing specific to type kinds, case on
3377 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3378 subtype denotes a private subtype whose base type is nonprivate (needed
3379 for subtypes of private fulfilled by task types when compiling with
3382 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3384 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3385 late primitives that override interface operations when the full
3386 expander is not active, to avoid blowups in Register_Primitive when
3387 types don't have associated secondary dispatch tables.
3389 2011-08-31 Yannick Moy <moy@adacore.com>
3391 * alfa_test.adb: Code clean up.
3393 2011-08-31 Marc Sango <sango@adacore.com>
3395 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3396 by Comes_From_Source (Original_Node (N)) in order to treat also the
3397 nodes which have been rewritten.
3398 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3399 explicit dereference and slice violation in spark mode on the nodes
3400 coming only from the source code.
3402 2011-08-31 Robert Dewar <dewar@adacore.com>
3404 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3405 lib-xref-alfa.adb: Minor reformatting.
3407 2011-08-31 Matthew Heaney <heaney@adacore.com>
3409 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3411 2011-08-31 Javier Miranda <miranda@adacore.com>
3413 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3414 only for class-wide subprograms conflicting with entities of concurrent
3417 2011-08-31 Matthew Heaney <heaney@adacore.com>
3419 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3422 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3424 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3425 general description of the routine.
3427 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3429 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3430 doubly-linked lists.
3432 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3434 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3435 check is needed for a left-hand side that is a dereference, and the
3436 base type is private without discriminants (whereas the full type does
3437 have discriminants), an extra retrieval of the underlying type may be
3438 needed in the case where the subtype is a record subtype whose base
3439 type is private. Update comments.
3441 2011-08-31 Javier Miranda <miranda@adacore.com>
3443 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3444 found check if there is a class-wide subprogram covering the primitive.
3446 2011-08-31 Yannick Moy <moy@adacore.com>
3448 * sem_res.adb: Further cases where full expansion test is needed,
3449 rather than expansion test.
3451 2011-08-31 Pascal Obry <obry@adacore.com>
3453 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3455 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3457 * exp_ch5.adb: Handle iterators over derived container types.
3459 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3461 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3462 (Has_Anonymous_Master): New routine.
3463 (Set_Has_Anonymous_Master): New routine.
3464 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3465 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3466 (Current_Anonymous_Master): New routine.
3467 (Current_Unit_First_Declaration): Removed.
3468 (Current_Unit_Scope): Removed.
3469 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3470 their objects on a per-unit heterogeneous finalization master.
3472 2011-08-31 Matthew Heaney <heaney@adacore.com>
3474 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3477 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3479 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3482 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3484 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3485 where the actual is an unexpanded call to 'Input.
3487 2011-08-31 Yannick Moy <moy@adacore.com>
3489 * sem_ch4.adb: Code clean up.
3491 2011-08-31 Yannick Moy <moy@adacore.com>
3493 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3495 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3497 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3498 and TSS primitive Finalize_Address if finalization is suppressed.
3499 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3500 primitive Finalize_Address if finalization is suppressed.
3502 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3504 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3505 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3506 sure that the underlying task has already been created before trying
3507 to change its affinity.
3508 (Set_CPU): Use the term processor instead of CPU, as we do in
3511 2011-08-31 Vincent Celier <celier@adacore.com>
3513 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3514 * prj-nmsc.adb (Process_Compiler): Process attribute
3515 Source_File_Switches.
3516 * prj.ads (Language_Config): New name list component
3517 Name_Source_File_Switches.
3518 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3520 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3522 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3523 discriminated component of an actual, expand at once to prevent
3524 ouf-of-order references with generated subtypes.
3526 2011-08-31 Yannick Moy <moy@adacore.com>
3528 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3529 reference to operator in Alfa xrefs.
3531 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3533 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3534 where the parent instance was frozen before the current instance due to
3535 the presence of a source body. Update calls to Insert_After_Last_Decl.
3536 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3537 Update the comment which illustrates the purpose of the routine.
3538 Package instances are now frozen by source bodies which appear after
3539 the instance. This ensures that entities coming from within the
3540 instance are available for use in the said bodies.
3541 (Install_Body): Add code to handle the case where the parent instance
3542 was frozen before the current instance due to the presence of a source
3543 body. Update calls to Insert_After_Last_Decl.
3545 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3547 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3549 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3551 2011-08-31 Yannick Moy <moy@adacore.com>
3553 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3555 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3556 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3557 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3558 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3559 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3560 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3561 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3562 ALFA in Alfa (we dropped acronym).
3563 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3564 operations in a case where it returned previously No_Elist.
3566 2011-08-31 Robert Dewar <dewar@adacore.com>
3568 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3569 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3570 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3571 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3572 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3573 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3576 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3578 * sem_ch12 (Check_Private_View): Revert previous change.
3579 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3580 conversion is in a generic instance.
3582 2011-08-31 Matthew Heaney <heaney@adacore.com>
3584 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3585 * a-chtgbo.adb (Free): Allow 0 as index value.
3587 2011-08-31 Matthew Heaney <heaney@adacore.com>
3589 * a-cborma.adb (Insert): Add comment to explain why no element
3592 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3594 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3595 spec discriminant is already a concurrent type, in which case just use
3596 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3598 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3600 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3601 system-linux-mips.ads, system-linux-mipsel.ads,
3602 system-linux-mips64el.ads, system-linux-ppc64.ads,
3603 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3605 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3607 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3608 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3609 (build_unary_op): Likewise.
3611 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3613 * raise-gcc.c: Do not include coretypes.h and tm.h.
3614 (setup_to_install): Remove test for compiler macro.
3615 * targext.c: Document use for the library.
3616 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3618 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3620 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3621 the expression to the nominal type if the latter is a record type with
3622 a variant part and the type of the former is a record type without one.
3624 2011-08-30 Yannick Moy <moy@adacore.com>
3626 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3627 expansion in Alfa mode.
3628 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3629 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3631 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3632 * sem_res.adb: Ditto.
3633 * gcc-interface/Make-lang.in: Update dependencies.
3635 2011-08-30 Thomas Quinot <quinot@adacore.com>
3637 * g-socket.ads: Minor documentation adjustment.
3639 2011-08-30 Robert Dewar <dewar@adacore.com>
3641 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3643 2011-08-30 Yannick Moy <moy@adacore.com>
3645 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3646 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3647 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3648 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3649 Revert change which introduced files for "light"
3650 expansion, to be replaced by a single file for Alfa expansion.
3652 2011-08-30 Robert Dewar <dewar@adacore.com>
3654 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3655 Minor code reorg/reformatting.
3657 2011-08-30 Yannick Moy <moy@adacore.com>
3659 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3660 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3661 used for testing full expansion, that is active expansion not in the
3662 reduced mode for Alfa
3663 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3664 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3665 of the verbose (Expander_Active and not ALFA_Mode)
3667 2011-08-30 Tristan Gingold <gingold@adacore.com>
3669 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3670 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3671 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3672 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3674 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3676 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3677 access conversions to check that the conversion is a rewritten node,
3678 rather than just having Comes_From_Source set to False, which wasn't
3681 2011-08-30 Robert Dewar <dewar@adacore.com>
3683 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3684 g-socket.ads: Minor reformatting.
3686 2011-08-30 Thomas Quinot <quinot@adacore.com>
3688 * sem_util.adb: Minor reformatting.
3690 2011-08-30 Tristan Gingold <gingold@adacore.com>
3692 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3693 to be compliant with the ABI.
3695 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3697 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3698 of a designated type when the related access type is an actual in an
3699 instance. This ensures that the full view of designated type is
3700 available when inside the body of the instance.
3702 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3704 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3705 in a position to be modified, a slice is treated like an indexed
3708 2011-08-30 Thomas Quinot <quinot@adacore.com>
3710 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3711 field tv_sec in struct timeval.
3713 2011-08-30 Yannick Moy <moy@adacore.com>
3715 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3716 blocks of code doing full expansion, previously only guarded by
3717 Expander_Active, by anding the test that ALFA_Mode is not set
3719 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3721 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3722 add the function to the list of private dependents, for subsequent
3723 legality check on Taft amendment types.
3724 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3725 Private_Dependents, as for other incomplete types.
3726 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3727 Taft-amendment type is used as the return type of a function.
3729 2011-08-30 Javier Miranda <miranda@adacore.com>
3731 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3732 which emits an error by a call to a new routine which report the error.
3733 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3734 entity does not cover an existing interface.
3735 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3737 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3738 protected procedures or entries whose mode is not conformant.
3739 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3740 an error by a call to a new routine which report the error.
3742 2011-08-30 Robert Dewar <dewar@adacore.com>
3744 * gnat_rm.texi: Minor change.
3745 * exp_attr_light.adb: Minor reformatting.
3747 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3749 * sem_ch3.adb: Patch inheritance of aspects in
3750 Complete_Private_Subtype, to avoid infinite loop.
3752 2011-08-30 Javier Miranda <miranda@adacore.com>
3754 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3755 been reported and a subprogram covering an interface primitive is not
3756 found then skip generating the internal entity. Done to avoid crashing
3758 (Check_Abstract_Overriding): Change text of error of wrong formal of
3759 protected subprogram or entry. Done for consistency to emit exactly the
3760 same error reported by Check_Synchronized_Overriding. In addition, the
3761 error is restricted to protected types (bug found working on AI05-0090)
3763 2011-08-30 Yannick Moy <moy@adacore.com>
3765 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3766 expansion in Alfa mode.
3767 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3768 * exp_light.adb, exp_light.ads: New package defining light expansion.
3769 * expander.adb (Expand): Call light expansion in Alfa mode
3770 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3772 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3774 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3775 * gnat1drv.adb (Adjust_Global_Switches): Comment
3777 2011-08-30 Yannick Moy <moy@adacore.com>
3779 * lib-xref-alfa.adb: Minor refactoring.
3781 2011-08-30 Yannick Moy <moy@adacore.com>
3783 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3785 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3786 expansion in Alfa mode.
3787 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3790 2011-08-30 Robert Dewar <dewar@adacore.com>
3792 * debug_a.adb: Update comment.
3794 2011-08-30 Robert Dewar <dewar@adacore.com>
3796 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3797 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3798 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3799 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3801 2011-08-30 Robert Dewar <dewar@adacore.com>
3803 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3806 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3808 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3809 Build_Finalization_Master by supplying an insertion node and enclosing
3810 scope. In its old version, the call did not generate a finalization
3812 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3813 recognize anonymous access-to-controlled components. Rewrite the
3814 machinery which creates finalization masters to service anonymous
3815 access-to-controlled components of a record type. In its current state,
3816 only one heterogeneous master is necessary to handle multiple anonymous
3818 (Freeze_Type): Comment reformatting.
3819 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3821 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3822 associates TSS primitive Finalize_Address with either the master itself
3823 or with the internal hash table depending on the mode of operation of
3826 2011-08-30 Javier Miranda <miranda@adacore.com>
3828 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3829 interface type then do not generate code to compare this component.
3830 Required since they have no components and their equality operator is
3833 2011-08-30 Steve Baird <baird@adacore.com>
3835 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3836 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3837 returns the (static) accessibility level of the object. Otherwise, the
3838 same as Type_Access_Level.
3839 (Dynamic_Accessibility_Level): New function; given an expression which
3840 could occur as the rhs of an assignment to a saooaaat (i.e., an
3841 expression of an access-to-object type), return the new value for the
3842 saooaaat's associated Extra_Accessibility object.
3843 (Effective_Extra_Accessibility): New function; same as
3844 Einfo.Extra_Accessibility except that object renames are looked through.
3846 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3847 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3849 (Effective_Extra_Accessibility): New function; see sem_util.ads
3851 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3852 (Extra_Accessibility): Update comments.
3853 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3854 except RM_Size field (which is only for types) is unaffected.
3856 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3857 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3859 (Init_Size): Add assertion that we are not trashing the
3860 Extra_Accessibility attribute of an object.
3861 (Init_Size_Align): Add assertion that we are not trashing the
3862 Extra_Accessibility attribute of an object.
3863 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3864 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3865 differently for the type of a (non-library-level) saooaaat depending
3866 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3867 is queried in this set of changes - everything else (in particular,
3868 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3869 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3870 The special treatment of library-level saooaaats is an optimization,
3871 not required for correctnesss. This is based on the observation that the
3872 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3873 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3875 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3876 false for the type of a saooaaat, declare and initialize its
3877 accessibility level object and set the Extra_Accessibility attribute
3878 of the saooaaat to refer to this object.
3879 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3880 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3881 calls to Effective_Extra_Accessibility in order to support
3882 renames of saooaaats.
3883 (Expand_N_Type_Conversion): Add new local function,
3884 Has_Extra_Accessibility, and call it when determining whether an
3885 accessibility check is needed.
3886 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3887 evaluate to True (without raising an exception).
3889 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3890 saooaaat, update its associated Extra_Accessibility object (if
3891 it has one). This includes an accessibility check.
3892 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3893 a saooaaat, update its Extra_Accessibility object too (if it
3895 (Expand_Call): Replace a couple of calls to Type_Access_Level
3896 with calls to Dynamic_Access_Level to handle cases where
3897 passing a literal (any literal) is incorrect.
3898 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3899 checks associated with "Saooaat := Some_Object'Access;"; this must
3900 be rejected if Some_Object is declared in a more nested scope
3902 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3903 assignment to a saooaaat even if Is_Local_Anonymous_Access
3904 returns False for its type (indicating a 2012-style saooaaat).
3906 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3907 (which is only appropriate for objects, not types) with a call
3908 of Init_Object_Size_Align in order to avoid trashing the
3909 Extra_Accessibility attribute of a rename (the two attributes
3912 (Valid_Conversion) Replace six calls to Type_Access_Level with
3913 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3914 Ada2012 non-library-level saooaaat, the former returns library level
3915 while the latter returns the (static) accessibility level of the
3916 saooaaat. A type conversion to the anonymous type of a saooaaat
3917 can only occur as part of an assignment to the saooaaat, so we
3918 know that such a conversion must be in a lhs context, so Deepest
3919 yields the result that we need. If such a conversion could occur,
3920 say, as the operand of an equality operator, then this might not
3921 be right. Also add a test so that static accessibilty checks are
3922 performed for converting to a saooaaat's type even if
3923 Is_Local_Anonymous_Access yields False for the type.
3925 2011-08-30 Javier Miranda <miranda@adacore.com>
3927 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3928 controls generation of a warning associated with late declaration of
3929 dispatching functions. Required to avoid generating spurious
3932 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3934 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3935 return object has an anonymous access type and the function's type is
3936 a named access type.
3937 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3938 conversions on implicit conversions, since such conversions can occur
3939 for anonymous access cases due to expansion. Issue error for attempt
3940 to rename an anonymous expression as an object of a named access type.
3941 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3942 to indicate whether this function should report errors on invalid
3944 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3945 the expression is of an anonymous access type and the expected type is
3946 a named general access type, rewrite the expression as a type
3947 conversion, unless this is an expression of a membership test.
3948 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3949 calling of Error_Msg_N on new formal Report_Errs.
3950 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3951 calling of Error_Msg_NE on new formal Report_Errs.
3952 (Valid_Conversion): Move declaration of this function to the package
3953 spec, to allow calls from membership test processing. For Ada 2012,
3954 enforce legality restrictions on implicit conversions of anonymous
3955 access values to general access types, disallowing such conversions in
3956 cases where the expression has a dynamic accessibility level (access
3957 parameters, stand-alone anonymous access objects, or a component of a
3958 dereference of one of the first two cases).
3959 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3960 in the context of a named general access expected type.
3961 * exp_ch4.adb Add with and use of Exp_Ch2.
3962 (Expand_N_In): Add processing for membership tests applied to
3963 expressions of an anonymous access type. First, Valid_Conversion is
3964 called to check whether the test is statically False, and then the
3965 conversion is expanded to test that the expression's accessibility
3966 level is no deeper than that of the tested type. In the case of
3967 anonymous access-to-tagged types, a tagged membership test is applied
3969 (Tagged_Membership): Extend to handle access type cases, applying the
3970 test to the designated types.
3971 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3972 accessibility level, and the actual is a 'Access applied to a current
3973 instance, pass the accessibility level of the type of the current
3974 instance rather than applying Object_Access_Level to the prefix. Add a
3975 ??? comment, since this level isn't quite right either (will eventually
3976 need to pass an implicit level parameter to init procs).
3978 2011-08-30 Bob Duff <duff@adacore.com>
3980 * s-taskin.ads: Minor comment fix.
3982 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3984 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3985 component and the selector is a dispatching operation, check if it is
3986 a prefixed call before rewriting as a parameterless function call.
3988 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3990 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3991 tsystem.h into $(RTSDIR) instead of rts.
3993 2011-08-29 Robert Dewar <dewar@adacore.com>
3995 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3997 * gcc-interface/Make-lang.in: Update dependencies.
3999 2011-08-29 Yannick Moy <moy@adacore.com>
4001 * alfa.ads (Name_Of_Heap_Variable): New constant name.
4002 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4003 table to hold dereferences.
4004 (Add_ALFA_Xrefs): Take into account dereferences as special
4005 reads/writes to the variable "HEAP".
4006 (Enclosing_Subprogram_Or_Package): Move subprogram here.
4007 (Generate_Dereference): New procedure to store a read/write dereferencew
4009 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4010 the special "HEAP" var.
4011 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4013 * sem_util.adb (Note_Possible_Modification): Store write dereference
4016 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4018 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4019 ensures that the level of the subpool access type is not deeper than
4020 that of the pool object.
4021 * sem_util.adb (Object_Access_Level): Expand to handle defining
4023 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4024 subpool handle name of a rewritten allocator.
4026 2011-08-29 Robert Dewar <dewar@adacore.com>
4028 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4030 2011-08-29 Thomas Quinot <quinot@adacore.com>
4032 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4033 values, we generate multiple triples of parameters in the TypeCode.
4034 Bump Choice_Index for each such triple so that a subsequent default
4035 choice is associated with the correct index in the typecode.
4037 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4039 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4041 (First, Last): Handle properly an iterator over a null container.
4043 2011-08-29 Bob Duff <duff@adacore.com>
4045 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4046 processing if we run across a node with no Scope. This can happen if
4047 we're with-ing an library-level instance, and that instance got errors
4048 that caused "instantiation abandoned".
4049 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4050 an exception instead of using Assert, so it won't go into an infinite
4051 loop, even when assertions are turned off.
4053 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4055 * a-coorse.adb: Proper handling of empty ordered sets.
4057 2011-08-29 Johannes Kanig <kanig@adacore.com>
4059 * debug.adb: Add comments.
4061 2011-08-29 Thomas Quinot <quinot@adacore.com>
4063 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4066 2011-08-29 Yannick Moy <moy@adacore.com>
4068 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4069 declaration for Itypes in Alfa mode.
4071 2011-08-29 Robert Dewar <dewar@adacore.com>
4073 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4074 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4075 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4078 2011-08-29 Tristan Gingold <gingold@adacore.com>
4080 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4082 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4083 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4086 2011-08-29 Robert Dewar <dewar@adacore.com>
4088 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4090 2011-08-29 Javier Miranda <miranda@adacore.com>
4092 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4093 renamings of formal subprograms when the actual for a formal type is
4096 2011-08-29 Matthew Heaney <heaney@adacore.com>
4098 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4101 2011-08-29 Matthew Heaney <heaney@adacore.com>
4103 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4104 components of record type.
4105 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4108 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4110 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4111 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4114 2011-08-29 Robert Dewar <dewar@adacore.com>
4116 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4119 2011-08-29 Matthew Heaney <heaney@adacore.com>
4121 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4122 components of record type.
4124 2011-08-29 Bob Duff <duff@adacore.com>
4126 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4127 by the termination handler.
4129 2011-08-29 Yannick Moy <moy@adacore.com>
4131 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4132 created in Alfa mode, instead of inserting artificial declarations of
4133 non-Itypes in the tree.
4134 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4135 know if an Itype has a corresponding declaration, as defined in
4138 2011-08-29 Yannick Moy <moy@adacore.com>
4140 * gnat1drv.adb: Minor rewrite.
4142 2011-08-29 Bob Duff <duff@adacore.com>
4144 * s-tasuti.adb (Make_Passive): Work around race condition in
4145 Make_Independent, which can cause Wait_Count to be zero. So instead of
4146 asserting that Wait_Count > 0, and then decrementing it, decrement it
4147 only if Wait_Count > 0.
4148 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4149 should be nonnegative, so declare them Natural instead of Integer.
4151 2011-08-29 Robert Dewar <dewar@adacore.com>
4153 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4154 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4155 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4156 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4157 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4159 2011-08-29 Tristan Gingold <gingold@adacore.com>
4161 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4163 2011-08-29 Vadim Godunko <godunko@adacore.com>
4165 * s-parint.ads: Minor comment clarification.
4167 2011-08-29 Vincent Celier <celier@adacore.com>
4169 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4170 may be used as identifiers.
4172 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4174 * a-coinho.ads: Minor reformating.
4176 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4178 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4179 container of a derived type.
4181 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4183 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4184 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4186 2011-08-29 Pascal Obry <obry@adacore.com>
4188 * exp_disp.adb: Minor comment fix.
4189 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4190 to avoid warnings when compiling with -Wall.
4191 (Make_Disp_Conditional_Select_Body): Likewise.
4192 (Make_Disp_Timed_Select_Body): Likewise.
4194 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4196 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4197 an entity name, generate reference for it.
4199 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4201 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4203 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4204 the class-wide type.
4205 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4207 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4209 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4210 subtype for an object whose type is an unconstrained union.
4212 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4214 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4215 is allowed in a component definition, by AI95-406.
4217 2011-08-29 Matthew Heaney <heaney@adacore.com>
4219 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4221 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4223 * a-except-2005.adb: Alphabetize all routines.
4224 (Triggered_By_Abort): New routine.
4225 * a-except-2005.ads (Triggered_By_Abort): New routine.
4226 * a-except.adb Alphabetize all routines.
4227 (Triggered_By_Abort): New routine.
4228 * a-except.ads (Triggered_By_Abort): New routine.
4229 * exp_ch7.adb: Update all comments involving the detection of aborts in
4231 (Build_Object_Declarations): Do not generate code to detect the
4232 presence of an abort at the start of finalization code, use a runtime
4234 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4236 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4237 allocate a task on a subpool.
4238 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4239 The flag disables all actions related to the maintenance of
4240 Finalize_Address_Table when subpools are not in use.
4241 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4243 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4244 performs costly task locking when subpools are not in use.
4246 2011-08-29 Yannick Moy <moy@adacore.com>
4248 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4249 types and dispatching calls in Alfa mode.
4250 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4251 correspondance between body and spec scopes, to reuse utility functions
4252 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4253 by testing the presence of the library unit for the body
4254 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4255 mode the expansion of accept statements is skipped
4256 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4257 the unique entity corresponding to the one returned by
4258 Unique_Defining_Entity applied to the enclosing declaration of the
4261 2011-08-29 Bob Duff <duff@adacore.com>
4263 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4264 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4265 an alias for pn. ppp is an alias for pt.
4267 2011-08-29 Javier Miranda <miranda@adacore.com>
4269 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4270 aggregate to take a consistent decision on the need to convert into
4271 assignments aggregates that initialize constant objects.
4273 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4275 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4276 Build_Allocate_Deallocate_Proc in order to handle allocation of
4277 non-controlled objects on subpools.
4278 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4279 to be end-user visible.
4280 * s-finmas.adb: Add with and use clause for System.HTable.
4281 Add an instantiation of Simple_HTable which provides a mapping between
4282 the address of a controlled object and the corresponding
4283 Finalize_Address used to clean up the object. The table is used when a
4284 master is operating in heterogeneous mode.
4285 (Attach): Explain why the input node is not verified on being already
4287 (Delete_Finalize_Address): New routine.
4288 (Detach): Add pragma Assert which ensures that a node is already
4290 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4291 since nodes are no longer removed on traversal. Explain why node
4292 detachment is undesirable in this case.
4293 (Get_Finalize_Address): New routine.
4294 (Hash): New routine.
4295 (Is_Empty_List): Removed.
4296 (pm): Renamed to Print_Master. Add output for discriminant
4298 Comment reformatting.
4299 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4300 * s-finmas.ads: Various comments additions / improvements.
4301 Type Finalization_Master has a discriminant which determines the mode of
4303 (Delete_Finalize_Address): New routine.
4304 (Get_Finalize_Address): New routine.
4305 (pm): Renamed to Print_Master.
4306 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4307 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4308 use clause for System.IO.
4309 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4310 Finalize_Address depending on the mode of allocation and the mode of
4312 (Deallocate_Any_Controlled): Remove the relation pair object -
4313 Finalize_Address regardless of the master mode. Add comment explaining
4315 (Detach): Ensure that fields Prev and Next are null after detachment.
4316 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4317 scheme to check whether the list of subpools is empty. There is no
4318 longer need to store the next subpool or advance the current pointer.
4319 (Is_Empty_List): New routine.
4320 (Print_Pool): New routine.
4321 (Print_Subpool): New routine.
4322 * s-stposu.ads: Various comments additions / improvements.
4323 Field Master of type Root_Subpool is now a heterogeneous collection.
4324 (Print_Pool): New routine.
4325 (Print_Subpool): New routine.
4327 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4329 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4330 forms, using aspects of container types.
4331 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4332 Has_Implicit_Dereference flags, that may be set on the partial view.
4333 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4334 container type with an indexing aspect.
4335 (Analyze_Quantified_Expression): Analyze construct with expansion
4336 disabled, because it will be rewritten as a loop during expansion.
4337 (Try_Container_Indexing): The prefix itself may be a container type
4338 with an indexing aspect, as with a vector of vectors.
4339 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4340 the original doamin of iteration, for name capture.
4341 (Analyze_Iterator_Specification): If the domain is an expression that
4342 needs finalization, create a separate declaration for it.
4343 For an iterator with "of" retrieve default iterator info from aspect of
4344 container type. For "in" iterator, retrieve type of Iterate function.
4345 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4346 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4347 analysis, to prevent spurious errors about late attributes.
4348 * sprint.adb: Handle quantified expression with either loop or iterator
4350 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4353 2011-08-29 Vincent Celier <celier@adacore.com>
4355 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4356 Binder or Linker of the main project file.
4358 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4360 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4363 2011-08-29 Yannick Moy <moy@adacore.com>
4365 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4367 2011-08-29 Yannick Moy <moy@adacore.com>
4369 * exp_ch11.adb: Minor expansion of comment.
4371 2011-08-29 Yannick Moy <moy@adacore.com>
4373 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4375 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4377 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4378 interpretation, set the type before resolving the operands, because
4379 legality checks on an exponention operand need to know the type of the
4382 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4384 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4385 cleanups on a master if the instance is within a generic unit.
4386 Complement to the corresponding fix to inline.adb for K520-030.
4388 2011-08-29 Tristan Gingold <gingold@adacore.com>
4390 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4392 * exp_intr.adb: Minor comment fix.
4394 2011-08-29 Bob Duff <duff@adacore.com>
4396 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4397 Delay_Required was used as an uninitialized variable.
4399 2011-08-29 Robert Dewar <dewar@adacore.com>
4401 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4402 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4403 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4405 2011-08-29 Thomas Quinot <quinot@adacore.com>
4407 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4408 Remove unused variables.
4410 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4412 * sem_res.adb: Remove Build_Explicit_Dereference.
4413 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4414 from sem_res.adb, used in analysis of additional constructs.
4415 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4416 expansion of iterators.
4417 (Is_Object_Reference): Recognize variables rewritten as explicit
4418 dereferences in Ada2012.
4419 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4420 Reversible_Iterator names, for expansion of Ada2012 iterators.
4421 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4422 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4423 linked list container.
4424 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4425 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4427 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4429 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4432 2011-08-29 Vincent Celier <celier@adacore.com>
4434 * make.adb (Gnatmake): Get the maximum number of simultaneous
4435 compilation processes after the Builder switches has been scanned, as
4436 there may include -jnn.
4438 2011-08-29 Matthew Heaney <heaney@adacore.com>
4440 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4442 2011-08-29 Tristan Gingold <gingold@adacore.com>
4444 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4445 GNAT_DRIVER_COMMAND_LINE to 255.
4447 2011-08-29 Pascal Obry <obry@adacore.com>
4449 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4450 reformatting and style fix (class attribute casing).
4452 2011-08-29 Yannick Moy <moy@adacore.com>
4454 * exp_ch11.adb: Yet another case where expansion should be common
4455 between CodePeer and Alfa.
4457 2011-08-29 Yannick Moy <moy@adacore.com>
4459 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4461 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4463 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4464 incomplete type and its completion match.
4466 2011-08-29 Yannick Moy <moy@adacore.com>
4468 * exp_ch13.adb: Adjust previous change.
4470 2011-08-29 Robert Dewar <dewar@adacore.com>
4472 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4473 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4476 2011-08-29 Emmanuel Briot <briot@adacore.com>
4478 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4479 initialize aggregated projects.
4481 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4483 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4484 depth of candidates to resolve a potentially spurious ambiguity between
4485 two visible subprograms.
4487 2011-08-29 Yannick Moy <moy@adacore.com>
4489 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4491 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4492 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4495 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4497 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4500 2011-08-29 Thomas Quinot <quinot@adacore.com>
4502 * sem_res.adb: Minor reformatting.
4504 2011-08-29 Johannes Kanig <kanig@adacore.com>
4506 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4508 * gnat1drv.adb (Adjust_Global_Switches): Set
4509 Use_Expressions_With_Actions to False in ALFA mode.
4510 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4513 2011-08-29 Yannick Moy <moy@adacore.com>
4515 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4516 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4517 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4518 tagged types and dispatching calls in Alfa mode.
4520 2011-08-29 Javier Miranda <miranda@adacore.com>
4522 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4523 we do not report an error on an Empty node.
4525 2011-08-29 Geert Bosch <bosch@adacore.com>
4527 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4528 a-nlrear.o and a-nurear.o.
4530 2011-08-29 Robert Dewar <dewar@adacore.com>
4532 * freeze.adb: Minor code reorganization.
4534 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4535 sem_ch6.adb: Minor reformatting
4537 2011-08-29 Tristan Gingold <gingold@adacore.com>
4539 * s-except.ads, s-except.adb: Provide dummy body.
4541 2011-08-29 Yannick Moy <moy@adacore.com>
4543 * sem_warn.adb (Within_Postcondition): Take into account the case of
4544 an Ensures component in a Test_Case.
4546 2011-08-29 Tristan Gingold <gingold@adacore.com>
4548 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4549 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4550 System_Exceptions_Debug
4551 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4552 * a-except.adb: With and use System.Exceptions_Debug instead of
4554 * a-except-2005.adb: Likewise.
4555 * s-assert.adb: Likewise.
4556 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4557 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4558 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4559 s-excdeb. Update dependencies.
4560 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4561 as these no longer need external libraries.
4563 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4565 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4566 exponentiation operator on universal values in a context that requires
4569 2011-08-29 Tristan Gingold <gingold@adacore.com>
4571 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4572 before calling notify_handled_exception.
4573 * a-exextr.adb: Fix comment.
4575 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4577 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4578 Finalize_Address of the access type's finalization master.
4579 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4580 access type's finalization master. Add a guard to prevent
4581 Associated_Storage_Pool from being set on .NET/JVM.
4582 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4583 attribute Finalize_Address of the access type's finalization master.
4584 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4585 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4586 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4588 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4589 use clause for System.IO
4590 (Detach): Relax the assertion, to be reinstated later.
4591 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4592 Relax the assertion on Finalize_Address, to be reinstated later.
4593 (Is_Empty_List): New routine.
4594 (pm): New debug routine.
4595 (Set_Finalize_Address): New routine.
4596 * s-finmas.ads (pm): New debug routine.
4597 (Set_Finalize_Address): New routine.
4598 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4600 2011-08-29 Tristan Gingold <gingold@adacore.com>
4602 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4603 Remove convention C.
4605 2011-08-29 Tristan Gingold <gingold@adacore.com>
4607 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4608 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4609 (Finalize_TCB): Remove its finalization.
4610 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4611 * s-soflin.adb (NT_Exc_Stack): Remove
4612 (Get_Exc_Stack_Addr_NT): Likewise.
4613 (Get_Exc_Stack_Addr_Soft): Likewise.
4614 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4615 (Get_Exc_Stack_Addr): Likewise.
4616 (Get_Exc_Stack_Addr_Soft): Likewise
4617 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4618 (Exc_Stack_Ptr_T): Likewise.
4619 (Private_Data): Remove Exc_Stack_Ptr component.
4621 2011-08-29 Tristan Gingold <gingold@adacore.com>
4623 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4625 2011-08-29 Tristan Gingold <gingold@adacore.com>
4627 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4629 2011-08-29 Geert Bosch <bosch@adacore.com>
4631 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4632 L2_Norm, Swap_Column): New generic subprograms
4633 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4634 L2_Norm, Swap_Column): Implement new subprograms in order to
4635 eliminate dependency on BLAS and LAPACK libraries in
4636 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4637 version. Forward_Eliminate/Back_Substitute can be used to put a
4638 matrix in row echelon or reduced row echelon form using partial
4640 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4641 Swap_Column): Instantiate from System.Generic_Array_Operations.
4642 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4643 (Sqrt): Local function for simple computation of square root without
4644 adding dependencies on Generic_Elementary_Functions.
4645 (Swap): New subprogram to exchange floating point numbers.
4646 (Inverse): Reimplement using Jordan-Gauss elimination.
4647 (Jacobi): New procedure implementing Jacobi's method for computation
4648 of eigensystems, based on Rutishauser's implementation.
4649 (L2_Norm): Implement directly using the inner product.
4650 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4651 decreasing eigenvalue as required by the Ada RM.
4652 (Swap_Column): New helper procedure for Sort_Eigensystem.
4653 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4654 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4657 2011-08-29 Thomas Quinot <quinot@adacore.com>
4659 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4662 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4664 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4665 than the current node.
4666 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4667 Finalization_Master. The list headers have two fields instead of three.
4668 This should fix alignment issue but subpool allocations are now
4669 unusable. Alphabetize subprograms.
4670 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4671 the size of the header when converting the beginning of the object to
4672 a FM_Node. Set the master's Finalize_Address attribute if not already
4674 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4675 header when converting the beginning of the object to a FM_Node.
4677 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4679 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4680 reraise when compiling for CodePeer.
4682 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4684 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4685 now needed by a-convec.adb. Fix warning.
4687 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4689 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4690 processing of TSS routine Finalize_Address when compiling in
4693 2011-08-29 Thomas Quinot <quinot@adacore.com>
4695 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4696 sem_warn.adb: Minor reformatting.
4698 2011-08-29 Emmanuel Briot <briot@adacore.com>
4700 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4701 languages from aggregated projects.
4703 2011-08-29 Yannick Moy <moy@adacore.com>
4705 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4706 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4707 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4708 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4709 for stubs are traversed too when parameter is set
4710 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4711 (Traverse_Declarations_Or_Statements): Do the special traversing for
4712 stubs when required.
4713 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4714 return subprogram or package body from stub.
4715 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4716 stubs without prior subprogram decl.
4718 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4720 * gnat_ugn.texi: Fix typo.
4722 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4724 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4725 which accounts for size vs alignment issues and calculates the size of
4727 (Deallocate_Any_Controlled): Ditto.
4728 (Nearest_Multiple_Rounded_Up): New routine.
4730 2011-08-29 Tristan Gingold <gingold@adacore.com>
4732 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4733 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4734 (Set_Exception_Msg): Ditto.
4735 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4737 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4738 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4739 (Raise_With_Msg): Remove Cleanup_Flag.
4740 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4741 Clean_Flag and Private_Data components.
4743 2011-08-29 Yannick Moy <moy@adacore.com>
4745 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4747 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4748 of an explicitly declared type, so that the base types of the original
4749 type and this generated type are the same, and a "type" (not a subtype
4751 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4752 small" in Alfa mode, like in CodePeer mode.
4753 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4754 clauses in Alfa mode.
4756 2011-08-29 Javier Miranda <miranda@adacore.com>
4758 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4759 function to the package spec.
4760 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4761 internally generated bodies of null procedures locate the internally
4762 generated spec enforcing mode conformance.
4763 (Is_Interface_Conformant): Ensure that the controlling formal of the
4766 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4768 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4769 reject the pragma if it appears to apply to a formal subprogram.
4771 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4773 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4774 inner expression, to prevent double evaluation.
4776 2011-08-29 Tristan Gingold <gingold@adacore.com>
4778 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4780 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4781 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4782 (Raise_Current_Excep): Adjust call.
4783 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4785 2011-08-29 Thomas Quinot <quinot@adacore.com>
4787 * exp_disp.adb: Minor reformatting.
4789 2011-08-29 Tristan Gingold <gingold@adacore.com>
4791 * a-exexpr.adb (Setup_Exception): Removed.
4792 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4793 * a-except.adb (Exception_Propagation): Removed.
4794 * a-except-2005.adb (Setup_Exception): Removed.
4795 (Reraise): Remove call to Setup_Exception.
4796 (Reraise_Occurrence): Ditto.
4797 (Reraise_Occurrence_Always): Ditto.
4798 (Reraise_Occurrence_No_Defer): Ditto.
4799 (Transfer_Occurrence): Ditto.
4800 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4801 (Set_Exception_Msg): Ditto.
4803 2011-08-29 Robert Dewar <dewar@adacore.com>
4805 * a-convec.adb, exp_disp.adb: Minor reformatting.
4807 2011-08-29 Tristan Gingold <gingold@adacore.com>
4809 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4811 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4813 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4814 Exception_Handlers to No_List instead of Empty_List in the case where
4815 there are no handlers.
4817 2011-08-29 Tristan Gingold <gingold@adacore.com>
4819 * gcc-interface/gigi.h (enum standard_datatypes): Add
4820 ADT_reraise_zcx_decl
4821 (reraise_zcx_decl): New macro.
4822 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4823 (gigi): Set reraise_zcx_decl.
4824 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4825 (gnat_to_gnu): Handle N_Raise_Statement.
4827 2011-08-29 Robert Dewar <dewar@adacore.com>
4829 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4830 a-undesu.adb: Minor reformatting.
4832 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4834 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4835 table, accept an unfrozen untagged component if it is an actual for a
4836 formal incomplete type.
4837 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4838 provide new iterator forms over vectors.
4839 Introduce type Iterator in package body to implement operations of
4840 Reversible_Iterator interface.
4841 * a-iteint.ads: Make package pure so it is usable with new container
4842 packages, that are categorized Remote_Types.
4844 2011-08-29 Robert Dewar <dewar@adacore.com>
4846 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4848 2011-08-29 Bob Duff <duff@adacore.com>
4850 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4851 of <>, because this is the routine that checks for dimensionality
4852 errors (for example, for a two-dimensional array, (others => <>) should
4853 be (others => (others => <>)).
4855 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4857 * impunit.adb: Add new run-time units.
4858 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4859 s-stposu.ads, s-stposu.adb: Code clean up.
4860 Handle protected class-wide or task class-wide types
4861 Handle C/C++/CIL/Java types.
4862 * s-spsufi.adb, s-spsufi.ads: New files.
4864 2011-08-29 Yannick Moy <moy@adacore.com>
4866 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4867 library-level subprogram.
4868 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4870 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4872 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4874 * gnat_rm.texi: Update doc for Test_Case pragma.
4876 2011-08-29 Tristan Gingold <gingold@adacore.com>
4878 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4880 (GCC_Exception_Access): New type.
4881 (Unwind_DeleteException): New imported procedure
4882 (Foreign_Exception): Import it.
4883 (GNAT_GCC_Exception): Simply have the occurrence inside.
4884 (To_GCC_Exception): New function.
4885 (To_GNAT_GCC_Exception): New function.
4886 (GNAT_GCC_Exception_Cleanup): New procedure..
4887 (Propagate_GCC_Exception): New procedure.
4888 (Reraise_GCC_Exception): New procedure.
4889 (Setup_Current_Excep): New procedure.
4890 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4891 (Unwind_RaiseException): Ditto.
4892 (Unwind_ForcedUnwind): Ditto.
4894 (Begin_Handler): Change type of parameter.
4895 (End_Handler): Ditto. Now delete the exception if still present.
4896 (Setup_Key): Removed.
4897 (Is_Setup_And_Not_Propagated): Removed.
4898 (Set_Setup_And_Not_Propagated): Ditto.
4899 (Clear_Setup_And_Not_Propagated): Ditto.
4900 (Save_Occurrence_And_Private): Ditto.
4901 (EID_For): Add 'not null' constraint on parameter.
4902 (Setup_Exception): Does nothing.
4903 (Propagate_Exception): Simplified.
4904 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4905 re-raise is not expanded anymore.
4906 * s-except.ads (Foreign_Exception): New exception - placeholder for
4908 * raise-gcc.c (__gnat_setup_current_excep): Declare
4909 (CXX_EXCEPTION_CLASS): Define (not yet used)
4910 (GNAT_EXCEPTION_CLASS): Define.
4911 (is_handled_by): Handle foreign exceptions.
4912 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4914 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4916 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4918 2011-08-29 Thomas Quinot <quinot@adacore.com>
4920 * a-synbar-posix.adb: Minor reformatting.
4922 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4924 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4925 a-exetim-default.ads (Interrupt_Clocks_Supported,
4926 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4927 definitions to be compliant with AI-0171. The target systems do not
4928 support separate account for the execution time of interrupt handlers.
4930 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4932 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4933 in the barrier to put first the easiest to evaluate (and the one which
4934 will be True more often). More efficient.
4936 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4938 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4940 2011-08-29 Bob Duff <duff@adacore.com>
4942 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4943 attributes that are now aspects, as specified by AI05-0229-1.
4944 * sem_ch13.adb (Analyze_Aspect_Specifications,
4945 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4946 pragmas or attribute references, as appropriate.
4948 2011-08-29 Robert Dewar <dewar@adacore.com>
4950 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4951 a-synbar-posix.ads: Minor reformatting.
4953 2011-08-29 Yannick Moy <moy@adacore.com>
4955 * snames.ads-tmpl: Add name Force.
4957 2011-08-29 Pascal Obry <obry@adacore.com>
4959 * prj-nmsc.adb: Minor reformatting.
4961 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4963 * a-exetim.ads (Interrupt_Clocks_Supported,
4964 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4965 definitions to be compliant with AI-0171.
4967 2011-08-29 Robert Dewar <dewar@adacore.com>
4969 * a-ngelfu.adb: Add comments.
4971 2011-08-29 Geert Bosch <bosch@adacore.com>
4973 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4974 the closest machine number to Pi / 2.0.
4976 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4978 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4979 package Ada.Synchronous_Barriers.
4980 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4981 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4982 default implementation using protected objects and another one
4983 a-synbar-posix using POSIX barriers as the underlying support.
4984 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4985 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4986 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4987 Clean up dependencies.
4988 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4990 2011-08-29 Robert Dewar <dewar@adacore.com>
4992 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4993 exp_dist.adb: Minor code reorganization.
4996 2011-08-29 Thomas Quinot <quinot@adacore.com>
4998 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4999 primitive operation must support external streaming if it is not a
5000 controlling access result.
5002 2011-08-29 Thomas Quinot <quinot@adacore.com>
5004 * sinfo.ads, sem_ch7.adb: Minor reformatting.
5006 2011-08-29 Bob Duff <duff@adacore.com>
5008 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5009 restriction on allocators, as required by AI05-0013-1.
5010 * restrict.ads: Minor comment fix.
5012 2011-08-29 Tristan Gingold <gingold@adacore.com>
5014 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5015 (To_Jmpbuf_Address): Ditto
5016 (builtin_longjmp): Ditto
5018 2011-08-29 Thomas Quinot <quinot@adacore.com>
5020 * sem_res.adb: Minor reformatting.
5022 2011-08-29 Vincent Celier <celier@adacore.com>
5024 * make.adb (Gnatmake): Move special processing for VM targets after the
5025 call to Get_Target_Parameters.
5027 2011-08-29 Thomas Quinot <quinot@adacore.com>
5029 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5031 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5033 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5034 where an anonymous access discriminant of a limited designated type
5035 appears in a non-immutably limited discriminated type and issue an
5036 error message. Add local variable Desig_T and replace all occurrences
5039 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5041 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5042 implementation is compliant to RM D.15(15/2) after the modification
5043 imposed by AI05-0094-1 (binding interpretation).
5045 2011-08-29 Robert Dewar <dewar@adacore.com>
5047 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5048 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5050 2011-08-29 Thomas Quinot <quinot@adacore.com>
5052 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5053 the scope name, do not report a missing label as a style violation (it
5054 will be diagnosed as an illegality).
5055 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5056 variant records: Get_Enum_Lit_From_Pos already returns a usage
5057 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5058 on Expr in Integer_Literal case so that it can be used by
5061 2011-08-29 Tristan Gingold <gingold@adacore.com>
5063 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5065 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5066 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5068 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5069 Build_Abort_Block_Handler to build the exception handler. Do not
5070 undefer aborts for the Abort_Signal exception handler if back-end
5071 exception mechanism.
5072 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5073 back_end exceptions for all others and abort_signal.
5074 * s-except.ads (ZCX_By_Default): New constant.
5075 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5076 (Raise_Exception_Always): Ditto.
5077 (Raise_From_Signal_Handler): Ditto.
5078 (Raise_With_Location_And_Msg): Ditto.
5079 (Raise_With_Msg): Ditto.
5081 (Reraise_Occurence): Ditto.
5082 (Reraise_Occurrence_Always): Ditto.
5083 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5084 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5086 2011-08-29 Thomas Quinot <quinot@adacore.com>
5088 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5090 2011-08-29 Robert Dewar <dewar@adacore.com>
5092 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5093 Minor code reorganization.
5095 2011-08-29 Bob Duff <duff@adacore.com>
5097 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5098 2012, not just Ada 2005.
5100 2011-08-29 Vincent Celier <celier@adacore.com>
5102 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5103 with a project file or with gprbuid, if -gnatep= is specified, the
5104 builder may need to be invoked with -x.
5106 2011-08-29 Tristan Gingold <gingold@adacore.com>
5108 * a-exexpr-gcc.adb: Minor comment fix.
5110 2011-08-29 Robert Dewar <dewar@adacore.com>
5112 * sem_ch8.adb: Minor reformatting.
5114 2011-08-29 Bob Duff <duff@adacore.com>
5116 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5117 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5118 treating "some" as unreserved in earlier Ada versions. This is now
5119 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5120 rather than Name_Some, since Tok_Some is now recognized as reserved.
5121 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5123 * scans.ads: Minor comment fixes.
5124 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5125 for other language versions.
5126 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5127 treating "some" as unreserved in earlier Ada versions. This is now
5128 handled in Snames.Is_Keyword_Name.
5129 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5131 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5132 unreserved in earlier Ada versions. This is now handled in
5133 Snames.Is_Keyword_Name.
5134 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5135 words as for other language versions.
5136 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5137 Ada 2012, not just Ada 2005.
5139 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5141 * sem_ch13.adb: Additional semantic checks for aspects involved in
5144 2011-08-29 Matthew Heaney <heaney@adacore.com>
5146 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5147 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5148 Container parameter.
5149 (Ancestor_Find): ditto.
5151 2011-08-29 Thomas Quinot <quinot@adacore.com>
5153 * par-endh.adb: Minor reformatting.
5155 2011-08-29 Tristan Gingold <gingold@adacore.com>
5157 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5158 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5159 (Adjust_N_CLeanups_For): Remove.
5160 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5162 (Propgate_Exception): Adjust.
5163 * raise-gcc.c: Add a few static/const.
5164 (Adjust_N_Cleanups_For): Remove declaration.
5165 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5167 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5169 * sem_ch8.adb: Use type of function return when rewriting as object
5172 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5174 * sem_type.adb: Minor reformatting.
5176 2011-08-29 Robert Dewar <dewar@adacore.com>
5178 * makeutl.adb: Minor reformatting.
5180 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5182 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5183 function call of a limited type, the expansion of the renaming is
5184 complicated by the presence of various temporaries and subtypes that
5185 capture constraints of the renamed object.
5186 Rewrite node as an object declaration, whose expansion is simpler.
5187 Given that the object is limited there is no copy involved and no
5190 2011-08-29 Robert Dewar <dewar@adacore.com>
5192 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5193 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5195 2011-08-29 Tristan Gingold <gingold@adacore.com>
5197 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5198 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5199 system-linux-hppa.ads, system-linux-s390.ads,
5200 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5201 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5202 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5203 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5204 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5205 system-solaris-sparc.ads, system-lynxos-x86.ads,
5206 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5207 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5208 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5209 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5210 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5211 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5212 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5213 * opt.ads: Adjust comment.
5214 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5215 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5216 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5218 2011-08-29 Emmanuel Briot <briot@adacore.com>
5220 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5221 file name is specified on the gnatmake or gprbuild command line, and
5222 before we search for that file in the project.
5224 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5226 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5227 used to determine whether a possible interpretation for an overloadable
5228 entity is declared within the current instantiation and should be
5229 included in the candidate set.
5231 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5233 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5235 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5237 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5238 access subtype is access_to_subprogram, when applying checks for
5241 2011-08-29 Matthew Heaney <heaney@adacore.com>
5243 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5244 for sibling when common parent.
5246 2011-08-29 Thomas Quinot <quinot@adacore.com>
5248 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5251 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5253 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5254 for the return type when in ASIS mode.
5256 2011-08-29 Vincent Celier <celier@adacore.com>
5258 * make.adb (Gnatmake): Get the default search dirs, then the target
5259 parameters after getting the Builder switches, as the Builder switches
5260 may include --RTS= and that could change the default search dirs.
5262 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5264 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5265 Make_Final_Call. Move the processing for class-wide types before the
5266 processing for derivations from [Limited_]Controlled.
5267 (Make_Final_Call): Move the processing for class-wide types before the
5268 processing for derivations from [Limited_]Controlled.
5269 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5270 Add code to account for alignments larger than the list header. Add a
5271 comment illustrating the structure of the allocated object + padding +
5273 (Deallocate_Any_Controlled): Add code to account for alignments larger
5274 than the list header.
5276 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5278 * sinfo.ads, sinfo.adb: New node kind
5279 N_Formal_Incomplete_Type_Definition, related flags.
5280 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5281 Parse formal incomplete types.
5282 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5284 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5285 Formal incomplete types do not need completion.
5286 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5287 Validate_Incomplete_Type_Instance): New procedures to handle formal
5289 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5290 that corresponds to a formal incomplete type.
5291 * sprint.adb: Handle formal incomplete type declarations.
5292 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5295 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5297 * a-fihema.ads, a-fihema.adb: Unit removed.
5298 * a-undesu.ads, a-undesu.adb: New unit implementing
5299 Ada.Unchecked_Deallocate_Subpool.
5300 * einfo.adb: Remove Associated_Collection from the node usage.
5301 Add Finalization_Master to the node usage.
5302 (Associated_Collection): Removed.
5303 (Finalization_Master): New routine.
5304 (Set_Associated_Collection): Removed.
5305 (Set_Finalization_Master): New routine.
5306 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5307 Finalization_Master to the output.
5308 * einfo.ads: Remove attribute Associated_Collection and its uses in
5310 Add new attribute Finalization_Master along with its uses in entitites.
5311 (Associated_Collection): Removed along with its pragma import.
5312 (Finalization_Master): New routine along with a pragma import.
5313 (Set_Associated_Collection): Removed along with its pragma import.
5314 (Set_Finalization_Master): New routine along with a pragma import.
5315 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5316 Build_Finalization_Collection with Build_Finalization_Master.
5317 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5318 before the bodies of the predefined routines. Add comment explaining
5319 this. Replace call to Build_Finalization_Collection with
5320 Build_Finalization_Master.
5321 (Freeze_Type): Replace call to Build_Finalization_Collection with
5322 Build_Finalization_Master.
5323 (Make_Finalize_Address_Body): Comment reformatting.
5324 (Make_Predefined_Primitive_Specs): Code reformatting.
5325 (Stream_Operation_OK): Update comment mentioning finalization
5326 collections. Replace RE_Finalization_Collection with
5327 RE_Finalization_Master.
5328 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5329 Associated_Collection with Finalization_Master. Replace call to
5330 Build_Finalization_Collection with Build_Finalization_Master.
5331 (Expand_Allocator_Expression): Replace call to Associated_Collection
5332 with Finalization_Master. Replace call to Set_Associated_Collection with
5333 Set_Finalization_Master. Remove the generation of
5334 Set_Finalize_Address_Ptr.
5335 (Expand_N_Allocator): Replace call to Associated_Collection with
5336 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5337 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5338 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5339 comment on usage. Replace call to Needs_BIP_Collection with
5340 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5341 BIP_Finalization_Master. Update all comments which mention finalization
5342 collections. Replace Associated_Collection with
5343 Finalization_Master. Replace Build_Finalization_Collection with
5344 Build_Finalization_Master.
5345 (BIP_Formal_Suffix): Update BIP_Collection's case.
5346 (Build_Heap_Allocator): Update the related comment. Rename local
5347 variable Collect to Fin_Mas_Id and update its occurrences. Update
5348 comments which mention finalization collections. Replace
5349 Set_Associated_Collection with Set_Finalization_Master.
5350 (Expand_Call): Update the code which detects a special piece of library
5352 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5353 Add_Collection_Actual_To_Build_In_Place_Call with
5354 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5355 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5356 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5357 Add_Collection_Actual_To_Build_In_Place_Call with
5358 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5359 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5360 Add_Collection_Actual_To_Build_In_Place_Call with
5361 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5362 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5363 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5364 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5365 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5366 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5367 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5368 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5369 Replace the call to Associated_Collection with Finalization_Master.
5370 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5371 Update the way finalization master names are generated. Update the
5372 retrieval of the correct access type which will carry the pool and
5374 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5375 (Make_Finalize_Address_Body): Abstract types do not need
5376 Finalize_Address. Code reformatting.
5377 (Make_Finalize_Address_Stmts): Update comment on usage.
5378 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5379 (Process_Declarations): Update comments.
5380 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5381 Build_Finalization_Master. Update associated comment.
5382 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5383 * exp_ch13.adb: Update comments which mention finalization collections.
5384 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5385 with Finalization_Master.
5386 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5387 create calls to routines Allocate_Any_Controlled and
5388 Deallocate_Any_Controlled.
5389 (Find_Finalize_Address): New routine.
5390 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5392 (Requires_Cleanup_Actions): Update the comment on freeze node
5394 * exp_util.ads: Remove comment on generated code for
5395 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5396 is better to simply look in the body.
5397 * freeze.adb (Freeze_All): Update the comment of finalization
5398 collections. Replace the call to Associated_Collection with
5399 Finalization_Master. Replace the call to Build_Finalization_Collection
5400 with Build_Finalization_Master.
5401 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5402 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5404 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5405 Ada.Finalization. Add processing for children of System.Storage_Pools.
5406 * rtsfind.ads: Remove the naming of second level children of
5408 Remove Ada_Finalization_Heap_Management from the list of units.
5409 Remove subtype Ada_Finalization_Child.
5410 Remove the following subprogram entities:
5414 RE_Finalization_Collection
5415 RE_Finalization_Collection_Ptr
5416 RE_Set_Finalize_Address_Ptr
5418 Add the naming of second level children of System.Storage_Pools.
5419 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5421 Add subtype System_Storage_Pools_Child.
5422 Add the following subprogram entities to System.Finalization_Masters:
5424 RE_Finalization_Master
5425 RE_Finalization_Master_Ptr
5427 Add the following subprogram entities to System.Storage_Pools.Subpools:
5429 RE_Allocate_Any_Controlled
5430 RE_Deallocate_Any_Controlled
5431 RE_Root_Storage_Pool_With_Subpools
5435 Move the following subprogram entities from
5436 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5438 RE_Add_Offset_To_Address
5443 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5444 Set_Associated_Collection with Set_Finalization_Master.
5445 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5446 BIP_Finalization_Master is created.
5447 * s-finmas.adb: New unit System.Finalization_Masters.
5448 * s-finmas.ads: New unit System.Finalization_Masters.
5449 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5450 * s-stposu.ads, s-stposu.adb: New unit implementing
5451 System.Storage_Pools.Subpools.
5453 2011-08-29 Bob Duff <duff@adacore.com>
5455 * tbuild.adb: Add assertion.
5457 2011-08-29 Thomas Quinot <quinot@adacore.com>
5459 * s-pooglo.adb: Minor reformatting.
5461 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5463 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5464 an indexed component of a packed array whose element type is a record
5465 with a representation clause different from that of the right-hand
5466 side, generate a temporary to minimuze the number of bit-field
5467 operations generated.
5469 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5471 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5472 declarations, and thus are likely insertion points for actions.
5474 2011-08-29 Bob Duff <duff@adacore.com>
5476 * einfo.ads: Minor comment fix.
5478 2011-08-29 Robert Dewar <dewar@adacore.com>
5480 * frontend.adb, gnat1drv.adb: Minor reformatting.
5482 2011-08-29 Tristan Gingold <gingold@adacore.com>
5484 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5485 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5486 space in front of the header.
5488 2011-08-29 Johannes Kanig <kanig@adacore.com>
5490 * frontend.adb (Frontend): Exit after creating Standard package when
5491 -gnatd.H is present.
5492 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5495 2011-08-29 Robert Dewar <dewar@adacore.com>
5497 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5498 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5499 snames.ads-tmpl: Minor reformatting.
5501 2011-08-29 Philippe Gil <gil@adacore.com>
5503 * prj.adb (Reset_Units_In_Table): New procedure.
5504 Reset units to avoid access to freed memory.
5506 2011-08-29 Thomas Quinot <quinot@adacore.com>
5508 * get_scos.adb: When reading a P statement SCO without a pragma name
5509 (from an older ALI file), ensure that the Pragma_Name component is set
5510 to Unknown_Pragma (not left uninitialized).
5512 2011-08-29 Vincent Celier <celier@adacore.com>
5514 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5515 modified to compute correctly the object path of a SAL project that is
5516 extending another library project.
5517 (Write_Path_File): New procedure.
5518 * makeutl.ads (Directories): New table moved from Buildgpr
5519 (Get_Directories): New procedure moved from Buildgpr
5520 (Write_Path_File): New procedure
5521 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5522 paths before binding SALs, instead of Set_Ada_Paths.
5523 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5525 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5526 (Current_Source_Path_File_Of): New function
5527 (Set_Current_Object_Path_File_Of): New procedure
5528 (Current_Source_Object_File_Of): New function
5529 (Set_Current_Object_Path_File_Of): New procedure
5530 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5531 (Current_Source_Path_File_Of): New function
5532 (Set_Current_Object_Path_File_Of): New procedure
5533 (Current_Source_Object_File_Of): New function
5534 (Set_Current_Object_Path_File_Of): New procedure
5536 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5538 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5539 packed entity, use a bit-field assignment only if there is no change of
5542 2011-08-29 Thomas Quinot <quinot@adacore.com>
5544 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5545 Is_RTU instead of using Chars comparisons.
5547 2011-08-29 Thomas Quinot <quinot@adacore.com>
5549 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5550 temporary object if the actual is constrained, and the discriminants
5551 read from the stream don't match.
5553 2011-08-29 Tristan Gingold <gingold@adacore.com>
5555 * sem_attr.adb, exp_attr.adb: Add handling of
5556 Attribute_System_Allocator_Alignment
5557 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5558 Attribute_System_Allocator_Alignment.
5559 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5560 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5561 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5562 get_target_system_allocator_alignment.
5564 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5566 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5569 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5571 * exp_ch3.adb (In_Runtime): Fix typo.
5573 2011-08-29 Bob Duff <duff@adacore.com>
5575 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5577 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5579 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5580 and a separate tag assignment is generated, ensure that the tag
5581 assignment is analyzed.
5583 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5585 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5586 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5587 of statement lists that may contain local declarations.
5588 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5589 duplicate the triggering statements needed for the expansion of this
5590 construct, when the trigger is a dispatching call to a synchronized
5593 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5595 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5596 * bindgen.adb: Add comments.
5597 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5600 2011-08-29 Robert Dewar <dewar@adacore.com>
5602 * exp_attr.adb: Minor reformatting.
5603 Minor code reorganization and commenting.
5604 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5607 2011-08-29 Thomas Quinot <quinot@adacore.com>
5609 * get_scos.adb: Ignore chaining indicators not currently supported
5612 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5614 * system.ads: Minor editing.
5616 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5618 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5620 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5621 Attribute_Elab_Subp_Body.
5622 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5623 * sem_util.adb: Update comments.
5625 2011-08-29 Thomas Quinot <quinot@adacore.com>
5627 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5628 pragma name for each SCO statement corresponding to a pragma.
5630 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5632 * opt.ads: Minor editing.
5634 2011-08-29 Yannick Moy <moy@adacore.com>
5636 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5637 that only made sense for CodePeer mode.
5639 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5641 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5642 which is no longer used.
5643 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5644 handling of the 64-bit division check.
5645 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5647 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5650 2011-08-29 Thomas Quinot <quinot@adacore.com>
5652 * get_scos.adb: Minor reformatting.
5654 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5656 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5657 statement list is wrapped in a block, the block is explicitly analyzed
5658 in order to properly redecorate the entities and create a servicing
5661 2011-08-29 Tristan Gingold <gingold@adacore.com>
5663 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5664 (Set_Zero_Cost_Handling): Remove.
5666 2011-08-29 Thomas Quinot <quinot@adacore.com>
5668 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5670 2011-08-29 Geert Bosch <bosch@adacore.com>
5672 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5673 instruction, as the latter may produce -0.0, which is not a valid VAX
5675 (Neg_G): Likewise for VAX F float.
5677 2011-08-29 Robert Dewar <dewar@adacore.com>
5679 * exp_util.adb: Minor reformatting.
5681 2011-08-29 Yannick Moy <moy@adacore.com>
5683 * sem_ch3.adb: Minor comment update.
5685 2011-08-29 Thomas Quinot <quinot@adacore.com>
5687 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5690 2011-08-29 Thomas Quinot <quinot@adacore.com>
5692 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5693 current statement sequence on a generic instantiation or a subprogram
5696 2011-08-29 Robert Dewar <dewar@adacore.com>
5698 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5701 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5703 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5704 Correct the check which involves the freeze node of a controlled or
5705 access-to-controlled type.
5707 2011-08-29 Geert Bosch <bosch@adacore.com>
5709 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5711 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5714 2011-08-29 Yannick Moy <moy@adacore.com>
5716 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5717 for every index type and component type that is not a subtype_mark.
5718 (Process_Subtype): Set Etype of subtype.
5720 2011-08-29 Robert Dewar <dewar@adacore.com>
5722 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5723 reorganization. Minor reformatting.
5725 2011-08-29 Steve Baird <baird@adacore.com>
5727 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5728 for CodePeer and ALFA modes.
5730 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5732 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5733 that comes from an enclosing scope if it is not the renaming of an
5734 actual, to handle properly a spurious ambiguity in an instance.
5736 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5738 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5739 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5740 use it instead of the Esize of the first parameter.
5741 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5743 <Size>: Likewise. Call it for composite types on the RM size.
5745 2011-08-29 Yannick Moy <moy@adacore.com>
5747 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5748 * sem_util.adb (Unique_Name): Correct behaviour for names of
5751 2011-08-29 Yannick Moy <moy@adacore.com>
5753 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5754 verification mode, analyze pragma expression for correctness, for
5755 pre/post on library-level subprogram, as it is not expanded later.
5757 2011-08-29 Yannick Moy <moy@adacore.com>
5759 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5760 in formal verification.
5762 2011-08-29 Thomas Quinot <quinot@adacore.com>
5764 * sem_util.adb: Minor reformatting.
5765 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5767 * par_sco.ads, par_sco.adb: Update comments.
5769 2011-08-29 Yannick Moy <moy@adacore.com>
5771 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5772 associated getter/setter.
5773 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5775 2011-08-29 Vincent Celier <celier@adacore.com>
5777 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5778 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5779 with declarations for Language_Kind and Dependency_Kind for Ada.
5780 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5781 (Process_Compiler): Take into account the new attributes Dependency_Kind
5783 (Check_Configuration): Check if language kind is unit based, not if the
5784 language name is Ada.
5785 (Process_Exceptions_Unit_Based): Ditto
5786 (Add_Language): Remove default additions of language and dependency kind
5787 * prj.ads: Minor comment change
5788 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5790 2011-08-29 Johannes Kanig <kanig@adacore.com>
5792 * debug.adb: Update comments.
5794 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5796 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5797 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5798 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5799 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5800 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5802 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5804 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5805 (GNATLIBCFLAGS_FOR_C): Replace
5806 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5807 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5808 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5809 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5811 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5813 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5815 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5817 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5819 2011-08-05 Nicolas Roche <roche@adacore.com>
5821 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5822 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5824 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5826 2011-08-05 Matthew Heaney <heaney@adacore.com>
5828 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5829 subprogram bodies declared out-of-order.
5831 2011-08-05 Yannick Moy <moy@adacore.com>
5833 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5834 entities directly in package Standard, otherwise skip the standard
5837 2011-08-05 Robert Dewar <dewar@adacore.com>
5839 * a-cbmutr.adb: Minor reformatting
5840 (Allocate_Node): refactor node allocation algorithm
5842 2011-08-05 Robert Dewar <dewar@adacore.com>
5844 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5845 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5847 (Analyze_Pragma, case Check_Policy): Ditto.
5848 * sem_prag.ads (Check_Disabled): New function
5849 * snames.ads-tmpl: Add Name_Disable.
5851 2011-08-05 Robert Dewar <dewar@adacore.com>
5853 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5854 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5856 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5858 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5859 that appears in a generic formal part and applies to a formal
5862 2011-08-05 Robert Dewar <dewar@adacore.com>
5864 * a-cbmutr.ads: Minor reformatting.
5866 2011-08-05 Matthew Heaney <heaney@adacore.com>
5868 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5869 to check count, check sign of value instead.
5870 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5871 (Copy_Subtree): allocate copy of source element
5872 (Equal_Subtree): compare elements, not access objects
5874 2011-08-05 Vincent Celier <celier@adacore.com>
5876 * gnat_ugn.texi: Fix VMS alternative.
5878 2011-08-05 Thomas Quinot <quinot@adacore.com>
5880 * sem_ch11.adb: Add comment.
5882 2011-08-05 Robert Dewar <dewar@adacore.com>
5884 * exp_util.adb: Minor comment fix.
5886 2011-08-05 Robert Dewar <dewar@adacore.com>
5888 * scng.adb (Error_Unterminated_String): Improve flag position when
5891 2011-08-05 Matthew Heaney <heaney@adacore.com>
5893 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5895 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5896 multiway tree containers.
5898 2011-08-05 Robert Dewar <dewar@adacore.com>
5900 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5901 * stylesw.adb: Implement -gnatyC to control comment spacing
5902 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5904 * usage.adb: Add line for -gnatyC.
5906 2011-08-05 Robert Dewar <dewar@adacore.com>
5908 * gnat_ugn.texi: Document -gnatyC.
5909 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5910 synonym for COMMENTS2).
5912 2011-08-05 Robert Dewar <dewar@adacore.com>
5914 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5915 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5916 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5917 a-comutr.ads, lib-xref.adb: Minor reformatting.
5919 2011-08-05 Robert Dewar <dewar@adacore.com>
5921 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5922 warning if there is an exception handler present.
5924 2011-08-05 Pascal Obry <obry@adacore.com>
5926 * a-iteint.ads: Fix copyright year.
5928 2011-08-05 Thomas Quinot <quinot@adacore.com>
5930 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5931 statement SCO for a USE clause or a representation clause.
5933 2011-08-05 Yannick Moy <moy@adacore.com>
5935 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5936 between body and spec for stub.
5937 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5938 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5939 pragma precondition or postcondition, for which the enclosing
5940 subprogram or package in the AST is not the desired one, return empty.
5942 2011-08-05 Thomas Quinot <quinot@adacore.com>
5944 * g-expect.adb: Minor reformatting.
5946 2011-08-05 Bob Duff <duff@adacore.com>
5948 * a-fihema.adb: Comment out OS_Lib.
5950 2011-08-05 Matthew Heaney <heaney@adacore.com>
5952 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5953 (unbounded multiway tree containers) and a-iteint.ads.
5954 * a-comutr.ads, a-comutr.adb:
5955 This is the new Ada 2012 unit for unbounded multiway tree containers
5956 * a-cimutr.ads, a-cimutr.adb
5957 This is the new Ada 2012 unit for indefinite multiway tree containers
5958 * a-iteint.ads: New file.
5960 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5962 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5964 2011-08-05 Bob Duff <duff@adacore.com>
5966 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5968 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5970 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5972 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5973 general indexing aspects of Ada2012. Called when analyzing indexed
5974 components when other interpretations fail.
5975 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5976 in an expression context where overloading is meaningful. This excludes
5977 the occurrence in an aspect specification (efficiency only).
5978 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5979 related to iterators can be set by an attribute specification, but
5981 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5982 Constant_Indexing and Variable_Indexing.
5983 (Check_Indexing_Functions): New procedure to perform legality checks.
5984 Additional semantic checks at end of declarations.
5986 2011-08-05 Sergey Rybin <rybin@adacore.com>
5988 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5989 order of calling Tree_Write/Tree_Read routines made for aspects.
5991 2011-08-05 Bob Duff <duff@adacore.com>
5993 * a-fihema.adb (Finalize): Fix race condition.
5995 2011-08-05 Yannick Moy <moy@adacore.com>
5997 * sem_ch12.adb (Analyze_Package_Instantiation,
5998 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6001 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6003 * sem_type.adb (Specific_Type): in an instance, the type-specific
6004 operand of an equality check that involves null may have a private
6005 type. Use full view to determine legality of construct.
6007 2011-08-05 Vincent Celier <celier@adacore.com>
6009 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6010 delete or close the file when the call to gnatmake was successful.
6012 2011-08-05 Yannick Moy <moy@adacore.com>
6014 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6015 Global_Discard_Names.
6017 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6019 * sinfo.ads: comments on use of entity field for aspect specifications.
6021 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6023 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6024 node is not itself an entity but a selected component, it is a
6025 rewritten parameterless call to an en enclosing synchronized operation,
6026 and this expansion will be performed again in the instance, so there is
6027 no global information to preserve.
6029 2011-08-05 Javier Miranda <miranda@adacore.com>
6031 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6032 for renamings of predefined primitives.
6033 (In_Predef_Prims_DT): New subprogram.
6035 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6037 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6038 possible interpretation of name is a reference type, add an
6039 interpretation that is the designated type of the reference
6040 discriminant of that type.
6041 * sem_res.adb (resolve): If the interpretation imposed by context is an
6042 implicit dereference, rewrite the node as the deference of the
6043 reference discriminant.
6044 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6045 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6046 parent type or base type.
6047 * sem_ch4.adb (Process_Indexed_Component,
6048 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6049 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6050 Check for implicit dereference.
6051 (List_Operand_Interps): Indicate when an implicit dereference is
6053 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6055 2011-08-05 Thomas Quinot <quinot@adacore.com>
6057 * scos.ads: Update documentation of SCO table. Pragma statements can now
6058 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6059 * par_sco.ads, par_sco.adb: Implement the above change.
6060 (Process_Decisions_Defer): Generate a P decision for the first parameter
6061 of a dyadic pragma Debug.
6062 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6064 * put_scos.adb: Code simplification based on above change.
6066 2011-08-05 Robert Dewar <dewar@adacore.com>
6068 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6069 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6070 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6071 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6073 2011-08-05 Bob Duff <duff@adacore.com>
6075 * a-stunau.ads, g-spipat.adb: Update comments.
6077 2011-08-05 Bob Duff <duff@adacore.com>
6079 * a-fihema.ads: Minor comment fix.
6080 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6082 (Attach, Detach): Remove some unnecessary code.
6083 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6085 2011-08-05 Bob Duff <duff@adacore.com>
6087 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6088 allocation for Objects component. This simplifies the code somewhat. It
6089 is also a little more efficient in the not-so-unusual case where there
6090 are no controlled objects allocated.
6091 Make Finalization_Started flag atomic.
6092 (Finalize): Avoid unnecessary detachment of items from the list.
6093 (pcol): Minor cleanup.
6095 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6097 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6098 package whose name is the same as that of the generic unit, or its
6101 2011-08-05 Bob Duff <duff@adacore.com>
6103 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6104 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6105 Minor comment fixes.
6107 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6109 * make.adb (Linking_Phase): No longer need to set source search path
6110 before calling gnatlink in CodePeer mode.
6111 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6112 gcc in CodePeer mode, since the binder generated file no longer has a
6114 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6115 * switch-c.adb: Update comment.
6117 2011-08-05 Thomas Quinot <quinot@adacore.com>
6119 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6121 2011-08-05 Nicolas Roche <roche@adacore.com>
6123 * gnat_ugn.texi: Fix minor syntax error issue.
6125 2011-08-05 Vincent Celier <celier@adacore.com>
6127 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6128 delete or close the file when the call to gnatmake returns a non
6129 successful return code.
6131 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6133 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6134 check, indicate that the copy of the original node does not come from
6135 source, to prevent an infinite recursion of the expansion.
6137 2011-08-05 Johannes Kanig <kanig@adacore.com>
6139 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6140 VC generation for subprogram bodies.
6142 2011-08-05 Yannick Moy <moy@adacore.com>
6145 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6146 the base type with the smallest allowed base type.
6148 2011-08-05 Sergey Rybin <rybin@adacore.com>
6150 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6153 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6155 * sem_ch12.ads: minor comment updates.
6157 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6159 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6160 instantiation and a formal package the compiler generates a package
6161 renaming declaration so that the generic name within the declaration
6162 is interpreted as a renaming of the instance. At the end of a formal
6163 package declaration, this renaming must become invisible.
6165 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6167 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6168 comparison and rely on concrete entities instead.
6170 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6172 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6173 and discriminants, to indicate that the type has an access discriminant
6174 that supports implicit dereference.
6175 * snames.ads-tmpl: Add names of aspects and attributes related to
6176 Ada2012 iterators: constant_indexing, default_iterator,
6177 iterator_element, implicit_dereference, variable_indexing.
6178 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6179 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6180 iterator-related aspects.
6181 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6183 2011-08-05 Sergey Rybin <rybin@adacore.com>
6185 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6186 metrics in gnatmetric to cover new kinds of coupling mentrics.
6188 2011-08-05 Steve Baird <baird@adacore.com>
6190 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6191 of calling the user-defined main subprogram.
6192 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6193 is set) Call_Main_Subprogram ahead of, as opposed to
6195 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6196 generation of a "with" of the user-defined main subprogram.
6197 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6198 (which is now called from Gen_Main instead).
6200 2011-08-05 Emmanuel Briot <briot@adacore.com>
6202 * projects.texi: Added reference to the Makefile package.
6204 2011-08-05 Thomas Quinot <quinot@adacore.com>
6206 * exp_ch7.adb: Minor comment rewording.
6208 2011-08-05 Ed Falis <falis@adacore.com>
6210 * env.c: Fix comment.
6212 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6214 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6215 character comparison and rely on concrete entities instead.
6217 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6219 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6220 suggested by AI95-0068.
6222 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6224 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6225 the two potential initialization calls. This accounts for any
6226 access-before-elaboration checks which may precede the initialization
6228 (Next_Suitable_Statement): New routine. Returns the next real statement
6229 after the input node while skipping generated checks.
6230 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6231 with comment on usage.
6232 Do not generate Elaborate_All when the trigger is a finalization call
6233 coming from a type init proc.
6234 (Check_Elab_Call): Propagate the initialization procedure context to
6235 subsequent calls to Check_A_Call.
6236 (Check_Internal_Call_Continue): Propagate the initialization procedure
6237 context to subsequent calls to Check_Elab_Call.
6238 (Is_Finalization_Procedure): New routine. Returns True if the input
6239 entity denotes a [Deep_]Finalize routine.
6240 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6241 along with comment on usage.
6243 2011-08-05 Vadim Godunko <godunko@adacore.com>
6245 * s-atocou.ads: Add list of supported platforms.
6247 2011-08-05 Yannick Moy <moy@adacore.com>
6249 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6251 * opt.ads (Disable_ALI_File): new Boolean flag
6252 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6254 2011-08-05 Ed Falis <falis@adacore.com>
6256 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6257 environ is properly defined.
6259 2011-08-05 Vincent Celier <celier@adacore.com>
6261 * make.adb (Compilation_Phase): Exit immediately when all objects have
6262 been found up to date, to avoid multiple exit messages.
6263 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6264 same project for languages with no compiler.
6265 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6267 2011-08-05 Robert Dewar <dewar@adacore.com>
6269 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6270 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6271 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6272 s-atocou-builtin.adb: Minor reformatting.
6274 2011-08-05 Yannick Moy <moy@adacore.com>
6276 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6277 if the node to wrap is a pragma check, this node and enclosed
6278 expression are not expanded, so do not apply any transformations here.
6279 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6280 introducing transient scopes.
6282 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6284 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6285 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6286 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6287 routine is available, so we use the default implementation of these
6289 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6290 support for copying attributes on VxWorks 6.
6292 2011-08-05 Yannick Moy <moy@adacore.com>
6294 * debug.adb: Remove use of -gnatd.D.
6295 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6296 * opt.ads: Simplify variables for ALFA mode, to keep one only
6297 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6300 2011-08-05 Vincent Celier <celier@adacore.com>
6302 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6303 Builder'Default_Switches.
6305 2011-08-05 Vincent Celier <celier@adacore.com>
6307 * makeusg.adb: Add lines for --create-map-file switches.
6309 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6311 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6312 profile is incomplete and the full view is available, replace it with
6314 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6315 incomplete, freezing the subprogram is delayed until the full view is
6317 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6318 fixed-point multiplication operator and the predefined operator is
6319 resolved in favor of the user-defined one.
6321 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6323 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6326 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6328 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6329 whether a type lacks user-defined Read or Write operations, or has a
6330 component that lacks them.
6331 * sem_attr.adb (Check_Stream_Attribute): if restriction
6332 No_Default_Stream_Attributes is active, verify that all subcomponent
6333 types of the target have user-defined stream operations, and report
6335 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6336 * exp_strm.adb: Build_Elementary_Input_Call,
6337 Build_Elementary_Write_Call): remove checks for restriction
6338 No_Default_Stream_Attributes, now checked in semantics.
6340 2011-08-04 Vincent Celier <celier@adacore.com>
6342 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6343 switches on the command line, look for all valid --RTS switches in the
6344 Builder switches and for each language use the first runtime name found
6345 to invoke gprconfig.
6346 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6347 command line and there is no auto-configuration.
6348 (Runtime_Name_Set_For): New function.
6350 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6352 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6353 elaborate initialization expression for variable Abort when processing
6354 a package body or a declaration.
6355 (Create_Finalizer): Propagate the package context when creating the
6356 exception-related variables.
6357 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6358 For_Package along with usage comment.
6360 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6362 * gcc-interface/Makefile.in: Clean up targets.
6363 Enable new package for atomic counters and copy-on-write implementation
6364 of unbounded strings on x86 platforms.
6365 * gcc-interface/Make-lang.in: Update dependencies.
6367 2011-08-04 Robert Dewar <dewar@adacore.com>
6369 * exp_ch7.adb: Minor reformatting.
6371 2011-08-04 Robert Dewar <dewar@adacore.com>
6373 * exp_strm.adb: Minor reformatting.
6375 2011-08-04 Vadim Godunko <godunko@adacore.com>
6377 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6378 operations are not supported.
6379 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6380 * s-atocou-x86.adb: New file.
6381 * Makefile.rtl: Add s-atocou.o file
6383 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6385 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6386 (Compilation_Phase): ... here.
6387 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6389 2011-08-04 Thomas Quinot <quinot@adacore.com>
6391 * Make-generated.in: Fix minor typo in comment.
6393 2011-08-04 Thomas Quinot <quinot@adacore.com>
6395 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6398 2011-08-04 Robert Dewar <dewar@adacore.com>
6400 * a-coinho.adb: Minor reformatting.
6402 2011-08-04 Robert Dewar <dewar@adacore.com>
6404 * a-coinho.ads: Minor reformatting.
6406 2011-08-04 Vadim Godunko <godunko@adacore.com>
6408 * s-atocou.ads, s-atocou.adb: New files.
6409 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6410 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6411 direct use of GCC's atomic builtins and replace them by use of new
6412 atomic counter package.
6414 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6416 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6418 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6420 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6421 with a call to Get_External_Tag.
6422 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6423 subprogram usage. Remove the guard against package declarations and
6424 bodies since Build_Cleanup_Statements is no longer invoked in that
6426 (Build_Components): Initialize Tagged_Type_Stmts when the context
6427 contains at least one library-level tagged type.
6428 (Build_Finalizer): New local variables Has_Tagged_Types and
6429 Tagged_Type_Stmts along with associated comments on usage. Update the
6430 logic to include tagged type processing.
6431 (Create_Finalizer): Insert all library-level tagged type unregistration
6432 code before the jump block circuitry.
6433 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6434 (Expand_N_Package_Declaration): Remove the call to
6435 Build_Cleanup_Statements.
6436 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6437 unregister the external tag of a tagged type.
6438 (Processing_Actions): Reimplemented to handle tagged types.
6439 (Process_Declarations): Detect the declaration of a library-level
6440 tagged type and carry out the appropriate actions.
6441 (Unregister_Tagged_Types): Removed. The machinery has been directly
6442 merged with Build_Finalizer.
6444 2011-08-04 Robert Dewar <dewar@adacore.com>
6446 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6447 gnatls.adb, exp_ch3.adb: Minor reformatting.
6449 2011-08-04 Marc Sango <sango@adacore.com>
6451 * sem_attr.adb (Analyze_Attribute): Replace the message
6452 "invisible attribute of}" of the spark restriction violation in
6453 attribute reference by the simple message "invisible attribute of type".
6454 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6455 two insertion characters: '&' and '}'.
6457 2011-08-04 Vadim Godunko <godunko@adacore.com>
6459 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6460 * a-coinho.ads, a-coinho.adb: New file.
6461 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6463 2011-08-04 Nicolas Roche <roche@adacore.com>
6465 * alfa_test.adb: Not all ali files are containing alfa information even
6466 if compiled with -gnatd.F. So suppress warning about missing ALFA
6469 2011-08-04 Yannick Moy <moy@adacore.com>
6471 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6473 * put_alfa.adb: Check that scope name is not empty.
6475 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6477 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6478 Needs_Elementary_Stream_Operation, to determine whether user-defined
6479 Read and Write attributes are available for the elementary components
6480 of the given type. If only the predefined attributes are available,
6481 then when restriction No_Default_Stream_Attributes is active the
6482 predefined stream attributes for the composite type cannot be created.
6484 2011-08-04 Robert Dewar <dewar@adacore.com>
6486 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6487 Put routines in alpha order
6489 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6491 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6492 * gcc-interface/Make-lang.in: Update dependencies.
6494 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6496 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6497 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6500 2011-08-04 Robert Dewar <dewar@adacore.com>
6502 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6503 lib-xref-alfa.adb: Minor reformatting.
6505 2011-08-04 Marc Sango <sango@adacore.com>
6507 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6508 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6509 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6512 2011-08-04 Tristan Gingold <gingold@adacore.com>
6514 * bindgen.adb (Gen_Adainit_C): Remove.
6515 (Gen_Adafinal_C): Ditto.
6516 (Gen_Elab_Externals_C): Ditto.
6517 (Gen_Elab_Calls_C): Ditto.
6518 (Gen_Elab_Order_C): Ditto.
6519 (Gen_Elab_Defs_C): Ditto.
6520 (Gen_Finalize_Library_C): Ditto.
6521 (Gen_Finalize_Library_Defs_C): Ditto.
6522 (Gen_Main_C): Ditto.
6523 (Gen_Output_File_C): Ditto.
6524 (Gen_Restrictions_C): Ditto.
6525 (Gen_Versions_C): Ditto.
6526 (Write_Info_Ada_C): Ditto.
6527 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6528 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6529 Always call Gen_Output_File_Ada.
6530 * gnatlink.adb (Begin_Info): Now a constant.
6532 (Ada_Bind_File): Remove
6533 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6534 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6535 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6536 * opt.ads (Ada_Bind_File): Remove.
6538 2011-08-04 Thomas Quinot <quinot@adacore.com>
6540 * projects.texi: Document target-specific directory in default project
6543 2011-08-04 Thomas Quinot <quinot@adacore.com>
6545 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6548 2011-08-04 Yannick Moy <moy@adacore.com>
6550 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6551 opt.ads, lib-xref.ads: Code clean up.
6553 2011-08-04 Yannick Moy <moy@adacore.com>
6555 * gnat_rm.texi: Update description of Test_Case
6556 * gnat_ugn.texi: Typo.
6558 2011-08-04 Ed Falis <falis@adacore.com>
6560 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6562 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6564 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6565 it is of type Root_Controlled. This action eliminates fields Prev and
6566 Next from type equality.
6568 2011-08-04 Yannick Moy <moy@adacore.com>
6570 * lib-xref-alfa.adb: Correct typo.
6572 2011-08-04 Matthew Heaney <heaney@adacore.com>
6574 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6577 2011-08-04 Yannick Moy <moy@adacore.com>
6579 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6580 (Analyze_Pragma): allow static string expression for name of Test_Case,
6581 instead of simply string literals.
6582 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6585 2011-08-04 Vincent Celier <celier@adacore.com>
6587 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6588 case suffixes to find truncated main sources.
6590 2011-08-04 Tristan Gingold <gingold@adacore.com>
6592 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6593 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6594 (Compute_Current_Task): Ditto.
6596 2011-08-04 Tristan Gingold <gingold@adacore.com>
6598 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6600 2011-08-04 Yannick Moy <moy@adacore.com>
6602 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6603 library-level constant.
6604 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6605 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6606 used as selector of parameter association, in ALFA mode.
6608 2011-08-04 Robert Dewar <dewar@adacore.com>
6610 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6611 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6614 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6616 * make.adb (Linking_Phase): Set source search path before calling
6617 gnatlink in CodePeer mode.
6619 2011-08-04 Javier Miranda <miranda@adacore.com>
6621 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6622 Remove code which takes care of building TSDs.
6623 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6624 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6625 the accessibility check in VM targets.
6626 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6627 (Building_Static_DT): Now returns false for VM targets.
6628 (Build_VM_TSDs): Removed.
6629 (Expand_Interface_Conversion): Generate missing runtime check for
6630 conversions to interface types whose target type is unknown at compile
6632 (Make_VM_TSD): Add missing code to disable the generation of calls to
6633 Check_TSD if the tagged type is not defined at library level, or not
6634 has a representation clause specifying its external tag, or -gnatdQ is
6636 * exp_disp.ads (Build_VM_TSDs): Removed.
6637 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6638 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6639 register primitives in the dispatch tables in VM targets.
6640 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6641 initialization of class-wide interface objects in VM targets.
6642 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6645 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6647 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6648 when dotnet-ld cannot be found.
6650 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6652 * bindgen.adb: Simplify significantly generation of binder body file in
6654 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6655 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6658 2011-08-04 Yannick Moy <moy@adacore.com>
6660 * sem_prag.adb, sem.ads: Code cleanup.
6662 2011-08-04 Tristan Gingold <gingold@adacore.com>
6664 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6665 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6666 results if possible.
6667 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6668 * gnat_ugn.texi: Update dynamic stack usage section.
6670 2011-08-04 Steve Baird <baird@adacore.com>
6672 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6673 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6674 contains only a call to the user-defined main subprogram.
6675 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6676 call the "wrapper" subprogram instead of directly
6677 calling the user-defined main subprogram.
6679 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6681 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6682 alternatives of a case statement for controlled objects. Rename local
6683 variable A to Dead_Alt.
6684 (Expand_N_If_Statement): Check the then and else statements of an if
6685 statement for controlled objects. Check the then statements of all
6686 elsif parts of an if statement for controlled objects.
6687 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6689 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6690 detects a loop associated with the expansion of an array object.
6691 Augment the processing of the loop statements to account for a possible
6692 wrap done by Process_Statements_For_Controlled_Objects.
6693 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6694 statements and abortable part of an asynchronous select for controlled
6696 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6697 conditional entry call for controlled objects.
6698 (Expand_N_Selective_Accept): Check the alternatives of a selective
6699 accept for controlled objects.
6700 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6701 alternatives of a timed entry call for controlled objects.
6702 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6703 exception handler for controlled objects.
6704 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6705 Add formal parameter Nested_Constructs along with its associated
6707 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6708 Requires_Cleanup_Actions.
6709 (Process_Statements_For_Controlled_Objects): New routine.
6710 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6711 routine. Inspect a node which contains a non-handled sequence of
6712 statements for controlled objects. If such an object is found, the
6713 statements are wrapped in a block.
6715 2011-08-04 Bob Duff <duff@adacore.com>
6717 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6718 need to compare with Class_Wide_Type (T2), in order to get at the
6719 original class-wide type node.
6720 * sem_type.ads (Covers): Improve the comment.
6721 * einfo.ads (Class_Wide_Type): Improve the comment.
6722 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6723 the type of the Deref.
6725 2011-08-04 Yannick Moy <moy@adacore.com>
6727 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6728 separate declarations.
6729 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6730 check identifier of pragma argument.
6731 (Chain_TC): check that no other test case associated to the same entity
6732 share the same name.
6733 (Check_Test_Case): disallow test case inside subprogram body
6734 (Analyze_Pragma): correct call to check identifier and not argument
6735 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6736 function gets name from test case pragma.
6738 2011-08-04 Yannick Moy <moy@adacore.com>
6740 * gnat_rm.texi: Document new pragma and aspect.
6741 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6742 (No_Duplicates_Allowed): new constant array defining whether duplicates
6743 aspects of each kind can appear on the same declaration.
6744 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6745 field, which points to a node holding the previous Spec_PPC_List.
6746 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6747 through the indirection with Contract.
6748 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6749 * par-prag.adb (Prag): do nothing on Test_Case pragma
6750 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6752 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6753 component Ensures of Test_Case.
6754 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6755 (Analyze_Generic_Subprogram_Declaration,
6756 Analyze_Subprogram_Instantiation,
6757 Analyze_Abstract_Subprogram_Declaration,
6758 Analyze_Subprogram_Body_Helper,
6759 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6760 insert contract in subprogram node at point of definition
6762 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6763 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6764 corresponding pragma
6765 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6766 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6767 similar to the analysis of pre/post
6768 (Derive_Subprogram): insert contract in subprogram node at point of
6770 * sem_prag.adb, sem_prag.ads
6771 (Check_Arg_Is_String_Literal, Check_Identifier):
6772 new checking procedures to be called in treatment of pragmas
6773 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6774 pragma is well-formed. This does not check currently that 'Result is
6775 used only in the Ensures component of a Test_Case.
6776 (Analyze_Pragma): add case for Test_Case
6777 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6778 components of a Test_Case.
6779 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6780 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6781 pragma, treated as spec expressions.
6782 (Sig_Flags): add value -1 for Test_Case.
6783 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6784 Get_Requires_From_Test_Case_Pragma): getters for both expression
6785 components of a Test_Case.
6786 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6787 indirection between an entry or [generic] subprogram entity and its
6788 pre/post + test-cases.
6789 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6790 get/set for fields of an N_Contract node.
6791 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6792 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6793 names and pragma for Test_Case.
6794 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6796 2011-08-04 Vincent Celier <celier@adacore.com>
6798 * gnat_ugn.texi: Improve documentation of gnatmake switch
6799 --source-info-file=.
6801 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6803 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6804 type). Initialize Atyp to the appropriate type which is later checked
6805 for completion. Rewrite the assertion associated with private type
6808 2011-08-04 Ed Falis <falis@adacore.com>
6810 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6811 initialize the number of CPUs.
6813 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6815 * sem_type.adb (Disambiguate): New subsidiary routine
6816 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6817 equality on an anonymous access type whose designated type is private
6818 does not lead to an ambiguity with the universal access equality
6819 operator in the body or child units of the defining package. The same
6820 is true for a multiplication operator on a private type completed with
6823 2011-08-04 Javier Miranda <miranda@adacore.com>
6825 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6826 (Normalize_Scalars_Config): Removed.
6828 (Register_Opt_Config_Switches): Remove registering config values of
6829 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6830 (Restore_Opt_Config_Switches): Remove code which restores the values of
6831 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6832 Init_Or_Norm_Scalars.
6833 (Save_Opt_Config_Switches): Remove code which saves values of
6834 Init_Or_Norm_Scalars and Normalize_Scalars.
6835 (Set_Opt_Config_Switches): Remove code which restores config values of
6836 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6837 Init_Or_Norm_Scalars.
6839 2011-08-04 Yannick Moy <moy@adacore.com>
6841 * frontend.adb (Frontend): remove previous patch to avoid full
6842 qualification in ALFA mode.
6843 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6844 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6845 unique name for an entity, which could be used to identify the entity
6846 across compilation units.
6848 2011-08-04 Thomas Quinot <quinot@adacore.com>
6851 (Initialize_Default_Project_Path): Add target specific directory
6852 ($prefix/$target/lib/gnat) in front of project path in all cases
6853 (making gnatmake's behaviour consistent with gprbuild).
6854 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6855 Pass target name from Sdefault to project subsystem.
6856 * gnatls.adb: Show new target specific default project directory.
6858 2011-08-04 Johannes Kanig <kanig@adacore.com>
6860 * cstand.adb: Add Information to Identifier in Standard
6861 (Identifer_For): Set Entity to the corresponding entity
6863 2011-08-04 Sergey Rybin <rybin@adacore.com>
6865 * gnat_ugn.texi: Update doc on gnatcheck.
6867 2011-08-04 Yannick Moy <moy@adacore.com>
6869 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6872 2011-08-04 Yannick Moy <moy@adacore.com>
6874 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6875 performing expansion.
6876 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6877 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6878 it is not called in ALFA mode.
6880 2011-08-04 Emmanuel Briot <briot@adacore.com>
6882 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6883 after all, so removed.
6885 2011-08-04 Sergey Rybin <rybin@adacore.com>
6887 * vms_data.ads: Add missing VMS qualifiers.
6889 2011-08-04 Emmanuel Briot <briot@adacore.com>
6891 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6892 the list of files on the command line after processing it through
6895 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6897 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6898 processing for .NET/JVM. These targets can now benefit from
6899 Raise_From_Controlled_Operation and they share the same processing with
6901 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6902 These targets need transient scopes in order to properly finalize short
6903 lived controlled objects.
6904 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6905 NET/JVM. These targets can now benefit from
6906 Raise_From_Controlled_Operation and they share the same processing with
6909 2011-08-04 Geert Bosch <bosch@adacore.com>
6911 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6913 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6915 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6916 Expand_Record_Aggregate, to determine whether aggregate must be
6917 expanded into assignments. This is the case if the ancestor part is
6918 private, regarless of the setting of the flag Has_Private_Ancestor.
6920 2011-08-04 Ed Falis <falis@adacore.com>
6922 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6924 2011-08-04 Bob Duff <duff@adacore.com>
6926 * sinfo.ads: Fix comment.
6928 2011-08-04 Steve Baird <baird@adacore.com>
6930 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6931 choose a package name in much the same way as is
6932 done for JGNAT when VM_Target /= No_VM, except that
6933 a slightly more distinctive prefix string is used.
6935 2011-08-04 Emmanuel Briot <briot@adacore.com>
6937 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6938 gnatmake command line.
6939 This behavior was never documented (and was supported only because of
6940 an early bug in the code). This case might lead to ambiguous cases
6941 (between unit names and truncated base names without suffixes).
6943 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6945 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6946 Remove the external tag of a tagged type from the internal hash table.
6947 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6948 expanded usage of the routine. Strenghten the check for Is_Master. Add
6949 processing for tagged types.
6950 (Build_Finalizer): Create all the necessary lists used in finalizer
6951 creation when the processed context is a package that may contain
6953 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6954 Requires_Cleanup_Actions.
6955 (Expand_N_Package_Body): Package bodies may need clean up code
6956 depending on whether they contain tagged types.
6957 (Expand_N_Package_Declaration): Package declarations may need clean up
6958 code depending on whether they contain tagged types.
6959 (Unregister_Tagged_Types): New routine. Search through a list of
6960 declarations or statements, looking for non-abstract Ada tagged types.
6961 For each such type, generate code to unregister the external tag.
6962 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6963 Requires_Cleanup_Actions.
6964 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6965 through a list of declarations or statements looking for non-abstract
6966 Ada tagged types or controlled objects.
6967 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6968 Requires_Cleanup_Actions.
6969 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6970 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6973 2011-08-04 Vincent Celier <celier@adacore.com>
6975 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6976 has Ada sources, not project Project, because if the root project
6977 Project has no sources of its own, all projects will be deemed without
6980 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6982 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6983 of the No_Param_Proc acc-to-subp type used for initialization of
6984 __gnat_finalize_library_objects so that it's declared at library level
6985 rather than nested inside of the adainit routine.
6987 2011-08-04 Javier Miranda <miranda@adacore.com>
6989 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6990 if the tagged type has a representation clause which specifies its
6993 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6995 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6996 Remove previous procedure with that name.
6997 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6999 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7000 subtype mark, the ancestor cannot have unknown discriminants.
7001 (Resolve_Record_Aggregate): if the type has invisible components
7002 because of a private ancestor, the aggregate is illegal.
7004 2011-08-04 Vincent Celier <celier@adacore.com>
7006 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7007 account switches -gnat2005, -gnat12 and -gnat2012.
7009 2011-08-04 Bob Duff <duff@adacore.com>
7011 * s-tasdeb.ads: Minor comment fix.
7013 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7015 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7017 * switch.ads, switch.adb (Is_Language_Switch): New function.
7019 2011-08-04 Vincent Celier <celier@adacore.com>
7021 * switch-c.adb: Minor comment addition.
7023 2011-08-04 Vincent Celier <celier@adacore.com>
7025 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7026 ending with '=' is followed by a space (missing file name).
7028 2011-08-04 Pascal Obry <obry@adacore.com>
7030 * g-regist.ads: Fix size of HKEY on x86_64-windows.
7032 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7034 * sem_ch12.adb (Analyze_Associations): New routine
7035 Check_Overloaded_Formal_Subprogram to reject a formal package when
7036 there is a named association or a box initialisation for an overloaded
7037 formal subprogram of the corresponding generic.
7039 2011-08-04 Yannick Moy <moy@adacore.com>
7041 * alfa.ads (ALFA_Xref_Record): add component for type of entity
7042 * get_alfa.adb, put_alfa.adb: Read and write new component of
7044 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7046 2011-08-04 Pascal Obry <obry@adacore.com>
7048 * urealp.adb: Minor reformatting.
7050 2011-08-04 Tristan Gingold <gingold@adacore.com>
7052 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7053 Handle the case when Cleanup_Protected_Object returns Empty.
7055 2011-08-04 Yannick Moy <moy@adacore.com>
7057 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7059 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7061 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7062 call, ignore functions.
7064 2011-08-04 Geert Bosch <bosch@adacore.com>
7066 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7069 2011-08-04 Emmanuel Briot <briot@adacore.com>
7071 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7072 as an index for Builder'Switches. This conforms to the documentation.
7073 * make.adb (Insert_Project_Sources): avoid duplicate code
7075 2011-08-04 Emmanuel Briot <briot@adacore.com>
7077 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7078 name on the command line (for instance "../dummy"), never assume it can
7081 2011-08-04 Tristan Gingold <gingold@adacore.com>
7083 * bindgen.adb: Remove code the reference or create the
7084 Break_Start/__gnat_break_start procedure.
7085 * s-stalib.adb (Break_Start): Removed.
7087 2011-08-04 Emmanuel Briot <briot@adacore.com>
7089 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7090 shared with gprbuild.
7092 2011-08-04 Yannick Moy <moy@adacore.com>
7094 * par-ch4.adb (P_Primary): preferentially issue an error message about
7095 a missing parenthesis arount a conditional or case expression in Ada
7096 2012 mode, if we detect that the alignment is not correct for a
7099 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7101 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7102 tag-to-class-wide conversion as needing finalization actions.
7103 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7104 a tag-to-class-wide conversion as needing finalization actions.
7105 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7106 conversion does not need finalization actions.
7107 (Is_Tag_To_CW_Conversion): New routine.
7108 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7109 whether an object is the result of a tag-to-class-wide conversion.
7111 2011-08-04 Yannick Moy <moy@adacore.com>
7113 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7114 the left-hand-side and right-hand-side of a conjunct are inserted when
7115 translating a pre- or postcondition
7116 * sem_ch6.adb: Correct typo in comment
7118 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7120 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7121 Unchecked_Conversion and Unchecked_Deallocation.
7123 2011-08-04 Thomas Quinot <quinot@adacore.com>
7125 * make.adb: Minor reformatting.
7127 2011-08-04 Emmanuel Briot <briot@adacore.com>
7129 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7130 sources in the project and its imported projects, but not in the whole
7133 2011-08-04 Emmanuel Briot <briot@adacore.com>
7135 * make.adb: Remove debug trace.
7137 2011-08-04 Vincent Celier <celier@adacore.com>
7139 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7140 path in canonical form, to be able to compare path names on platforms
7141 such as Windows or Darwin.
7143 2011-08-04 Thomas Quinot <quinot@adacore.com>
7145 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7146 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7147 * scos.ads: Update documentation accordingly.
7148 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7151 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7153 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7154 attribute only if prefix type is scalar.
7156 2011-08-04 Emmanuel Briot <briot@adacore.com>
7158 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7159 in gnatmake for specifying mains on the command line that do not belong
7160 to the main project. These mains must currently all belong to the same
7162 (Ultimate_Extension_Of): removed, since duplicated
7163 Ultimate_Extending_Project.
7165 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7167 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7169 (CodePeer_Mode_String): New.
7170 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7172 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7173 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7174 mode, since no useful elaboration subprogram is needed by CodePeer.
7175 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7176 In this mode, compile binder file with -gnatC and do stop after this
7179 2011-08-04 Vincent Celier <celier@adacore.com>
7181 * exp_ch7.adb: Minor comment fix.
7183 2011-08-04 Robert Dewar <dewar@adacore.com>
7185 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7186 exp_ch4.adb, makeutl.adb: Minor reformatting.
7188 2011-08-04 Emmanuel Briot <briot@adacore.com>
7190 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7191 Create several new subprograms to move code out of Make. This makes the
7192 code more readable, removes code duplication, and is a preparation work
7193 for adding support for aggregate projects.
7195 2011-08-04 Tristan Gingold <gingold@adacore.com>
7197 * s-po32gl.ads, s-po32gl.adb: New files.
7198 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7199 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7200 (Build_Finalization_Collection): Use it.
7201 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7202 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7204 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7205 * gcc-interface/Make-lang.in: Update dependencies.
7207 2011-08-04 Emmanuel Briot <briot@adacore.com>
7209 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7212 2011-08-04 Emmanuel Briot <briot@adacore.com>
7214 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7215 command line is not a file name, also check whether it could be a unit
7218 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7220 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7221 the header of the finalization routine.
7222 If the unit has no finalizer but is a body whose spec has one, then
7223 generate the decrement of the elaboration entity only.
7224 If the unit has a finalizer and is a spec, then do not generate the
7225 decrement of the elaboration entity.
7226 (Gen_Finalize_Library_C): Likewise.
7228 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7230 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7231 (Bounds_Size_Expression): Removed.
7232 (Double_Alignment_Of): New subsidiary routine.
7233 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7234 for a hole in the dope vector of unconstrained arrays due to different
7235 index and element alignments.
7237 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7239 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7240 raise program_error because body has not been seen yet.
7242 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7244 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7247 2011-08-04 Vincent Celier <celier@adacore.com>
7249 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7251 2011-08-04 Yannick Moy <moy@adacore.com>
7253 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7254 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7256 2011-08-04 Thomas Quinot <quinot@adacore.com>
7258 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7259 instantiation in RCI.
7261 2011-08-04 Emmanuel Briot <briot@adacore.com>
7263 * make.adb: Share more code with gprbuild
7265 2011-08-04 Emmanuel Briot <briot@adacore.com>
7267 * projects.texi: Added documentation for the IDE'Gnat project file
7270 2011-08-04 Nicolas Roche <roche@adacore.com>
7272 * gnat_rm.texi: Minor editing.
7274 2011-08-04 Javier Miranda <miranda@adacore.com>
7276 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7277 and the library case for VM targets.
7278 (Gen_Adainit_Ada): Likewise.
7280 2011-08-04 Robert Dewar <dewar@adacore.com>
7282 * g-altive.ads: Minor comment updates.
7283 * prj-nmsc.adb: Minor reformatting.
7285 2011-08-04 Javier Miranda <miranda@adacore.com>
7288 (Normalize_Scalars_Config): Value of the configuration switch set by
7289 pragma Normalize_Scalars when it appears in the gnat.adc file.
7290 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7291 to save and restore settings of this pragma.
7293 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7294 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7296 2011-08-04 Vincent Celier <celier@adacore.com>
7298 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7300 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7302 * makeutl.adb: Minor reformatting.
7304 2011-08-04 Olivier Hainque <hainque@adacore.com>
7306 * g-altive.ads: Update comments to reflect that only the soft
7307 binding is available today.
7309 2011-08-04 Robert Dewar <dewar@adacore.com>
7311 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7312 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7313 * gcc-interface/Make-lang.in: Update dependencies.
7315 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7317 * prj-env.adb: Remove local debug traces.
7319 2011-08-04 Yannick Moy <moy@adacore.com>
7321 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7322 was used instead of Hi_OK, which could cause a read of an uninitialized
7323 value later on. Detected while working on the new warning.
7324 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7326 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7327 in more cases, in order to detect more unreferenced values.
7328 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7329 object for expression, if any.
7331 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7333 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7334 the operand types instead of the Esize.
7336 2011-08-04 Steve Baird <baird@adacore.com>
7338 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7339 enable CodePeer_Mode.
7340 * bindusg.adb (Display): Add help message describing -P binder switch.
7341 * gnat_ugn.texi: Document -P binder switch.
7342 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7343 user-defined main program directly.
7344 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7345 user-defined main program in the context clause of the package body.
7347 2011-08-04 Yannick Moy <moy@adacore.com>
7349 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7350 duplicate of Defining_Entity
7351 (Get_Unique_Entity_For_Decl): rename function into
7352 Unique_Defining_Entity
7353 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7354 (Formal_Proof_On): remove synthesized flag
7355 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7356 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7357 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7358 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7359 Annotate (Formal_Proof)
7361 2011-08-04 Emmanuel Briot <briot@adacore.com>
7363 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7364 source files with non-standard naming schemes, in imported projects
7366 2011-08-04 Emmanuel Briot <briot@adacore.com>
7368 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7369 specified on the gprbuild command line, we need to compile all units
7370 within that file, not just the first one we find
7371 Fix error message for mains that are not found.
7373 2011-08-04 Thomas Quinot <quinot@adacore.com>
7375 * sem_ch6.adb: Update comment.
7376 * sem_ch12.adb: Minor reformatting.
7378 2011-08-04 Bob Duff <duff@adacore.com>
7380 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7381 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7382 race condition whose symptom is to fail to lock Parent. That, in turn,
7383 causes Parent.Awake_Count to be accessed without locking Parent, which
7384 causes another race condition whose symptom is that Parent.Awake_Count
7385 can be off by 1 (either too high or too low). The solution is to lock
7386 Parent unconditionally, and then lock Acceptor, before reading
7387 Acceptor.Terminate_Alternative.
7389 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7391 * debug.adb: Update comment.
7393 2011-08-04 Robert Dewar <dewar@adacore.com>
7395 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7396 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7397 exp_ch6.adb: Minor reformatting.
7399 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7401 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7404 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7406 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7408 2011-08-04 Thomas Quinot <quinot@adacore.com>
7410 * sinfo.ads: Minor reformatting.
7412 2011-08-04 Emmanuel Briot <briot@adacore.com>
7414 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7415 even if there is no location.
7417 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7419 * sem_res.adb, sem_ch4.adb: move check for restriction
7420 No_Task_Hierarchy to resolve_allocator.
7422 2011-08-04 Thomas Quinot <quinot@adacore.com>
7424 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7425 This flag of N_Pragma nodes is not used, remove it as well as all of
7426 the associated circuitry.
7428 2011-08-04 Javier Miranda <miranda@adacore.com>
7430 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7431 runtime check on duplicated externa tags
7432 * debug.adb Document switch -gnatdQ.
7434 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7436 * a-fihema.ads: Minor typo fix.
7438 2011-08-04 Yannick Moy <moy@adacore.com>
7440 * sem_ch10.adb: Minor comment update.
7442 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7444 * einfo.adb: Update the node field usage to reflect the renaming of
7445 Return_Flag to Return_ Flag_Or_Transient_Decl.
7446 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7447 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7448 (Write_Field15_Name): Change Return_Flag to
7449 Return_Flag_Or_Transient_Decl.
7450 * einfo.ads: Rename node field Return_Flag to
7451 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7452 occurrences in entities.
7453 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7454 associated Inline pragma.
7455 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7456 associated Inline pragma.
7457 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7459 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7460 Return_Flag and Set_Return_Flag.
7461 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7462 objects generated for controlled transients declared inside an
7463 Exception_With_Actions. Update the calls to Return_Flag.
7464 (Process_Object_Declaration): Add code to add a null guard for hook
7465 objects generated for controlled transients declared inside an
7466 Exception_With_Actions. Update related comment.
7467 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7468 objects generated for controlled transients declared inside an
7469 Exception_With_Actions. Update the calls to Return_Flag.
7470 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7472 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7474 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7475 positional aggregate.
7477 2011-08-04 Vincent Celier <celier@adacore.com>
7479 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7480 SLOC only for pragmas.
7482 2011-08-04 Emmanuel Briot <briot@adacore.com>
7484 * projects.texi: Minor typo fix.
7486 2011-08-04 Emmanuel Briot <briot@adacore.com>
7488 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7489 on case-sensitive file systems.
7491 2011-08-04 Thomas Quinot <quinot@adacore.com>
7493 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7494 nested in a disabled pragma.
7495 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7496 enclosing pragma, if any, for X decisions.
7498 2011-08-04 Thomas Quinot <quinot@adacore.com>
7500 * sem_prag.adb: Minor reformatting.
7502 2011-08-04 Vincent Celier <celier@adacore.com>
7504 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7505 allowed in no run time mode.
7507 2011-08-04 Vincent Celier <celier@adacore.com>
7509 * make.adb (Check): When -gnatc is used, check for the source file
7510 inside the ALI file with a canonical case file name.
7512 2011-08-04 Emmanuel Briot <briot@adacore.com>
7514 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7515 overriding the separator.
7517 2011-08-04 Robert Dewar <dewar@adacore.com>
7519 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7520 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7522 2011-08-04 Robert Dewar <dewar@adacore.com>
7524 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7526 2011-08-04 Yannick Moy <moy@adacore.com>
7528 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7529 'Result only appears in postcondition of function.
7531 2011-08-04 Thomas Quinot <quinot@adacore.com>
7533 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7534 external tag, include the value of the external tag in the exception
7537 2011-08-04 Yannick Moy <moy@adacore.com>
7539 * sem_attr.adb (Result): modify error message for misplaced 'Result
7541 2011-08-04 Sergey Rybin <rybin@adacore.com>
7543 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7544 clear that the second argument must be an identifier.
7546 2011-08-04 Thomas Quinot <quinot@adacore.com>
7548 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7549 -fpreserve-control-flow, insert an IF statement on the barrier
7550 condition to ensure that a conditional branch instruction is generated.
7552 2011-08-04 Emmanuel Briot <briot@adacore.com>
7554 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7555 (Processing_Flags.Ignore_Missing_With): new flag.
7557 2011-08-04 Emmanuel Briot <briot@adacore.com>
7559 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7560 Source_List_File on case-insensitive systems where the file is actually
7561 on a case-sensitive file system (NFS,...).
7563 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7565 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7566 function return contains a controlled [extension] aggregate and the
7567 return statement is not part of a handled sequence of statements, wrap
7568 the return in a block. This ensures that all controlled temporaries
7569 generated during aggregate resolution will be picked up by the
7570 finalization machinery.
7572 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7574 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7575 components, freeze type before resolution, to ensure that default
7576 initializations are present for all components.
7577 * sem_res.adb (Resolve_Actuals): the designated object of an
7578 accces-to-constant type is a legal actual in a call to an
7579 initialization procedure.
7581 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7583 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7584 N_Unchecked_Type_Conversion to the possible containers of a renamed
7587 2011-08-04 Yannick Moy <moy@adacore.com>
7589 * par-ch13.adb (Aspect_Specifications_Present): recognize
7590 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7591 is issued in Strict mode.
7592 * par.adb: Fix typos in comments.
7594 2011-08-04 Yannick Moy <moy@adacore.com>
7596 * sem_attr.adb (Result): modify error message to take into account Post
7597 aspect when compiling Ada 2012 (or newer) code.
7599 2011-08-04 Nicolas Roche <roche@adacore.com>
7601 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7602 remove need for GCC exceptions.
7604 2011-08-04 Vincent Celier <celier@adacore.com>
7606 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7607 project, not the source file name.
7608 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7609 excluded, continue looking. This excluded source will only be returned
7610 if there is no other source with the same base name that is not locally
7613 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7615 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7616 private and one of the operands is a real literal, use a qualified
7617 expression rather than a conversion which is not meaningful to the
7620 2011-08-04 Yannick Moy <moy@adacore.com>
7622 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7623 corresponding aspect X'Class are allowed, proceed with analysis of the
7624 aspect instead of skipping it.
7626 2011-08-04 Tristan Gingold <gingold@adacore.com>
7628 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7629 This will allow to have an Ada implementation for the subprogram.
7631 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7633 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7634 completion and aspects are present, apply them to the entity for the
7635 type which is currently the partial view, but which is the one that
7637 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7638 applies to a partial view, indicate that the full view has predicates
7639 and delayed aspects.
7640 (Replace_Type_Reference): Handle properly predicates that apply to the
7641 full view of a private completion.
7643 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7645 * layout.adb (Layout_Type): For composite types, do not set Esize.
7646 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7648 (Size_Known): Look at the RM size of components instead of the Esize.
7649 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7650 issue warning and activate Implicit_Packing.
7651 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7652 if the Esize is not known.
7653 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7654 for elementary types only.
7655 (Analyze_Record_Representation_Clause): Look at the RM size instead
7656 of the Esize to issue errors.
7657 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7659 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7661 Look at the RM size instead of the Esize for types if the latter is
7663 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7665 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7667 * sem_type.adb: proper handling of equality not involving anonymous
7670 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7672 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7673 Vis_Decls. When creating a library-level finalizer for a package spec,
7674 both the declaration and body of the finalizer are inserted either in
7675 the visible or private declarations of the package spec.
7677 2011-08-04 Javier Miranda <miranda@adacore.com>
7679 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7680 use of the full-view of a type when invoking Is_Ancestor.
7681 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7682 the full-view of private parents is requested, then use also the
7683 full-view of the parent of the first derivation.
7685 2011-08-04 Tristan Gingold <gingold@adacore.com>
7687 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7688 instead of the locally imported procedure.
7689 * s-taprop-mingw.adb (Enter_Task): Ditto.
7690 * s-valrea.adb (Scan_Real): Ditto.
7691 * s-imgrea.adb (Set_Image_Real): Ditto.
7692 * s-flocon.ads: Make the package pure.
7694 2011-08-04 Thomas Quinot <quinot@adacore.com>
7696 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7697 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7698 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7699 New subprogram, moved here from...
7700 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7701 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7702 rewriting of the last argument into a procedure call statement here...
7703 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7706 2011-08-04 Thomas Quinot <quinot@adacore.com>
7708 * par_sco.adb: Minor reformatting.
7710 2011-08-04 Robert Dewar <dewar@adacore.com>
7712 * erroutc.adb: Minor reformatting.
7714 2011-08-04 Thomas Quinot <quinot@adacore.com>
7716 * par_sco.adb: Comment update.
7718 2011-08-04 Tristan Gingold <gingold@adacore.com>
7720 * s-flocon.ads: New file.
7721 * g-flocon.ads: Now a renaming of s-flocon.
7722 * Makefile.rtl: Add s-flocon.o
7724 2011-08-04 Javier Miranda <miranda@adacore.com>
7726 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7727 constrained, do not attempt to build a subtype of it.
7729 2011-08-04 Yannick Moy <moy@adacore.com>
7731 * errout.ads Change comments: remove 'R'M as an example where quotes
7732 are needed; add ALFA as another case where quotes are not needed
7733 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7734 case where quotes are not needed.
7735 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7736 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7737 Remove all occurrences of 'A'L'F'A
7739 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7741 * sem_ch13.adb: check legality of invariant pragma.
7743 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7745 * bindgen.adb: Add comments.
7747 2011-08-04 Yannick Moy <moy@adacore.com>
7749 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7751 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7752 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7754 2011-08-04 Robert Dewar <dewar@adacore.com>
7756 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7757 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7758 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7760 2011-08-04 Thomas Quinot <quinot@adacore.com>
7762 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7764 2011-08-04 Thomas Quinot <quinot@adacore.com>
7767 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7770 2011-08-04 Robert Dewar <dewar@adacore.com>
7772 * einfo.ads, exp_ch4.adb: Minor reformatting.
7774 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7776 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7778 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7780 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7781 type in all cases to compute list of primitive operations, because full
7782 view may be an itype that is not attached to the list of declarations.
7784 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7786 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7787 library has already been finalized.
7788 (Gen_Adafinal_C): Likewise.
7789 (Gen_Adainit_Ada): Generate an early return if the library has
7790 already been elaborated.
7791 (Gen_Adainit_C): Likewise.
7792 (Gen_Output_File_Ada): Generate an elaboration flag.
7793 (Gen_Output_File_C): Likewise.
7795 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7797 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7798 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7799 built in the first place.
7800 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7801 for CodePeer because Finalize_Address was not built to begin with.
7802 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7804 2011-08-04 Pascal Obry <obry@adacore.com>
7806 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7807 filenames, this ensures unicity of filenames across processes.
7809 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7811 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7812 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7813 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7814 Add False as the actual to From_Abort in the generated call to
7815 Raise_From_Controlled_Operation.
7817 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7819 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7820 so that the ali file name can be retrieved from outside of this package.
7821 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7822 doing nothing in the general case, but used to update the object file
7823 timestamp if directly generated by the backend.
7824 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7825 to a later time than the ali file one.
7827 2011-08-04 Yannick Moy <moy@adacore.com>
7829 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7830 entities whose body contains an Annotate pragma which forces formal
7832 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7833 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7834 Mark_Non_ALFA_Subprogram to pass in a message and node.
7835 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7836 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7837 surrounding subprogram.
7838 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7839 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7840 as not in ALFA is annotated with Formal_Proof being On, then an error
7841 is issued based on the additional parameters for message and node.
7842 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7843 * gcc-interface/Make-lang.in: Update dependencies.
7845 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7847 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7848 Finalize_Address when CodePeer is enabled.
7850 2011-08-04 Pascal Obry <obry@adacore.com>
7852 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7853 the latter returns a pointer to a static buffer which is deallocated
7854 at the end of the routine.
7856 2011-08-04 Yannick Moy <moy@adacore.com>
7858 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7859 after index creation; mark unconstrained base array type generated as
7860 being in/not in ALFA as well
7861 (Make_Index): mark subtype created as in/not in ALFA
7862 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7863 over a loop as in/not in ALFA, depending on its type and form of loop
7866 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7868 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7869 directly to False on .NET and JVM.
7871 2011-08-04 Yannick Moy <moy@adacore.com>
7873 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7874 constraint that subtype must come from source code to be in ALFA, so
7875 that anonymous subtypes can be in ALFA too.
7877 2011-08-04 Yannick Moy <moy@adacore.com>
7879 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7880 reference for ALFA mode.
7881 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7882 procedure public so as to use it from formal verification back-end.
7884 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7886 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7887 invalid checks of the Parameter, making Remove_Switch not working
7890 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7892 * targparm.ads: Update header: no run-time exception is needed on this
7895 2011-08-04 Vincent Celier <celier@adacore.com>
7897 * a-fihema.adb: Use System.IO instead of GNAT.IO
7899 2011-08-04 Thomas Quinot <quinot@adacore.com>
7901 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7902 are forbidden in Compiler_Unit mode.
7904 2011-08-04 Robert Dewar <dewar@adacore.com>
7906 * sem_util.adb: Minor reformatting.
7908 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7910 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7911 library-level finalizers.
7912 (Gen_Finalize_Library_C): Update the import string for library-level
7914 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7915 library-level finalizer.
7916 * exp_ch7.adb: Remove with and use clauses for Stringt.
7917 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7918 Spec_Decl. Add local variable Body_Id. The names of library-level
7919 finalizers are now manually fully qualified and are no longer external.
7920 A single name is now capable of servicing .NET, JVM and non-VM targets.
7921 Pragma Export is no longer required to provide visibility for the name.
7922 (Create_Finalizer_String): Removed.
7923 (New_Finalizer_Name): New routine which mimics New_..._Name.
7925 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7927 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7928 elaboration counter to Standard_Short_Integer.
7929 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7930 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7931 (Gen_Elab_Externals_C): Likewise.
7933 2011-08-04 Ed Falis <falis@adacore.com>
7935 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7936 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7937 system-vxworks-mips.ads, system-vxworks-x86.ads
7938 (Always_Compatible_Rep): set to False for all VxWorks targets.
7940 2011-08-04 Robert Dewar <dewar@adacore.com>
7942 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7943 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7944 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7945 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7946 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7947 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7948 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7949 Minor reformatting and code reorganization.
7951 2011-08-04 Emmanuel Briot <briot@adacore.com>
7953 * projects.texi: Added doc for aggregate projects.
7955 2011-08-04 Emmanuel Briot <briot@adacore.com>
7957 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7958 Add support for overriding the Project_Path in aggregate projects.
7960 2011-08-04 Robert Dewar <dewar@adacore.com>
7962 * a-cofove.ads: Minor reformatting.
7964 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7966 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7967 on the generated code.
7968 (Build_Finalize_Statements): Update the comment on the generated code.
7969 (Build_Initialize_Statements): Update the comment on the generated code.
7970 (Build_Object_Declarations): Add local variable Result. The object
7971 declarations are now built in sequence.
7972 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7975 2011-08-04 Robert Dewar <dewar@adacore.com>
7977 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7979 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7981 * einfo.ads (Elaboration_Entity): Document new definition and use.
7982 (Elaboration_Entity_Required): Adjust to above change.
7983 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7984 * exp_ch12.adb: And with and use for Snames.
7985 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7986 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7987 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7988 <Check_Unit_Name>: Deal with N_Expanded_Name.
7989 <Attribute_Elaborated>: Extend to all unit names.
7990 * sem_elab.adb: And with and use for Uintp.
7991 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7992 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7993 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7994 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7995 from Gen_Adainit_Ada.
7996 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7997 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7998 case, do not call System.Standard_Library.Adafinal; instead call
7999 finalize_library if needed.
8000 (Gen_Adafinal_C): Likewise.
8001 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8002 non-main program case.
8003 (Gen_Adainit_C): Generate a couple of external declarations here.
8004 In the main program case, set SSL.Finalize_Library_Objects.
8005 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8006 (Gen_Elab_Calls_C): Likewise.
8007 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
8008 (Gen_Finalize_Library_C): Likewise. Generate a full function.
8009 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8011 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8012 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
8014 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8015 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
8016 of external declarations. Call Gen_Finalize_Library_C.
8018 2011-08-04 Emmanuel Briot <briot@adacore.com>
8020 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8021 Compute_Compilation_Phases): new subprogram.
8022 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8023 The number of mains as well as the various compilation phases that
8024 need to be run are now project tree specific, since various
8025 aggregated trees might have different requirements. In particular,
8026 they do not all require bind or link phases.
8028 2011-08-04 Emmanuel Briot <briot@adacore.com>
8030 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8031 (Project_Tree_Appdata): New type.
8032 It is now possible to associate application-specific data to a project
8033 tree. In particular, this is used in the gprbuild builder to avoid a
8034 number of global tables and htables, especially now that there can be
8035 several project trees loaded at once because of aggregate projects.
8036 (Debug_Name): new procedure.
8037 * projects.texi: Clarify syntax of "**" for Source_Dirs
8039 2011-08-03 Emmanuel Briot <briot@adacore.com>
8041 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8042 the "roots" for a main.
8043 (Fill_From_Project): add support for aggregate projects. Main units
8044 in aggregated projects are now automatically added in the list of
8045 files to build (although this fails later on in gprbuild, because
8046 these files are not using the root proejct tree, so this needs
8048 * gcc-interface/Make-lang.in: Update dependencies.
8050 2011-08-03 Yannick Moy <moy@adacore.com>
8052 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8053 conditional expression in ALFA.
8054 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8055 expressions as not in ALFA.
8057 2011-08-03 Robert Dewar <dewar@adacore.com>
8059 * a-cofove.adb: Minor reformatting.
8061 2011-08-03 Emmanuel Briot <briot@adacore.com>
8063 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8064 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8066 These packages are more logically placed in the Queue package, since
8067 they manipulate the queue. It is also likely that they can be adapted
8068 for gnatmake, thus sharing more code.
8069 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8070 that we could move the above.
8072 2011-08-03 Emmanuel Briot <briot@adacore.com>
8074 * errutil.adb (Finalize): clean up the list of error messages on exit.
8075 Calling this subprogram multiple times will no longer show duplicate
8076 error messages on stderr.
8078 2011-08-03 Emmanuel Briot <briot@adacore.com>
8080 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8081 Getopt_Switches when we have already define a command line
8084 2011-08-03 Yannick Moy <moy@adacore.com>
8086 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8087 in ALFA. Instead, they are considered as assertions to prove.
8088 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8089 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8090 if they have no ELSE part, or if they occur in pre- and postconditions,
8091 where the Condition cannot have side-effects in ALFA
8092 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8093 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8094 Instead, include type conversion between scalar types in ALFA.
8095 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8096 if-and-only-if its type is in ALFA.
8098 2011-08-03 Thomas Quinot <quinot@adacore.com>
8100 * scos.adb, get_scos.adb, put_scos.adb
8101 New code letter for decisions: G (entry guard)
8103 (Traverse_Subprogram_Body): Rename to...
8104 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8105 (Traverse_Protected_Body): New subprogram
8106 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8107 protected bodies and entry bodies.
8109 2011-08-03 Yannick Moy <moy@adacore.com>
8111 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8112 entities with get/set subprograms, which is set on procedure entities
8113 generated by the compiler for a postcondition.
8114 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8115 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8116 entity for a declaration
8117 (Get_Unique_Entity_For_Decl): new function returning an entity which
8118 represents a declaration, so that matching spec and body have the same
8121 2011-08-03 Robert Dewar <dewar@adacore.com>
8123 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8124 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8126 2011-08-03 Yannick Moy <moy@adacore.com>
8128 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8129 library-level because retriction No_Implicit_Dynamic_Code in the
8130 front-end prevents its definition as a local subprogram
8131 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8132 for reuse in other contexts
8133 (Traverse_Declarations_Or_Statements,
8134 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8135 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8136 procedures take a callback parameter to be called on all declarations
8138 (Traverse_All_Compilation_Units): new generic function to traverse a
8139 compilation unit and call a callback parameter on all declarations
8141 2011-08-03 Javier Miranda <miranda@adacore.com>
8143 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8144 in Java since they are always enclosed in a namespace that
8145 differentiates them, and overloaded entities are supported by the VM.
8147 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8149 * checks.adb (Determine_Range): If a computed bound of an operation is
8150 outside the range of the base type of the expression, and overflow
8151 checks are enabled, the result is unknown and cannot be used for any
8152 subsequent constant folding.
8153 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8154 unknown, so is the result of the comparison.
8156 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8158 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8159 From_Abort. When finalization was triggered by an abort, propagate
8160 Standard'Abort_Signal rather than Program_Error.
8161 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8163 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8164 From_Abort. When finalization was triggered by an abort, propagate
8165 Standard'Abort_Signal rather than Program_Error.
8166 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8168 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8169 Abort_Id. Update the calls to Build_Object_Declarations and
8170 Build_Raise_Statement to include Abort_Id.
8171 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8172 calls to Build_Object_Declarations and Build_Raise_Statement to include
8174 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8175 calls to Build_Object_Declarations and Build_Raise_Statement to include
8177 (Build_Components): Create an entity for Abort_Id when exceptions are
8178 allowed on the target.
8179 (Build_Finalizer): New local variable Abort_Id.
8180 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8181 calls to Build_Object_Declarations and Build_Raise_Statement to include
8183 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8184 declaration of flag Abort_Id to preserve the original abort status
8185 before finalization code is executed.
8186 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8187 runtime routine Raise_From_Controlled_Operation.
8188 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8189 Abort_Id. Update the call to Build_Object_Declarations to include
8190 Abort_Id. Update the layout of the finalizer body.
8191 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8192 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8193 clunky code to create all flags and objects related to
8194 exception propagation and replace it with a call to
8195 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8197 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8198 Add new formal Abort_Id and associated comment on its use.
8199 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8201 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8202 Remove the clunky code to create all flags and objects related to
8203 exception propagation and replace it with a call to
8204 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8206 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8208 * s-tassta.adb: Fix minor typos.
8210 2011-08-03 Robert Dewar <dewar@adacore.com>
8212 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8213 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8215 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8217 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8218 to packages. This ensures that the finalizer body will not end up
8219 inside the freeze node.
8220 (Process_Declarations): Add code to detect whether a freeze node has a
8221 nested finalization collection.
8223 2011-08-03 Pascal Obry <obry@adacore.com>
8225 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8226 (Current_Session): Return a not null access to Session_Type.
8227 (Default_Session): Likewise.
8229 2011-08-03 Robert Dewar <dewar@adacore.com>
8231 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8232 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8234 2011-08-03 Pascal Obry <obry@adacore.com>
8236 * g-awk.ads: Minor comment fix.
8238 2011-08-03 Sergey Rybin <rybin@adacore.com>
8240 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8241 the tree structure related to discriminant constraints.
8242 Original_Discriminant cannot be used any more for computing the
8243 defining name for the reference to a discriminant.
8245 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8247 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8248 function is not visibly tagged, this is not a dispatching call and
8249 therfore is not Tag_Indeterminate, even if the function is marked as
8250 dispatching on result.
8252 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8254 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8255 (Expand_N_Free_Statement): Add a guard to protect against run-times
8256 which do not support controlled types.
8257 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8258 against run-times which do not support controlled types.
8259 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8260 against run-times which do not support controlled types.
8261 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8262 against run-times which do not support controlled types.
8263 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8264 protect against run-times which do not support controlled types.
8266 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8268 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8269 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8271 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8273 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8274 modified in the source, to prevent spurious warnings when compiling
8277 2011-08-03 Thomas Quinot <quinot@adacore.com>
8279 * a-except-2005.adb: Minor reformatting.
8281 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8283 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8284 is a renaming declaration in the private part of a package, do not emit
8285 a warning that the with_clause could be moved because the renaming may
8286 be used in the body or in a child unit.
8288 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8290 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8291 Propagate the Comes_From_Source attribute from the original return
8292 object to the renaming.
8294 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8296 * exp_ch7.adb (Build_Raise_Statement): Do not call
8297 Raise_From_Controlled_Operation when this routine is not present in
8298 the run-time library.
8299 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8300 libraries (Ravenscar), tasks are non-terminating, and protected objects
8301 and tasks can only appear at library level, so we do not want
8302 finalization of protected objects nor tasks.
8303 * exp_intr.adb: Minor clarification in comment.
8304 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8305 Gen_Output_File_C): Remove references to finalization of library-level
8306 objects when using restricted run-time libraries.
8308 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8310 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8311 Original_Discriminant only if the parent type is a generic formal.
8313 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8315 * exp_ch13.adb: Add with and use clause for Targparm;
8316 (Expand_N_Free_Statement): Prevent the generation of a custom
8317 Deallocate on .NET/JVM targets since this requires pools and address
8319 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8320 .NET/JVM targets, attach the newly allocated object to the access
8321 type's finalization collection. Do not generate a call to
8322 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8323 exist in the runtime.
8324 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8325 create a custom Allocate for object that do not require initialization.
8326 Attach a newly allocated object to the access type's finalization
8327 collection on .NET/JVM.
8328 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8329 assignment of controlled types on .NET/JVM. The two hidden pointers
8330 Prev and Next and stored and later restored after the assignment takes
8332 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8333 kludge for .NET/JVM to recognize a particular piece of code coming from
8334 Heap_Management and change the call to Finalize into Deep_Finalize.
8335 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8336 finalization collections on .NET/JVM only for types derived from
8337 Controlled. Separate the association of storage pools with a collection
8338 and only allow it on non-.NET/JVM targets.
8339 (Make_Attach_Call): New routine.
8340 (Make_Detach_Call): New routine.
8341 (Process_Object_Declarations): Suppress the generation of
8342 build-in-place return object clean up code on .NET/JVM since it uses
8344 * exp_ch7.ads (Make_Attach_Call): New routine.
8345 (Make_Detach_Call): New routine.
8346 * exp_intr.adb Add with and use clause for Targparm.
8347 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8348 on .NET/JVM targets.
8349 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8350 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8351 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8352 names used in finalization.
8354 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8356 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8357 (Attach, Detach): Lock the current task when chaining an object onto a
8360 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8362 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8363 Rewritten to create the message strings when the exception is not
8364 raised by an abort during finalization.
8365 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8366 Raise_From_Controlled_Operation and update its associated comment.
8367 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8368 Ada.Finalization.Heap_Management provides key functionality
8369 associated with controlled objects on the heap, their creation,
8370 finalization and reclamation. Type Finalization_Collection is
8371 effectively a wrapper which sits ontop of a storage pool and performs
8372 all necessary bookkeeping for all the objects it contains. Each
8373 access-to-controlled or access-to-class-wide type receives a collection
8374 as part of its expansion. The compiler generates buffer code and
8375 invokes Allocate / Deallocate to create and destroy allocated
8377 * a-finali.adb ("="): Removed.
8378 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8379 fields Prev and Next.
8380 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8381 A library unit with at least one controlled object on the library level
8382 has a special finalizer which is invoked by the binder. To signal this,
8383 ali files carry field PF.
8384 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8385 associated comment on field usage.
8386 * a-tags.adb (Get_RC_Offset): Removed.
8387 (Needs_Finalization): New routine.
8388 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8389 Dispatch tables now carry field Needs_Finalization which provides
8390 runtime indication whether a type is controlled or has controlled
8391 components or both. Remove field RC_Offset.
8392 (Get_RC_Offset): Removed along with its associated pragma Export.
8393 Since tagged types with controlled components no longer carry hidden
8394 field _controller, the special mechanism to retrieve its location is no
8396 (Needs_Finalization): New routine.
8397 * atree.ads, atree.adb (Elist24): New routine.
8398 (Set_Elist24): New routine.
8399 * atree.h: Add a define clause for Elist24.
8400 * bindgen.adb New library-level variable Lib_Final_Built.
8401 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8402 presence of a VM target, the routine generates calls to the proper
8403 library finalization routine.
8404 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8405 targets. Set the correct library finalization routine depending on
8406 whether the library has controlled objects or this is a VM compilation.
8407 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8408 to library-level finalizers of compiled units in reverse order of
8409 elaboration. It also produces exception management code and reraises a
8410 potential exception after all units have been finalized.
8411 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8412 library-level finalizers of compiled units in reverse order of
8414 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8415 definitions of all library-level finalizers available to the compilation
8416 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8418 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8419 System.Standard_Library.Adafinal directly. If the library needs
8420 finalization actions, create the sequence of finalization calls.
8421 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8422 Generate a with clause for System.Soft_Links when compiling for a VM.
8423 Remove the code which imports System.Standard_Library.Adafinal as
8424 Do_Finalize. Generate the library finalization routine.
8425 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8426 If the library needs finalization actions, create all the definitions
8427 of library- level finalizers.
8428 (Has_Finalizer): New routine. Determines whether at least one compiled
8429 unit has a library-level finalizer.
8430 Add type Qualification_Mode.
8431 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8432 * einfo.adb: New usage of field 15 as Return_Flag.
8433 Remove Finalization_Chain_Entity from the usages of field 19.
8434 Remove Associated_Final_Chain from the usages of field 23.
8435 New usage of field 23 as Associated_Collection.
8436 New usage of field 24 as Finalizer.
8437 New usage of flag 252 as Is_Processed_Transient.
8438 (Associated_Final_Chain): Removed.
8439 (Associated_Collection): New routine.
8440 (Finalization_Chain_Entity): Removed.
8441 (Finalizer): New routine.
8442 (Is_Finalizer): New routine.
8443 (Is_Processed_Transient): New routine.
8444 (Return_Flag): New routine.
8445 (Set_Associated_Final_Chain): Removed.
8446 (Set_Associated_Collection): New routine.
8447 (Set_Finalization_Chain_Entity): Removed.
8448 (Set_Finalizer): New routine.
8449 (Set_Is_Processed_Transient): New routine.
8450 (Set_Return_Flag): New routine.
8451 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8453 (Write_Field8_Name): Alphabetize the output.
8454 (Write_Field11_Name): Alphabetize the output.
8455 (Write_Field12_Name): Alphabetize the output.
8456 (Write_Field13_Name): Alphabetize the output.
8457 (Write_Field14_Name): Alphabetize the output.
8458 (Write_Field15_Name): Alphabetize the output.
8459 (Write_Field16_Name): Alphabetize the output.
8460 (Write_Field17_Name): Alphabetize the output.
8461 (Write_Field18_Name): Alphabetize the output.
8462 (Write_Field19_Name): Alphabetize the output. Remove the output of
8463 Finalization_Chain_Entity.
8464 (Write_Field20_Name): Alphabetize the output.
8465 (Write_Field21_Name): Alphabetize the output.
8466 (Write_Field22_Name): Alphabetize the output.
8467 (Write_Field23_Name): Alphabetize the output. Remove the output of
8468 Associated_Final_Chain. Add output for Associated_Collection.
8469 (Write_Field24_Name): Alphabetize the output.
8470 (Write_Field25_Name): Add output for Finalizer.
8471 (Write_Field26_Name): Alphabetize the output.
8472 (Write_Field27_Name): Alphabetize the output.
8473 (Write_Field28_Name): Alphabetize the output.
8474 * einfo.ads: Add new field description for Associated_Collection and
8476 Remove Associated_Final_Chain and its uses in nodes.
8477 Remove Finalization_Chain_Entity and its uses in nodes.
8478 Add new field description for Finalizer and its uses in nodes.
8479 Add new synthesized attribute Is_Finalizer.
8480 Add new flag description for Is_Processed_Transient and its uses in
8482 Add new field description for Return_Flag and its uses in nodes.
8483 (Associated_Final_Chain): Removed along with its pragma Inline.
8484 (Associated_Collection): New routine and pragma Inline.
8485 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8486 (Finalizer): New routine and pragma Inline.
8487 (Is_Finalizer): New routine and pragma Inline.
8488 (Is_Processed_Transient): New routine and pragma Inline.
8489 (Return_Flag): New routine and pragma Inline.
8490 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8491 (Set_Associated_Collection): New routine and pragma Inline.
8492 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8493 (Set_Finalizer): New routine and pragma Inline.
8494 (Set_Is_Processed_Transient): New routine and pragma Inline.
8495 (Set_Return_Flag): New routine and pragma Inline.
8496 * exp_aggr.adb: Alphabetize subprograms.
8497 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8498 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8499 associated comments. Remove local variables External_Final_List and
8501 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8502 Ancestor. Remove the retrieval of finalization lists. Update the call to
8504 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8505 lists. Update the call to Late_Expansion.
8506 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8507 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8508 (Gen_Assign): Remove the retrieval of the finalization list used to
8509 build the assignment. Update the calls to Make_Init_Call and
8511 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8512 Remove the mechanism to determine attachment levels and finalization
8513 list retrieval. Remove the processing for coextensions.
8514 (Init_Controller): Removed. Controllers no longer exist.
8515 (Late_Expansion): Remove formals Flist and Obj along with their
8516 associated comments. Update the calls to Build_Record_Aggr_Code and
8517 Build_Array_Aggr_Code.
8518 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8519 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8520 appear in entry bodies, protected subprograms and task bodies.
8521 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8522 * exp_ch3.adb (Add_Final_Chain): Removed.
8523 (Build_Array_Init_Proc): Alphabetize local variables.
8524 (Build_Assignment): Alphabetize local variables. Update the call to
8526 (Build_Class_Wide_Master): Rename local variables to better reflect
8528 (Build_Discriminant_Assignments): Code reformatting.
8529 (Build_Init_Call_Thru): Code reformatting.
8530 (Build_Init_Procedure): Code reformatting. Generate a special version
8531 of Deep_Finalize which is capable of finalizing all initialized
8532 components and ignore the rest.
8533 (Build_Init_Statements): Rename local variables to better reflect their
8535 Reimplement the mechanism to include the creation and update of an index
8536 variable called a "counter". It is used as a bookmark for tracing
8537 initialized and non-initialized components.
8538 (Build_Initialization_Call): Remove local variable Controller_Typ.
8539 Alphabetize all local variables. Remove the initialization of the
8540 record controller and update the call to Make_Init_Call.
8541 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8542 New local variable Counter.
8543 (Constrain_Array): Alphabetize.
8544 (Expand_Freeze_Array_Type): Create a collection instead of a
8546 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8547 Finalize_Address which is used in conjunction with allocated controlled
8549 (Expand_N_Object_Declaration): Remove the creation of a finalization
8550 list for anonymous access types. Update the calls to Make_Init_Call and
8552 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8553 retrieval of finalization lists. Remove the expansion of the record
8554 controller. Create TSS primitive Finalize_Address used in conjunction
8555 with controlled objects on the heap. Create finalization collections
8556 for access-to-controlled record components.
8557 (Expand_Record_Controller): Removed.
8558 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8559 class-wide types now requires additional processing. Create
8560 finalization collections for access-to-controlled types.
8561 (Increment_Counter): New routine.
8562 (Make_Counter): New routine.
8563 (Make_Eq_If): Remove the mention of Name_uController.
8564 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8565 types coming from System.Finalization_Root.
8566 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8567 (Predefined_Primitive_Bodies): There is no longer need to skip types
8568 coming from System.Finalization_Root.
8569 (Stream_Operation_OK): Do not generate stream routines for
8570 type Ada.Finalization.Heap_Management.Finalization_Collection.
8571 * exp_ch3.ads: Alphabetize subprograms.
8572 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8573 Add with and use clause for Lib.
8574 (Complete_Coextension_Finalization): Removed.
8575 (Complete_Controlled_Allocation): New routine. Create a finalization
8576 collection for anonymous access-to-controlled types. Create a custom
8577 Allocate which interfaces with the back end and the machinery in
8579 (Expand_Allocator_Expression): Add necessary calls to
8580 Complete_Controlled_Allocation. Remove the retrieval of finalization
8581 lists. Update the calls to Make_Adjust_Call. Generate a call to
8582 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8583 the associated collection.
8584 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8585 Code clean up. Remove the retrieval of finalization lists and
8587 Update the call to Make_Init_Call. Generate a call to
8588 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8589 the associated collection.
8590 (Get_Allocator_Final_List): Removed. Finalization lists are not
8592 (Suitable_Element): Remove the mention of Name_uController.
8593 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8594 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8595 the left hand side, carry out the assignment and adjust the left hand
8597 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8598 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8599 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8600 BIP_Collection and BIPcollection.
8601 (Build_Heap_Allocator): New routine used to allocate the return object
8602 of a build-in-place function onto a collection.
8603 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8604 (Expand_Call): Do not replace direct calls to Deep routines with their
8606 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8607 and update their occurrences. Add a special return flag to monitor the
8608 [ab]normal execution of the function. The flag is set right before the
8610 Rewrite the mechanism used to allocate a build-in-place return object
8611 on the heap or on a storage pool.
8612 (Is_Direct_Deep_Call): New routine.
8613 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8614 build-in-place function call instead of a final list. Build a call to
8615 Set_Finalize_Address_Ptr to decorate the associated collection.
8616 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8617 order to name the build-in-place function call's result for later
8618 finalization. Add a collection to a build-in-place function call
8619 instead of a final list.
8620 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8621 build-in-place function call instead of a final list. Remove the code
8622 which moves one final list and transforms it into the actual in a
8623 nested build-in-place call.
8624 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8625 build-in-place function call instead of a final list.
8626 (Move_Final_List): Removed.
8627 (Needs_BIP_Collection): New routine.
8628 (Needs_BIP_Final_List): Removed.
8629 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8630 enumeration type BIP_Formal_Kind.
8631 Update the related comment.
8632 (Needs_BIP_Collection): New routine.
8633 (Needs_BIP_Final_List): Removed.
8634 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8635 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8636 majority of subprograms in this unit. Add Name_Finalize_Address to
8637 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8638 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8639 statements for an array type.
8640 (Build_Adjust_Statements): Create the adjust statements for a record
8642 (Build_Cleanup_Statements): New routine. A procedure which given any
8643 construct containing asynchronous calls, references to _master, or is a
8644 task body, a task allocation or a protected body produces the necessary
8645 runtime calls to clean up these constructs.
8646 (Build_Exception_Handler): New routine.
8647 (Build_Final_List): Removed.
8648 (Build_Finalization_Collection): New routine. A core procedure which
8649 creates a collection to service heap allocated controlled objects
8650 associated with an access-to-controlled type.
8651 (Build_Finalize_Statements): Create the finalization statements for a
8653 (Build_Finalizer): New routine. A core procedure which given any
8654 construct with declarations and/or statements detects all objects which
8655 need any type of clean up (controlled objects, protected objects) and
8656 generates all necessary code to clean up the said objects in the proper
8658 (Build_Finalizer_Call): New routine.
8659 (Build_Initialize_Statements): Create the initialization statements for
8660 an array type. The generated routine contains code to finalize partially
8662 (Build_Object_Declarations): New routine.
8663 (Build_Raise_Statement): New routine.
8664 (Clean_Simple_Protected_Objects): Removed.
8665 (Controller_Component): Removed.
8666 (Enclosing_Function): New routine.
8667 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8668 either declarations or statements or both.
8669 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8670 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8672 (Find_Final_List): Removed.
8673 (Global_Flist_Ref): Removed.
8674 (In_Finalization_Root): Removed.
8675 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8676 scope in terms of tree nodes. Process all transient variables within
8678 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8679 generated after the adjust.
8680 (Make_Attach_Call): Removed.
8681 (Make_Call): New routine.
8682 (Make_Clean): Removed.
8683 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8685 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8687 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8689 (Make_Final_Call): Modified to simply create a call to either
8690 Deep_Finalize or Finalize.
8691 (Make_Finalize_Address_Body): New routine.
8692 (Make_Finalize_Address_Stmts): New routine. A function which produces
8693 TSS primitive Finalize_Address used in conjunction with heap allocated
8695 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8696 (Make_Init_Call): Rewritten. There is no longer an attach call
8697 generated after initialization.
8698 (Make_Local_Deep_Finalize): New routine.
8699 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8700 (Make_Transient_Block): Remove the finalization list retrieval and
8702 (Needs_Finalization): Moved to Exp_Util.
8703 (Parent_Field_Type): New routine.
8704 (Preprocess_Components): New routine.
8705 (Process_Transient_Objects): New routine.
8706 (Wrap_HSS_In_Block): New routine.
8707 (Wrap_Transient_Declaration): Remove finalization list management and
8708 controller insertion.
8709 (Wrap_Transient_Expression): Code reformatting.
8710 (Wrap_Transient_Statement): Code reformatting.
8711 * exp_ch7.ads (Build_Final_List): Removed.
8712 (Build_Finalization_Collection): New routine.
8713 (Build_Raise_Statement): New routine.
8714 (Controller_Component): Removed.
8715 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8716 (Find_Final_List): Removed.
8717 (In_Finalization_Root): Removed.
8718 (Is_Simple_Protected_Type): Update related comment.
8719 (Make_Adjust_Call): New parameter profile and associated comments.
8720 (Make_Attach_Call): Removed.
8721 (Make_Final_Call): New parameter profile and associated comments.
8722 (Make_Finalize_Address_Body): New routine.
8723 (Make_Init_Call): New parameter profile and associated comments.
8724 (Make_Local_Deep_Finalize): New routine.
8725 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8726 (Needs_Finalization): Moved to Exp_Util.
8727 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8728 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8729 (Find_Protection_Type): Moved to Exp_Util.
8730 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8731 (Make_DT): Update sequence of dispatch table initialization. Remove the
8732 initialization of field RC_Offset. Add initialization of field Needs_
8734 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8735 Reimplement how an object is first finalized, then deallocated.
8736 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8738 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8739 Register TSS_Finalize_Address with type TSS_Names.
8740 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8741 procedure provides the interface between an allocation / deallocation
8742 and the support machinery in Ada.Finalization.Heap_Management.
8743 (Find_Init_Call): Code reformatting.
8744 (Find_Init_Call_In_List): Code reformatting.
8745 (Find_Protection_Type): Moved from Exp_Ch9.
8746 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8747 (Has_Controlled_Coextensions): Removed.
8748 (Has_Controlled_Objects): New routine.
8749 (In_Library_Level_Package_Body): New routine.
8750 (Insert_Action_After): New routine.
8751 (Is_Finalizable_Transient): New routine. This predicate determines
8752 whether an object declaration is one of the many variants of controlled
8754 (Is_Null_Access_BIP_Func_Call): New routine.
8755 (Is_Non_BIP_Func_Call): New routine.
8756 (Is_Related_To_Func_Return): New routine.
8757 (Needs_Finalization): Moved from Exp_Ch7.
8758 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8759 (Find_Protection_Type): Moved from Exp_Ch9.
8760 (Has_Controlled_Coextensions): Removed.
8761 (Has_Controlled_Objects): New routine.
8762 (In_Library_Level_Package_Body): New routine.
8763 (Insert_Action_After): New routine.
8764 (Is_Finalizable_Transient): New routine.
8765 (Is_Null_Access_BIP_Func_Call): New routine.
8766 (Is_Non_BIP_Func_Call): New routine.
8767 (Is_Related_To_Func_Return): New routine.
8768 (Needs_Finalization): Moved from Exp_ch7.
8769 * expander.adb (Expand): Add a case for N_Free_Statement.
8770 * freeze.adb (Freeze_All): Replace the generation of a finalization
8771 list with a collection for access-to-controlled types.
8772 (Freeze_Entity): Code reformatting.
8773 (Freeze_Record_Type): Remove the freezing of a record controller
8775 (Freeze_Subprogram): Code reformatting.
8776 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8778 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8779 has a library-level finalizer.
8780 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8781 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8782 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8783 files. Add a-fihema to the list of object files.
8785 Alphabetize the associations in type Is_Parameterless_Attribute.
8786 * rtsfind.ads: Ada.Finalization_List.Controller and
8787 System.Finalization_Implementation are no longer a GNAT unit.
8788 Update the range of type Ada_Finalization_Child. Remove the following
8789 recoverable entities:
8791 RE_Attach_To_Final_List
8795 RE_Finalizable_Ptr_Ptr
8796 RE_Global_Final_List
8797 RE_Limited_Record_Controller
8800 RE_Record_Controller
8801 RE_Simple_List_Controller
8803 Add the following recoverable entities:
8805 RE_Add_Offset_To_Address
8809 RE_Exception_Identity
8810 RE_Finalization_Collection
8811 RE_Finalization_Collection_Ptr
8812 RE_Needs_Finalization
8813 RE_Save_Library_Occurrence
8814 RE_Set_Finalize_Address_Ptr
8815 RE_Set_Storage_Pool_Ptr
8817 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8819 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8820 (First_Stored_Discriminant): Remove the mention of Name_uController.
8821 * sem_aux.ads: Comment reformatting.
8822 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8823 to redecorate an already existing class-wide type.
8824 (Decorate_Tagged_Type): New parameter profile and associated comment.
8825 Create a "shadow class-wide type" for a shadow entity.
8826 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8827 of the final chain along with the associated comment.
8828 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8829 Full_Desig and set it to the full view of the designated type.
8830 Initialize the finalization collection to empty.
8831 (Build_Derived_Record_Type): Alphabetize local variables. Code
8833 (Collect_Fixed_Components): Remove the mention of Name_uController.
8834 (Create_Constrained_Components): Remove the mention of Name_uController.
8835 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8836 class-wide type of a shadow entity.
8837 (Process_Full_View): Update the machinery which marks type
8838 Limited_Controlled's entity as limited.
8839 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8840 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8841 list, instead make a collection build-in-place formal.
8842 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8843 a designated type in order to establish a match between the renaming
8844 and the renamed entity.
8845 (Find_Selected_Component): Add guard to prevent spurious exceptions
8846 from being raised on .NET/JVM.
8847 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8848 to the list of primitive that need special processing. Update arrays
8849 C_Names and D_Names.
8850 (Replace_Types): Handle class-wide types.
8851 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8852 different parameter profile, look at the first formal.
8853 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8854 use clauses for Exp_Util.
8855 * sem_res.adb: Remove with and use clauses for Elists.
8856 (Propagate_Coextensions): Removed.
8857 (Resolve_Allocator): Do not propagate the list of coextensions from one
8858 allocator to another.
8859 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8860 Deaccessed_T to Desig_Typ.
8861 (Enter_Name): Remove the mention of Name_uController.
8862 (Gather_Components): Remove the mention of Name_uController.
8863 (Incomplete_Or_Private_View): New routine.
8864 (Is_Coextension_Root): Removed.
8865 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8866 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8867 (Is_Coextension_Root): Removed.
8868 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8869 Controlled types are now derived from a null tagged record. Remove
8870 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8871 * sinfo.adb (Coextensions): Removed.
8872 (Set_Coextensions): Removed.
8873 * sinfo.ads: Remove Coextensions from the explanation of node fields
8874 and its uses in nodes.
8875 Update the field usage of N_Allocator.
8876 (Coextensions): Removed along with its pragma Inline.
8877 (Set_Coextensions): Removed along with its pragma Inline.
8878 * snames.ads-tmpl: Remove names
8883 Name_uLocal_Final_List
8884 Name_Finalization_Root
8891 Name_Finalize_Address
8892 * s-pooglo.adb (Allocate): Add overriding indicator.
8893 (Deallocate): Add overriding indicator.
8894 (Storage_Size): Add overriding indicator.
8895 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8896 than Finalize_Global_List.
8897 (Null_Finalize_Global_List): Removed.
8898 (Save_Library_Occurrence): New routine.
8899 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8900 initialization. Add variable Finalize_Library_Objects along with its
8901 pragma Export. Add variables Library_Exception and
8902 Library_Exception_Set along with their pragma Export.
8903 (Null_Finalize_Global_List): Removed.
8904 (Save_Library_Occurrence): New routine.
8905 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8906 rather than Finalize_Global_List.
8907 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8908 of the constructed node.
8910 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8912 * link.c: Include "auto-host.h" before system headers.
8914 2011-08-03 Vincent Celier <celier@adacore.com>
8916 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8917 that are not extended. Do not check if a library project that is
8918 extended should be regenerated. Do not add to table Library_Paths the
8919 libraries that are in extended projects. Link only with libraries that
8920 are in libray projects that are not extended.
8921 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8922 for a library project that is extended.
8924 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8926 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8927 conforming subprogram renamings that appear to be completions if they
8928 are not fully conformant.
8929 Such renamings are homographs but not completions.
8930 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8931 names in a subprogram renaming that appears in an instance.
8933 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8935 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8936 not immutably limited, build actual subtype from expression to provide
8937 proper bounds to caller.
8939 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8941 * sem_ch8.adb: Minor comment correction.
8943 2011-08-03 Thomas Quinot <quinot@adacore.com>
8945 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8946 returning a limited array, use an extended return statement.
8948 2011-08-03 Vincent Celier <celier@adacore.com>
8950 * make.adb (Initialize): If --subdirs= is used, but no project file is
8951 specified, attempt to create the specify subdir if it does not already
8952 exist and use it as the object directory as if -D had been specified.
8954 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8956 * s-tpopsp-vms.adb: New file.
8957 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8958 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8960 2011-08-03 Emmanuel Briot <briot@adacore.com>
8962 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8965 2011-08-03 Yannick Moy <moy@adacore.com>
8967 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8968 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8969 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8970 detect that an array has static bounds.
8972 2011-08-03 Thomas Quinot <quinot@adacore.com>
8974 * exp_dist.adb: Minor reformatting.
8976 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8978 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8979 (ATCB_Key): Removed, not always used.
8981 2011-08-03 Emmanuel Briot <briot@adacore.com>
8983 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8984 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8985 most remaining global variables.
8987 2011-08-03 Robert Dewar <dewar@adacore.com>
8989 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8990 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8993 2011-08-03 Javier Miranda <miranda@adacore.com>
8995 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8996 that must be passed by copy in VM targets.
8998 2011-08-03 Emmanuel Briot <briot@adacore.com>
9000 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9001 duplicates a similar htable now in the project tree.
9003 2011-08-03 Claire Dross <dross@adacore.com>
9005 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9006 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9007 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9008 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9009 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9010 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9011 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9014 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9016 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9017 (ATCB_Key): Removed, not always used.
9018 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9020 * s-tpopsp-tls.adb: New file.
9021 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9022 x86/x64/ia64/powerpc/sparc Linux.
9024 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9026 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9027 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9029 2011-08-03 Thomas Quinot <quinot@adacore.com>
9031 * rtsfind.ads, exp_dist.adb, exp_dist.ads
9032 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9033 Fix type selection for mapping integer types to PolyORB types.
9035 2011-08-03 Bob Duff <duff@adacore.com>
9037 * sem_ch7.adb: Minor comment clarification.
9039 2011-08-03 Bob Duff <duff@adacore.com>
9041 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9042 an error analyzing a choice, skip further processing. Further
9043 processing could cause a crash or cascade errors.
9045 2011-08-03 Emmanuel Briot <briot@adacore.com>
9047 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9048 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9049 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9050 prj-env.ads (Shared_Project_Tree_Data): new type
9051 An aggregate project and its aggregated trees need to share the common
9052 data structures used for lists of strings, packages,... This makes the
9053 code simpler since otherwise we have to pass the root tree (also used
9054 for the configuration file data) in addition to the current project
9055 tree. This also avoids ambiguities as to which tree should be used.
9056 And finally this saves a bit of memory.
9057 (For_Every_Project_Imported): new parameter Tree.
9058 Since aggregated projects are using a different tree, we need to let
9059 the caller know which tree to use to manipulate the returned project.
9061 2011-08-03 Robert Dewar <dewar@adacore.com>
9063 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9064 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9065 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9066 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9068 2011-08-03 Javier Miranda <miranda@adacore.com>
9070 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9071 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9073 2011-08-03 Bob Duff <duff@adacore.com>
9075 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9078 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9080 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9081 g-sehash.ads: Fix typo. Update header.
9083 2011-08-03 Thomas Quinot <quinot@adacore.com>
9085 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9088 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9090 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9091 prefixes of private types along with records, since the selector may be
9093 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9094 private types along with records, since the selector may be a
9097 2011-08-03 Emmanuel Briot <briot@adacore.com>
9099 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9101 2011-08-03 Javier Miranda <miranda@adacore.com>
9103 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9104 Tagged_Type_Expansion.
9106 2011-08-03 Yannick Moy <moy@adacore.com>
9108 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9109 violation when the argument of concatenation is the name of a
9112 2011-08-03 Emmanuel Briot <briot@adacore.com>
9114 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9115 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9116 (Process_Declarative_Items): new parameter Child_Env.
9118 2011-08-03 Yannick Moy <moy@adacore.com>
9120 * alfa.ads: Update format of ALFA section in ALI file in order to
9121 add a mapping from bodies to specs when both are present.
9122 (ALFA_Scope_Record): Add components for spec file/scope.
9123 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9125 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9126 collected, fill in the spec information when relevant.
9127 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9130 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9132 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9133 code unit to decide whether to add internally generated subprograms.
9135 2011-08-03 Javier Miranda <miranda@adacore.com>
9137 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9138 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9139 be handled by copy in VM targets.
9141 2011-08-03 Emmanuel Briot <briot@adacore.com>
9143 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9144 code with Makeutl.Get_Switches.
9145 * prj-tree.adb: Update comment.
9147 2011-08-03 Thomas Quinot <quinot@adacore.com>
9149 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9150 subprogram with a limited formal that does not support external
9153 2011-08-03 Yannick Moy <moy@adacore.com>
9155 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9157 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9158 not from current unit in two phases, because it is not possible to
9159 change the table while iterating over its content.
9160 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9162 2011-08-03 Sergey Rybin <rybin@adacore.com>
9164 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9165 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9167 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9169 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9170 and the component type is composite, this is ambiguous for predefined
9171 concatenation, but if the node is not overloaded and the entity is a use
9172 -defined function its profile can be used to resolve that aggregate.
9174 2011-08-03 Robert Dewar <dewar@adacore.com>
9176 * exp_ch4.adb: Minor code cleanup.
9178 2011-08-03 Thomas Quinot <quinot@adacore.com>
9180 * exp_dist.adb: Do not generate distribution stubs if serious errors
9181 have been diagnosed.
9183 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9185 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9186 the first formal of a primitive operation, go to the base type to
9187 handle properly an access to a derived type with constrained
9189 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9190 user-defined function that is only use-visible.
9192 2011-08-03 Robert Dewar <dewar@adacore.com>
9194 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9195 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9196 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9197 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9198 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9199 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9200 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9201 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9203 2011-08-03 Robert Dewar <dewar@adacore.com>
9205 * repinfo.adb (List_Mechanism): Add handling of
9206 Convention_Ada_Pass_By_XXX.
9207 * sem_mech.adb (Set_Mechanism): Ditto.
9208 * sem_prag.adb (Process_Convention): Add entries for
9209 Convention_Ada_Pass_By_XXX.
9210 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9212 2011-08-03 Pascal Obry <obry@adacore.com>
9214 * makeutl.adb: Minor reformatting.
9216 2011-08-03 Vincent Celier <celier@adacore.com>
9219 (Get_File_Name) If the file cannot be found when there are no config
9220 pragmas file and May_Fail is True, return No_File instead of the file
9221 name, to be consistent.
9223 2011-08-03 Pascal Obry <obry@adacore.com>
9225 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9228 2011-08-03 Javier Miranda <miranda@adacore.com>
9231 (Same_Representation): In VM targets the representation of arrays with
9232 aliased components differs from arrays with non-aliased components.
9234 2011-08-03 Emmanuel Briot <briot@adacore.com>
9236 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9237 not systematically lower case attribute indexes that contain no "."
9238 Fix definition of several Naming attributes, which take
9239 a unit name as index and therefore should be case insensitive.
9240 Minor refactoring (reduce length of variable names).
9242 2011-08-03 Emmanuel Briot <briot@adacore.com>
9244 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9246 2011-08-03 Emmanuel Briot <briot@adacore.com>
9248 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9249 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9250 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9251 prj-tree.ads (Prj.Tree.Environment): new type.
9253 2011-08-03 Emmanuel Briot <briot@adacore.com>
9255 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9256 prj-tree.adb, prj-tree.ads (Environment): new type.
9258 2011-08-03 Emmanuel Briot <briot@adacore.com>
9260 * prj-tree.ads: Remove unused variable.
9262 2011-08-03 Yannick Moy <moy@adacore.com>
9264 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9265 issuing messages related to SPARK restriction violation.
9267 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9269 * sem_ch6.adb: guard against error nodes in return statements.
9271 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9273 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9274 a warning can only appear on a configuration file, so emit warning
9275 without further checks.
9277 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9279 * s-interr.ads: add overriding keyword.
9281 2011-08-03 Geert Bosch <bosch@adacore.com>
9283 * exp_attr.adb: Fix minor typo.
9285 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9287 * par-ch4.adb: improve error recovery.
9289 2011-08-03 Emmanuel Briot <briot@adacore.com>
9291 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9292 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9295 2011-08-03 Emmanuel Briot <briot@adacore.com>
9297 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9298 "external" as an attribute name in aggregate projects.
9300 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9302 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9303 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9304 from 0, so we need to adjust.
9306 2011-08-03 Emmanuel Briot <briot@adacore.com>
9308 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9309 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9311 2011-08-03 Yannick Moy <moy@adacore.com>
9313 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9314 restriction on overloaded entity if the entity is not an operator.
9316 2011-08-03 Yannick Moy <moy@adacore.com>
9318 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9319 restrict.ads: Rename remaining Check_Formal_Restriction* into
9320 Check_SPARK_Restriction*.
9322 2011-08-03 Emmanuel Briot <briot@adacore.com>
9324 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9325 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9327 (Project_Empty): removed
9328 (Empty_Project): new parameter Qualifier
9329 This is used to have fields specific to aggregate projects, cleaner
9330 New field to store the list of aggregated projects.
9331 (Check_Aggregate_Project): removed
9332 (Process_Aggregated_Projects, Free): new subprograms.
9334 2011-08-03 Olivier Hainque <hainque@adacore.com>
9336 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9338 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9340 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9341 explicit dereference of an unconstrained type, create a constrained
9342 subtype for it, as is done for function calls that return an
9345 2011-08-03 Thomas Quinot <quinot@adacore.com>
9347 * g-pehage.adb (Finalize): Avoid possible double-free.
9349 2011-08-03 Steve Baird <baird@adacore.com>
9351 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9352 Elab_Spec/Body attrs in CodePeer_Mode.
9354 2011-08-03 Javier Miranda <miranda@adacore.com>
9356 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9357 low bound is not known at compile time but they have no others choice.
9358 Done because in this case the bounds can be obtained directly from the
9361 2011-08-03 Ed Falis <falis@adacore.com>
9363 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9364 on VxWorks SMP. Remove unusable constant ANY_CPU.
9366 2011-08-03 Emmanuel Briot <briot@adacore.com>
9368 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9369 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9370 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9371 Prj.Env.Initialize_Empty): new subprograms
9372 (Get_Env, Find_Project): remove parameter Target_Name.
9374 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9376 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9377 as a condition for the delayed call to Derived_Subprograms done for the
9378 case of the rewriting of a derived type that constrains the
9379 discriminants of its parent type.
9380 Avoids redundant subprogram derivations for private subtype derivations.
9382 2011-08-03 Javier Miranda <miranda@adacore.com>
9384 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9385 Build_Record_Aggr_Code.
9386 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9387 discriminants in extension aggregates.
9389 2011-08-03 Emmanuel Briot <briot@adacore.com>
9391 * prj-pp.adb (Print): also output project qualifiers, since in
9392 particular "aggregate" is mandatory in an aggregate project.
9394 2011-08-03 Emmanuel Briot <briot@adacore.com>
9396 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9397 (Debug_Output): new function.
9399 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9401 * gnat_ugn.texi: Document -Wstack-usage.
9402 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9404 2011-08-03 Thomas Quinot <quinot@adacore.com>
9406 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9407 have keyword LIMITED.
9409 2011-08-03 Yannick Moy <moy@adacore.com>
9411 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9412 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9413 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9414 section (does not happen in compiler, only if code directly calls
9416 * get_alfa.adb, get_alfa.ads: New files.
9417 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9419 * lib-xref-alfa.adb: New file.
9420 * lib-xref.adb, lib-xref.ads
9421 (Xref_Entry): redefine information needed in cross-references for ALFA.
9422 Push ALFA treatments in separated local package.
9423 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9424 identifiers. Return entity of package body instead of spec. Return
9425 Empty for a scope with no location.
9426 (Generate_Reference): adapt to new components for ALFA information.
9427 Remove the need for D references on definitions.
9428 (Is_Local_Reference): moved to ALFA local package
9429 (Output_References): extract subfunction as Extract_Source_Name
9430 (Output_Local_References): remove procedure, replaced by filtering of
9431 cross-references in package ALFA and printing in Put_ALFA.
9432 (Write_Entity_Name): remove procedure
9433 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9434 print exact name of entity as it appears in source file
9435 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9436 * put_alfa.adb, put_alfa.ads: New files.
9437 * xref_lib.adb (Search_Xref): protect read of cross-references against
9438 reading other sections of the ALI file, in gnatxref
9439 (Search): protect read of cross-references against reading other
9440 sections of the ALI file, in gnatfind.
9441 * gcc-interface/Make-lang.in: Update dependencies.
9443 2011-08-03 Thomas Quinot <quinot@adacore.com>
9445 * sem_ch3.adb: Minor reformatting.
9447 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9449 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9450 raising an exception.
9452 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9454 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9455 type, always use 1 as the lower bound or string, even if lower bound of
9456 context is not static, to handle properly null strings in a non-static
9459 2011-08-03 Bob Duff <duff@adacore.com>
9461 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9462 always legal on the right-hand side of an assignment statement; there
9463 is always an applicable index constraint in this case. Therefore, the
9464 check for Pkind = N_Assignment_Statement is now unconditional -- it
9465 doesn't depend on whether Is_Constrained (Typ).
9467 2011-08-03 Robert Dewar <dewar@adacore.com>
9469 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9471 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9473 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9474 for an itype created within a generic unit.
9476 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9478 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9479 suppresses all inlining.
9481 2011-08-03 Robert Dewar <dewar@adacore.com>
9483 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9484 exp_aggr.adb: Minor reformatting.
9486 2011-08-03 Thomas Quinot <quinot@adacore.com>
9488 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9489 tagged assignment when discriminant checks are suppressed. This is
9490 useless and extremely costly in terms of static stack usage.
9492 2011-08-03 Bob Duff <duff@adacore.com>
9494 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9495 of generics, because this leads to the wrong entity in the wrong scope,
9496 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9498 (Process_Interface_Name): Follow Alias for instances of generics, to
9499 correct for the above change.
9501 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9503 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9504 is an integer literal it is always safe to replace the reference. In
9505 addition, if the reference appears in the generated code for an object
9506 declaration it is necessary to copy because otherwise the reference
9507 might be to the uninitilized value of the discriminant of the object
9510 2011-08-03 Pascal Obry <obry@adacore.com>
9512 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9513 ACL used, in this case we want to check for ending .exe, not .exe
9514 anywhere in the path.
9516 2011-08-03 Sergey Rybin <rybin@adacore.com>
9518 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9519 the tree structure (semantic decoration of references to record
9522 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9524 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9525 choices of a named array aggregate, bail out when any choices are
9526 marked as Errors_Posted.
9528 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9530 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9531 in which entity is frozen, to handle properly loop variables in
9534 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9536 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9537 subtype is not static, compute the upper bound using attributes, to
9538 handle properly index types that are not integer types.
9540 2011-08-03 Bob Duff <duff@adacore.com>
9542 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9543 Update copyright notice.
9545 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9547 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9548 Original_Discriminant if within an instance.
9549 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9551 2011-08-03 Thomas Quinot <quinot@adacore.com>
9553 * einfo.ads: Minor reformatting.
9555 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9557 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9558 composite type with an unfrozen subcomponent, in the profile of a
9559 primitive operation.
9561 2011-08-03 Robert Dewar <dewar@adacore.com>
9563 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9565 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9567 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9568 unconstrained type with discriminants is initialized with an aggregate,
9569 use the constrained subtype of the aggregate as the type of the object,
9570 because it is immutable, and this allows the back-end to generate no
9571 code for the object declaration.
9573 2011-08-03 Robert Dewar <dewar@adacore.com>
9575 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9576 comparison operand is variable, and turns out to be zero or negative.
9578 2011-08-03 Javier Miranda <miranda@adacore.com>
9581 (Expand_Dispatching_Constructor_Call): Disable expansion of
9582 code required for native targets. Done to avoid generating
9583 references to unavailable runtime entities in VM targets.
9585 (Expand_N_Object_Declaration): Add missing support to handle
9586 the explicit initialization of class-wide interface objects.
9589 2011-08-03 Matthew Heaney <heaney@adacore.com>
9591 * a-cobove.adb (Merge): Move source onto target, instead of using
9594 2011-08-03 Matthew Heaney <heaney@adacore.com>
9596 * a-cbdlli.adb (Splice): Move source items from first to last.
9598 2011-08-03 Yannick Moy <moy@adacore.com>
9600 * sem_util.ads: Add comment.
9602 2011-08-03 Javier Miranda <miranda@adacore.com>
9605 (Expand_Record_Aggregate): In VM targets disable the expansion into
9606 assignments of aggregates whose type is not known at compile time.
9608 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9610 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9611 protected entries and task entries, to build the proper renaming
9612 declaration for entry formals, used in debugging.
9613 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9614 parameters in the same way.
9616 2011-08-02 Robert Dewar <dewar@adacore.com>
9618 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9619 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9620 code reorganization.
9622 2011-08-02 Robert Dewar <dewar@adacore.com>
9624 * debug.adb: Debug flag d.P to suppress length comparison optimization
9625 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9626 comparison of Length by comparing First/Last instead.
9628 2011-08-02 Matthew Heaney <heaney@adacore.com>
9630 * a-cobove.ads: Code clean up.
9632 2011-08-02 Vincent Celier <celier@adacore.com>
9634 * adaint.c (file_names_case_sensitive_cache): New static int.
9635 (__gnat_get_file_names_case_sensitive): Cache the return value in
9636 file_names_case_sensitive_cache at the first invocation, to avoid
9637 multiple calls to getenv.
9639 2011-08-02 Bob Duff <duff@adacore.com>
9641 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9643 2011-08-02 Yannick Moy <moy@adacore.com>
9645 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9646 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9647 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9648 indicate that we are in a precondition or postcondition. This is used in
9649 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9650 decide whether to flag the spec or body of the current subprogram as
9653 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9655 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9657 * a-extiin.ads: New file.
9659 2011-08-02 Bob Duff <duff@adacore.com>
9661 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9662 now raises Name_Error instead of Use_Error in certain cases. The other
9663 parts of this AI were already implemented properly.
9665 2011-08-02 Vincent Celier <celier@adacore.com>
9667 * link.c: Only import "auto-host.h" when building the gnattools.
9669 2011-08-02 Yannick Moy <moy@adacore.com>
9671 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9672 which calls a local subprogram, so extract subprogram
9673 from Mark_Non_ALFA_Subprogram_Body.
9675 2011-08-02 Javier Miranda <miranda@adacore.com>
9678 (Extract_Dispatching_Call): If the type of the dispatching object is an
9679 access type then return an explicit dereference in the Object out-mode
9682 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9684 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9685 compatibility checks for all indexes of an array subtype, not just the
9686 first. Reset Has_Dynamic_Range_Check on the subtype before each
9687 potential check to ensure that Insert_Range_Checks will not elide any
9688 of the dynamic checks.
9690 2011-08-02 Yannick Moy <moy@adacore.com>
9692 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9693 SPARK restriction at parsing time.
9694 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9695 directive only if the SPARK restriction is set for this unit.
9697 2011-08-02 Yannick Moy <moy@adacore.com>
9699 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9700 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9701 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9702 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9703 Mark_Non_ALFA_Subprogram_Body.
9704 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9707 2011-08-02 Yannick Moy <moy@adacore.com>
9709 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9712 2011-08-02 Robert Dewar <dewar@adacore.com>
9714 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9715 exp_ch3.adb: Minor reformatting.
9717 2011-08-02 Emmanuel Briot <briot@adacore.com>
9719 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9720 files, not any regular file.
9721 (__gnat_locate_file_with_predicate): new subprogram.
9723 2011-08-02 Yannick Moy <moy@adacore.com>
9725 * sinfo.adb, sinfo.ads: Restrict the use of flags
9726 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9727 nodes, plus N_Subtype_Declaration for the 2nd one.
9729 2011-08-02 Sergey Rybin <rybin@adacore.com>
9731 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9732 - fix bugs in the description of Source_Trace;
9733 - get rid of UNIT_NAME;
9735 2011-08-02 Javier Miranda <miranda@adacore.com>
9738 (Build_Dispatching_Requeue): Adding support for VM targets
9739 since we cannot directly reference the Tag entity.
9740 * exp_sel.adb (Build_K): Adding support for VM targets.
9741 (Build_S_Assignment): Adding support for VM targets.
9743 (Default_Prim_Op_Position): In VM targets do not restrict availability
9744 of predefined interface primitives to compiling in Ada 2005 mode.
9745 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9746 restricted to compiling in Ada 2005 mode.
9747 (Make_VM_TSD): Generate code that declares and initializes the OSD
9748 record. Needed to support dispatching calls through synchronized
9751 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9752 primitives associated with synchronized interfaces.
9753 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9754 primitives associated with synchronized interfaces.
9756 2011-08-02 Yannick Moy <moy@adacore.com>
9758 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9759 statements hidden in SPARK if preceded by the HIDE directive
9760 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9761 exception handlers as hidden in SPARK if preceded by the HIDE directive
9762 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9763 if starting with the HIDE directive
9764 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9765 starting with the HIDE directive; mark the declarations in a private
9766 part as hidden in SPARK if the private part starts with the HIDE
9768 * restrict.adb, restrict.ads
9769 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9770 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9771 argument node belongs to a part which is hidden in SPARK
9772 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9773 parts in SPARK; protect the possibly costly call to
9774 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9775 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9776 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9777 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9779 (Scan): recognize special comment starting with '#' and followed by
9780 SPARK keyword "hide" as a HIDE directive.
9782 2011-08-02 Yannick Moy <moy@adacore.com>
9784 * types.ads, erroutc.ads: Minor reformatting.
9786 2011-08-02 Vincent Celier <celier@adacore.com>
9788 * link.c: Add response file support for cross platforms.
9790 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9792 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9793 in an association, set parent field of copy before partial analysis.
9794 * sem_res.adb (Resolve_Slice): create reference to itype only when
9795 expansion is enabled.
9797 2011-08-02 Yannick Moy <moy@adacore.com>
9799 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9800 for new flag denoting which subprogram bodies are in ALFA
9801 * restrict.adb, sem_ch7.adb: Update comment
9802 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9803 sem_ch9.adb, sem_res.adb: Add calls to
9804 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9805 * sem_ch6.adb (Analyze_Function_Return): add calls to
9806 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9807 middle of the body, and extended return.
9808 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9809 False when missing return.
9810 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9811 to True for subprograms whose spec is in ALFA. Remove later on the flag
9812 on the entity used for a subprogram body when there exists a separate
9814 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9815 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9816 False, otherwise do nothing.
9818 2011-08-02 Robert Dewar <dewar@adacore.com>
9820 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9822 2011-08-02 Yannick Moy <moy@adacore.com>
9824 * sem_ch4.ads: minor formatting.
9826 2011-08-02 Yannick Moy <moy@adacore.com>
9828 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9829 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9830 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9831 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9832 opt.ads: cleanup of SPARK mode
9834 2011-08-02 Yannick Moy <moy@adacore.com>
9836 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9838 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9839 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9841 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9842 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9843 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9844 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9846 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9848 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9849 functions whose return type is not in ALFA.
9850 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9852 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9853 parameter's type is not in ALFA.
9854 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9857 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9859 * sem_ch6 (Analyze_Expression_Function): treat the function as
9860 Inline_Always, and introduce a subprogram declaration for it when it is
9862 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9863 expression functions, so that the back-end can determine whether they
9864 can in fact be inlined.
9865 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9866 a function body comes from an expression function.
9868 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9870 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9871 null exclusions to test Can_Never_Be_Null on the anonymous access types
9872 of the formals rather than testing the formals themselves. Exclude this
9873 check in cases where the Old_Formal is marked as a controlling formal,
9874 to avoid issuing spurious errors for bodies completing dispatching
9875 operations (due to the flag not getting set on controlling access
9876 formals in body specs).
9877 (Find_Corresponding_Spec): When checking full and subtype conformance of
9878 subprogram bodies in instances, pass Designated and E in that order, for
9879 consistency with the expected order of the formals (New_Id followed by
9882 2011-08-02 Robert Dewar <dewar@adacore.com>
9884 * sem_ch8.adb: Minor reformatting.
9886 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9888 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9889 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9890 primitive operations of class-wide actuals.
9892 2011-08-02 Javier Miranda <miranda@adacore.com>
9894 * exp_atag.ads, exp_atag.adb
9895 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9896 since its value is implicitly passed in argument Typ.
9897 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9898 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9899 Build_Common_Dispatching_Select_Statements.
9901 2011-08-02 Robert Dewar <dewar@adacore.com>
9903 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9904 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9907 2011-08-02 Robert Dewar <dewar@adacore.com>
9909 * sem_res.adb: Minor reformatting.
9910 * sem_prag.adb: Minor reformatting.
9912 2011-08-02 Javier Miranda <miranda@adacore.com>
9914 * exp_atag.adb, exp_atags.ads
9915 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9916 by the tagged type Entity. Required to use this routine in the VM
9917 targets since we do not have available the Tag entity in the VM
9920 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9921 Ada.Tags has not been previously loaded.
9923 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9924 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9926 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9927 view of enclosing scopes. Required to handle enclosing scopes that
9928 are synchronized types whose full view is a task type.
9930 (Build_VM_TSDs): Minor code improvement to avoid generating and
9931 analyzing lists with empty nodes.
9932 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9933 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9934 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9935 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9936 (Make_Select_Specific_Data_Table): Add support for VM targets.
9937 (Make_VM_TSD): Generate code to initialize the SSD structure of
9940 2011-08-02 Yannick Moy <moy@adacore.com>
9942 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9943 cross-references section in ALI.
9944 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9945 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9947 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9948 subprogram or package entity of a node
9949 (Is_Local_Reference_Type): new function returns True for references
9950 selected in local cross-references.
9951 (Lt): function extracted from Lt in Output_References
9952 (Write_Entity_Name): function extracted from Output_References
9953 (Generate_Definition): generate reference with type 'D' for definition
9954 of objects (object declaration and parameter specification), with
9955 appropriate locations and units, for use in local cross-references.
9956 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9957 references of type 'I' for initialization in object definition.
9958 (Output_References): move part of function Lt and procedure
9959 Write_Entity_Name outside of the body. Ignore references of types 'D'
9960 and 'I' introduced for local cross-references.
9961 (Output_Local_References): new procedure to output the local
9962 cross-references sections.
9963 (Lref_Entity_Status): new array defining whether an entity is a local
9964 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9965 with 'I' type when initialization expression is present.
9966 * get_scos.adb, get_scos.ads: Correct comments and typos
9968 2011-08-02 Javier Miranda <miranda@adacore.com>
9970 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9972 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9974 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9977 2011-08-02 Vincent Celier <celier@adacore.com>
9979 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9980 (No_Space_Img): New function
9981 (Find_Excluded_Sources): When reading from a file, record the file name
9982 and the line number for each excluded source.
9983 (Mark_Excluded_Sources): When reporting an error, if the excluded
9984 sources were read from a file, include file name and line number in
9987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9989 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9991 2011-08-02 Robert Dewar <dewar@adacore.com>
9993 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9995 2011-08-02 Javier Miranda <miranda@adacore.com>
9997 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9998 generation of TSDs to the DOTNET compiler.
9999 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10000 generation of TSDs to the DOTNET compiler.
10002 2011-08-02 Javier Miranda <miranda@adacore.com>
10004 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10005 record of all the tagged types declared inside library level package
10006 declarations, library level package bodies or library level subprograms.
10007 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10008 associated with a given tagged type.
10009 (Build_VM_TSDs): New subprogram.
10010 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10011 compilation units that are subprograms.
10012 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10013 compilation units that are package bodies.
10014 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10015 units that are a package declaration or a package instantiation.
10016 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10017 reorganization to improve the error generated by the frontend when the
10018 function Ada.Tags.Secondary_Tag is not available.
10019 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10020 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10022 2011-08-02 Javier Miranda <miranda@adacore.com>
10024 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10026 2011-08-02 Robert Dewar <dewar@adacore.com>
10028 * s-imenne.ads: Minor reformatting.
10030 2011-08-02 Robert Dewar <dewar@adacore.com>
10032 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10033 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10034 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10036 2011-08-02 Robert Dewar <dewar@adacore.com>
10038 * einfo.ads (Materialize_Entity): Document this is only for renamings
10039 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10040 required debug information in the case where we transform the object
10041 declaration into a renaming declaration.
10042 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10044 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10045 Materialize_Entity.
10047 2011-08-02 Robert Dewar <dewar@adacore.com>
10049 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10050 Suppress_Init_Procs.
10051 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10052 Suppress_Initialization/Initialization_Suppressed.
10053 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10054 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10055 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10056 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10058 2011-08-02 Robert Dewar <dewar@adacore.com>
10060 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10061 Minor reformatting.
10063 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10065 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10066 only have inheritable classwide pre/postconditions.
10068 2011-08-02 Javier Miranda <miranda@adacore.com>
10070 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10071 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10072 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10073 checks if the external tag of a type is the same as the external tag
10074 of some other declaration.
10076 2011-08-02 Thomas Quinot <quinot@adacore.com>
10078 * s-taskin.ads: Minor reformatting.
10080 2011-08-02 Emmanuel Briot <briot@adacore.com>
10082 * g-comlin.adb (Display_Help): swap the order in which it prints the
10083 short help and the general usage.
10085 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10087 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10088 the aspect declarations and attach them to the generic copy for
10089 subsequent analysis.
10090 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10091 declarations of the generic tree to the new subprogram declarations.
10092 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10093 conditions that apply to a subprogram instance.
10095 2011-08-02 Robert Dewar <dewar@adacore.com>
10097 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10099 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10101 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10102 private type with a tagged full view is not derived in the immediate
10103 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10105 2011-08-02 Robert Dewar <dewar@adacore.com>
10107 * exp_ch4.adb: Minor reformatting.
10109 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10111 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10112 Ada2012 iterator, the loop will be rewritten during expansion into a
10113 while loop with a cursor and an element declaration. Do not analyze the
10114 body in this case, because if the container is for indefinite types the
10115 actual subtype of the elements will only be determined when the cursor
10116 declaration is analyzed.
10118 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10120 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10121 size/alignment related attributes in CodePeer_Mode.
10123 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10125 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10126 Prepend_Element, since this can result in the operation getting the
10127 wrong slot in the full type's dispatch table if the full type has
10128 inherited operations. The incomplete type's operation will get added
10129 to the proper position in the full type's primitives
10130 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10131 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10132 dispatching operations, since there are cases where nonprimitive
10133 subprograms can get added to the list of incomplete dependents (such
10134 as subprograms in nested packages).
10135 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10136 private part when determining whether to add a primitive with a
10137 parameter of a tagged incomplete type to the Private_Dependents list.
10138 Such primitives can also occur in the visible part, and should not have
10139 been excluded from being private dependents.
10140 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10141 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10142 list of a Taft-amendment incomplete type is a primitive before issuing
10143 an error that the full type must appear in the same unit. There are
10144 cases where nonprimitives can be in the list (such as subprograms in
10146 * sem_disp.adb (Derives_From): Use correct condition for checking that
10147 a formal's type is derived from the type of the corresponding formal in
10148 the parent subprogram (the condition was completely wrong). Add
10149 checking that was missing for controlling result types being derived
10150 from the result type of the parent operation.
10152 2011-08-02 Yannick Moy <moy@adacore.com>
10154 * errout.adb (First_Node): minor renaming
10155 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10158 2011-08-02 Yannick Moy <moy@adacore.com>
10160 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10161 before accessing operands.
10162 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10163 decide whether an initialization expression respects SPARK rules, as
10164 the plain node is the expanded one. This allows for more valid warnings
10166 * gnat_rm.texi: Minor update.
10168 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10170 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10173 2011-08-02 Robert Dewar <dewar@adacore.com>
10175 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10177 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10179 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10180 loop statements and the element renaming declaration with a block when
10181 the element type is controlled.
10183 2011-08-02 Yannick Moy <moy@adacore.com>
10185 * sinfo.ads: Minor formatting.
10187 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10189 * sem_aggr.adb (Add_Association): if the association has a box and no
10190 expression, use the Sloc of the aggregate itself for the new
10192 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10195 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10197 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10198 When a container is provided via a function call, generate a renaming
10199 of the function result. This avoids the creation of a transient scope
10200 and the premature finalization of the container.
10201 * exp_ch7.adb (Is_Container_Cursor): Removed.
10202 (Wrap_Transient_Declaration): Remove the supression of the finalization
10203 of the list controller when the declaration denotes a container cursor,
10206 2011-08-02 Yannick Moy <moy@adacore.com>
10208 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10209 node is from source, instead of the original node being from source.
10211 (Resolve_Array_Aggregate): refine the check for a static expression, to
10212 recognize also static ranges
10213 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10214 Array_Type_Declaration): postpone the test for the type being a subtype
10215 mark after the type has been resolved, so that component-selection and
10216 expanded-name are discriminated.
10217 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10218 to distinguish the case of an iteration scheme, so that an error is
10219 issed on a non-static range in SPARK except in an iteration scheme.
10220 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10221 In_Iter_Schm = True.
10222 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10223 user-defined operators so that they are allowed in renaming
10225 (Find_Selected_Component): refine the check for prefixing of operators
10226 so that they are allowed in renaming. Move the checks for restrictions
10227 on selector name after analysis discriminated between
10228 component-selection and expanded-name.
10229 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10230 concatenation argument of string type if it is static.
10231 * sem_util.adb, sem_util.ads
10232 (Check_Later_Vs_Basic_Declarations): add a new function
10233 Is_Later_Declarative_Item to decice which declarations are allowed as
10234 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10235 mode, add that renamings are considered as later items.
10236 (Enclosing_Package): new function to return the enclosing package
10237 (Enter_Name): correct the rule for homonyms in SPARK
10238 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10239 from source (result of expansion) to avoid issuing wrong warnings.
10241 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10243 * errout.adb: On anything but an expression First_Node returns its
10246 2011-08-02 Pascal Obry <obry@adacore.com>
10248 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10250 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10252 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10253 Set the associated loop as the related expression of internally
10255 * exp_ch7.adb (Is_Container_Cursor): New routine.
10256 (Wrap_Transient_Declaration): Supress the finalization of the list
10257 controller when the declaration denotes a container cursor.
10259 2011-08-02 Yannick Moy <moy@adacore.com>
10261 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10263 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10264 expression is a simple expression. This check cannot be performed in
10265 the semantics, so just drop it.
10266 (P_Index_Or_Discriminant_Constraint): move check that the index or
10267 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10268 semantics. Other cases were previously checked in the semantics.
10269 * par-ch4.adb (P_Name): move checks that a selector name is not
10270 character literal or an operator symbol to Find_Selected_Component in
10272 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10273 declarations are not placed after later declarations in a separate
10274 procedure in Sem_Util (possibly not the best choice?), to be used both
10275 during parsing, for Ada 83 mode, and during semantic analysis, for
10277 * par-endh.adb (Check_End): move check that end label is not missing
10278 to Process_End_Label in the semantics
10279 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10280 the special case for SPARK restriction
10281 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10282 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10283 parameter Force to issue the error message even on internal node (used
10284 for generated end label). Call Check_Restriction to check when an error
10285 must be issued. In SPARK mode, issue an error message even if the
10286 restriction is not set.
10287 (Check_Restriction): new procedure with an additional out parameter to
10288 inform the caller that a message has been issued
10289 * sem_aggr.adb: Minor modification of message
10290 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10291 instead of issuing an error message directly
10292 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10293 declarations are not placed after later declarations, by calling
10294 Check_Later_Vs_Basic_Declarations
10295 (Analyze_Subtype_Declaration): move here the check that an index or
10296 discriminant constraint must be a subtype mark. Change the check that
10297 a subtype of String must start at one so that it works on subtype marks.
10298 * sem_ch4.adb (Analyze_Call): move here the check that a named
10299 association cannot follow a positional one in a call
10300 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10301 instead of issuing an error message directly
10302 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10303 selector name is not a character literal or an operator symbol. Move
10304 here the check that the prefix of an expanded name cannot be a
10305 subprogram or a loop statement.
10306 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10307 procedure called from parsing and semantics to check that basic
10308 declarations are not placed after later declarations
10309 (Process_End_Label): move here the check that end label is not missing
10311 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10313 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10314 representation clause in codepeer mode, since it confuses CodePeer and
10315 does not bring useful info.
10317 2011-08-02 Ed Falis <falis@adacore.com>
10319 * init.c: initialize fp hw on MILS.
10321 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10323 * errout.adb (First_Node): for bodies, return the node itself (small
10324 optimization). For other nodes, do not check source_unit if the node
10325 comes from Standard.
10327 2011-08-02 Robert Dewar <dewar@adacore.com>
10329 * exp_ch3.adb: Minor comment additions.
10330 * sem_ch13.adb: Minor reformatting.
10332 2011-08-02 Pascal Obry <obry@adacore.com>
10334 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10336 2011-08-02 Robert Dewar <dewar@adacore.com>
10338 * sem_attr.adb: Minor reformatting.
10340 2011-08-02 Robert Dewar <dewar@adacore.com>
10342 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10343 (Has_Default_Component_Value): Removed
10344 * einfo.ads Comment updates
10345 (Has_Default_Aspect): Replaces Has_Default_Value
10346 (Has_Default_Component_Value): Removed
10348 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10350 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10351 (Get_Simple_Init_Val): Handle Default_Value aspect
10352 (Needs_Simple_Initialization): Handle Default_Value aspect
10353 * exp_ch3.ads: Needs_Simple_Initialization
10354 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10355 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10357 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10358 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10359 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10361 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10363 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10364 package containing iteration primitives.
10365 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10367 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10369 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10370 "of", pre-analyze expression in case it is a function call with
10371 finalization actions that must be placed ahead of the loop.
10372 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10373 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10375 2011-08-02 Geert Bosch <bosch@adacore.com>
10377 * cstand.adb (Create_Float_Types): Only consider C's long double for
10378 Long_Long_Float, in addition to double.
10380 2011-08-02 Robert Dewar <dewar@adacore.com>
10382 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10383 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10384 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10385 Minor reformatting.
10387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10389 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10392 2011-08-02 Javier Miranda <miranda@adacore.com>
10394 * einfo.ads, einfo.adb
10395 (Original_Access_Type): Move this attribute to Node26 since there was
10396 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10397 which causes conflicts and breaks the generation of the .NET compiler.
10398 (Interface_Name): Add missing documentation on JGNAT only uses of
10401 2011-08-02 Geert Bosch <bosch@adacore.com>
10403 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10404 (Find_Back_End_Float_Type): Likewise
10405 (Create_Back_End_Float_Types): Likewise
10406 (Create_Float_Types): Likewise
10407 (Register_Float_Type): Likewise
10408 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10409 Nlist and split out type selection in new local Find_Base_Type function.
10410 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10412 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10414 2011-08-02 Robert Dewar <dewar@adacore.com>
10416 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10418 * opt.ads: Minor comment change.
10419 * sem_ch12.adb: Minor code reorganization.
10421 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10423 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10424 subtype's list of rep items to the list on the full subtype in the case
10425 where the lists are the same.
10427 2011-08-02 Geert Bosch <bosch@adacore.com>
10429 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10430 using the one from System.Strings, which also deallocates all strings.
10432 2011-08-02 Geert Bosch <bosch@adacore.com>
10434 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10436 * gcc-interface/Make-lang.in: Update dependencies.
10438 2011-08-02 Olivier Hainque <hainque@adacore.com>
10440 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10443 2011-08-02 Javier Miranda <miranda@adacore.com>
10445 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10446 associated with anonymous access to subprograms.
10448 2011-08-02 Geert Bosch <bosch@adacore.com>
10451 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10452 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10453 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10454 (Add_Symbol_Definition): Move to switch-c.adb
10455 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10456 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10457 (Add_Symbol_Definition): Move to switch-c.adb.
10458 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10460 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10461 Move to warnsw.adb.
10462 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10463 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10464 Move to warnsw.adb.
10465 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10466 (Add_Symbol_Definition): Moved from Prepcomp.
10467 * switch-c.ads: Update copyright notice. Use String_List instead of
10468 Argument_List, removing dependency on System.OS_Lib.
10470 2011-08-02 Yannick Moy <moy@adacore.com>
10472 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10473 mode on initialization expression which does not respect SPARK
10475 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10476 if the tree referenced by its argument represents an initialization
10477 expression in SPARK, suitable for initializing an object in an object
10480 2011-08-02 Javier Miranda <miranda@adacore.com>
10482 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10483 internally generated access to subprogram with its associated protected
10485 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10487 2011-08-02 Geert Bosch <bosch@adacore.com>
10489 * cstand.adb (Register_Float_Type): Print information about type to
10490 register, if the Debug_Flag_Dot_B is set.
10491 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10492 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10493 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10494 with a requested precision of more than Max_Digits digits and no more
10495 than Max_Base_Digits digits, if a range specification is present and the
10496 Predefined_Float_Types list has a suitable type to derive from.
10497 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10498 case of type completion with pragma Import
10500 (Process_Import_Predefined_Type): Processing to complete a type
10501 with pragma Import. Currently supports floating point types only.
10502 (Set_Convention_From_Pragma): Do nothing without underlying type.
10503 (Process_Convention): Guard against absence of underlying type,
10504 which may happen when importing incomplete types.
10505 (Process_Import_Or_Interface): Handle case of importing predefined
10506 types. Tweak error message.
10508 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10510 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10511 functions to previous change. Reorganize code slightly.
10513 2011-08-02 Geert Bosch <bosch@adacore.com>
10515 * back_end.ads (Register_Type_Proc): New call back procedure type for
10516 allowing the back end to provide information about available types.
10517 (Register_Back_End_Types): New procedure to register back end types.
10518 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10520 * cstand.adb (Back_End_Float_Types): New list for floating point types
10521 supported by the back end.
10522 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10523 (Copy_Float_Type): New procedure to make new copies of predefined types.
10524 (Register_Float_Type): New call back procedure to populate the BEFT list
10525 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10526 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10527 (Create_Float_Types): New procedure to create entities for floating
10528 point types predefined in Standard, and put these and any remaining
10529 BEFTs on the Predefined_Float_Types list.
10530 * stand.ads (Predefined_Float_Types): New list for predefined floating
10531 point types that do not have declarations in package Standard.
10533 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10535 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10536 entity node for the unit containing the parameter.
10537 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10538 (Add_Inlined_Subprogram): Likewise.
10539 * gcc-interface/Make-lang.in: Update dependencies.
10541 2011-08-02 Thomas Quinot <quinot@adacore.com>
10543 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10546 2011-08-02 Geert Bosch <bosch@adacore.com>
10548 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10550 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10552 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10553 computed value of Base_Type.
10555 2011-08-02 Yannick Moy <moy@adacore.com>
10557 * restrict.adb (Check_Restriction): issue an error for any use of
10558 class-wide, even if the No_Dispatch restriction is not set.
10559 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10560 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10561 when completing a private extension, the type named in the private part
10562 is not the same as that named in the visible part.
10563 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10564 of an inherited primitive operations of a tagged type or type extension
10565 that returns the tagged type.
10566 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10567 function which returns True for an implicit operation inherited by the
10568 derived type declaration for the argument type.
10569 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10572 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10574 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10575 Process_Bounds, to perform analysis with expansion of a range or an
10576 expression that is the iteration scheme for a loop.
10577 (Analyze_Iterator_Specification): If domain of iteration is given by a
10578 function call with a controlled result, as is the case if call returns
10579 a predefined container, ensure that finalization actions are properly
10581 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10583 2011-08-02 Javier Miranda <miranda@adacore.com>
10585 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10586 * gcc-interface/Make-lang.in: Update dependencies.
10588 2011-08-02 Javier Miranda <miranda@adacore.com>
10590 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10591 determine if the analysis is performed using N or Original_Node (N).
10592 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10593 functionality of routine Is_Variable avoids code duplication.
10594 * checks.adb (Determine_Range): Handle temporaries generated by
10595 Remove_Side_Effects.
10597 2011-08-02 Javier Miranda <miranda@adacore.com>
10599 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10600 expansion of the condition. Required since the previous analysis was
10601 done with expansion disabled (see Resolve_Quantified_Expression) and
10602 hence checks were not inserted and record comparisons have not been
10605 2011-08-02 Ed Falis <falis@adacore.com>
10607 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10610 2011-08-02 Bob Duff <duff@adacore.com>
10612 * opt.ads: Minor comment fix.
10614 2011-08-02 Bob Duff <duff@adacore.com>
10616 * sem_ch12.adb (Analyze_Package_Instantiation,
10617 Analyze_Subprogram_Instantiation): Turn off style checking while
10618 analyzing an instance. Whatever style checks that apply to the generic
10619 unit should apply, so it makes no sense to apply them in an instance.
10620 This was causing trouble when compiling an instance of a runtime
10621 unit that violates the -gnatyO switch.
10622 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10623 one of the two case statements, causing spurious errors.
10625 2011-08-02 Robert Dewar <dewar@adacore.com>
10627 * uname.adb: Minor reformatting.
10628 * gnatcmd.adb: Minor reformatting.
10629 * exp_attr.adb: Minor reformatting.
10631 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10633 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10634 No_Dispatching_Calls, do not look for the Assign primitive, because
10635 predefined primitives are not created in this case.
10637 2011-08-02 Bob Duff <duff@adacore.com>
10639 * stylesw.ads: Minor comment fixes.
10641 2011-08-02 Robert Dewar <dewar@adacore.com>
10643 * freeze.adb (Add_To_Result): New procedure.
10645 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10647 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10648 time, if the specific run-time routines for handling streams of strings
10649 are not available, use the default mechanism.
10651 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10653 * s-regpat.ads: Fix typo.
10655 2011-08-02 Vincent Celier <celier@adacore.com>
10657 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10658 not null, call it to create the in memory config project file without
10659 parsing an existing default config project file.
10661 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10663 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10665 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10667 * sem_elim.adb: an abstract subprogram does not need an eliminate
10668 pragma for its descendant to be eliminable.
10670 2011-08-02 Ed Falis <falis@adacore.com>
10672 * init.c: revert to handling before previous checkin for VxWorks
10673 * s-intman-vxworks.adb: delete unnecessary declarations related to
10674 using Ada interrupt facilities for handling signals.
10675 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10676 * s-intman-vxworks.ads: Import __gnat_install_handler as
10677 Initialize_Interrupts.
10678 * s-taprop-vxworks.adb: Delete Signal_Mask.
10679 (Abort_Handler): change construction of mask to unblock exception
10682 2011-08-02 Jerome Guitton <guitton@adacore.com>
10684 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10685 Debug_Raise_Exception before propagation starts.
10687 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10689 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10690 to Restriction_Check_Required.
10691 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10692 * sem_res.adb (Resolve_Call): Likewise.
10693 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10695 2011-08-02 Bob Duff <duff@adacore.com>
10697 * stylesw.ads: Update comment.
10698 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10699 * errout.ads: Remove obsolete comment.
10701 2011-08-02 Javier Miranda <miranda@adacore.com>
10703 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10704 (Set_Is_Safe_To_Reevaluate): new procedure.
10705 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10706 assignment is allowed on safe-to-reevaluate variables.
10707 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10708 temporary created to remove side effects in expressions that use
10709 the secondary stack as safe-to-reevaluate.
10710 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10711 variables that are not true constants.
10713 2011-08-02 Robert Dewar <dewar@adacore.com>
10715 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10716 sem_res.adb, sem_ch6.adb: Minor reformatting.
10718 2011-08-02 Jerome Guitton <guitton@adacore.com>
10720 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10722 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10724 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10725 not set Overridden_Operation if subprogram is an initialization
10728 2011-08-02 Yannick Moy <moy@adacore.com>
10730 * par-ch6.adb: Correct obsolete name in comments
10731 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10732 which takes two message arguments (existing function takes one), with
10733 second message used for continuation.
10734 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10735 block statements that originate from a source block statement, not
10736 generated block statements
10737 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10738 symmetry with procedure case
10739 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10740 function to issue an error in formal mode if a package specification
10741 contains more than one tagged type or type extension.
10742 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10743 parameters matching formals of tagged types are objects (or ancestor
10744 type conversions of objects), not general expressions. Issue an error
10745 on view conversions that are not involving ancestor conversion of an
10747 (Resolve_Type_Conversion): in formal mode, issue an error on the
10748 operand of an ancestor type conversion which is not an object
10749 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10750 procedure so that it works also for actuals of function calls
10751 (Is_Actual_Tagged_Parameter): new function which determines if its
10752 argument is an actual parameter of a formal of tagged type in a
10754 (Is_SPARK_Object_Reference): new function which determines if the tree
10755 referenced by its argument represents an object in SPARK
10757 2011-08-02 Robert Dewar <dewar@adacore.com>
10759 * sem_ch3.adb: Minor reformatting
10760 Minor comment addition
10761 Minor error msg text change
10763 2011-08-02 Javier Miranda <miranda@adacore.com>
10765 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10766 function. Used to be more precise when we generate a variable plus one
10767 assignment to remove side effects in the evaluation of the Bound
10769 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10770 of the bound expression to force its re-analysis and thus expand the
10771 associated transient scope (if required). Code cleanup replacing the
10772 previous code that declared the constant entity by an invocation to
10773 routine Force_Evaluation which centralizes this work in the frontend.
10775 2011-08-02 Robert Dewar <dewar@adacore.com>
10777 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10778 (Base_Type): Now uses improved Is_Base_Type function
10779 * einfo.ads (Base_Type): Inline this function
10781 2011-08-02 Robert Dewar <dewar@adacore.com>
10783 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10784 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10786 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10788 * gcc-interface/Make-lang.in: Update dependencies.
10789 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10792 2011-08-02 Yannick Moy <moy@adacore.com>
10794 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10795 non-simple expression used in delta constraint
10796 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10797 index constraint which is not a subtype mark
10798 * par.adb: With and use Restrict
10799 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10800 mode on component type which is not a subtype mark and default
10801 expression on component
10802 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10803 of string which does not have a lower index bound equal to 1
10804 (Array_Type_Declaration): issue an error in formal mode on index or
10805 component type which is not a subtype mark, and on aliased keyword on
10807 (Derived_Type_Declaration): issue an error in formal mode on interface,
10808 limited or abstract type
10809 (Record_Type_Declaration): issue an error in formal mode on interface
10810 (Record_Type_Definition): issue an error in formal mode on tagged types
10811 and type extensions not declared in the specification of a library unit
10812 package; on null non-tagged record; on variant part
10814 2011-08-02 Vincent Celier <celier@adacore.com>
10816 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10817 not declared for qualified library project when Library_Name is not
10818 declared, but Library_Dir is.
10820 2011-08-02 Robert Dewar <dewar@adacore.com>
10822 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10823 pragmas (affects aspects [Component_]Default_Value
10824 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10825 component type for the resolution
10827 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10829 * einfo.adb (Base_Type): Tune implementation for speed.
10831 2011-08-02 Robert Dewar <dewar@adacore.com>
10833 * freeze.adb: Minor reformatting.
10835 2011-08-02 Thomas Quinot <quinot@adacore.com>
10837 * scos.ads: Update comments.
10839 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10841 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10842 base type, because the parent may be a subtype of a private type whose
10843 convention is established in a private part.
10845 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10847 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10848 statement in a block when the expansion of the return expression has
10849 created a finalization chain.
10850 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10851 with the parent node.
10852 Add N_Extended_Return_Statement to handle the case where a transient
10853 object declaration appears in the Return_Object_Declarations list of
10854 an extended return statement.
10856 2011-08-02 Matthew Gingell <gingell@adacore.com>
10858 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10859 unused parameter 'name'.
10861 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10863 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10864 inherited operation, check whether its alias, which is the source
10865 operastion that it renames, has been marked eliminated.
10867 2011-08-02 Javier Miranda <miranda@adacore.com>
10869 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10870 in-mode parameter whose type is an access type since it can be used to
10871 modify its designated object. Enforce code that handles as safe an
10872 access type that is not access-to-constant but it is the result of a
10873 previous removal of side-effects.
10874 (Remove_Side_Effects): Minor code reorganization of cases which require
10875 no action. Done to incorporate documentation on new cases uncovered
10876 working in this ticket: no action needed if this routine was invoked
10877 too early and the nodes are not yet decorated.
10878 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10879 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10880 were issued with actuals that are implicitly provided by
10883 2011-08-02 Robert Dewar <dewar@adacore.com>
10885 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10887 2011-08-02 Yannick Moy <moy@adacore.com>
10889 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10890 to issue an error in formal mode on attribute not supported in this mode
10891 (Analyze_Attribute): issue errors on standard attributes not supported
10893 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10894 comment, and issue error in formal mode on modulus which is not a power
10896 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10898 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10900 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10901 operator on modular type (except 'not').
10903 2011-08-02 Robert Dewar <dewar@adacore.com>
10905 * gnat_rm.texi: Minor reformatting.
10907 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10909 * s-osinte-linux.ads: Minor comment update and reformatting.
10910 * i-cexten.ads: Make this unit pure, as for its parent.
10911 Will allow its usage in more contexts if needed.
10913 2011-08-02 Robert Dewar <dewar@adacore.com>
10915 * s-utf_32.ads: Minor comment fix.
10917 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10919 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10920 operation of a tagged synchronized type, handle the case where the
10921 controlling argument is overloaded.
10923 2011-08-02 Yannick Moy <moy@adacore.com>
10925 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10926 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10927 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10928 SPARK mode and formal verification mode on processing SPARK restriction
10929 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10930 requiring consistency checking.
10932 2011-08-02 Robert Dewar <dewar@adacore.com>
10934 * sem_res.adb: Minor reformatting.
10936 2011-08-02 Robert Dewar <dewar@adacore.com>
10938 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10939 a-cforse.ads: Remove unneeded with of Ada.Containers
10940 Remove commented out pragma Inline's
10941 Move specifications of new subprograms to the actual specs
10943 2011-08-02 Yannick Moy <moy@adacore.com>
10945 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10946 a-cforse.ads: Update comments.
10948 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10950 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10952 2011-08-02 Robert Dewar <dewar@adacore.com>
10954 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10955 a-cforse.ads, a-cofove.ads: Minor reformatting.
10957 2011-08-02 Claire Dross <dross@adacore.com>
10959 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10960 a-cofove.ads: Add comments.
10962 2011-08-02 Yannick Moy <moy@adacore.com>
10964 * gnat_rm.texi: Document formal containers.
10966 2011-08-02 Emmanuel Briot <briot@adacore.com>
10968 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10969 are empty sections.
10971 2011-08-02 Robert Dewar <dewar@adacore.com>
10973 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10976 2011-08-02 Robert Dewar <dewar@adacore.com>
10978 * aspects.adb: New aspects Default_Value and Default_Component_Value
10979 New format of Aspect_Names table checks for omitted entries
10980 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10981 handling of boolean aspects for derived types.
10982 New aspects Default_Value and Default_Component_Value
10983 New format of Aspect_Names table checks for omitted entries
10984 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10985 (Has_Default_Value): New flag
10986 (Has_Default_Component_Value): New flag
10987 (Has_Default_Value): New flag
10988 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10990 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10991 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10992 Default_Value and Default_Component_Value
10993 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10994 New aspects Default_Value and Default_Component_Value
10995 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10996 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10998 2011-08-02 Vincent Celier <celier@adacore.com>
11000 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11001 inherit library kind.
11003 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11005 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11006 Minor reformatting.
11008 2011-08-02 Robert Dewar <dewar@adacore.com>
11010 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11012 2011-08-02 Yannick Moy <moy@adacore.com>
11014 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11016 2011-08-02 Robert Dewar <dewar@adacore.com>
11018 * impunit.adb: Add comment.
11020 2011-08-02 Yannick Moy <moy@adacore.com>
11022 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11023 qualification of aggregates in formal mode
11024 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11026 (Resolve_Aggregate): complete the test that an aggregate is adequately
11027 qualified in formal mode
11029 2011-08-02 Pascal Obry <obry@adacore.com>
11031 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11032 * mlib-prj.adb: Supress warning when compiling binder generated file.
11033 (Build_Library): Supress all warnings when compiling the binder
11036 2011-08-02 Yannick Moy <moy@adacore.com>
11038 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11040 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11041 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11042 Add with/use clauses to make Check_Formal_Restriction visible
11044 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11046 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11047 in-parameters when type of the generic formal is private in the generic
11048 spec and non-private in the body.
11050 2011-08-02 Claire Dross <dross@adacore.com>
11052 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11053 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11054 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11055 * impunit.adb, Makefile.rtl: Take new files into account.
11057 2011-08-02 Robert Dewar <dewar@adacore.com>
11059 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11060 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11062 2011-08-02 Yannick Moy <moy@adacore.com>
11064 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11066 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11067 matching static array bounds, taking into account the special case of
11069 * sem_ch3.adb: Typo in comment.
11071 2011-08-02 Yannick Moy <moy@adacore.com>
11073 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11074 which issues an error in formal mode if its argument node is originally
11076 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11077 has a discriminant specification so that it does not include the case
11079 (Derived_Type_Declaration): move here the test that a derived type has a
11080 discriminant specification
11081 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11082 first element of a component association before accessing its choices
11083 (presence of component association is not enough)
11084 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11085 declaration is a library item before accessing the next element in a
11086 list, as library items are not member of lists
11087 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11088 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11089 Check_Formal_Restriction whenever possible.
11091 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11093 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11094 reference when needed.
11096 2011-08-02 Bob Duff <duff@adacore.com>
11098 * gnat_ugn.texi: Fix typo.
11100 2011-08-02 Vincent Celier <celier@adacore.com>
11102 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11103 archive file name. Do not use the full path name of archives for Open
11106 2011-08-02 Robert Dewar <dewar@adacore.com>
11108 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11109 Analyze_Aspect_Specifications
11111 (Analyze_Aspect_Specifications): New handling for boolean aspects
11112 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11113 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11114 sequence for Analyze_Aspect_Specifications
11115 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11116 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11118 2011-08-02 Robert Dewar <dewar@adacore.com>
11120 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11121 aspects, since these no longer exist.
11123 2011-08-02 Robert Dewar <dewar@adacore.com>
11125 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11126 semicolon, do not try to see if there are aspects following it.
11127 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11130 2011-08-02 Robert Dewar <dewar@adacore.com>
11132 * sem_ch8.adb, aspects.ads: Minor reformatting.
11134 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11136 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11137 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11139 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11141 2011-08-02 Yannick Moy <moy@adacore.com>
11143 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11144 mode on subprogram declaration outside of package specification, unless
11145 it is followed by a pragma Import
11146 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11147 Access_Type_Declaration): issue error in formal mode on access type
11148 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11150 (Analyze_Object_Declaration): issue error in formal mode on object
11151 declaration which does not respect SPARK restrictions
11152 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11153 declaration which does not respect SPARK restrictions
11154 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11155 error in formal mode on digits or delta constraint
11156 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11157 decimal fixed point type
11158 (Derived_Type_Declaration): issue error in formal mode on derived type
11159 other than type extensions of tagged record types
11160 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11161 with check on access definition
11162 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11163 mode on protected definition.
11164 (Analyze_Task_Definition): issue error in formal mode on task definition
11166 2011-08-02 Robert Dewar <dewar@adacore.com>
11168 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11170 2011-08-02 Javier Miranda <miranda@adacore.com>
11172 * sem_ch6.adb (Can_Override_Operator): New function.
11173 (Verify_Overriding_Indicator): Add missing code to check overriding
11174 indicator in operators. Fixes regression.
11175 (Check_Overriding_Indicator): Minor reformating after replacing the
11176 code that evaluates if the subprogram can override an operator by
11177 invocations to the above new function.
11179 (Write_Field26_Name): Add missing code to ensure that, following
11180 the documentation in einfo.ads, this field is not shown as attribute
11181 "Static_Initialization" on non-dispatching functions.
11183 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11185 * sem_res.adb (Resolve_Call): A call to
11186 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11187 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11188 i.e., when the second parameter is of type Time_Span.
11190 2011-08-02 Vincent Celier <celier@adacore.com>
11192 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11193 with an archive instead of -L<library dir> -l<library name>.
11195 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11197 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11198 mark the base types In_Use in addition to making the operations
11201 2011-08-02 Ed Falis <falis@adacore.com>
11203 * init.c: add and setup __gnat_signal_mask for the exception signals
11204 * s-inmaop-vxworks.adb: new file.
11205 * s-intman-vxworks.adb: remove unnecessary initializations and
11207 * s-intman-vxworks.ads: remove unnecessary variable
11208 * s-taprop-vxworks.adb: simplify signal initialization
11210 2011-08-02 Robert Dewar <dewar@adacore.com>
11212 * sem_ch8.adb: Minor code reorganization, comment updates.
11214 2011-08-02 Robert Dewar <dewar@adacore.com>
11216 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11217 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11219 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11220 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11224 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11225 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11226 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11227 use_type_clauses, to handle more efficiently use_type and use_all_type
11229 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11230 Ada2012 Use_All_Type clause.
11231 (Use_Class_Wide_Operations): new procedure.
11233 2011-08-02 Robert Dewar <dewar@adacore.com>
11235 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11236 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11237 expression to expression function.
11239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11241 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11242 if types are compatible.
11244 2011-08-02 Yannick Moy <moy@adacore.com>
11246 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11247 returns True if its argument array types have same dimension and same
11248 static bounds at each index.
11249 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11250 OUT or IN OUT paramaters which are not view conversions in SPARK.
11251 (Resolve_Arithmetic_Op): issue an error in formal mode on
11252 multiplication or division with operands of fixed point types which are
11253 not qualified or explicitly converted.
11254 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11255 Boolean or array type (except String) operands.
11256 (Resolve_Equality_Op): issue an error in formal mode on equality
11257 operators for array types other than String with non-matching static
11259 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11260 for array types with non-matching static bounds. Factorize the code in
11261 Matching_Static_Array_Bounds.
11262 (Resolve_Qualified_Expression): issue an error in formal mode on
11263 qualified expressions for array types with non-matching static bounds.
11264 (Resolve_Type_Conversion): issue an error in formal mode on type
11265 conversion for array types with non-matching static bounds
11267 2011-08-02 Robert Dewar <dewar@adacore.com>
11269 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11271 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11273 * par-ch9.adb: save location of entry for proper error message.
11275 2011-08-02 Javier Miranda <miranda@adacore.com>
11277 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11278 (Use_Full_View) which permits this routine to climb through the
11279 ancestors using the full-view of private parents.
11280 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11281 Use_Full_View to true in calls to Is_Ancestor.
11282 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11283 true in call to Is_Ancestor.
11284 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11285 Use_Full_View to true in call to Is_Ancestor.
11286 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11287 call to Is_Ancestor.
11288 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11289 Use_Full_View to true in calls to Is_Ancestor.
11290 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11291 Make_Select_Specific_Data_Table, Register_Primitive,
11292 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11293 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11294 to true in call to Is_Ancestor.
11295 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11296 Use_Full_View to true in calls to Is_Ancestor.
11298 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11299 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11301 2011-08-02 Robert Dewar <dewar@adacore.com>
11303 * gnat_rm.texi: Minor reformatting.
11304 * sem_prag.adb: Minor reformatting.
11306 2011-08-02 Tristan Gingold <gingold@adacore.com>
11308 * vms_data.ads: Add VMS qualifier for -gnateP.
11310 2011-08-02 Robert Dewar <dewar@adacore.com>
11312 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11313 * par-ch7.adb (P_Package): Proper placement of aspects for package
11314 decl/instantiation.
11315 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11316 (End_Statements): Add Is_Sloc parameterr
11317 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11318 (Check_End): Ad Is_Sloc parameter
11319 (End_Statements): Add Is_Sloc parameterr
11321 2011-08-02 Vincent Celier <celier@adacore.com>
11323 * ug_words: Add VMS qualifier equivalent to -gnateP:
11324 /SYMBOL_PREPROCESSING.
11326 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11328 * gnat-style.texi: For hexadecimal numeric literals the typical
11329 grouping of digits is 4 to represent 2 bytes.
11330 A procedure spec which is split into several lines is indented two
11333 2011-08-02 Yannick Moy <moy@adacore.com>
11335 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11336 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11337 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11339 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11340 choice in array aggregate
11341 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11343 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11344 positional and named aggregate for record, or others in record
11345 aggregate, or multiple choice in record aggregate
11346 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11347 array operands to logical operations AND, OR and XOR do not have the
11348 same static lower and higher bounds
11349 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11351 2011-08-01 Robert Dewar <dewar@adacore.com>
11353 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11354 Replaces Last_Source_Node_In_Sequence.
11355 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11356 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11357 parens and blank in string (this was inconsistently implemented).
11359 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11360 blank in string (this was inconsistently implemented).
11362 (Set_Global_Switches): Set formal mode switches appropriately
11363 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11365 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11366 call Set_Error_Msg_Lang to set "spark" as language name.
11367 * par.adb: Remove unnecessary call to set formal language for errout
11368 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11369 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11371 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11372 calls to it, moved after resolution so that types are known
11373 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11374 result of concatenation is not of type String
11375 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11376 concatenation is not properly restricted
11377 * gnat_rm.texi: Add doc on pragma Spark_95.
11378 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11379 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11380 * gcc-interface/Make-lang.in: Update dependencies.
11382 2011-08-01 Javier Miranda <miranda@adacore.com>
11384 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11385 condition that detects if the overridden operation must replace an
11388 2011-08-01 Javier Miranda <miranda@adacore.com>
11390 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11391 code declarations inserted by Insert_Actions in each alternative of the
11392 N_Case_Expression node.
11394 2011-08-01 Robert Dewar <dewar@adacore.com>
11396 * sem_ch6.adb: Minor code reorganization.
11397 * sem_util.adb: Minor reformatting.
11399 2011-08-01 Pascal Obry <obry@adacore.com>
11401 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11402 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11404 2011-08-01 Yannick Moy <moy@adacore.com>
11406 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11407 literal or operator symbol which is prefixed
11408 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11409 mode on access attributes.
11410 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11411 that concatenation operands are properly restricted in formal mode
11412 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11413 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11414 result of the concatenation has a type different from String.
11415 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11416 Analyze_Quantified_Expression, Analyze_Slice,
11417 Analyze_Null): issue an error in formal mode on unsupported constructs
11419 (Analyze_Block_Statement): only issue error on source block statement
11420 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11421 function which returns the last node in a list of nodes for which
11422 Comes_From_Source returns True, if any
11423 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11424 Last_Source_Node_In_Sequence
11425 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11426 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11427 mode on unsupported constructs
11428 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11429 rest of the actions may be needed later on since the error is marked as
11431 * sinfo.ads: Typos in comments.
11433 2011-08-01 Pascal Obry <obry@adacore.com>
11435 * projects.texi: Minor editing.
11437 2011-08-01 Yannick Moy <moy@adacore.com>
11439 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11440 insertion character ~~
11441 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11442 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11443 with insertion character ~~
11444 (Set_Msg_Text): treat insertion character ~~
11445 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11446 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11447 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11448 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11449 errors related to the formal language restriction not serious
11450 (insertion character |).
11451 * par.adb (Par): set formal language for error messages if needed
11452 * sem_ch6.adb (Check_Missing_Return): take into account possible
11453 generated statements at the end of the function
11454 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11455 enumeration value to define a new pragma SPARK_95
11456 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11457 SPARK_Version): new type and variables to store the SPARK version
11459 (SPARK_Mode): return True when SPARK_Version is set
11460 * par-prag.adb: Correct indentation
11461 (Prag): take Pragma_SPARK_95 into account
11462 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11465 2011-08-01 Robert Dewar <dewar@adacore.com>
11467 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11468 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11469 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11471 2011-08-01 Pascal Obry <obry@adacore.com>
11473 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11474 Target_Name to Get_Path call.
11475 (Parse_Single_Project): Likewise.
11476 (Post_Parse_Context_Clause): Likewise.
11477 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11478 Call Initialise_Project_Path with the proper Target_Name.
11479 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11481 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11482 with the proper Target_Name.
11483 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11484 Part.Parse routine.
11485 (Parse_Project_And_Apply_Config): Likewise.
11486 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11487 This is fine as this part of the code is supporting only native
11489 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11490 is fine as this part of the code is supporting only native compilation.
11492 2011-08-01 Yannick Moy <moy@adacore.com>
11494 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11495 of homonym, unless the homonym is one of the cases allowed in SPARK
11496 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11497 package declaration occurring after a body.
11499 2011-08-01 Robert Dewar <dewar@adacore.com>
11501 * checks.adb, exp_ch4.adb: Minor reformatting.
11503 2011-08-01 Javier Miranda <miranda@adacore.com>
11505 * einfo.ads (Access_Disp_Table): Fix documentation.
11506 (Dispatch_Table_Wrappers): Fix documentation.
11508 2011-08-01 Pascal Obry <obry@adacore.com>
11510 * prj-env.adb, prj-env.ads: Minor reformatting.
11512 2011-08-01 Yannick Moy <moy@adacore.com>
11514 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11515 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11516 procedures out of these packages.
11517 * errout.ads, errout.adb
11518 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11519 procedures in of this package
11520 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11521 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11522 on misplaced later vs initial declarations, like in Ada 83
11523 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11524 formal mode on attribute of private type whose full type declaration
11526 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11527 package declaration inside a package specification
11528 (Analyze_Full_Type_Declaration): issue error in formal mode on
11529 controlled type or discriminant type
11530 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11531 user-defined operator means that it should come from the source
11532 (New_Overloaded_Entity): issue error in formal mode on overloaded
11534 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11536 2011-08-01 Thomas Quinot <quinot@adacore.com>
11538 * atree.adb: Minor reformatting.
11539 * checks.adb: Minor reformatting.
11541 2011-08-01 Vincent Celier <celier@adacore.com>
11543 * s-parame-vms-ia64.ads: Fix typo in comment
11545 * s-parame-vms-restrict.ads: Removed, unused.
11547 2011-08-01 Javier Miranda <miranda@adacore.com>
11550 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11552 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11553 * sem_ch3.ads, sem_ch3.adb
11554 (Is_Constant_Bound): New extended version of the subprogram that was
11555 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11556 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11557 * sem_aux.ads (Constant_Value): Fix typo in comment.
11558 * checks.adb (Generate_Index_Checks): New implementation which, for
11559 array objects with constant bounds, generates the runtime check
11560 referencing the bounds of the array type. For other cases this routine
11561 provides its previous behavior obtaining such values from the array
11563 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11565 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11566 we cannot have semantic interpretations of the new node.
11568 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11570 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11573 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11575 * sem_ch8.adb: Minor code editing.
11576 * s-vxwext.adb: Remove trailing space.
11577 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11578 consistency with other files.
11580 2011-08-01 Thomas Quinot <quinot@adacore.com>
11582 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11584 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11586 * par-ch10.adb: reject parameterized expressions as compilation unit.
11587 * sem_ch4.adb: handle properly conditional expression with overloaded
11588 then_clause and no else_clause.
11590 2011-08-01 Tristan Gingold <gingold@adacore.com>
11592 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11593 like done by System.Aux_DEC.
11594 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11596 2011-08-01 Yannick Moy <moy@adacore.com>
11598 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11599 missing label at end of declaration (subprogram or package)
11600 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11601 of positional and named parameter association
11602 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11603 Error_Msg_SP which adds a prefix to the error message giving the name
11604 of the formal language analyzed
11605 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11606 access result type in subprogram, unconstrained array as result type,.
11607 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11609 * sem_ch8.adb: Code clean up.
11611 2011-08-01 Javier Miranda <miranda@adacore.com>
11613 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11614 * einfo.ads (Access_Disp_Table): Fix documentation.
11615 (Dispatch_Table_Wrappers): Fix documentation.
11616 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11617 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11618 to enforce the documentation of this attribute.
11619 (Set_Is_Interface): Cleanup the assertion.
11620 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11621 the Underlying_Type entity before reading attribute Access_Disp_Table.
11622 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11623 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11624 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11625 the Underlying_Type entity before reading attribute Access_Disp_Table.
11626 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11627 Locate the Underlying_Type entity before reading attribute
11630 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11632 * s-poosiz.ads: Additional overriding indicators.
11634 2011-08-01 Yannick Moy <moy@adacore.com>
11636 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11638 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11639 parameter specification does not include a subtype mark.
11640 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11641 formal mode on abstract subprogram.
11642 (Analyze_Subprogram_Specification): issue error in formal mode on
11643 user-defined operator.
11644 (Process_Formals): issue error in formal mode on access parameter and
11645 default expression.
11646 * sem_ch9.adb (Analyze_Abort_Statement,
11647 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11648 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11649 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11650 Analyze_Requeue, Analyze_Selective_Accept,
11651 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11652 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11653 issue error in formal mode on user-defined raise statement.
11655 2011-08-01 Thomas Quinot <quinot@adacore.com>
11657 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11658 declaration being hidden when overriding an implicit inherited
11660 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11661 (-gnats), do not complain about a source file that contains only a
11664 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11666 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11667 variable if already set.
11669 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11671 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11672 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11673 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11674 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11675 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11676 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11677 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11678 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11679 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11680 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11681 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11682 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11683 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11684 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11685 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11686 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11687 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11688 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11689 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11690 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11691 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11692 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11693 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11694 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11695 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11696 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11697 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11698 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11699 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11700 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11701 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11702 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11703 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11704 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11705 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11706 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11707 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11708 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11709 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11710 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11711 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11712 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11713 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11714 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11715 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11716 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11717 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11718 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11719 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11720 Use GNAT instead of GNARL.
11722 2011-08-01 Bob Duff <duff@adacore.com>
11724 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11725 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11726 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11729 2011-08-01 Yannick Moy <moy@adacore.com>
11731 * debug.adb (d.D) reverve flag for the SPARK mode
11732 (d.E) reverve flag for SPARK generation mode
11733 (d.F) reverve flag for Why generation mode
11734 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11735 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11736 functions which return True when the corresponding modes are set
11737 (Formal_Language): return "spark" or "alfa" when in formal verification
11739 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11740 Error_Msg to prefix the error message with a tag giving the formal
11742 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11743 message with a tag giving the formal language
11744 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11746 (Analyze_Case_Statement): issue error in formal mode on case statement
11747 with a single "others" case alternative
11748 (Analyze_Exit_Statement): issue errors in formal mode on exit
11749 statements which do not respect SPARK restrictions
11750 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11751 (Check_Unreachable_Code): always issue an error (not a warning) in
11752 formal mode on unreachable code (concerns both code after an infinite
11753 loop and after an unconditional jump, both not allowed in SPARK)
11754 * sem_ch6.adb (Analyze_Return_Statement): add call to
11755 Set_Return_Present for a procedure containing a return statement
11756 (already done for functions in Analyze_Function_Return)
11757 (Analyze_Function_Return): issue error in formal mode on extended
11758 return or if return is not last statement in function
11759 (Check_Missing_Return): issue error in formal mode if function does
11760 not end with return or if procedure contains a return
11761 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11762 function to detect if there is an inner scope of its parameter S which
11765 2011-08-01 Thomas Quinot <quinot@adacore.com>
11767 * sem_ch6.ads: Minor reformatting.
11769 2011-08-01 Javier Miranda <miranda@adacore.com>
11771 * sem_util.adb (Abstract_Interface_List): Complete condition when
11772 processing private type declarations to avoid reading unavailable
11774 (Is_Synchronized_Tagged_Type): Complete condition when processing
11775 private extension declaration nodes to avoid reading unavailable
11778 2011-08-01 Thomas Quinot <quinot@adacore.com>
11780 * sem_ch3.adb: Minor reformatting.
11782 2011-08-01 Thomas Quinot <quinot@adacore.com>
11784 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11785 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11786 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11787 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11788 for VMS, instead parametrize the common implementation with
11789 System.Parameters declarations.
11791 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11793 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11795 2011-08-01 Tristan Gingold <gingold@adacore.com>
11797 * seh_init.c: Fix SEH handler installation on win64.
11799 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11801 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11802 double analysis of an anonymous access to subprogram, because it can
11803 lead to improper sharing of profiles and a back-end crash.
11805 2011-08-01 Robert Dewar <dewar@adacore.com>
11807 * make.adb, sem_ch4.adb: Minor reformatting.
11808 * gcc-interface/Make-lang.in: Update dependencies.
11809 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11811 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11813 * gnat_rm.texi: Fix definition of Long_Integer.
11815 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11817 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11818 to prevent storage exhaustion.
11819 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11820 finalized is a function body, insert the cleanup code before the final
11821 return statement, to prevent spurious warnings.
11822 * s-pooglo.ads: add overriding indicator.
11824 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11826 * sem_ch4.adb (Operator_Check): improve error message when both a
11827 with_clause and a use_clause are needed to make operator usage legal.
11828 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11829 determine whether a compilation unit is visible within an other,
11830 either through a with_clause in the current unit, or a with_clause in
11831 its library unit or one one of its parents.
11833 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11835 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11836 over an arbitrary expression of an array or container type.
11837 * lib-xref.adb: clarify comment.
11839 2011-08-01 Bob Duff <duff@adacore.com>
11841 * einfo.ads: Minor reformatting.
11842 * debug.adb: Minor comment improvement.
11844 2011-08-01 Javier Miranda <miranda@adacore.com>
11846 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11847 consider hidden subprograms as valid candidates.
11849 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11851 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11853 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11855 * gnat_ugn.texi: Fix typo.
11857 2011-08-01 Robert Dewar <dewar@adacore.com>
11859 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11860 lib-xref.adb: Minor reformatting
11862 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11864 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11865 when to generate a call to Move_Final_List.
11866 (Has_Controlled_Parts): Remove this function.
11868 2011-08-01 Geert Bosch <bosch@adacore.com>
11870 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11871 "," in choice list.
11873 2011-08-01 Thomas Quinot <quinot@adacore.com>
11875 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11876 explicit raise of a predefined exception as Comes_From_Source if the
11877 original N_Raise_Statement comes from source.
11879 2011-08-01 Robert Dewar <dewar@adacore.com>
11881 * sinfo.ads: Add comment.
11882 * sem_ch6.adb: Minor reformatting.
11884 2011-08-01 Robert Dewar <dewar@adacore.com>
11886 * freeze.adb (Freeze_Entity): Refine check for bad component size
11887 clause to avoid rejecting confirming clause when atomic/aliased present.
11889 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11891 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11892 better determine whether an entity reference is a write.
11893 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11895 * lib-xref.adb (Output_References): Do no suppress a read reference at
11896 the same location as an immediately preceeding modify-reference, to
11897 handle properly in-out actuals.
11899 2011-08-01 Tristan Gingold <gingold@adacore.com>
11901 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11903 2011-08-01 Quentin Ochem <ochem@adacore.com>
11905 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11906 heap to compute the result.
11908 2011-08-01 Robert Dewar <dewar@adacore.com>
11910 * atree.ads: Minor reformatting.
11912 2011-08-01 Emmanuel Briot <briot@adacore.com>
11914 * g-expect.adb (Get_Command_Output): Fix memory leak.
11916 2011-08-01 Geert Bosch <bosch@adacore.com>
11918 * cstand.adb (P_Float_Type): New procedure to print the definition of
11919 predefined fpt types.
11920 (P_Mixed_Name): New procedure to print a name using mixed case
11921 (Print_Standard): Use P_Float_Type for printing floating point types
11922 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11923 precision IEEE float.
11925 2011-08-01 Thomas Quinot <quinot@adacore.com>
11927 * sem_ch3.adb: Minor reformatting.
11929 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11931 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11932 the completion of a generic function, insert the new body rather than
11933 rewriting the original.
11935 2011-08-01 Yannick Moy <moy@adacore.com>
11937 * sinfo.ads, errout.ads: Typos in comments.
11939 2011-08-01 Robert Dewar <dewar@adacore.com>
11941 * par-endh.adb: Minor reformatting.
11943 2011-08-01 Robert Dewar <dewar@adacore.com>
11945 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11946 (Pre_Post_Aspects): New subtype.
11947 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11948 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11949 * par-ch7.adb (P_Package): Remove Decl parameter
11950 (P_Package): Handle new syntax for aspects (before IS)
11951 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11953 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11954 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11955 (P_Package): Remove Decl parameter
11956 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11958 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11960 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11961 * sinfo.ads: Document new syntax for aspects in packages etc.
11962 * sprint.adb: Handle new syntax of aspects before IS in package
11964 2011-08-01 Thomas Quinot <quinot@adacore.com>
11966 * atree.ads: Minor reformatting.
11967 * sem_prag.adb: Minor reformatting.
11969 2011-08-01 Robert Dewar <dewar@adacore.com>
11971 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11972 case expr alternative.
11974 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11976 * sem_ch12.adb: Fix typo.
11978 2011-08-01 Geert Bosch <bosch@adacore.com>
11980 * sem_prag.adb (Check_No_Link_Name): New procedure.
11981 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11982 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11983 instead of Standard_Long_Long_Float_Size global. Preparation for
11984 eventual removal of per type constants.
11985 * exp_util.ads (Get_Stream_Size): New function returning the stream
11986 size value of subtype E.
11987 * exp_util.adb (Get_Stream_Size): Implement new function.
11988 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11990 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11992 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11994 2011-08-01 Geert Bosch <bosch@adacore.com>
11996 * cstand.adb: Fix comments.
11997 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11998 count of arguments.
12000 2011-08-01 Robert Dewar <dewar@adacore.com>
12002 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12004 2011-08-01 Geert Bosch <bosch@adacore.com>
12006 * atree.ads: Fix comment.
12008 2011-08-01 Robert Dewar <dewar@adacore.com>
12010 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12011 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12012 * par.adb: Add with for Namet.Sp.
12013 * par-tchk.adb: Minor reformatting.
12015 2011-08-01 Vincent Celier <celier@adacore.com>
12017 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12018 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12019 of the init procedure of a SAL.
12020 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12023 2011-08-01 Thomas Quinot <quinot@adacore.com>
12025 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12028 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12030 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12032 2011-08-01 Thomas Quinot <quinot@adacore.com>
12034 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12035 conformant with its spec (return True only for types that have
12036 an overriding Initialize primitive operation that prevents them from
12037 having preelaborable initialization).
12038 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12039 initialization for controlled types in Ada 2005 or later mode.
12041 2011-08-01 Robert Dewar <dewar@adacore.com>
12043 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12045 (Same_Aspect): New function.
12046 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12047 Type_Invariant, Precondition, Postcondition.
12048 * snames.ads-tmpl: Add Name_Type_Invariant.
12050 2011-08-01 Robert Dewar <dewar@adacore.com>
12052 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12054 (Freeze_All_Ent): Fix error in handling inherited aspects.
12055 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12056 already analyzed, but don't skip entire processing of a declaration,
12057 that's wrong in some cases of declarations being rewritten.
12058 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12059 Don't delay for integer, string literals
12060 Treat predicates in usual manner for delay, remove special case code,
12062 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12063 (Build_Predicate_Function): Update saved expression in aspect
12064 (Build_Invariant_Procedure): Update saved expression in aspect
12065 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12066 of replacement of discriminant references if the reference is simple.
12068 2011-08-01 Robert Dewar <dewar@adacore.com>
12070 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12071 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12072 Static_Predicate and Dynamic_Predicate.
12073 (Build_Predicate_Function): Add processing for Static_Predicate
12074 and Dynamic_Predicate.
12075 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12076 (From_Static_Predicate): New flag
12077 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12079 2011-08-01 Robert Dewar <dewar@adacore.com>
12081 * usage.adb: Documentation cleanup for Ada version modes in usage.
12082 * expander.adb: Minor reformatting.
12084 2011-08-01 Robert Dewar <dewar@adacore.com>
12086 * atree.ads: Minor comment fix.
12087 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12088 a-witeio.ads, sem_prag.adb: Minor reformatting.
12090 2011-08-01 Doug Rupp <rupp@adacore.com>
12092 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12093 pointers. Use descrip.h header file for convenience. Add some
12096 2011-08-01 Robert Dewar <dewar@adacore.com>
12098 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12099 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12100 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12102 (Check_Aspect_At_End_Of_Declarations): New procedure
12103 (Analye_Aspect_Specification): Minor changes for above procedures
12104 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12105 specification node as well.
12107 2011-08-01 Pascal Obry <obry@adacore.com>
12109 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12110 Windows files. Use GetFilesAttributes() in this case to check for file
12111 existence instead of returning with an error code.
12113 2011-08-01 Vincent Celier <celier@adacore.com>
12115 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12116 High is above Source length.
12118 2011-08-01 Robert Dewar <dewar@adacore.com>
12120 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12122 2011-08-01 Robert Dewar <dewar@adacore.com>
12124 * aspects.ads (Boolean_Aspects): New subtype.
12125 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12126 for derived types in cases where the parent type and derived type have
12128 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12129 with aspects when parent type also has aspects.
12130 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12131 boolean expression at this point).
12132 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12133 accordance with final decision on the Ada 2012 feature.
12134 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12136 2011-08-01 Matthew Heaney <heaney@adacore.com>
12138 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12140 2011-08-01 Pascal Obry <obry@adacore.com>
12142 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12143 Fix Replace_Slice when High is above current string size.
12144 (Replace_Slice): Fix DL computation when High is above current
12147 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12149 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12151 2011-08-01 Matthew Heaney <heaney@adacore.com>
12153 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12156 2011-08-01 Pascal Obry <obry@adacore.com>
12158 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12161 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12163 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12164 access to protected subprograms in generic bodies.
12165 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12166 protected type, indicate that the convention of the subprogram is
12167 Convention_Protected, because it may be used in subsequent declarations
12168 within the protected declaration.
12170 2011-08-01 Vincent Celier <celier@adacore.com>
12172 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12173 and "final" procedures when the name of the library is "ada", to avoid
12174 duplicate symbols "adainit" and "adafinal" in executables.
12176 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12178 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12179 quantified expression that appears within a postcondition and uses the
12180 Ada2012 'Result attribute.
12182 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12184 * init.c (__gnat_error_handler): Cast reason to int.
12185 (__gnat_install_handler): Explain sa_sigaction use.
12187 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12189 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12190 subprogram has copy-in copy-out parameters, try to promote the mode of
12191 the return type if it is passed in registers.
12193 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12195 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12196 left operand as addressable.
12198 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12200 * gcc-interface/gigi.h (build_function_stub): Remove.
12201 (build_return_expr): Likewise.
12202 (convert_vms_descriptor): Declare.
12203 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12204 (build_function_stub): Move to...
12205 * gcc-interface/utils2.c (build_return_expr): Move to...
12206 * gcc-interface/trans.c (build_function_stub): ...here.
12207 (build_return_expr): ...here.
12208 (Subprogram_Body_to_gnu): Add local variable for language_function.
12209 Disconnect the parameter attributes cache, if any, once done with it.
12210 Call end_subprog_body only after setting the end_locus.
12211 Build the stub associated with the function, if any, at the very end.
12212 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12213 variables and streamline control flow.
12215 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12218 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12219 g-trasym-dwarf.adb.
12221 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12224 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12225 Assign to act.sa_sigaction.
12226 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12227 current->return_address to char * before arithmetic.
12229 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12231 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12232 Correct argument types.
12233 Extract code from reason.
12234 (__gnat_install_handler): Assign to act.sa_sigaction.
12236 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12238 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12239 (GNAT1_OBJS): ...here.
12241 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12244 * g-socthi-mingw.adb (Fill): Fix formatting.
12246 * gcc-interface/gigi.h: Move around comment.
12248 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12251 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12253 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12256 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12258 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12260 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12261 range comparison if Pmode is SImode.
12263 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12264 Eric Botcazou <ebotcazou@adacore.com>
12266 * adadecode.c: Wrap up in extern "C" block.
12267 * adadecode.h: Likewise.
12268 * adaint.c: Likewise. Remove 'const' keyword.
12269 * adaint.h: Likewise.
12270 * argv.c: Likewise.
12271 * atree.h: Likewise.
12273 * cstreams.c: Likewise.
12275 * exit.c: Likewise.
12277 * final.c: Likewise.
12278 * init.c: Likewise.
12279 * initialize.c: Likewise.
12280 * link.c: Likewise.
12281 * namet.h: Likewise.
12282 * nlists.h: Likewise.
12283 * raise.c: Likewise.
12284 * raise.h: Likewise.
12285 * repinfo.h: Likewise.
12286 * seh_init.c: Likewise.
12287 * targext.c: Likewise.
12288 * tracebak.c: Likewise.
12289 * uintp.h: Likewise.
12290 * urealp.h: Likewise.
12291 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12292 * xsinfo.adb: Likewise.
12293 * xsnamest.adb: Likewise.
12294 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12295 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12296 * gcc-interface/misc.c: Likewise.
12297 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12298 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12299 ada/targext.o here...
12300 (GNAT_ADA_OBJS): ...and not here.
12301 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12302 (GNATBIND_OBJS): Reorder.
12304 2011-07-07 Richard Henderson <rth@redhat.com>
12306 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12307 dwarf2out_frame_init.
12309 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12311 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12313 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12316 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12318 2011-07-06 Richard Guenther <rguenther@suse.de>
12320 * gcc-interface/misc.c (gnat_init): Merge calls to
12321 build_common_tree_nodes and build_common_tree_nodes_2.
12322 Re-initialize boolean_false_node.
12324 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12325 Olivier Hainque <hainque@adacore.com>
12326 Nicolas Setton <setton@adacore.com>
12328 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12329 the type according to the ARTIFICIAL_P parameter.
12330 (create_type_decl): Likewise.
12331 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12333 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12335 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12336 (gnatbind): Likewise.
12338 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12340 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12342 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12344 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12345 local variable throughout. Remove useless call to Base_Type.
12346 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12347 Take it also into account for the volatileness of the field. Set the
12348 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12350 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12352 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12353 on a dereference built for a by-ref object if it has an address clause.
12355 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12357 * einfo.ads (Address_Taken): Document use for the second argument of
12358 Asm_Input and Asm_Output attributes.
12359 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12360 argument is an entity name, then set Address_Taken on it.
12361 <Attribute_Asm_Output>: Likewise.
12362 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12363 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12364 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12365 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12367 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12369 PR middle-end/46500
12370 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12372 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12374 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12375 (ada/utils.o): Update dependencies.
12376 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12377 ../../../libcpp/libcpp.a.
12378 * gcc-interface/utils.c: Include common/common-target.h.
12379 (process_attributes): Use targetm_common.have_named_sections.
12381 2011-06-07 Richard Guenther <rguenther@suse.de>
12383 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12386 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12388 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12389 TREE_THIS_NOTRAP flag.
12391 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12393 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12396 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12398 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12399 constants whose full view has discriminants specially.
12401 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12403 * gcc-interface/utils.c: Include diagnostic.h.
12404 (gnat_write_global_declarations): Output debug information for all
12405 global type declarations before finalizing the compilation unit.
12406 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12408 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12410 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12412 2011-05-25 Kai Tietz <ktietz@redhat.com>
12414 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12415 initialization instead of const/none-const pointer assignment.
12417 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12419 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12420 $(EXTRA_GNAT1_OBJS).
12421 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12422 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12423 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12424 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12425 libcommon-target.a instead of prefix.o.
12427 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12430 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12432 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12434 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12435 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12436 instead of version.o.
12438 2011-05-18 Kai Tietz <ktietz@redhat.com>
12440 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12441 boolean_false_node instead of integer_zero_node.
12442 (convert_with_check): Likewise.
12443 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12445 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12447 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12448 type of the parameter is an unconstrained array, convert the actual to
12449 the type of the formal in the In Out and Out cases as well.
12451 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12453 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12454 call build_function_type_array or build_varargs_function_type_array
12456 (create_subprog_type): Don't call build_function_type; call
12457 build_function_type_vec instead.
12459 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12461 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12462 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12463 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12465 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12467 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12469 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12470 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12472 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12474 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12476 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12478 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12479 instead of accessing TYPE_ARG_TYPES directly.
12480 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12482 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12485 * gcc-interface/gigi.h (get_variant_part): Declare.
12486 * gcc-interface/decl.c (get_variant_part): Make global.
12487 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12488 types have the same constant size, are record types and T1 has a
12489 variant part while T2 doesn't.
12491 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12493 * gcc-interface/utils.c (begin_subprog_body): Do not call
12495 (end_subprog_body): Likewise.
12497 2011-05-04 Richard Guenther <rguenther@suse.de>
12499 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12501 (pos_to_constructor): Likewise.
12503 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12504 Eric Botcazou <ebotcazou@adacore.com>
12506 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12507 of build_function_type. Adjust calls to...
12508 (build_raise_check): ...this. Do not take a void_tree parameter.
12509 Call build_function_type_list instead of build_function_type.
12510 Fix head comment and swap couple of conditional blocks.
12512 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12514 * gnatvsn.ads (Library_Version): Bump to 4.7.
12515 (Current_Year): Bump to 2011.
12517 2011-04-29 Michael Matz <matz@suse.de>
12519 * gcc-interface/misc.c (gnat_handle_option): Set
12520 warn_maybe_uninitialized.
12522 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12524 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12525 the Watson/McCabe paper.
12527 2011-04-23 Jim Meyering <meyering@redhat.com>
12529 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12531 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12533 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12536 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12538 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12540 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12541 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12542 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12543 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12544 <all>: Do not set flags on the reused DECL node coming from an alias.
12545 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12546 don't need debug info here...
12547 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12548 (gigi): Adjust calls to create_subprog_decl.
12549 (build_raise_check): Likewise.
12550 (establish_gnat_vms_condition_handler): Likewise.
12551 (Compilation_Unit_to_gnu): Likewise.
12552 (gnat_to_gnu): Likewise.
12554 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12556 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12557 (NO_REORDER_ADAFLAGS): New variable.
12558 (EXTRA_GNATTOOLS): Always define.
12559 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12560 Clean up and adjust list of files compiled with special options.
12561 * gcc-interface/Make-lang.in: Likewise.
12562 (ada/decl.o): Cosmetical change.
12563 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12565 2011-04-20 Jim Meyering <meyering@redhat.com>
12567 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12569 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12571 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12572 $(CFLAGS) on the link line.
12574 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12576 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12577 padded type built for the return type if it is unconstrained.
12579 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12581 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12583 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12585 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12586 before calling TREE_CHAIN.
12587 * gcc-interface/misc.c (gnat_init_ts): New function.
12588 (LANG_HOOKS_INIT_TS): Define.
12590 2011-04-12 Martin Jambor <mjambor@suse.cz>
12592 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12593 instead of cgraph_node.
12595 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12597 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12598 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12601 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12603 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12604 of aggregate types that contain a placeholder.
12606 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12608 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12610 (handle_type_generic_attribute): Likewise.
12612 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12615 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12617 2011-04-04 Kai Tietz <ktietz@redhat.com>
12620 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12623 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12625 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12626 type case, do not strip a padding type around the array type.
12628 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12630 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12633 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12635 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12636 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12637 code for -feliminate-unused-debug-types.
12638 (gnat_post_options): Likewise.
12640 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12642 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12643 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12646 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12648 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12649 DECL_ARTIFICIAL flag on enumeration types.
12651 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12653 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12654 fat pointer types artificial unconditionally.
12655 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12658 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12660 * gcc-interface/gigi.h (get_dummy_type): Declare.
12661 (build_dummy_unc_pointer_types): Likewise.
12662 (finish_fat_pointer_type): Likewise.
12663 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12664 fat pointer type has been built, complete it in place.
12665 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12666 and thin pointers. Remove useless variable.
12667 (finish_fat_pointer_type): Make global and move to...
12668 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12669 (get_dummy_type): New function.
12670 (build_dummy_unc_pointer_types): Likewise.
12671 (gnat_pushdecl): Propage the name to the anonymous variants only.
12672 (update_pointer_to): Only adjust the pointer types in the unconstrained
12675 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12677 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12678 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12679 if this is a Taft amendment type and the full declaration is available.
12680 * gcc-interface/trans.c (process_type): Likewise.
12681 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12682 (process_freeze_entity): Likewise.
12683 * gcc-interface/utils.c (dummy_global): New static variable.
12684 (gnat_write_global_declarations): If there are types declared as used
12685 at the global level, insert them in the global hash table.
12687 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12689 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12690 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12691 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12693 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12694 flag of the type accordingly.
12695 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12697 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12699 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12700 finalizing types when updating the pointers to the designated type.
12701 <all>: Finalize the deferred types even if we didn't defer processing
12702 of incomplete types in this invocation.
12704 2011-04-01 Olivier Hainque <hainque@adacore.com>
12705 Nicolas Setton <setton@adacore.com>
12706 Eric Botcazou <ebotcazou@adacore.com>
12708 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12709 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12711 2011-03-28 Kai Tietz <ktietz@redhat.com>
12713 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12715 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12716 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12718 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12720 2011-03-28 Tristan Gingold <gingold@adacore.com>
12723 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12724 Use ada output of gnatbind.
12725 (ada/b_gnatb.adb): Ditto.
12726 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12727 (ada.mostlyclean, ada.stage1)
12728 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12729 (ada.stagefeedback): Adjust.
12730 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12731 Use ada output of gnatbind.
12732 (b_gnatm.adb): Ditto.
12733 (b_gnatl.o, b_gnatm.o): New rules.
12735 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12737 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12738 for the padded type built to support a specified size or alignment.
12740 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12742 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12743 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12744 unconditionally to the end of the unit when the designated type is
12746 <all>: Rename local variable. Attempt to un-defer types only and do it
12747 for limited_with'ed types as well.
12748 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12749 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12750 consistently and remove redundant call to finalize_from_with_types.
12752 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12754 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12755 subprograms without a previous spec declared in the same unit.
12756 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12757 subprograms at the end of the unit instead of at the beginning.
12758 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12759 isn't public for the special handling of non-inline functions nested
12760 inside inline external functions.
12762 2011-03-25 Jeff Law <law@redhat.com>
12764 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12766 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12768 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12769 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12770 to compute Set_Size_Depends_On_Discriminant.
12771 (Layout_Type): Call it on array types in back-end layout mode.
12772 * sem_util.adb (Requires_Transient_Scope): Return true for array
12773 types only if the size depends on the value of discriminants.
12774 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12775 type if the RHS is a call to a function that returns an unconstrained
12776 type with default discriminant.
12778 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12780 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12781 non-conversion to the nominal result type at the end.
12783 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12785 * gcc-interface/trans.c (create_temporary): New function taken from...
12786 (create_init_temporary): ...here. Call it.
12787 (call_to_gnu): Create the temporary for the return value early, if any.
12788 Create it for a function with copy-in/copy-out parameters if there is
12789 no target; in other cases of copy-in/copy-out, use another temporary.
12790 Push the new binding level lazily. Add and rename local variables.
12792 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12794 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12796 (set_rm_size): Likewise.
12798 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12800 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12801 for the padded type built in order to support a specified alignment.
12802 Fix incorrect formatting.
12804 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12807 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12809 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12811 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12812 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12813 to the end of the list. Adjust recursive call. Rename local variable.
12814 If REORDER is true, reorder components of the record type.
12815 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12816 components_to_record and adjust the parameter list.
12818 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12820 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12821 disabled, use the variable for bounds of loop iteration scheme.
12823 2011-03-21 Kai Tietz <ktietz@redhat.com>
12826 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12828 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12830 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12831 out whether the expression is read-only. Short-circuit placeholder
12832 case and rename a couple of local variables.
12834 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12836 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12837 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12838 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12839 (convert): Deal with conversions from a smaller form type specially.
12841 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12843 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12844 its argument, except for the special -I- switch.
12846 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12848 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12851 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12853 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12855 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12857 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12859 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12860 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12861 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12862 Do not generate the check directly, instead instantiate the template
12863 check present in the descriptor.
12864 (make_descriptor_field): Move around.
12865 (build_vms_descriptor32): Build a template check in the POINTER field.
12866 (build_vms_descriptor): Remove useless suffixes.
12867 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12869 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12872 * targext.c: Include target files if IN_RTS is defined.
12874 2011-01-26 Richard Guenther <rguenther@suse.de>
12877 * targext.c: Include config.h.
12878 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12881 2011-01-04 Pascal Obry <obry@adacore.com>
12882 Eric Botcazou <ebotcazou@adacore.com>
12884 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12886 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12888 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12889 end-of-case on the end label and its associated gotos, if any.
12891 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12893 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12894 expressions of the parameter cache within the statement group of
12895 the CICO mechanism.
12897 2011-01-04 Olivier Hainque <hainque@adacore.com>
12898 Eric Botcazou <ebotcazou@adacore.com>
12900 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12901 (set_end_locus_from_node): New function.
12902 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12903 make and the function end_locus.
12904 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12905 for the elaboration subprogram.
12906 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12907 set the end_locus of the expression as well.
12909 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12912 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12913 variables that are referenced in exception handlers volatile.
12917 Copyright (C) 2011 Free Software Foundation, Inc.
12919 Copying and distribution of this file, with or without modification,
12920 are permitted in any medium without royalty provided the copyright
12921 notice and this notice are preserved.
12923 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12924 - fix bugs in the description of Source_Trace;
12925 - get rid of UNIT_NAME;
12927 2011-08-02 Javier Miranda <miranda@adacore.com>
12930 (Build_Dispatching_Requeue): Adding support for VM targets
12931 since we cannot directly reference the Tag entity.
12932 * exp_sel.adb (Build_K): Adding support for VM targets.
12933 (Build_S_Assignment): Adding support for VM targets.
12935 (Default_Prim_Op_Position): In VM targets do not restrict availability
12936 of predefined interface primitives to compiling in Ada 2005 mode.
12937 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12938 restricted to compiling in Ada 2005 mode.
12939 (Make_VM_TSD): Generate code that declares and initializes the OSD
12940 record. Needed to support dispatching calls through synchronized
12943 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12944 primitives associated with synchronized interfaces.
12945 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12946 primitives associated with synchronized interfaces.
12948 2011-08-02 Yannick Moy <moy@adacore.com>
12950 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12951 statements hidden in SPARK if preceded by the HIDE directive
12952 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12953 exception handlers as hidden in SPARK if preceded by the HIDE directive
12954 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12955 if starting with the HIDE directive
12956 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12957 starting with the HIDE directive; mark the declarations in a private
12958 part as hidden in SPARK if the private part starts with the HIDE
12960 * restrict.adb, restrict.ads
12961 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12962 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12963 argument node belongs to a part which is hidden in SPARK
12964 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12965 parts in SPARK; protect the possibly costly call to
12966 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12967 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12968 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12969 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12971 (Scan): recognize special comment starting with '#' and followed by
12972 SPARK keyword "hide" as a HIDE directive.
12974 2011-08-02 Yannick Moy <moy@adacore.com>
12976 * types.ads, erroutc.ads: Minor reformatting.
12978 2011-08-02 Vincent Celier <celier@adacore.com>
12980 * link.c: Add response file support for cross platforms.
12982 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12984 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12985 in an association, set parent field of copy before partial analysis.
12986 * sem_res.adb (Resolve_Slice): create reference to itype only when
12987 expansion is enabled.
12989 2011-08-02 Yannick Moy <moy@adacore.com>
12991 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12992 for new flag denoting which subprogram bodies are in ALFA
12993 * restrict.adb, sem_ch7.adb: Update comment
12994 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12995 sem_ch9.adb, sem_res.adb: Add calls to
12996 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12997 * sem_ch6.adb (Analyze_Function_Return): add calls to
12998 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12999 middle of the body, and extended return.
13000 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13001 False when missing return.
13002 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13003 to True for subprograms whose spec is in ALFA. Remove later on the flag
13004 on the entity used for a subprogram body when there exists a separate
13006 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13007 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13008 False, otherwise do nothing.
13010 2011-08-02 Robert Dewar <dewar@adacore.com>
13012 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13014 2011-08-02 Yannick Moy <moy@adacore.com>
13016 * sem_ch4.ads: minor formatting.
13018 2011-08-02 Yannick Moy <moy@adacore.com>
13020 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13021 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13022 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13023 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13024 opt.ads: cleanup of SPARK mode
13026 2011-08-02 Yannick Moy <moy@adacore.com>
13028 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13030 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13031 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13033 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13034 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13035 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13036 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13038 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13040 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13041 functions whose return type is not in ALFA.
13042 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13044 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13045 parameter's type is not in ALFA.
13046 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13049 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13051 * sem_ch6 (Analyze_Expression_Function): treat the function as
13052 Inline_Always, and introduce a subprogram declaration for it when it is
13054 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13055 expression functions, so that the back-end can determine whether they
13056 can in fact be inlined.
13057 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13058 a function body comes from an expression function.
13060 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13062 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13063 null exclusions to test Can_Never_Be_Null on the anonymous access types
13064 of the formals rather than testing the formals themselves. Exclude this
13065 check in cases where the Old_Formal is marked as a controlling formal,
13066 to avoid issuing spurious errors for bodies completing dispatching
13067 operations (due to the flag not getting set on controlling access
13068 formals in body specs).
13069 (Find_Corresponding_Spec): When checking full and subtype conformance of
13070 subprogram bodies in instances, pass Designated and E in that order, for
13071 consistency with the expected order of the formals (New_Id followed by
13074 2011-08-02 Robert Dewar <dewar@adacore.com>
13076 * sem_ch8.adb: Minor reformatting.
13078 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13080 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13081 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13082 primitive operations of class-wide actuals.
13084 2011-08-02 Javier Miranda <miranda@adacore.com>
13086 * exp_atag.ads, exp_atag.adb
13087 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13088 since its value is implicitly passed in argument Typ.
13089 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13090 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13091 Build_Common_Dispatching_Select_Statements.
13093 2011-08-02 Robert Dewar <dewar@adacore.com>
13095 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13096 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13097 Minor reformatting.
13099 2011-08-02 Robert Dewar <dewar@adacore.com>
13101 * sem_res.adb: Minor reformatting.
13102 * sem_prag.adb: Minor reformatting.
13104 2011-08-02 Javier Miranda <miranda@adacore.com>
13106 * exp_atag.adb, exp_atags.ads
13107 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13108 by the tagged type Entity. Required to use this routine in the VM
13109 targets since we do not have available the Tag entity in the VM
13112 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13113 Ada.Tags has not been previously loaded.
13115 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13116 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13118 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13119 view of enclosing scopes. Required to handle enclosing scopes that
13120 are synchronized types whose full view is a task type.
13122 (Build_VM_TSDs): Minor code improvement to avoid generating and
13123 analyzing lists with empty nodes.
13124 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13125 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13126 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13127 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13128 (Make_Select_Specific_Data_Table): Add support for VM targets.
13129 (Make_VM_TSD): Generate code to initialize the SSD structure of
13132 2011-08-02 Yannick Moy <moy@adacore.com>
13134 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13135 cross-references section in ALI.
13136 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13137 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13139 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13140 subprogram or package entity of a node
13141 (Is_Local_Reference_Type): new function returns True for references
13142 selected in local cross-references.
13143 (Lt): function extracted from Lt in Output_References
13144 (Write_Entity_Name): function extracted from Output_References
13145 (Generate_Definition): generate reference with type 'D' for definition
13146 of objects (object declaration and parameter specification), with
13147 appropriate locations and units, for use in local cross-references.
13148 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13149 references of type 'I' for initialization in object definition.
13150 (Output_References): move part of function Lt and procedure
13151 Write_Entity_Name outside of the body. Ignore references of types 'D'
13152 and 'I' introduced for local cross-references.
13153 (Output_Local_References): new procedure to output the local
13154 cross-references sections.
13155 (Lref_Entity_Status): new array defining whether an entity is a local
13156 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13157 with 'I' type when initialization expression is present.
13158 * get_scos.adb, get_scos.ads: Correct comments and typos
13160 2011-08-02 Javier Miranda <miranda@adacore.com>
13162 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13164 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13166 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13169 2011-08-02 Vincent Celier <celier@adacore.com>
13171 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13172 (No_Space_Img): New function
13173 (Find_Excluded_Sources): When reading from a file, record the file name
13174 and the line number for each excluded source.
13175 (Mark_Excluded_Sources): When reporting an error, if the excluded
13176 sources were read from a file, include file name and line number in
13179 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13181 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13183 2011-08-02 Robert Dewar <dewar@adacore.com>
13185 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13187 2011-08-02 Javier Miranda <miranda@adacore.com>
13189 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13190 generation of TSDs to the DOTNET compiler.
13191 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13192 generation of TSDs to the DOTNET compiler.
13194 2011-08-02 Javier Miranda <miranda@adacore.com>
13196 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13197 record of all the tagged types declared inside library level package
13198 declarations, library level package bodies or library level subprograms.
13199 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13200 associated with a given tagged type.
13201 (Build_VM_TSDs): New subprogram.
13202 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13203 compilation units that are subprograms.
13204 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13205 compilation units that are package bodies.
13206 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13207 units that are a package declaration or a package instantiation.
13208 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13209 reorganization to improve the error generated by the frontend when the
13210 function Ada.Tags.Secondary_Tag is not available.
13211 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13212 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13214 2011-08-02 Javier Miranda <miranda@adacore.com>
13216 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13218 2011-08-02 Robert Dewar <dewar@adacore.com>
13220 * s-imenne.ads: Minor reformatting.
13222 2011-08-02 Robert Dewar <dewar@adacore.com>
13224 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13225 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13226 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13228 2011-08-02 Robert Dewar <dewar@adacore.com>
13230 * einfo.ads (Materialize_Entity): Document this is only for renamings
13231 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13232 required debug information in the case where we transform the object
13233 declaration into a renaming declaration.
13234 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13236 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13237 Materialize_Entity.
13239 2011-08-02 Robert Dewar <dewar@adacore.com>
13241 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13242 Suppress_Init_Procs.
13243 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13244 Suppress_Initialization/Initialization_Suppressed.
13245 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13246 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13247 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13248 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13250 2011-08-02 Robert Dewar <dewar@adacore.com>
13252 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13253 Minor reformatting.
13255 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13257 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13258 only have inheritable classwide pre/postconditions.
13260 2011-08-02 Javier Miranda <miranda@adacore.com>
13262 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13263 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13264 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13265 checks if the external tag of a type is the same as the external tag
13266 of some other declaration.
13268 2011-08-02 Thomas Quinot <quinot@adacore.com>
13270 * s-taskin.ads: Minor reformatting.
13272 2011-08-02 Emmanuel Briot <briot@adacore.com>
13274 * g-comlin.adb (Display_Help): swap the order in which it prints the
13275 short help and the general usage.
13277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13279 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13280 the aspect declarations and attach them to the generic copy for
13281 subsequent analysis.
13282 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13283 declarations of the generic tree to the new subprogram declarations.
13284 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13285 conditions that apply to a subprogram instance.
13287 2011-08-02 Robert Dewar <dewar@adacore.com>
13289 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13291 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13293 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13294 private type with a tagged full view is not derived in the immediate
13295 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13297 2011-08-02 Robert Dewar <dewar@adacore.com>
13299 * exp_ch4.adb: Minor reformatting.
13301 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13303 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13304 Ada2012 iterator, the loop will be rewritten during expansion into a
13305 while loop with a cursor and an element declaration. Do not analyze the
13306 body in this case, because if the container is for indefinite types the
13307 actual subtype of the elements will only be determined when the cursor
13308 declaration is analyzed.
13310 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13312 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13313 size/alignment related attributes in CodePeer_Mode.
13315 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13317 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13318 Prepend_Element, since this can result in the operation getting the
13319 wrong slot in the full type's dispatch table if the full type has
13320 inherited operations. The incomplete type's operation will get added
13321 to the proper position in the full type's primitives
13322 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13323 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13324 dispatching operations, since there are cases where nonprimitive
13325 subprograms can get added to the list of incomplete dependents (such
13326 as subprograms in nested packages).
13327 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13328 private part when determining whether to add a primitive with a
13329 parameter of a tagged incomplete type to the Private_Dependents list.
13330 Such primitives can also occur in the visible part, and should not have
13331 been excluded from being private dependents.
13332 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13333 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13334 list of a Taft-amendment incomplete type is a primitive before issuing
13335 an error that the full type must appear in the same unit. There are
13336 cases where nonprimitives can be in the list (such as subprograms in
13338 * sem_disp.adb (Derives_From): Use correct condition for checking that
13339 a formal's type is derived from the type of the corresponding formal in
13340 the parent subprogram (the condition was completely wrong). Add
13341 checking that was missing for controlling result types being derived
13342 from the result type of the parent operation.
13344 2011-08-02 Yannick Moy <moy@adacore.com>
13346 * errout.adb (First_Node): minor renaming
13347 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13350 2011-08-02 Yannick Moy <moy@adacore.com>
13352 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13353 before accessing operands.
13354 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13355 decide whether an initialization expression respects SPARK rules, as
13356 the plain node is the expanded one. This allows for more valid warnings
13358 * gnat_rm.texi: Minor update.
13360 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13362 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13365 2011-08-02 Robert Dewar <dewar@adacore.com>
13367 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13369 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13371 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13372 loop statements and the element renaming declaration with a block when
13373 the element type is controlled.
13375 2011-08-02 Yannick Moy <moy@adacore.com>
13377 * sinfo.ads: Minor formatting.
13379 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13381 * sem_aggr.adb (Add_Association): if the association has a box and no
13382 expression, use the Sloc of the aggregate itself for the new
13384 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13387 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13389 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13390 When a container is provided via a function call, generate a renaming
13391 of the function result. This avoids the creation of a transient scope
13392 and the premature finalization of the container.
13393 * exp_ch7.adb (Is_Container_Cursor): Removed.
13394 (Wrap_Transient_Declaration): Remove the supression of the finalization
13395 of the list controller when the declaration denotes a container cursor,
13398 2011-08-02 Yannick Moy <moy@adacore.com>
13400 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13401 node is from source, instead of the original node being from source.
13403 (Resolve_Array_Aggregate): refine the check for a static expression, to
13404 recognize also static ranges
13405 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13406 Array_Type_Declaration): postpone the test for the type being a subtype
13407 mark after the type has been resolved, so that component-selection and
13408 expanded-name are discriminated.
13409 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13410 to distinguish the case of an iteration scheme, so that an error is
13411 issed on a non-static range in SPARK except in an iteration scheme.
13412 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13413 In_Iter_Schm = True.
13414 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13415 user-defined operators so that they are allowed in renaming
13417 (Find_Selected_Component): refine the check for prefixing of operators
13418 so that they are allowed in renaming. Move the checks for restrictions
13419 on selector name after analysis discriminated between
13420 component-selection and expanded-name.
13421 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13422 concatenation argument of string type if it is static.
13423 * sem_util.adb, sem_util.ads
13424 (Check_Later_Vs_Basic_Declarations): add a new function
13425 Is_Later_Declarative_Item to decice which declarations are allowed as
13426 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13427 mode, add that renamings are considered as later items.
13428 (Enclosing_Package): new function to return the enclosing package
13429 (Enter_Name): correct the rule for homonyms in SPARK
13430 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13431 from source (result of expansion) to avoid issuing wrong warnings.
13433 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13435 * errout.adb: On anything but an expression First_Node returns its
13438 2011-08-02 Pascal Obry <obry@adacore.com>
13440 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13442 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13444 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13445 Set the associated loop as the related expression of internally
13447 * exp_ch7.adb (Is_Container_Cursor): New routine.
13448 (Wrap_Transient_Declaration): Supress the finalization of the list
13449 controller when the declaration denotes a container cursor.
13451 2011-08-02 Yannick Moy <moy@adacore.com>
13453 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13455 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13456 expression is a simple expression. This check cannot be performed in
13457 the semantics, so just drop it.
13458 (P_Index_Or_Discriminant_Constraint): move check that the index or
13459 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13460 semantics. Other cases were previously checked in the semantics.
13461 * par-ch4.adb (P_Name): move checks that a selector name is not
13462 character literal or an operator symbol to Find_Selected_Component in
13464 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13465 declarations are not placed after later declarations in a separate
13466 procedure in Sem_Util (possibly not the best choice?), to be used both
13467 during parsing, for Ada 83 mode, and during semantic analysis, for
13469 * par-endh.adb (Check_End): move check that end label is not missing
13470 to Process_End_Label in the semantics
13471 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13472 the special case for SPARK restriction
13473 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13474 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13475 parameter Force to issue the error message even on internal node (used
13476 for generated end label). Call Check_Restriction to check when an error
13477 must be issued. In SPARK mode, issue an error message even if the
13478 restriction is not set.
13479 (Check_Restriction): new procedure with an additional out parameter to
13480 inform the caller that a message has been issued
13481 * sem_aggr.adb: Minor modification of message
13482 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13483 instead of issuing an error message directly
13484 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13485 declarations are not placed after later declarations, by calling
13486 Check_Later_Vs_Basic_Declarations
13487 (Analyze_Subtype_Declaration): move here the check that an index or
13488 discriminant constraint must be a subtype mark. Change the check that
13489 a subtype of String must start at one so that it works on subtype marks.
13490 * sem_ch4.adb (Analyze_Call): move here the check that a named
13491 association cannot follow a positional one in a call
13492 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13493 instead of issuing an error message directly
13494 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13495 selector name is not a character literal or an operator symbol. Move
13496 here the check that the prefix of an expanded name cannot be a
13497 subprogram or a loop statement.
13498 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13499 procedure called from parsing and semantics to check that basic
13500 declarations are not placed after later declarations
13501 (Process_End_Label): move here the check that end label is not missing
13503 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13505 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13506 representation clause in codepeer mode, since it confuses CodePeer and
13507 does not bring useful info.
13509 2011-08-02 Ed Falis <falis@adacore.com>
13511 * init.c: initialize fp hw on MILS.
13513 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13515 * errout.adb (First_Node): for bodies, return the node itself (small
13516 optimization). For other nodes, do not check source_unit if the node
13517 comes from Standard.
13519 2011-08-02 Robert Dewar <dewar@adacore.com>
13521 * exp_ch3.adb: Minor comment additions.
13522 * sem_ch13.adb: Minor reformatting.
13524 2011-08-02 Pascal Obry <obry@adacore.com>
13526 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13528 2011-08-02 Robert Dewar <dewar@adacore.com>
13530 * sem_attr.adb: Minor reformatting.
13532 2011-08-02 Robert Dewar <dewar@adacore.com>
13534 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13535 (Has_Default_Component_Value): Removed
13536 * einfo.ads Comment updates
13537 (Has_Default_Aspect): Replaces Has_Default_Value
13538 (Has_Default_Component_Value): Removed
13540 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13542 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13543 (Get_Simple_Init_Val): Handle Default_Value aspect
13544 (Needs_Simple_Initialization): Handle Default_Value aspect
13545 * exp_ch3.ads: Needs_Simple_Initialization
13546 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13547 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13549 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13550 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13551 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13553 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13555 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13556 package containing iteration primitives.
13557 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13559 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13561 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13562 "of", pre-analyze expression in case it is a function call with
13563 finalization actions that must be placed ahead of the loop.
13564 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13565 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13567 2011-08-02 Geert Bosch <bosch@adacore.com>
13569 * cstand.adb (Create_Float_Types): Only consider C's long double for
13570 Long_Long_Float, in addition to double.
13572 2011-08-02 Robert Dewar <dewar@adacore.com>
13574 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13575 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13576 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13577 Minor reformatting.
13579 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13581 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13584 2011-08-02 Javier Miranda <miranda@adacore.com>
13586 * einfo.ads, einfo.adb
13587 (Original_Access_Type): Move this attribute to Node26 since there was
13588 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13589 which causes conflicts and breaks the generation of the .NET compiler.
13590 (Interface_Name): Add missing documentation on JGNAT only uses of
13593 2011-08-02 Geert Bosch <bosch@adacore.com>
13595 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13596 (Find_Back_End_Float_Type): Likewise
13597 (Create_Back_End_Float_Types): Likewise
13598 (Create_Float_Types): Likewise
13599 (Register_Float_Type): Likewise
13600 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13601 Nlist and split out type selection in new local Find_Base_Type function.
13602 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13604 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13606 2011-08-02 Robert Dewar <dewar@adacore.com>
13608 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13610 * opt.ads: Minor comment change.
13611 * sem_ch12.adb: Minor code reorganization.
13613 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13615 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13616 subtype's list of rep items to the list on the full subtype in the case
13617 where the lists are the same.
13619 2011-08-02 Geert Bosch <bosch@adacore.com>
13621 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13622 using the one from System.Strings, which also deallocates all strings.
13624 2011-08-02 Geert Bosch <bosch@adacore.com>
13626 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13628 * gcc-interface/Make-lang.in: Update dependencies.
13630 2011-08-02 Olivier Hainque <hainque@adacore.com>
13632 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13635 2011-08-02 Javier Miranda <miranda@adacore.com>
13637 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13638 associated with anonymous access to subprograms.
13640 2011-08-02 Geert Bosch <bosch@adacore.com>
13643 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13644 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13645 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13646 (Add_Symbol_Definition): Move to switch-c.adb
13647 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13648 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13649 (Add_Symbol_Definition): Move to switch-c.adb.
13650 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13652 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13653 Move to warnsw.adb.
13654 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13655 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13656 Move to warnsw.adb.
13657 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13658 (Add_Symbol_Definition): Moved from Prepcomp.
13659 * switch-c.ads: Update copyright notice. Use String_List instead of
13660 Argument_List, removing dependency on System.OS_Lib.
13662 2011-08-02 Yannick Moy <moy@adacore.com>
13664 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13665 mode on initialization expression which does not respect SPARK
13667 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13668 if the tree referenced by its argument represents an initialization
13669 expression in SPARK, suitable for initializing an object in an object
13672 2011-08-02 Javier Miranda <miranda@adacore.com>
13674 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13675 internally generated access to subprogram with its associated protected
13677 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13679 2011-08-02 Geert Bosch <bosch@adacore.com>
13681 * cstand.adb (Register_Float_Type): Print information about type to
13682 register, if the Debug_Flag_Dot_B is set.
13683 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13684 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13685 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13686 with a requested precision of more than Max_Digits digits and no more
13687 than Max_Base_Digits digits, if a range specification is present and the
13688 Predefined_Float_Types list has a suitable type to derive from.
13689 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13690 case of type completion with pragma Import
13692 (Process_Import_Predefined_Type): Processing to complete a type
13693 with pragma Import. Currently supports floating point types only.
13694 (Set_Convention_From_Pragma): Do nothing without underlying type.
13695 (Process_Convention): Guard against absence of underlying type,
13696 which may happen when importing incomplete types.
13697 (Process_Import_Or_Interface): Handle case of importing predefined
13698 types. Tweak error message.
13700 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13702 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13703 functions to previous change. Reorganize code slightly.
13705 2011-08-02 Geert Bosch <bosch@adacore.com>
13707 * back_end.ads (Register_Type_Proc): New call back procedure type for
13708 allowing the back end to provide information about available types.
13709 (Register_Back_End_Types): New procedure to register back end types.
13710 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13712 * cstand.adb (Back_End_Float_Types): New list for floating point types
13713 supported by the back end.
13714 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13715 (Copy_Float_Type): New procedure to make new copies of predefined types.
13716 (Register_Float_Type): New call back procedure to populate the BEFT list
13717 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13718 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13719 (Create_Float_Types): New procedure to create entities for floating
13720 point types predefined in Standard, and put these and any remaining
13721 BEFTs on the Predefined_Float_Types list.
13722 * stand.ads (Predefined_Float_Types): New list for predefined floating
13723 point types that do not have declarations in package Standard.
13725 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13727 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13728 entity node for the unit containing the parameter.
13729 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13730 (Add_Inlined_Subprogram): Likewise.
13731 * gcc-interface/Make-lang.in: Update dependencies.
13733 2011-08-02 Thomas Quinot <quinot@adacore.com>
13735 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13738 2011-08-02 Geert Bosch <bosch@adacore.com>
13740 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13742 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13744 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13745 computed value of Base_Type.
13747 2011-08-02 Yannick Moy <moy@adacore.com>
13749 * restrict.adb (Check_Restriction): issue an error for any use of
13750 class-wide, even if the No_Dispatch restriction is not set.
13751 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13752 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13753 when completing a private extension, the type named in the private part
13754 is not the same as that named in the visible part.
13755 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13756 of an inherited primitive operations of a tagged type or type extension
13757 that returns the tagged type.
13758 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13759 function which returns True for an implicit operation inherited by the
13760 derived type declaration for the argument type.
13761 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13764 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13766 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13767 Process_Bounds, to perform analysis with expansion of a range or an
13768 expression that is the iteration scheme for a loop.
13769 (Analyze_Iterator_Specification): If domain of iteration is given by a
13770 function call with a controlled result, as is the case if call returns
13771 a predefined container, ensure that finalization actions are properly
13773 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13775 2011-08-02 Javier Miranda <miranda@adacore.com>
13777 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13778 * gcc-interface/Make-lang.in: Update dependencies.
13780 2011-08-02 Javier Miranda <miranda@adacore.com>
13782 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13783 determine if the analysis is performed using N or Original_Node (N).
13784 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13785 functionality of routine Is_Variable avoids code duplication.
13786 * checks.adb (Determine_Range): Handle temporaries generated by
13787 Remove_Side_Effects.
13789 2011-08-02 Javier Miranda <miranda@adacore.com>
13791 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13792 expansion of the condition. Required since the previous analysis was
13793 done with expansion disabled (see Resolve_Quantified_Expression) and
13794 hence checks were not inserted and record comparisons have not been
13797 2011-08-02 Ed Falis <falis@adacore.com>
13799 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13802 2011-08-02 Bob Duff <duff@adacore.com>
13804 * opt.ads: Minor comment fix.
13806 2011-08-02 Bob Duff <duff@adacore.com>
13808 * sem_ch12.adb (Analyze_Package_Instantiation,
13809 Analyze_Subprogram_Instantiation): Turn off style checking while
13810 analyzing an instance. Whatever style checks that apply to the generic
13811 unit should apply, so it makes no sense to apply them in an instance.
13812 This was causing trouble when compiling an instance of a runtime
13813 unit that violates the -gnatyO switch.
13814 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13815 one of the two case statements, causing spurious errors.
13817 2011-08-02 Robert Dewar <dewar@adacore.com>
13819 * uname.adb: Minor reformatting.
13820 * gnatcmd.adb: Minor reformatting.
13821 * exp_attr.adb: Minor reformatting.
13823 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13825 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13826 No_Dispatching_Calls, do not look for the Assign primitive, because
13827 predefined primitives are not created in this case.
13829 2011-08-02 Bob Duff <duff@adacore.com>
13831 * stylesw.ads: Minor comment fixes.
13833 2011-08-02 Robert Dewar <dewar@adacore.com>
13835 * freeze.adb (Add_To_Result): New procedure.
13837 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13839 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13840 time, if the specific run-time routines for handling streams of strings
13841 are not available, use the default mechanism.
13843 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13845 * s-regpat.ads: Fix typo.
13847 2011-08-02 Vincent Celier <celier@adacore.com>
13849 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13850 not null, call it to create the in memory config project file without
13851 parsing an existing default config project file.
13853 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13855 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13857 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13859 * sem_elim.adb: an abstract subprogram does not need an eliminate
13860 pragma for its descendant to be eliminable.
13862 2011-08-02 Ed Falis <falis@adacore.com>
13864 * init.c: revert to handling before previous checkin for VxWorks
13865 * s-intman-vxworks.adb: delete unnecessary declarations related to
13866 using Ada interrupt facilities for handling signals.
13867 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13868 * s-intman-vxworks.ads: Import __gnat_install_handler as
13869 Initialize_Interrupts.
13870 * s-taprop-vxworks.adb: Delete Signal_Mask.
13871 (Abort_Handler): change construction of mask to unblock exception
13874 2011-08-02 Jerome Guitton <guitton@adacore.com>
13876 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13877 Debug_Raise_Exception before propagation starts.
13879 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13881 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13882 to Restriction_Check_Required.
13883 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13884 * sem_res.adb (Resolve_Call): Likewise.
13885 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13887 2011-08-02 Bob Duff <duff@adacore.com>
13889 * stylesw.ads: Update comment.
13890 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13891 * errout.ads: Remove obsolete comment.
13893 2011-08-02 Javier Miranda <miranda@adacore.com>
13895 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13896 (Set_Is_Safe_To_Reevaluate): new procedure.
13897 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13898 assignment is allowed on safe-to-reevaluate variables.
13899 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13900 temporary created to remove side effects in expressions that use
13901 the secondary stack as safe-to-reevaluate.
13902 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13903 variables that are not true constants.
13905 2011-08-02 Robert Dewar <dewar@adacore.com>
13907 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13908 sem_res.adb, sem_ch6.adb: Minor reformatting.
13910 2011-08-02 Jerome Guitton <guitton@adacore.com>
13912 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13914 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13916 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13917 not set Overridden_Operation if subprogram is an initialization
13920 2011-08-02 Yannick Moy <moy@adacore.com>
13922 * par-ch6.adb: Correct obsolete name in comments
13923 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13924 which takes two message arguments (existing function takes one), with
13925 second message used for continuation.
13926 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13927 block statements that originate from a source block statement, not
13928 generated block statements
13929 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13930 symmetry with procedure case
13931 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13932 function to issue an error in formal mode if a package specification
13933 contains more than one tagged type or type extension.
13934 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13935 parameters matching formals of tagged types are objects (or ancestor
13936 type conversions of objects), not general expressions. Issue an error
13937 on view conversions that are not involving ancestor conversion of an
13939 (Resolve_Type_Conversion): in formal mode, issue an error on the
13940 operand of an ancestor type conversion which is not an object
13941 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13942 procedure so that it works also for actuals of function calls
13943 (Is_Actual_Tagged_Parameter): new function which determines if its
13944 argument is an actual parameter of a formal of tagged type in a
13946 (Is_SPARK_Object_Reference): new function which determines if the tree
13947 referenced by its argument represents an object in SPARK
13949 2011-08-02 Robert Dewar <dewar@adacore.com>
13951 * sem_ch3.adb: Minor reformatting
13952 Minor comment addition
13953 Minor error msg text change
13955 2011-08-02 Javier Miranda <miranda@adacore.com>
13957 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13958 function. Used to be more precise when we generate a variable plus one
13959 assignment to remove side effects in the evaluation of the Bound
13961 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13962 of the bound expression to force its re-analysis and thus expand the
13963 associated transient scope (if required). Code cleanup replacing the
13964 previous code that declared the constant entity by an invocation to
13965 routine Force_Evaluation which centralizes this work in the frontend.
13967 2011-08-02 Robert Dewar <dewar@adacore.com>
13969 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13970 (Base_Type): Now uses improved Is_Base_Type function
13971 * einfo.ads (Base_Type): Inline this function
13973 2011-08-02 Robert Dewar <dewar@adacore.com>
13975 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13976 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13978 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13980 * gcc-interface/Make-lang.in: Update dependencies.
13981 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13984 2011-08-02 Yannick Moy <moy@adacore.com>
13986 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13987 non-simple expression used in delta constraint
13988 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13989 index constraint which is not a subtype mark
13990 * par.adb: With and use Restrict
13991 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13992 mode on component type which is not a subtype mark and default
13993 expression on component
13994 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13995 of string which does not have a lower index bound equal to 1
13996 (Array_Type_Declaration): issue an error in formal mode on index or
13997 component type which is not a subtype mark, and on aliased keyword on
13999 (Derived_Type_Declaration): issue an error in formal mode on interface,
14000 limited or abstract type
14001 (Record_Type_Declaration): issue an error in formal mode on interface
14002 (Record_Type_Definition): issue an error in formal mode on tagged types
14003 and type extensions not declared in the specification of a library unit
14004 package; on null non-tagged record; on variant part
14006 2011-08-02 Vincent Celier <celier@adacore.com>
14008 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14009 not declared for qualified library project when Library_Name is not
14010 declared, but Library_Dir is.
14012 2011-08-02 Robert Dewar <dewar@adacore.com>
14014 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14015 pragmas (affects aspects [Component_]Default_Value
14016 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14017 component type for the resolution
14019 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14021 * einfo.adb (Base_Type): Tune implementation for speed.
14023 2011-08-02 Robert Dewar <dewar@adacore.com>
14025 * freeze.adb: Minor reformatting.
14027 2011-08-02 Thomas Quinot <quinot@adacore.com>
14029 * scos.ads: Update comments.
14031 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14033 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14034 base type, because the parent may be a subtype of a private type whose
14035 convention is established in a private part.
14037 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14039 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14040 statement in a block when the expansion of the return expression has
14041 created a finalization chain.
14042 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14043 with the parent node.
14044 Add N_Extended_Return_Statement to handle the case where a transient
14045 object declaration appears in the Return_Object_Declarations list of
14046 an extended return statement.
14048 2011-08-02 Matthew Gingell <gingell@adacore.com>
14050 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14051 unused parameter 'name'.
14053 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14055 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14056 inherited operation, check whether its alias, which is the source
14057 operastion that it renames, has been marked eliminated.
14059 2011-08-02 Javier Miranda <miranda@adacore.com>
14061 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14062 in-mode parameter whose type is an access type since it can be used to
14063 modify its designated object. Enforce code that handles as safe an
14064 access type that is not access-to-constant but it is the result of a
14065 previous removal of side-effects.
14066 (Remove_Side_Effects): Minor code reorganization of cases which require
14067 no action. Done to incorporate documentation on new cases uncovered
14068 working in this ticket: no action needed if this routine was invoked
14069 too early and the nodes are not yet decorated.
14070 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14071 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14072 were issued with actuals that are implicitly provided by
14075 2011-08-02 Robert Dewar <dewar@adacore.com>
14077 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14079 2011-08-02 Yannick Moy <moy@adacore.com>
14081 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14082 to issue an error in formal mode on attribute not supported in this mode
14083 (Analyze_Attribute): issue errors on standard attributes not supported
14085 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14086 comment, and issue error in formal mode on modulus which is not a power
14088 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14090 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14092 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14093 operator on modular type (except 'not').
14095 2011-08-02 Robert Dewar <dewar@adacore.com>
14097 * gnat_rm.texi: Minor reformatting.
14099 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14101 * s-osinte-linux.ads: Minor comment update and reformatting.
14102 * i-cexten.ads: Make this unit pure, as for its parent.
14103 Will allow its usage in more contexts if needed.
14105 2011-08-02 Robert Dewar <dewar@adacore.com>
14107 * s-utf_32.ads: Minor comment fix.
14109 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14111 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14112 operation of a tagged synchronized type, handle the case where the
14113 controlling argument is overloaded.
14115 2011-08-02 Yannick Moy <moy@adacore.com>
14117 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14118 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14119 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14120 SPARK mode and formal verification mode on processing SPARK restriction
14121 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14122 requiring consistency checking.
14124 2011-08-02 Robert Dewar <dewar@adacore.com>
14126 * sem_res.adb: Minor reformatting.
14128 2011-08-02 Robert Dewar <dewar@adacore.com>
14130 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14131 a-cforse.ads: Remove unneeded with of Ada.Containers
14132 Remove commented out pragma Inline's
14133 Move specifications of new subprograms to the actual specs
14135 2011-08-02 Yannick Moy <moy@adacore.com>
14137 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14138 a-cforse.ads: Update comments.
14140 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14142 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14144 2011-08-02 Robert Dewar <dewar@adacore.com>
14146 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14147 a-cforse.ads, a-cofove.ads: Minor reformatting.
14149 2011-08-02 Claire Dross <dross@adacore.com>
14151 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14152 a-cofove.ads: Add comments.
14154 2011-08-02 Yannick Moy <moy@adacore.com>
14156 * gnat_rm.texi: Document formal containers.
14158 2011-08-02 Emmanuel Briot <briot@adacore.com>
14160 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14161 are empty sections.
14163 2011-08-02 Robert Dewar <dewar@adacore.com>
14165 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14168 2011-08-02 Robert Dewar <dewar@adacore.com>
14170 * aspects.adb: New aspects Default_Value and Default_Component_Value
14171 New format of Aspect_Names table checks for omitted entries
14172 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14173 handling of boolean aspects for derived types.
14174 New aspects Default_Value and Default_Component_Value
14175 New format of Aspect_Names table checks for omitted entries
14176 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14177 (Has_Default_Value): New flag
14178 (Has_Default_Component_Value): New flag
14179 (Has_Default_Value): New flag
14180 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14182 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14183 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14184 Default_Value and Default_Component_Value
14185 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14186 New aspects Default_Value and Default_Component_Value
14187 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14188 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14190 2011-08-02 Vincent Celier <celier@adacore.com>
14192 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14193 inherit library kind.
14195 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14197 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14198 Minor reformatting.
14200 2011-08-02 Robert Dewar <dewar@adacore.com>
14202 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14204 2011-08-02 Yannick Moy <moy@adacore.com>
14206 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14208 2011-08-02 Robert Dewar <dewar@adacore.com>
14210 * impunit.adb: Add comment.
14212 2011-08-02 Yannick Moy <moy@adacore.com>
14214 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14215 qualification of aggregates in formal mode
14216 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14218 (Resolve_Aggregate): complete the test that an aggregate is adequately
14219 qualified in formal mode
14221 2011-08-02 Pascal Obry <obry@adacore.com>
14223 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14224 * mlib-prj.adb: Supress warning when compiling binder generated file.
14225 (Build_Library): Supress all warnings when compiling the binder
14228 2011-08-02 Yannick Moy <moy@adacore.com>
14230 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14232 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14233 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14234 Add with/use clauses to make Check_Formal_Restriction visible
14236 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14238 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14239 in-parameters when type of the generic formal is private in the generic
14240 spec and non-private in the body.
14242 2011-08-02 Claire Dross <dross@adacore.com>
14244 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14245 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14246 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14247 * impunit.adb, Makefile.rtl: Take new files into account.
14249 2011-08-02 Robert Dewar <dewar@adacore.com>
14251 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14252 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14254 2011-08-02 Yannick Moy <moy@adacore.com>
14256 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14258 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14259 matching static array bounds, taking into account the special case of
14261 * sem_ch3.adb: Typo in comment.
14263 2011-08-02 Yannick Moy <moy@adacore.com>
14265 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14266 which issues an error in formal mode if its argument node is originally
14268 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14269 has a discriminant specification so that it does not include the case
14271 (Derived_Type_Declaration): move here the test that a derived type has a
14272 discriminant specification
14273 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14274 first element of a component association before accessing its choices
14275 (presence of component association is not enough)
14276 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14277 declaration is a library item before accessing the next element in a
14278 list, as library items are not member of lists
14279 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14280 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14281 Check_Formal_Restriction whenever possible.
14283 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14285 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14286 reference when needed.
14288 2011-08-02 Bob Duff <duff@adacore.com>
14290 * gnat_ugn.texi: Fix typo.
14292 2011-08-02 Vincent Celier <celier@adacore.com>
14294 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14295 archive file name. Do not use the full path name of archives for Open
14298 2011-08-02 Robert Dewar <dewar@adacore.com>
14300 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14301 Analyze_Aspect_Specifications
14303 (Analyze_Aspect_Specifications): New handling for boolean aspects
14304 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14305 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14306 sequence for Analyze_Aspect_Specifications
14307 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14308 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14310 2011-08-02 Robert Dewar <dewar@adacore.com>
14312 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14313 aspects, since these no longer exist.
14315 2011-08-02 Robert Dewar <dewar@adacore.com>
14317 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14318 semicolon, do not try to see if there are aspects following it.
14319 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14322 2011-08-02 Robert Dewar <dewar@adacore.com>
14324 * sem_ch8.adb, aspects.ads: Minor reformatting.
14326 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14328 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14329 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14331 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14333 2011-08-02 Yannick Moy <moy@adacore.com>
14335 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14336 mode on subprogram declaration outside of package specification, unless
14337 it is followed by a pragma Import
14338 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14339 Access_Type_Declaration): issue error in formal mode on access type
14340 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14342 (Analyze_Object_Declaration): issue error in formal mode on object
14343 declaration which does not respect SPARK restrictions
14344 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14345 declaration which does not respect SPARK restrictions
14346 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14347 error in formal mode on digits or delta constraint
14348 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14349 decimal fixed point type
14350 (Derived_Type_Declaration): issue error in formal mode on derived type
14351 other than type extensions of tagged record types
14352 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14353 with check on access definition
14354 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14355 mode on protected definition.
14356 (Analyze_Task_Definition): issue error in formal mode on task definition
14358 2011-08-02 Robert Dewar <dewar@adacore.com>
14360 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14362 2011-08-02 Javier Miranda <miranda@adacore.com>
14364 * sem_ch6.adb (Can_Override_Operator): New function.
14365 (Verify_Overriding_Indicator): Add missing code to check overriding
14366 indicator in operators. Fixes regression.
14367 (Check_Overriding_Indicator): Minor reformating after replacing the
14368 code that evaluates if the subprogram can override an operator by
14369 invocations to the above new function.
14371 (Write_Field26_Name): Add missing code to ensure that, following
14372 the documentation in einfo.ads, this field is not shown as attribute
14373 "Static_Initialization" on non-dispatching functions.
14375 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14377 * sem_res.adb (Resolve_Call): A call to
14378 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14379 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14380 i.e., when the second parameter is of type Time_Span.
14382 2011-08-02 Vincent Celier <celier@adacore.com>
14384 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14385 with an archive instead of -L<library dir> -l<library name>.
14387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14389 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14390 mark the base types In_Use in addition to making the operations
14393 2011-08-02 Ed Falis <falis@adacore.com>
14395 * init.c: add and setup __gnat_signal_mask for the exception signals
14396 * s-inmaop-vxworks.adb: new file.
14397 * s-intman-vxworks.adb: remove unnecessary initializations and
14399 * s-intman-vxworks.ads: remove unnecessary variable
14400 * s-taprop-vxworks.adb: simplify signal initialization
14402 2011-08-02 Robert Dewar <dewar@adacore.com>
14404 * sem_ch8.adb: Minor code reorganization, comment updates.
14406 2011-08-02 Robert Dewar <dewar@adacore.com>
14408 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14409 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14411 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14412 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14416 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14417 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14418 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14419 use_type_clauses, to handle more efficiently use_type and use_all_type
14421 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14422 Ada2012 Use_All_Type clause.
14423 (Use_Class_Wide_Operations): new procedure.
14425 2011-08-02 Robert Dewar <dewar@adacore.com>
14427 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14428 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14429 expression to expression function.
14431 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14433 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14434 if types are compatible.
14436 2011-08-02 Yannick Moy <moy@adacore.com>
14438 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14439 returns True if its argument array types have same dimension and same
14440 static bounds at each index.
14441 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14442 OUT or IN OUT paramaters which are not view conversions in SPARK.
14443 (Resolve_Arithmetic_Op): issue an error in formal mode on
14444 multiplication or division with operands of fixed point types which are
14445 not qualified or explicitly converted.
14446 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14447 Boolean or array type (except String) operands.
14448 (Resolve_Equality_Op): issue an error in formal mode on equality
14449 operators for array types other than String with non-matching static
14451 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14452 for array types with non-matching static bounds. Factorize the code in
14453 Matching_Static_Array_Bounds.
14454 (Resolve_Qualified_Expression): issue an error in formal mode on
14455 qualified expressions for array types with non-matching static bounds.
14456 (Resolve_Type_Conversion): issue an error in formal mode on type
14457 conversion for array types with non-matching static bounds
14459 2011-08-02 Robert Dewar <dewar@adacore.com>
14461 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14463 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14465 * par-ch9.adb: save location of entry for proper error message.
14467 2011-08-02 Javier Miranda <miranda@adacore.com>
14469 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14470 (Use_Full_View) which permits this routine to climb through the
14471 ancestors using the full-view of private parents.
14472 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14473 Use_Full_View to true in calls to Is_Ancestor.
14474 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14475 true in call to Is_Ancestor.
14476 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14477 Use_Full_View to true in call to Is_Ancestor.
14478 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14479 call to Is_Ancestor.
14480 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14481 Use_Full_View to true in calls to Is_Ancestor.
14482 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14483 Make_Select_Specific_Data_Table, Register_Primitive,
14484 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14485 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14486 to true in call to Is_Ancestor.
14487 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14488 Use_Full_View to true in calls to Is_Ancestor.
14490 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14491 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14493 2011-08-02 Robert Dewar <dewar@adacore.com>
14495 * gnat_rm.texi: Minor reformatting.
14496 * sem_prag.adb: Minor reformatting.
14498 2011-08-02 Tristan Gingold <gingold@adacore.com>
14500 * vms_data.ads: Add VMS qualifier for -gnateP.
14502 2011-08-02 Robert Dewar <dewar@adacore.com>
14504 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14505 * par-ch7.adb (P_Package): Proper placement of aspects for package
14506 decl/instantiation.
14507 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14508 (End_Statements): Add Is_Sloc parameterr
14509 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14510 (Check_End): Ad Is_Sloc parameter
14511 (End_Statements): Add Is_Sloc parameterr
14513 2011-08-02 Vincent Celier <celier@adacore.com>
14515 * ug_words: Add VMS qualifier equivalent to -gnateP:
14516 /SYMBOL_PREPROCESSING.
14518 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14520 * gnat-style.texi: For hexadecimal numeric literals the typical
14521 grouping of digits is 4 to represent 2 bytes.
14522 A procedure spec which is split into several lines is indented two
14525 2011-08-02 Yannick Moy <moy@adacore.com>
14527 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14528 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14529 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14531 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14532 choice in array aggregate
14533 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14535 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14536 positional and named aggregate for record, or others in record
14537 aggregate, or multiple choice in record aggregate
14538 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14539 array operands to logical operations AND, OR and XOR do not have the
14540 same static lower and higher bounds
14541 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14543 2011-08-01 Robert Dewar <dewar@adacore.com>
14545 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14546 Replaces Last_Source_Node_In_Sequence.
14547 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14548 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14549 parens and blank in string (this was inconsistently implemented).
14551 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14552 blank in string (this was inconsistently implemented).
14554 (Set_Global_Switches): Set formal mode switches appropriately
14555 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14557 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14558 call Set_Error_Msg_Lang to set "spark" as language name.
14559 * par.adb: Remove unnecessary call to set formal language for errout
14560 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14561 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14563 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14564 calls to it, moved after resolution so that types are known
14565 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14566 result of concatenation is not of type String
14567 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14568 concatenation is not properly restricted
14569 * gnat_rm.texi: Add doc on pragma Spark_95.
14570 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14571 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14572 * gcc-interface/Make-lang.in: Update dependencies.
14574 2011-08-01 Javier Miranda <miranda@adacore.com>
14576 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14577 condition that detects if the overridden operation must replace an
14580 2011-08-01 Javier Miranda <miranda@adacore.com>
14582 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14583 code declarations inserted by Insert_Actions in each alternative of the
14584 N_Case_Expression node.
14586 2011-08-01 Robert Dewar <dewar@adacore.com>
14588 * sem_ch6.adb: Minor code reorganization.
14589 * sem_util.adb: Minor reformatting.
14591 2011-08-01 Pascal Obry <obry@adacore.com>
14593 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14594 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14596 2011-08-01 Yannick Moy <moy@adacore.com>
14598 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14599 literal or operator symbol which is prefixed
14600 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14601 mode on access attributes.
14602 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14603 that concatenation operands are properly restricted in formal mode
14604 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14605 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14606 result of the concatenation has a type different from String.
14607 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14608 Analyze_Quantified_Expression, Analyze_Slice,
14609 Analyze_Null): issue an error in formal mode on unsupported constructs
14611 (Analyze_Block_Statement): only issue error on source block statement
14612 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14613 function which returns the last node in a list of nodes for which
14614 Comes_From_Source returns True, if any
14615 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14616 Last_Source_Node_In_Sequence
14617 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14618 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14619 mode on unsupported constructs
14620 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14621 rest of the actions may be needed later on since the error is marked as
14623 * sinfo.ads: Typos in comments.
14625 2011-08-01 Pascal Obry <obry@adacore.com>
14627 * projects.texi: Minor editing.
14629 2011-08-01 Yannick Moy <moy@adacore.com>
14631 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14632 insertion character ~~
14633 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14634 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14635 with insertion character ~~
14636 (Set_Msg_Text): treat insertion character ~~
14637 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14638 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14639 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14640 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14641 errors related to the formal language restriction not serious
14642 (insertion character |).
14643 * par.adb (Par): set formal language for error messages if needed
14644 * sem_ch6.adb (Check_Missing_Return): take into account possible
14645 generated statements at the end of the function
14646 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14647 enumeration value to define a new pragma SPARK_95
14648 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14649 SPARK_Version): new type and variables to store the SPARK version
14651 (SPARK_Mode): return True when SPARK_Version is set
14652 * par-prag.adb: Correct indentation
14653 (Prag): take Pragma_SPARK_95 into account
14654 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14657 2011-08-01 Robert Dewar <dewar@adacore.com>
14659 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14660 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14661 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14663 2011-08-01 Pascal Obry <obry@adacore.com>
14665 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14666 Target_Name to Get_Path call.
14667 (Parse_Single_Project): Likewise.
14668 (Post_Parse_Context_Clause): Likewise.
14669 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14670 Call Initialise_Project_Path with the proper Target_Name.
14671 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14673 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14674 with the proper Target_Name.
14675 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14676 Part.Parse routine.
14677 (Parse_Project_And_Apply_Config): Likewise.
14678 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14679 This is fine as this part of the code is supporting only native
14681 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14682 is fine as this part of the code is supporting only native compilation.
14684 2011-08-01 Yannick Moy <moy@adacore.com>
14686 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14687 of homonym, unless the homonym is one of the cases allowed in SPARK
14688 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14689 package declaration occurring after a body.
14691 2011-08-01 Robert Dewar <dewar@adacore.com>
14693 * checks.adb, exp_ch4.adb: Minor reformatting.
14695 2011-08-01 Javier Miranda <miranda@adacore.com>
14697 * einfo.ads (Access_Disp_Table): Fix documentation.
14698 (Dispatch_Table_Wrappers): Fix documentation.
14700 2011-08-01 Pascal Obry <obry@adacore.com>
14702 * prj-env.adb, prj-env.ads: Minor reformatting.
14704 2011-08-01 Yannick Moy <moy@adacore.com>
14706 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14707 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14708 procedures out of these packages.
14709 * errout.ads, errout.adb
14710 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14711 procedures in of this package
14712 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14713 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14714 on misplaced later vs initial declarations, like in Ada 83
14715 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14716 formal mode on attribute of private type whose full type declaration
14718 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14719 package declaration inside a package specification
14720 (Analyze_Full_Type_Declaration): issue error in formal mode on
14721 controlled type or discriminant type
14722 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14723 user-defined operator means that it should come from the source
14724 (New_Overloaded_Entity): issue error in formal mode on overloaded
14726 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14728 2011-08-01 Thomas Quinot <quinot@adacore.com>
14730 * atree.adb: Minor reformatting.
14731 * checks.adb: Minor reformatting.
14733 2011-08-01 Vincent Celier <celier@adacore.com>
14735 * s-parame-vms-ia64.ads: Fix typo in comment
14737 * s-parame-vms-restrict.ads: Removed, unused.
14739 2011-08-01 Javier Miranda <miranda@adacore.com>
14742 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14744 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14745 * sem_ch3.ads, sem_ch3.adb
14746 (Is_Constant_Bound): New extended version of the subprogram that was
14747 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14748 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14749 * sem_aux.ads (Constant_Value): Fix typo in comment.
14750 * checks.adb (Generate_Index_Checks): New implementation which, for
14751 array objects with constant bounds, generates the runtime check
14752 referencing the bounds of the array type. For other cases this routine
14753 provides its previous behavior obtaining such values from the array
14755 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14757 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14758 we cannot have semantic interpretations of the new node.
14760 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14762 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14765 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14767 * sem_ch8.adb: Minor code editing.
14768 * s-vxwext.adb: Remove trailing space.
14769 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14770 consistency with other files.
14772 2011-08-01 Thomas Quinot <quinot@adacore.com>
14774 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14776 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14778 * par-ch10.adb: reject parameterized expressions as compilation unit.
14779 * sem_ch4.adb: handle properly conditional expression with overloaded
14780 then_clause and no else_clause.
14782 2011-08-01 Tristan Gingold <gingold@adacore.com>
14784 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14785 like done by System.Aux_DEC.
14786 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14788 2011-08-01 Yannick Moy <moy@adacore.com>
14790 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14791 missing label at end of declaration (subprogram or package)
14792 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14793 of positional and named parameter association
14794 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14795 Error_Msg_SP which adds a prefix to the error message giving the name
14796 of the formal language analyzed
14797 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14798 access result type in subprogram, unconstrained array as result type,.
14799 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14801 * sem_ch8.adb: Code clean up.
14803 2011-08-01 Javier Miranda <miranda@adacore.com>
14805 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14806 * einfo.ads (Access_Disp_Table): Fix documentation.
14807 (Dispatch_Table_Wrappers): Fix documentation.
14808 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14809 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14810 to enforce the documentation of this attribute.
14811 (Set_Is_Interface): Cleanup the assertion.
14812 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14813 the Underlying_Type entity before reading attribute Access_Disp_Table.
14814 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14815 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14816 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14817 the Underlying_Type entity before reading attribute Access_Disp_Table.
14818 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14819 Locate the Underlying_Type entity before reading attribute
14822 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14824 * s-poosiz.ads: Additional overriding indicators.
14826 2011-08-01 Yannick Moy <moy@adacore.com>
14828 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14830 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14831 parameter specification does not include a subtype mark.
14832 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14833 formal mode on abstract subprogram.
14834 (Analyze_Subprogram_Specification): issue error in formal mode on
14835 user-defined operator.
14836 (Process_Formals): issue error in formal mode on access parameter and
14837 default expression.
14838 * sem_ch9.adb (Analyze_Abort_Statement,
14839 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14840 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14841 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14842 Analyze_Requeue, Analyze_Selective_Accept,
14843 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14844 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14845 issue error in formal mode on user-defined raise statement.
14847 2011-08-01 Thomas Quinot <quinot@adacore.com>
14849 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14850 declaration being hidden when overriding an implicit inherited
14852 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14853 (-gnats), do not complain about a source file that contains only a
14856 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14858 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14859 variable if already set.
14861 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14863 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14864 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14865 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14866 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14867 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14868 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14869 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14870 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14871 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14872 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14873 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14874 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14875 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14876 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14877 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14878 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14879 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14880 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14881 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14882 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14883 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14884 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14885 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14886 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14887 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14888 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14889 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14890 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14891 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14892 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14893 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14894 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14895 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14896 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14897 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14898 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14899 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14900 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14901 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14902 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14903 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14904 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14905 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14906 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14907 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14908 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14909 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14910 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14911 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14912 Use GNAT instead of GNARL.
14914 2011-08-01 Bob Duff <duff@adacore.com>
14916 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14917 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14918 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14921 2011-08-01 Yannick Moy <moy@adacore.com>
14923 * debug.adb (d.D) reverve flag for the SPARK mode
14924 (d.E) reverve flag for SPARK generation mode
14925 (d.F) reverve flag for Why generation mode
14926 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14927 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14928 functions which return True when the corresponding modes are set
14929 (Formal_Language): return "spark" or "alfa" when in formal verification
14931 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14932 Error_Msg to prefix the error message with a tag giving the formal
14934 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14935 message with a tag giving the formal language
14936 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14938 (Analyze_Case_Statement): issue error in formal mode on case statement
14939 with a single "others" case alternative
14940 (Analyze_Exit_Statement): issue errors in formal mode on exit
14941 statements which do not respect SPARK restrictions
14942 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14943 (Check_Unreachable_Code): always issue an error (not a warning) in
14944 formal mode on unreachable code (concerns both code after an infinite
14945 loop and after an unconditional jump, both not allowed in SPARK)
14946 * sem_ch6.adb (Analyze_Return_Statement): add call to
14947 Set_Return_Present for a procedure containing a return statement
14948 (already done for functions in Analyze_Function_Return)
14949 (Analyze_Function_Return): issue error in formal mode on extended
14950 return or if return is not last statement in function
14951 (Check_Missing_Return): issue error in formal mode if function does
14952 not end with return or if procedure contains a return
14953 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14954 function to detect if there is an inner scope of its parameter S which
14957 2011-08-01 Thomas Quinot <quinot@adacore.com>
14959 * sem_ch6.ads: Minor reformatting.
14961 2011-08-01 Javier Miranda <miranda@adacore.com>
14963 * sem_util.adb (Abstract_Interface_List): Complete condition when
14964 processing private type declarations to avoid reading unavailable
14966 (Is_Synchronized_Tagged_Type): Complete condition when processing
14967 private extension declaration nodes to avoid reading unavailable
14970 2011-08-01 Thomas Quinot <quinot@adacore.com>
14972 * sem_ch3.adb: Minor reformatting.
14974 2011-08-01 Thomas Quinot <quinot@adacore.com>
14976 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14977 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14978 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14979 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14980 for VMS, instead parametrize the common implementation with
14981 System.Parameters declarations.
14983 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14985 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14987 2011-08-01 Tristan Gingold <gingold@adacore.com>
14989 * seh_init.c: Fix SEH handler installation on win64.
14991 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14993 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14994 double analysis of an anonymous access to subprogram, because it can
14995 lead to improper sharing of profiles and a back-end crash.
14997 2011-08-01 Robert Dewar <dewar@adacore.com>
14999 * make.adb, sem_ch4.adb: Minor reformatting.
15000 * gcc-interface/Make-lang.in: Update dependencies.
15001 * sem_util.adb, exp_ch5.adb: Minor reformatting.
15003 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15005 * gnat_rm.texi: Fix definition of Long_Integer.
15007 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15009 * exp_aggr.adb: check limit size of static aggregate unconditionally,
15010 to prevent storage exhaustion.
15011 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15012 finalized is a function body, insert the cleanup code before the final
15013 return statement, to prevent spurious warnings.
15014 * s-pooglo.ads: add overriding indicator.
15016 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15018 * sem_ch4.adb (Operator_Check): improve error message when both a
15019 with_clause and a use_clause are needed to make operator usage legal.
15020 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15021 determine whether a compilation unit is visible within an other,
15022 either through a with_clause in the current unit, or a with_clause in
15023 its library unit or one one of its parents.
15025 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15027 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15028 over an arbitrary expression of an array or container type.
15029 * lib-xref.adb: clarify comment.
15031 2011-08-01 Bob Duff <duff@adacore.com>
15033 * einfo.ads: Minor reformatting.
15034 * debug.adb: Minor comment improvement.
15036 2011-08-01 Javier Miranda <miranda@adacore.com>
15038 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15039 consider hidden subprograms as valid candidates.
15041 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15043 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15045 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15047 * gnat_ugn.texi: Fix typo.
15049 2011-08-01 Robert Dewar <dewar@adacore.com>
15051 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15052 lib-xref.adb: Minor reformatting
15054 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15056 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15057 when to generate a call to Move_Final_List.
15058 (Has_Controlled_Parts): Remove this function.
15060 2011-08-01 Geert Bosch <bosch@adacore.com>
15062 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15063 "," in choice list.
15065 2011-08-01 Thomas Quinot <quinot@adacore.com>
15067 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15068 explicit raise of a predefined exception as Comes_From_Source if the
15069 original N_Raise_Statement comes from source.
15071 2011-08-01 Robert Dewar <dewar@adacore.com>
15073 * sinfo.ads: Add comment.
15074 * sem_ch6.adb: Minor reformatting.
15076 2011-08-01 Robert Dewar <dewar@adacore.com>
15078 * freeze.adb (Freeze_Entity): Refine check for bad component size
15079 clause to avoid rejecting confirming clause when atomic/aliased present.
15081 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15083 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15084 better determine whether an entity reference is a write.
15085 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15087 * lib-xref.adb (Output_References): Do no suppress a read reference at
15088 the same location as an immediately preceeding modify-reference, to
15089 handle properly in-out actuals.
15091 2011-08-01 Tristan Gingold <gingold@adacore.com>
15093 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15095 2011-08-01 Quentin Ochem <ochem@adacore.com>
15097 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15098 heap to compute the result.
15100 2011-08-01 Robert Dewar <dewar@adacore.com>
15102 * atree.ads: Minor reformatting.
15104 2011-08-01 Emmanuel Briot <briot@adacore.com>
15106 * g-expect.adb (Get_Command_Output): Fix memory leak.
15108 2011-08-01 Geert Bosch <bosch@adacore.com>
15110 * cstand.adb (P_Float_Type): New procedure to print the definition of
15111 predefined fpt types.
15112 (P_Mixed_Name): New procedure to print a name using mixed case
15113 (Print_Standard): Use P_Float_Type for printing floating point types
15114 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15115 precision IEEE float.
15117 2011-08-01 Thomas Quinot <quinot@adacore.com>
15119 * sem_ch3.adb: Minor reformatting.
15121 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15123 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15124 the completion of a generic function, insert the new body rather than
15125 rewriting the original.
15127 2011-08-01 Yannick Moy <moy@adacore.com>
15129 * sinfo.ads, errout.ads: Typos in comments.
15131 2011-08-01 Robert Dewar <dewar@adacore.com>
15133 * par-endh.adb: Minor reformatting.
15135 2011-08-01 Robert Dewar <dewar@adacore.com>
15137 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15138 (Pre_Post_Aspects): New subtype.
15139 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15140 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15141 * par-ch7.adb (P_Package): Remove Decl parameter
15142 (P_Package): Handle new syntax for aspects (before IS)
15143 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15145 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15146 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15147 (P_Package): Remove Decl parameter
15148 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15150 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15152 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15153 * sinfo.ads: Document new syntax for aspects in packages etc.
15154 * sprint.adb: Handle new syntax of aspects before IS in package
15156 2011-08-01 Thomas Quinot <quinot@adacore.com>
15158 * atree.ads: Minor reformatting.
15159 * sem_prag.adb: Minor reformatting.
15161 2011-08-01 Robert Dewar <dewar@adacore.com>
15163 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15164 case expr alternative.
15166 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15168 * sem_ch12.adb: Fix typo.
15170 2011-08-01 Geert Bosch <bosch@adacore.com>
15172 * sem_prag.adb (Check_No_Link_Name): New procedure.
15173 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15174 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15175 instead of Standard_Long_Long_Float_Size global. Preparation for
15176 eventual removal of per type constants.
15177 * exp_util.ads (Get_Stream_Size): New function returning the stream
15178 size value of subtype E.
15179 * exp_util.adb (Get_Stream_Size): Implement new function.
15180 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15182 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15184 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15186 2011-08-01 Geert Bosch <bosch@adacore.com>
15188 * cstand.adb: Fix comments.
15189 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15190 count of arguments.
15192 2011-08-01 Robert Dewar <dewar@adacore.com>
15194 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15196 2011-08-01 Geert Bosch <bosch@adacore.com>
15198 * atree.ads: Fix comment.
15200 2011-08-01 Robert Dewar <dewar@adacore.com>
15202 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15203 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15204 * par.adb: Add with for Namet.Sp.
15205 * par-tchk.adb: Minor reformatting.
15207 2011-08-01 Vincent Celier <celier@adacore.com>
15209 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15210 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15211 of the init procedure of a SAL.
15212 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15215 2011-08-01 Thomas Quinot <quinot@adacore.com>
15217 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15220 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15222 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15224 2011-08-01 Thomas Quinot <quinot@adacore.com>
15226 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15227 conformant with its spec (return True only for types that have
15228 an overriding Initialize primitive operation that prevents them from
15229 having preelaborable initialization).
15230 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15231 initialization for controlled types in Ada 2005 or later mode.
15233 2011-08-01 Robert Dewar <dewar@adacore.com>
15235 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15237 (Same_Aspect): New function.
15238 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15239 Type_Invariant, Precondition, Postcondition.
15240 * snames.ads-tmpl: Add Name_Type_Invariant.
15242 2011-08-01 Robert Dewar <dewar@adacore.com>
15244 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15246 (Freeze_All_Ent): Fix error in handling inherited aspects.
15247 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15248 already analyzed, but don't skip entire processing of a declaration,
15249 that's wrong in some cases of declarations being rewritten.
15250 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15251 Don't delay for integer, string literals
15252 Treat predicates in usual manner for delay, remove special case code,
15254 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15255 (Build_Predicate_Function): Update saved expression in aspect
15256 (Build_Invariant_Procedure): Update saved expression in aspect
15257 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15258 of replacement of discriminant references if the reference is simple.
15260 2011-08-01 Robert Dewar <dewar@adacore.com>
15262 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15263 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15264 Static_Predicate and Dynamic_Predicate.
15265 (Build_Predicate_Function): Add processing for Static_Predicate
15266 and Dynamic_Predicate.
15267 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15268 (From_Static_Predicate): New flag
15269 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15271 2011-08-01 Robert Dewar <dewar@adacore.com>
15273 * usage.adb: Documentation cleanup for Ada version modes in usage.
15274 * expander.adb: Minor reformatting.
15276 2011-08-01 Robert Dewar <dewar@adacore.com>
15278 * atree.ads: Minor comment fix.
15279 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15280 a-witeio.ads, sem_prag.adb: Minor reformatting.
15282 2011-08-01 Doug Rupp <rupp@adacore.com>
15284 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15285 pointers. Use descrip.h header file for convenience. Add some
15288 2011-08-01 Robert Dewar <dewar@adacore.com>
15290 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15291 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15292 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15294 (Check_Aspect_At_End_Of_Declarations): New procedure
15295 (Analye_Aspect_Specification): Minor changes for above procedures
15296 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15297 specification node as well.
15299 2011-08-01 Pascal Obry <obry@adacore.com>
15301 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15302 Windows files. Use GetFilesAttributes() in this case to check for file
15303 existence instead of returning with an error code.
15305 2011-08-01 Vincent Celier <celier@adacore.com>
15307 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15308 High is above Source length.
15310 2011-08-01 Robert Dewar <dewar@adacore.com>
15312 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15314 2011-08-01 Robert Dewar <dewar@adacore.com>
15316 * aspects.ads (Boolean_Aspects): New subtype.
15317 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15318 for derived types in cases where the parent type and derived type have
15320 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15321 with aspects when parent type also has aspects.
15322 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15323 boolean expression at this point).
15324 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15325 accordance with final decision on the Ada 2012 feature.
15326 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15328 2011-08-01 Matthew Heaney <heaney@adacore.com>
15330 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15332 2011-08-01 Pascal Obry <obry@adacore.com>
15334 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15335 Fix Replace_Slice when High is above current string size.
15336 (Replace_Slice): Fix DL computation when High is above current
15339 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15341 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15343 2011-08-01 Matthew Heaney <heaney@adacore.com>
15345 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15348 2011-08-01 Pascal Obry <obry@adacore.com>
15350 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15353 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15355 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15356 access to protected subprograms in generic bodies.
15357 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15358 protected type, indicate that the convention of the subprogram is
15359 Convention_Protected, because it may be used in subsequent declarations
15360 within the protected declaration.
15362 2011-08-01 Vincent Celier <celier@adacore.com>
15364 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15365 and "final" procedures when the name of the library is "ada", to avoid
15366 duplicate symbols "adainit" and "adafinal" in executables.
15368 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15370 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15371 quantified expression that appears within a postcondition and uses the
15372 Ada2012 'Result attribute.
15374 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15376 * init.c (__gnat_error_handler): Cast reason to int.
15377 (__gnat_install_handler): Explain sa_sigaction use.
15379 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15381 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15382 subprogram has copy-in copy-out parameters, try to promote the mode of
15383 the return type if it is passed in registers.
15385 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15387 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15388 left operand as addressable.
15390 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15392 * gcc-interface/gigi.h (build_function_stub): Remove.
15393 (build_return_expr): Likewise.
15394 (convert_vms_descriptor): Declare.
15395 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15396 (build_function_stub): Move to...
15397 * gcc-interface/utils2.c (build_return_expr): Move to...
15398 * gcc-interface/trans.c (build_function_stub): ...here.
15399 (build_return_expr): ...here.
15400 (Subprogram_Body_to_gnu): Add local variable for language_function.
15401 Disconnect the parameter attributes cache, if any, once done with it.
15402 Call end_subprog_body only after setting the end_locus.
15403 Build the stub associated with the function, if any, at the very end.
15404 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15405 variables and streamline control flow.
15407 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15410 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15411 g-trasym-dwarf.adb.
15413 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15416 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15417 Assign to act.sa_sigaction.
15418 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15419 current->return_address to char * before arithmetic.
15421 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15423 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15424 Correct argument types.
15425 Extract code from reason.
15426 (__gnat_install_handler): Assign to act.sa_sigaction.
15428 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15430 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15431 (GNAT1_OBJS): ...here.
15433 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15436 * g-socthi-mingw.adb (Fill): Fix formatting.
15438 * gcc-interface/gigi.h: Move around comment.
15440 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15443 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15445 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15448 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15450 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15452 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15453 range comparison if Pmode is SImode.
15455 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15456 Eric Botcazou <ebotcazou@adacore.com>
15458 * adadecode.c: Wrap up in extern "C" block.
15459 * adadecode.h: Likewise.
15460 * adaint.c: Likewise. Remove 'const' keyword.
15461 * adaint.h: Likewise.
15462 * argv.c: Likewise.
15463 * atree.h: Likewise.
15465 * cstreams.c: Likewise.
15467 * exit.c: Likewise.
15469 * final.c: Likewise.
15470 * init.c: Likewise.
15471 * initialize.c: Likewise.
15472 * link.c: Likewise.
15473 * namet.h: Likewise.
15474 * nlists.h: Likewise.
15475 * raise.c: Likewise.
15476 * raise.h: Likewise.
15477 * repinfo.h: Likewise.
15478 * seh_init.c: Likewise.
15479 * targext.c: Likewise.
15480 * tracebak.c: Likewise.
15481 * uintp.h: Likewise.
15482 * urealp.h: Likewise.
15483 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15484 * xsinfo.adb: Likewise.
15485 * xsnamest.adb: Likewise.
15486 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15487 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15488 * gcc-interface/misc.c: Likewise.
15489 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15490 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15491 ada/targext.o here...
15492 (GNAT_ADA_OBJS): ...and not here.
15493 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15494 (GNATBIND_OBJS): Reorder.
15496 2011-07-07 Richard Henderson <rth@redhat.com>
15498 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15499 dwarf2out_frame_init.
15501 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15503 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15505 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15508 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15510 2011-07-06 Richard Guenther <rguenther@suse.de>
15512 * gcc-interface/misc.c (gnat_init): Merge calls to
15513 build_common_tree_nodes and build_common_tree_nodes_2.
15514 Re-initialize boolean_false_node.
15516 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15517 Olivier Hainque <hainque@adacore.com>
15518 Nicolas Setton <setton@adacore.com>
15520 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15521 the type according to the ARTIFICIAL_P parameter.
15522 (create_type_decl): Likewise.
15523 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15525 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15527 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15528 (gnatbind): Likewise.
15530 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15532 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15534 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15536 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15537 local variable throughout. Remove useless call to Base_Type.
15538 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15539 Take it also into account for the volatileness of the field. Set the
15540 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15542 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15544 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15545 on a dereference built for a by-ref object if it has an address clause.
15547 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15549 * einfo.ads (Address_Taken): Document use for the second argument of
15550 Asm_Input and Asm_Output attributes.
15551 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15552 argument is an entity name, then set Address_Taken on it.
15553 <Attribute_Asm_Output>: Likewise.
15554 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15555 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15556 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15557 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15559 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15561 PR middle-end/46500
15562 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15564 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15566 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15567 (ada/utils.o): Update dependencies.
15568 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15569 ../../../libcpp/libcpp.a.
15570 * gcc-interface/utils.c: Include common/common-target.h.
15571 (process_attributes): Use targetm_common.have_named_sections.
15573 2011-06-07 Richard Guenther <rguenther@suse.de>
15575 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15578 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15580 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15581 TREE_THIS_NOTRAP flag.
15583 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15585 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15588 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15590 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15591 constants whose full view has discriminants specially.
15593 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15595 * gcc-interface/utils.c: Include diagnostic.h.
15596 (gnat_write_global_declarations): Output debug information for all
15597 global type declarations before finalizing the compilation unit.
15598 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15600 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15602 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15604 2011-05-25 Kai Tietz <ktietz@redhat.com>
15606 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15607 initialization instead of const/none-const pointer assignment.
15609 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15611 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15612 $(EXTRA_GNAT1_OBJS).
15613 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15614 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15615 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15616 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15617 libcommon-target.a instead of prefix.o.
15619 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15622 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15624 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15626 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15627 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15628 instead of version.o.
15630 2011-05-18 Kai Tietz <ktietz@redhat.com>
15632 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15633 boolean_false_node instead of integer_zero_node.
15634 (convert_with_check): Likewise.
15635 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15637 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15639 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15640 type of the parameter is an unconstrained array, convert the actual to
15641 the type of the formal in the In Out and Out cases as well.
15643 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15645 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15646 call build_function_type_array or build_varargs_function_type_array
15648 (create_subprog_type): Don't call build_function_type; call
15649 build_function_type_vec instead.
15651 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15653 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15654 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15655 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15657 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15659 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15661 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15662 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15664 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15666 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15668 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15670 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15671 instead of accessing TYPE_ARG_TYPES directly.
15672 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15674 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15677 * gcc-interface/gigi.h (get_variant_part): Declare.
15678 * gcc-interface/decl.c (get_variant_part): Make global.
15679 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15680 types have the same constant size, are record types and T1 has a
15681 variant part while T2 doesn't.
15683 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15685 * gcc-interface/utils.c (begin_subprog_body): Do not call
15687 (end_subprog_body): Likewise.
15689 2011-05-04 Richard Guenther <rguenther@suse.de>
15691 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15693 (pos_to_constructor): Likewise.
15695 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15696 Eric Botcazou <ebotcazou@adacore.com>
15698 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15699 of build_function_type. Adjust calls to...
15700 (build_raise_check): ...this. Do not take a void_tree parameter.
15701 Call build_function_type_list instead of build_function_type.
15702 Fix head comment and swap couple of conditional blocks.
15704 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15706 * gnatvsn.ads (Library_Version): Bump to 4.7.
15707 (Current_Year): Bump to 2011.
15709 2011-04-29 Michael Matz <matz@suse.de>
15711 * gcc-interface/misc.c (gnat_handle_option): Set
15712 warn_maybe_uninitialized.
15714 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15716 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15717 the Watson/McCabe paper.
15719 2011-04-23 Jim Meyering <meyering@redhat.com>
15721 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15723 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15725 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15728 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15730 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15732 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15733 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15734 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15735 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15736 <all>: Do not set flags on the reused DECL node coming from an alias.
15737 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15738 don't need debug info here...
15739 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15740 (gigi): Adjust calls to create_subprog_decl.
15741 (build_raise_check): Likewise.
15742 (establish_gnat_vms_condition_handler): Likewise.
15743 (Compilation_Unit_to_gnu): Likewise.
15744 (gnat_to_gnu): Likewise.
15746 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15748 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15749 (NO_REORDER_ADAFLAGS): New variable.
15750 (EXTRA_GNATTOOLS): Always define.
15751 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15752 Clean up and adjust list of files compiled with special options.
15753 * gcc-interface/Make-lang.in: Likewise.
15754 (ada/decl.o): Cosmetical change.
15755 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15757 2011-04-20 Jim Meyering <meyering@redhat.com>
15759 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15761 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15763 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15764 $(CFLAGS) on the link line.
15766 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15768 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15769 padded type built for the return type if it is unconstrained.
15771 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15773 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15775 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15777 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15778 before calling TREE_CHAIN.
15779 * gcc-interface/misc.c (gnat_init_ts): New function.
15780 (LANG_HOOKS_INIT_TS): Define.
15782 2011-04-12 Martin Jambor <mjambor@suse.cz>
15784 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15785 instead of cgraph_node.
15787 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15789 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15790 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15793 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15795 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15796 of aggregate types that contain a placeholder.
15798 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15800 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15802 (handle_type_generic_attribute): Likewise.
15804 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15807 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15809 2011-04-04 Kai Tietz <ktietz@redhat.com>
15812 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15815 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15817 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15818 type case, do not strip a padding type around the array type.
15820 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15822 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15825 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15827 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15828 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15829 code for -feliminate-unused-debug-types.
15830 (gnat_post_options): Likewise.
15832 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15834 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15835 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15838 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15840 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15841 DECL_ARTIFICIAL flag on enumeration types.
15843 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15845 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15846 fat pointer types artificial unconditionally.
15847 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15850 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15852 * gcc-interface/gigi.h (get_dummy_type): Declare.
15853 (build_dummy_unc_pointer_types): Likewise.
15854 (finish_fat_pointer_type): Likewise.
15855 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15856 fat pointer type has been built, complete it in place.
15857 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15858 and thin pointers. Remove useless variable.
15859 (finish_fat_pointer_type): Make global and move to...
15860 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15861 (get_dummy_type): New function.
15862 (build_dummy_unc_pointer_types): Likewise.
15863 (gnat_pushdecl): Propage the name to the anonymous variants only.
15864 (update_pointer_to): Only adjust the pointer types in the unconstrained
15867 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15869 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15870 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15871 if this is a Taft amendment type and the full declaration is available.
15872 * gcc-interface/trans.c (process_type): Likewise.
15873 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15874 (process_freeze_entity): Likewise.
15875 * gcc-interface/utils.c (dummy_global): New static variable.
15876 (gnat_write_global_declarations): If there are types declared as used
15877 at the global level, insert them in the global hash table.
15879 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15881 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15882 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15883 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15885 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15886 flag of the type accordingly.
15887 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15889 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15891 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15892 finalizing types when updating the pointers to the designated type.
15893 <all>: Finalize the deferred types even if we didn't defer processing
15894 of incomplete types in this invocation.
15896 2011-04-01 Olivier Hainque <hainque@adacore.com>
15897 Nicolas Setton <setton@adacore.com>
15898 Eric Botcazou <ebotcazou@adacore.com>
15900 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15901 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15903 2011-03-28 Kai Tietz <ktietz@redhat.com>
15905 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15907 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15908 * system-mingw.ads (System): Change ZCX_By_Default default to True.
15910 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15912 2011-03-28 Tristan Gingold <gingold@adacore.com>
15915 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15916 Use ada output of gnatbind.
15917 (ada/b_gnatb.adb): Ditto.
15918 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15919 (ada.mostlyclean, ada.stage1)
15920 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15921 (ada.stagefeedback): Adjust.
15922 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15923 Use ada output of gnatbind.
15924 (b_gnatm.adb): Ditto.
15925 (b_gnatl.o, b_gnatm.o): New rules.
15927 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15929 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15930 for the padded type built to support a specified size or alignment.
15932 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15934 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15935 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15936 unconditionally to the end of the unit when the designated type is
15938 <all>: Rename local variable. Attempt to un-defer types only and do it
15939 for limited_with'ed types as well.
15940 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15941 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15942 consistently and remove redundant call to finalize_from_with_types.
15944 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15946 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15947 subprograms without a previous spec declared in the same unit.
15948 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15949 subprograms at the end of the unit instead of at the beginning.
15950 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15951 isn't public for the special handling of non-inline functions nested
15952 inside inline external functions.
15954 2011-03-25 Jeff Law <law@redhat.com>
15956 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15958 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15960 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15961 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15962 to compute Set_Size_Depends_On_Discriminant.
15963 (Layout_Type): Call it on array types in back-end layout mode.
15964 * sem_util.adb (Requires_Transient_Scope): Return true for array
15965 types only if the size depends on the value of discriminants.
15966 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15967 type if the RHS is a call to a function that returns an unconstrained
15968 type with default discriminant.
15970 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15972 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15973 non-conversion to the nominal result type at the end.
15975 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15977 * gcc-interface/trans.c (create_temporary): New function taken from...
15978 (create_init_temporary): ...here. Call it.
15979 (call_to_gnu): Create the temporary for the return value early, if any.
15980 Create it for a function with copy-in/copy-out parameters if there is
15981 no target; in other cases of copy-in/copy-out, use another temporary.
15982 Push the new binding level lazily. Add and rename local variables.
15984 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15986 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15988 (set_rm_size): Likewise.
15990 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15992 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15993 for the padded type built in order to support a specified alignment.
15994 Fix incorrect formatting.
15996 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15999 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16001 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16003 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16004 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16005 to the end of the list. Adjust recursive call. Rename local variable.
16006 If REORDER is true, reorder components of the record type.
16007 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16008 components_to_record and adjust the parameter list.
16010 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16012 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16013 disabled, use the variable for bounds of loop iteration scheme.
16015 2011-03-21 Kai Tietz <ktietz@redhat.com>
16018 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16020 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16022 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16023 out whether the expression is read-only. Short-circuit placeholder
16024 case and rename a couple of local variables.
16026 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16028 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16029 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16030 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16031 (convert): Deal with conversions from a smaller form type specially.
16033 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
16035 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16036 its argument, except for the special -I- switch.
16038 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
16040 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16043 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16045 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16047 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16049 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16051 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16052 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16053 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16054 Do not generate the check directly, instead instantiate the template
16055 check present in the descriptor.
16056 (make_descriptor_field): Move around.
16057 (build_vms_descriptor32): Build a template check in the POINTER field.
16058 (build_vms_descriptor): Remove useless suffixes.
16059 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16061 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16064 * targext.c: Include target files if IN_RTS is defined.
16066 2011-01-26 Richard Guenther <rguenther@suse.de>
16069 * targext.c: Include config.h.
16070 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16073 2011-01-04 Pascal Obry <obry@adacore.com>
16074 Eric Botcazou <ebotcazou@adacore.com>
16076 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16078 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16080 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16081 end-of-case on the end label and its associated gotos, if any.
16083 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16085 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16086 expressions of the parameter cache within the statement group of
16087 the CICO mechanism.
16089 2011-01-04 Olivier Hainque <hainque@adacore.com>
16090 Eric Botcazou <ebotcazou@adacore.com>
16092 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16093 (set_end_locus_from_node): New function.
16094 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16095 make and the function end_locus.
16096 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16097 for the elaboration subprogram.
16098 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16099 set the end_locus of the expression as well.
16101 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16104 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16105 variables that are referenced in exception handlers volatile.
16109 Copyright (C) 2011 Free Software Foundation, Inc.
16111 Copying and distribution of this file, with or without modification,
16112 are permitted in any medium without royalty provided the copyright
16113 notice and this notice are preserved.