1 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
3 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
5 (Expand_Alfa): Alphabetize cases on first choice. Add
6 processing for object renaming declarations, identifiers and
8 (Expand_Alfa_N_In): Remove useless return.
9 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
10 (Expand_Potential_Renaming): New routine.
11 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
12 (Expand_N_Object_Declaration): Alphabetize local variables. Move
13 Evaluate_Name out to the top level.
14 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
15 * exp_util.adb (Remove_Side_Effects): Add processing for
16 functions with side effects in Alfa mode.
18 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
20 * gnat_rm.texi: Add entries for
21 restrictions No_Relative_Delay, No_Requeue_Statements and
22 No_Stream_Optimizations.
24 2011-11-04 Ed Schonberg <schonberg@adacore.com>
26 * sem_ch4.adb: Set type of entity in prefixed call, for
27 completeness in a generic context.
29 2011-11-04 Yannick Moy <moy@adacore.com>
31 * sem_prag.adb: Minor refactoring (renaming of a parameter).
33 2011-11-04 Robert Dewar <dewar@adacore.com>
35 * atree.ads: Minor reformatting.
37 2011-11-04 Robert Dewar <dewar@adacore.com>
39 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
41 * exp_ch2.adb (Expand_Entity_Reference): Use
42 Activate_Atomic_Synchronization
43 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
44 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
45 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
46 Use Activate_Atomic_Synchronization
47 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
49 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
50 N_Selected_Component node
52 2011-11-04 Robert Dewar <dewar@adacore.com>
54 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
56 2011-11-04 Yannick Moy <moy@adacore.com>
58 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
59 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
60 In ASIS mode, no splitting of aspects between conjuncts.
61 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
62 expressions refer to the original aspect expressions through
63 the Original_Node link. This is used in semantic analysis for
64 ASIS mode, so that the original expression also gets analyzed.
65 * sem_prag.adb (Preanalyze_TC_Args,
66 Check_Precondition_Postcondition,
67 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
68 generated from a source aspect, also analyze the original aspect
70 (Check_Expr_Is_Static_Expression): New procedure
71 similar to existing procedure Check_Arg_Is_Static_Expression,
72 except called on expression inside pragma.
74 2011-11-04 Tristan Gingold <gingold@adacore.com>
76 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
77 Find_Project.Try_Path_Name.
78 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
80 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
82 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
84 2011-11-04 Pascal Obry <obry@adacore.com>
86 * projects.texi: Add short description for qualifiers aggregate
87 and aggregate library.
89 2011-11-04 Matthew Heaney <heaney@adacore.com>
91 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
92 * a-cgaaso.adb: Replaced implementation with instantiation
94 * a-cogeso.ad[sb] This is the new Ada 2012 unit
95 Ada.Containers.Generic_Sort
97 2011-11-04 Robert Dewar <dewar@adacore.com>
99 * exp_ch2.adb (Expand_Entity_Reference): Do not set
100 Atomic_Sync_Required for the case of a prefix of an attribute.
101 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
102 atomic synchronization
103 (Expand_N_Indexed_Component): Ditto.
104 (Expand_B_Selected_Component): Ditto.
105 * sem_prag.adb (Process_Suppress_Unsuppress):
106 Disable/Enable_Atomic_Synchronization can now occur for array
107 types with pragma Atomic_Components.
108 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
109 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
111 2011-11-04 Gary Dismukes <dismukes@adacore.com>
113 * gnat_ugn.texi: Editorial corrections for gnattest section.
115 2011-11-04 Robert Dewar <dewar@adacore.com>
117 * sem_prag.adb: Minor reformatting.
118 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
120 * exp_ch2.adb (Expand_Entity_Reference): Only set
121 Atomic_Sync_Required on entities that are variables. Doesn't
122 make any sense on anything else.
124 2011-11-04 Robert Dewar <dewar@adacore.com>
126 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
127 atomic sync to type case.
128 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
131 2011-11-04 Robert Dewar <dewar@adacore.com>
133 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
135 * gcc-interface/Make-lang.in: Update dependencies.
137 2011-11-04 Robert Dewar <dewar@adacore.com>
139 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
142 2011-11-04 Matthew Heaney <heaney@adacore.com>
144 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
145 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
146 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
147 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
148 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
149 a-sulcin.ad[sb]: New files.
151 2011-11-04 Geert Bosch <bosch@adacore.com>
153 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
154 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
155 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
156 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
157 * gcc-interface/Makefile.in: Remove libgnala and related objects.
159 2011-11-04 Matthew Heaney <heaney@adacore.com>
161 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
162 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
163 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
164 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
167 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
169 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
170 that the type of the parameters isn't dummy in type_annotate_only mode.
172 2011-11-04 Robert Dewar <dewar@adacore.com>
174 * sem_ch12.adb: Minor reformatting
176 2011-11-04 Gary Dismukes <dismukes@adacore.com>
178 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
179 initialize elaboration entities to zero when specs are processed.
181 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
182 Eric Botcazou <ebotcazou@adacore.com>
185 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
186 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
188 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
191 * gcc-interface/Makefile.in (SYMDEPS): Delete.
192 (LIBICONV): New variable.
193 (LIBICONV_DEP): Likewise.
194 (LIBS): Add $(LIBICONV).
195 (LIBDEPS): Add $(LIBICONV_DEP).
196 (EXTRA_GNATTOOLS_OBJS): Merge into...
197 (TOOLS_LIBS): ...this. Add $(LIBICONV).
199 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
201 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
202 variable. Always create the elaboration variable, if any, as constant.
204 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
206 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
207 make a packable type for fields of union types as well.
208 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
209 (gnat_to_gnu_component_type): Try to make a packable type for fields
210 of union types as well.
211 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
212 (maybe_pad_type): Try to make a packable type for fields of union types
214 (gnat_to_gnu_field): Likewise.
215 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
216 (set_rm_size): Likewise.
218 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
219 * gcc-interface/trans.c (add_decl_expr): Likewise.
220 * gcc-interface/utils.c (finish_record_type): Likewise.
221 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
223 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
225 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
226 declared as atomic. Move around conditionally executed code.
228 2011-10-24 Robert Dewar <dewar@adacore.com>
230 * sem.adb (Initialize): Fix bug that blew up if called a second time.
232 2011-10-24 Robert Dewar <dewar@adacore.com>
234 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
235 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
237 2011-10-24 Robert Dewar <dewar@adacore.com>
239 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
242 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
244 * gnat_rm.texi: Add an entry for restriction No_Finalization.
246 2011-10-24 Ed Schonberg <schonberg@adacore.com>
248 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
249 current instance is within the one that contains the generic,
250 the freeze node for the current one must appear in the current
251 declarative part. Ditto if the current instance is within another
252 package instance. In both of these cases the freeze node of the
253 previous instance is not relevant.
255 2011-10-24 Gary Dismukes <dismukes@adacore.com>
257 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
258 of AAMP-specific switches -univ and -aamp_target.
260 2011-10-24 Robert Dewar <dewar@adacore.com>
262 * a-tienau.adb (Put): Deal properly with limited line length.
264 2011-10-24 Robert Dewar <dewar@adacore.com>
266 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
268 2011-10-24 Tristan Gingold <gingold@adacore.com>
270 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
273 2011-10-24 Ed Schonberg <schonberg@adacore.com>
275 * sem_ch12.adb (Earlier): make available globally. If both
276 nodes have the same sloc, the freeze node that does not come
277 from source is the later one.
278 (True_Parent): Make available globally.
279 (Previous_Instance): Subsidiary of
280 Insert_Freeze_Node_For_Instance, to check whether the generic
281 parent of the current instance is declared within a previous
282 instance in the same unit or declarative part, in which case the
283 freeze nodes of both instances must appear in order to prevent
284 elaboration problems in gigi.
285 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
286 freeze point, and the freeze node of a preceding instantiation
287 must be inserted before it.
289 2011-10-24 Robert Dewar <dewar@adacore.com>
291 * checks.ads, checks.adb: Add handling of Synchronization_Check
292 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
294 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
295 flag Minor code reorganization.
296 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
297 * par-prag.adb: Add dummy entries for pragma
298 Disable/Enable_Atomic_Synchronization.
299 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
300 case of Atomic_Synchronization specially (not suppressed
301 by All_Checks, cannot be set from Source).
302 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
303 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
304 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
305 entry for pragma Disable/Enable_Atomic_Synchronization
306 * switch-c.adb: The -gnatp switch does not disable
307 Atomic_Synchronization Add -gnatep switch to disable
308 Atomic_Synchronization.
309 * types.ads: Add entry for Synchronization_Check
310 * usage.adb: Add line for -gnated switch
311 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
313 2011-10-24 Geert Bosch <bosch@adacore.com>
315 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
318 2011-10-24 Robert Dewar <dewar@adacore.com>
320 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
322 2011-10-24 Robert Dewar <dewar@adacore.com>
324 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
325 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
327 2011-10-24 Emmanuel Briot <briot@adacore.com>
329 * prj-proc.adb (Process_Expression_Variable_Decl): No special
330 handling for Project_Path unless it is an attribute.
332 2011-10-24 Javier Miranda <miranda@adacore.com>
334 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
335 (Install_Hidden_Primitives): New subprogram.
336 (Restore_Hidden_Primitives): New subprogram.
337 (Analyze_Formal_Package_Declaration,
338 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
339 Invoke Check_Hidden_Primitives after every call to
340 Analyze_Associations, and invoke Restore_Hidden_Primitives to
341 restore their visibility after processing the instantiation.
342 (Instantiate_Package_Body): Install visible primitives before
343 analyzing the instantiation and uninstall them to restore their
344 visibility when the instantiation has been analyzed.
345 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
346 (Remove_Suffix): New subprogram
347 * sem_ch3.adb (Derive_Subprogram): When handling
348 a derived subprogram for the instantiation of a formal derived
349 tagged type, inherit the dispatching attributes from the actual
350 subprogram (not from the parent type).
352 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
354 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
356 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
358 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
360 (Build_Discriminant_Assignments): Add local variable D_Loc and update
362 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
363 Var_Loc and update their uses.
364 (Build_Record_Init_Proc): Code reformatting.
365 (Increment_Counter): Add formal parameter Loc.
366 (Make_Counter): Add formal parameter Loc.
368 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
370 * sem_disp.adb (Covers_Some_Interface): Fix typo.
372 2011-10-24 Matthew Heaney <heaney@adacore.com>
374 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
377 2011-10-24 Yannick Moy <moy@adacore.com>
379 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
380 Translate arguments in positional notation into pragma argument
381 association arguments for the generated pragma.
383 2011-10-24 Arnaud Charlet <charlet@adacore.com>
385 * exp_ch5.adb: Fix minor typo.
387 2011-10-24 Ed Schonberg <schonberg@adacore.com>
389 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
390 the case of a component reference in an instance body, when the
391 enclosing type is private.
393 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
395 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
396 driver for getting the project support into gnatelim section.
398 2011-10-24 Robert Dewar <dewar@adacore.com>
400 * gnat_rm.texi: Minor correction to documentation on address clause.
402 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
404 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
405 (Attach_Unprotected): New routine.
406 (Delete_Finalize_Address): Removed.
407 (Delete_Finalize_Address_Unprotected): New routine.
408 (Detach): Synchronize and call the unprotected version.
409 (Detach_Unprotected): Remove locking.
410 (Finalize): Add various comment on synchronization. Lock the critical
411 region and call the unprotected versions of routines.
412 (Finalize_Address): Removed.
413 (Finalize_Address_Unprotected): New routine.
414 (Set_Finalize_Address): Synchronize and call
415 the unprotected version.
416 (Set_Finalize_Address_Unprotected): New routine.
417 (Set_Heterogeneous_Finalize_Address): Removed.
418 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
419 (Set_Is_Heterogeneous): Add comment on synchronization and
421 * s-finmas.ads: Flag Finalization_Started is no longer atomic
422 because synchronization uses task locking / unlocking.
423 (Attach): Add comment on usage.
424 (Attach_Unprotected): New routine.
425 (Delete_Finalize_Address): Renamed to
426 Delete_Finalize_Address_Unprotected.
427 (Detach): Add comment on usage.
428 (Detach_Unprotected): New routine.
429 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
430 (Set_Finalize_Address): Add comment on usage.
431 (Set_Finalize_Address_Unprotected): New routine.
432 (Set_Heterogeneous_Finalize_Address): Renamed to
433 Set_Heterogeneous_Finalize_Address_Unprotected.
434 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
435 Allocation_Locked. Add various comments on synchronization. Lock
436 the critical region and call the unprotected version of
438 (Deallocate_Any_Controlled): Add various comments on
439 synchronization. Lock the critical region and call the unprotected
442 2011-10-24 Ed Schonberg <schonberg@adacore.com>
444 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
445 are universal and must carry the corresponding type.
446 * sem_eval.adb (Check_Non_Static_Context): If the type of the
447 expression is universal real, as may be the case for a fixed point
448 expression with constant operands in the context of a conversion,
449 there is nothing to check.
450 * s-finmas.adb: Minor reformatting
452 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
454 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
456 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
458 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
460 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
461 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
463 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
465 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
466 (unchecked_conversion_nop): Use it.
467 (gnat_to_gnu): Likewise.
469 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
471 * back_end.adb (Call_Back_End): Pass the maximum logical line number
472 instead of the maximum physical line number to gigi.
473 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
475 2011-10-16 Tom Tromey <tromey@redhat.com>
476 Dodji Seketeli <dodji@redhat.com>
478 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
479 public ordinary map interface.
481 2011-10-16 Tristan Gingold <gingold@adacore.com>
483 * link.c (_AIX): Add support for GNU ld.
485 2011-10-16 Fedor Rybin <frybin@adacore.com>
487 * gnat_ugn.texi: Fixing gnattest example names in the doc.
488 Adding explanation to additional tests usage.
490 2011-10-16 Robert Dewar <dewar@adacore.com>
492 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
494 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
496 * a-convec.adb: Fix minor inconsistencies.
498 2011-10-16 Matthew Heaney <heaney@adacore.com>
500 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
501 Implementation): Specify pragma Implementation_Defined.
503 2011-10-15 Nicolas Roche <roche@adacore.com>
505 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
506 either rtp-smp or ravenscar-cert-rtp runtimes.
508 2011-10-15 Bob Duff <duff@adacore.com>
510 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
511 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
513 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
514 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
516 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
517 pool only if RE_Root_Storage_Pool_Ptr is available.
518 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
519 pool actual unless RE_Root_Storage_Pool_Ptr is available.
520 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
521 formal only if RE_Root_Storage_Pool_Ptr is available.
523 2011-10-15 Matthew Heaney <heaney@adacore.com>
525 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
526 type): Specify Priority aspect for protected type.
528 2011-10-14 Ed Schonberg <schonberg@adacore.com>
530 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
531 is a generic actual, it is a subtype of a type that was frozen
532 by the instantiation, and even if not marked frozen it does not
533 affect the construction of the dispatch table.
535 2011-10-14 Robert Dewar <dewar@adacore.com>
537 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
539 * s-rident.ads: Add missing Compiler_Unit pragma.
541 2011-10-14 Gary Dismukes <dismukes@adacore.com>
543 * sem_res.adb: Minor reformatting.
545 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
547 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
548 Code and comment reformatting. Use BIP_Task_Master
549 when creating a _master.
550 (BIP_Formal_Suffix): Code reformatting. Correct the case for
552 (Make_Build_In_Place_Call_In_Object_Declaration): Use
553 BIP_Task_Master when creating a reference to the enclosing
554 function's _master formal.
555 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
557 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
558 (Needs_BIP_Finalization_Master): Alphabetized.
559 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
562 2011-10-14 Ed Schonberg <schonberg@adacore.com>
564 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
565 reject an aliased keyword on the object declaration of an extended
566 return statement. In older versions of the language indicate
567 that this is illegal in the standard.
569 2011-10-14 Pascal Obry <obry@adacore.com>
571 * sem_util.adb, sem_ch4.adb: Minor reformatting.
573 2011-10-14 Ed Schonberg <schonberg@adacore.com>
575 * sem_ch13.adb: Recognize properly procedure calls that are
576 transformed into code statements.
578 2011-10-14 Vincent Celier <celier@adacore.com>
580 * projects.texi: Minor fix in project example.
582 2011-10-14 Ed Schonberg <schonberg@adacore.com>
584 * sem_util.adb: Return objects are aliased if their type is
585 immutably limited as per AI05-0053.
587 2011-10-14 Gary Dismukes <dismukes@adacore.com>
589 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
590 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
591 Short_Circuit_And_Or expansion code (moved to sem_res).
592 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
593 "and" and "or" operators as short-circuit "and then" and "or
594 else", when pragma Short_Circuit_And_Or is active.
596 2011-10-13 Robert Dewar <dewar@adacore.com>
598 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
599 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
601 2011-10-13 Arnaud Charlet <charlet@adacore.com>
603 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
605 2011-10-13 Jerome Guitton <guitton@adacore.com>
607 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
609 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
611 * a-convec.ads (Cursor): Minor reformatting.
612 * a-convec.adb (Next): Fix minor inconsistencies.
613 (Previous): Likewise.
615 2011-10-13 Ed Schonberg <schonberg@adacore.com>
617 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
618 New predicate to determine whether some operations on an array
619 type are available when the full view of its component may differ
620 from the view of the point of the array declaration.
621 * sem_ch4.adb (Find_Equality_Types): Use
622 Available_Full_View_Of_Component.
623 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
625 2011-10-13 Ed Schonberg <schonberg@adacore.com>
627 * sem_ch9.adb: Analyze aspects while discriminants of protected
630 2011-10-13 Geert Bosch <bosch@adacore.com>
632 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
633 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
634 longer depend on an external library.
635 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
636 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
638 * gcc-interface/Make-lang.in: Update dependencies.
640 2011-10-13 Cyrille Comar <comar@adacore.com>
642 * gnat_ugn.texi: Minor editing.
644 2011-10-13 Vincent Celier <celier@adacore.com>
646 * projects.texi: Add documentation on packages and attributes
647 that are inherited from a project being extended into the
650 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
652 * exp_ch3.adb (Build_Master): Rewritten.
653 (Expand_N_Full_Type_Declaration): Reformat the declarative
654 region. Update the call to Build_Master_Renaming.
655 (Expand_Previous_Access_Type): Rewritten.
656 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
657 Add local constant Result_Subt and update related usage.
658 (Expand_N_Extended_Return_Statement): Add local constant
659 Result_Subt and update related usage.
660 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
661 new context detection mechanism.
662 (Build_Class_Wide_Master):
663 Use Insert_Action to add the renaming into the tree.
664 (Build_Master_Entity): Rewritten to use the new context detection
666 (Build_Master_Renaming): Add formal parameter Ins_Nod
667 and related usage. Use Insert_Action to add the renaming into the
669 (Find_Enclosing_Context): New subsidiary routine. Rather
670 than relying on enclosing scopes, this routine looks at the
671 tree structure to figure out the proper context for a _master
672 or a _chain. This approach eliminates the issues with transient
673 scopes which have not been converted into blocks.
674 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
675 to better reflect the new usage. Update the related comment.
676 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
677 the comment on usage.
678 * sem_ch3.adb (Access_Definition): Update the calls to
679 Build_Master_Entity and Build_Master_Renaming.
680 * sem_ch6.adb (Create_Extra_Formals): Add local variable
681 Full_Subt. Code reformatting.
682 * sem_util.adb (Is_Iterator): Alphabetized.
683 (Is_LHS): Alphabetized.
684 (Is_Limited_Class_Wide_Type): New routine.
685 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
687 2011-10-13 Geert Bosch <bosch@adacore.com>
689 * a-ngrear.adb (Solve): Make generic and move to
690 System.Generic_Array_Operations.
691 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
692 New generic solvers to compute a vector resp. matrix Y such
693 that A * Y = X, approximately.
694 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
695 Implement using Forward_Eliminate and Back_Substitute
696 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
698 * a-ngcoar.ads ("abs"): Fix return type to be real.
700 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
703 * s-linux-alpha.ads: Do not "with" Interfaces.C.
704 * s-linux-sparc.ads: Likewise.
706 2011-10-13 Geert Bosch <bosch@adacore.com>
708 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
710 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
712 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
715 2011-10-13 Geert Bosch <bosch@adacore.com>
717 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
718 move to System.Generic_Array_Operations.
720 2011-10-13 Geert Bosch <bosch@adacore.com>
722 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
723 * s-gearop.ads (L2_Norm): Change profile to be suitable for
725 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
728 2011-10-13 Robert Dewar <dewar@adacore.com>
730 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
731 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
732 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
733 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
734 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
735 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
737 2011-10-13 Geert Bosch <bosch@adacore.com>
739 * s-gearop.adb: Minor comment additions.
741 2011-10-13 Fedor Rybin <frybin@adacore.com>
743 * gnat_ugn.texi: Add gnattest section.
745 2011-10-13 Ed Schonberg <schonberg@adacore.com>
747 * freeze.adb: Do not create body of renaming if declaration has
750 2011-10-13 Olivier Hainque <hainque@adacore.com>
752 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
753 further, to the ppc+kernel case only.
755 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
757 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
758 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
759 Do not create a pool formal on .NET/JVM.
760 (Expand_N_Extended_Return_Statement): Alphabetize local
761 variables. Do not create a renaming of the build-in-place pool
762 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
763 Add the user-defined pool only on non-VM targets.
764 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
765 local variables. Do not add a pool actual on .NET/JVM.
766 * sem_ch6.adb: Add with and use clause for Targparm.
767 (Create_Extra_Formals): Add build-in-place pool formal only on
769 * rtsfind.ads: Alphabetize entries.
771 2011-10-13 Sergey Rybin <rybin@adacore.com>
773 * gnat_ugn.texi: Minor correction.
775 2011-10-13 Ed Schonberg <schonberg@adacore.com>
777 * sem_ch8.adb: Minor error message improvement.
779 2011-10-13 Robert Dewar <dewar@adacore.com>
781 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
783 2011-10-13 Gary Dismukes <dismukes@adacore.com>
785 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
786 of a for loop for an enumeration type with an enumeration rep
787 clause, which involves moving the original loop parameter into
788 a nested block, the loop parameter's entity must be removed from
789 the entity list of the loop scope.
791 2011-10-13 Bob Duff <duff@adacore.com>
793 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
794 that gets passed in the same cases where BIP_Alloc_Form is passed
795 (caller-unknown-size results). BIP_Storage_Pool is used when
796 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
797 to the user-defined storage pool is passed at the call site,
798 and this pool is used in callee to allocate the result.
799 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
800 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
801 the additional BIP_Storage_Pool actual.
802 (Expand_N_Extended_Return_Statement): Allocate the function
803 result using the user-defined storage pool, if BIP_Alloc_Form =
805 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
806 * exp_ch4.adb: Don't overwrite storage pool set by
807 Expand_N_Extended_Return_Statement.
808 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
809 for use in build-in-place function calls within allocators
810 where the access type has a user-defined storage pool.
812 2011-10-13 Sergey Rybin <rybin@adacore.com>
814 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
817 2011-10-13 Nicolas Roche <roche@adacore.com>
819 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
822 2011-10-13 Ed Schonberg <schonberg@adacore.com>
824 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
825 account that an unchecked union type can be limited.
827 2011-10-13 Olivier Hainque <hainque@adacore.com>
829 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
830 the use of the signal trampoline for PPC in the sjlj case as well.
831 Add legitimate casts, preventing compile time warnings on the
832 (sighandler *) profile.
834 2011-10-13 Yannick Moy <moy@adacore.com>
836 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
839 2011-10-13 Ed Schonberg <schonberg@adacore.com>
841 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
842 expressions are legal limited return values if each one of their
843 dependent expressions are legal.
845 2011-10-13 Ed Schonberg <schonberg@adacore.com>
847 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
848 if the prefix of the call is a qualified expression, rewrite as
850 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
851 code statement is legal if it is a rewriting of a procedure call.
853 2011-10-13 Ed Schonberg <schonberg@adacore.com>
855 * exp_aggr.adb (Flatten): If a component association has a box,
856 assume that aggregate is not static.
857 (Safe_Aggregate): If a component association in a non-limited
858 aggregate has a box, assume that it cannot be expanded in place.
860 2011-10-13 Vincent Celier <celier@adacore.com>
862 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
863 Process_Project_Tree_Phase_1 with Packages_To_Check.
864 (Process_Project_And_Apply_Config): Ditto
865 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
866 Remove default for argument Packages_To_Check.
867 * prj-proc.adb (Recursive_Process): New argument
870 (Process_Project_Tree_Phase_1): Ditto.
871 (Recursive_Project.Process_Aggregated_Projects): Call
872 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
874 * prj-proc.ads (Process): New argument Packages_To_Check
875 (Process_Project_Tree_Phase_1): Ditto
877 2011-10-13 Arnaud Charlet <charlet@adacore.com>
879 * gcc-interface/Makefile.in: Fix typo.
881 2011-10-13 Ed Schonberg <schonberg@adacore.com>
883 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
884 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
885 Use sloc of defining identifier of farmal type declaration,
886 as sloc of generated internal entity, to prevent misplaced
889 2011-10-13 Ed Schonberg <schonberg@adacore.com>
891 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
892 is fully defined before checking that it is a numeric type.
894 2011-10-13 Ed Schonberg <schonberg@adacore.com>
896 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
897 association for component X has a box, then X is covered in the
898 aggregate even if there is not default value for X in the type
899 declaration, and X has to be default-initialized.
901 2011-10-13 Ed Schonberg <schonberg@adacore.com>
903 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
904 literals as referenced only if reference is in current source unit.
906 2011-10-13 Matthew Heaney <heaney@adacore.com>
908 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
910 2011-10-13 Olivier Hainque <hainque@adacore.com>
912 * sigtramp.h: New file. Prototype and spec of the signal
913 trampoline to be called by an established handler to provide
914 dwarf call frame info before the real signal processing code.
915 * sigtramp-ppcvxw.c: New file. Implementation of the signal
916 trampoline for ppc-vxworks.
917 * init.c (vxworks section): Use it for ppc.
919 2011-10-13 Thomas Quinot <quinot@adacore.com>
921 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
922 (Check_Future_Identifier): New subprogram,
923 factors duplicated code from Par.Ch2.P_Identifier and
924 Par.Ch3.P_Defining_Identifier.
926 2011-10-13 Thomas Quinot <quinot@adacore.com>
928 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
929 if we fail to initialize CV attributes or CV.
931 2011-10-13 Thomas Quinot <quinot@adacore.com>
933 * s-tasren.adb (Timed_Selective_Wait, case
934 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
935 we know abortion is already deferred.
937 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
939 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
940 (Build_Master_Renaming (function)): Removed.
941 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
942 (Expand_Full_Type_Declaration): Alphabetize
943 variables. Reformatting of code and comments. Rewrite the
944 section on processing of anonymous access-to-task types in
946 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
947 (Build_Master_Renaming): Moved to exp_ch9.
948 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
949 (Build_Master_Entity): Add formal parameter
950 Use_Current. Reformatting of code and comments.
951 (Build_Master_Renaming): Moved from exp_ch3.
952 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
953 exp_ch3. Update comment on usage.
954 (Build_Master_Entity):
955 Add formal parameter Use_Current. Update comment on usage.
956 (Build_Master_Renaming): Moved from exp_ch3.
957 * sem_ch3.adb (Access_Definition): Remove redundant code to
958 create a _master and a renaming.
960 2011-10-13 Ed Schonberg <schonberg@adacore.com>
962 * lib-xref.adb: Do no emit reference to overridden operation,
963 if it is internally generated.
965 2011-10-13 Vincent Celier <celier@adacore.com>
967 * bindgen.adb: Remove any processing related to g-trasym
968 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
969 * mlib-prj.adb: Remove any processing related to g-trasym.
971 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
973 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
974 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
975 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
976 (ADA_FLAGS_TO_PASS): Likewise.
977 (COMMON_FLAGS_TO_PASS): New.
978 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
979 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
980 (gnatlib): Use COMMON_FLAGS_TO_PASS.
981 (ada.install-common): Likewise.
982 (install-gnatlib): Likewise.
983 (install-gnatlib-obj): Likewise.
984 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
985 (gnat-cross): Delete.
986 (gnatboot): Likewise.
987 (gnatboot2): Likewise.
988 (gnatboot3): Likewise.
989 (gnatstage1): Likewise.
990 (gnatstage2): Likewise.
991 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
992 (MOST_ADAFLAGS): Likewise.
993 (LOOSE_CFLAGS): Likewise.
994 (gnat-cross): Likewise.
995 (GNATLIBFLAGS): Add -W -Wall.
996 (GNATLIBCFLAGS_FOR_C): Likewise.
997 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
998 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
1000 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1002 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
1003 (push_range_check_info): Likewise.
1004 (gnat_to_gnu) <N_Code_Statement>: Likewise.
1005 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
1006 (gnat_invariant_expr): Likewise.
1007 * gcc-interface/utils.c (compute_related_constant): Likewise.
1008 (max_size): Fix handling of SAVE_EXPR.
1009 (remove_conversions): Fix formatting.
1011 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1013 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
1014 (DECL_INDUCTION_VAR): New macro.
1015 (SET_DECL_INDUCTION_VAR): Likewise.
1016 * gcc-interface/gigi.h (convert_to_index_type): Declare.
1017 (gnat_invariant_expr): Likewise.
1018 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
1019 parameter, set DECL_LOOP_PARM_P on it.
1020 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
1021 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
1022 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
1023 (struct range_check_info_d): New type.
1024 (struct loop_info_d): Likewise.
1025 (gnu_loop_stack): New stack.
1026 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
1027 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
1028 is set, do not test DECL_RENAMED_OBJECT.
1029 (push_range_check_info): New function.
1030 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
1031 the label. Reference the label and the iteration variable from it.
1032 Build the special induction variable in the unsigned version of the
1033 size type, if it is larger than the base type. And attach it to the
1034 iteration variable if the latter isn't by-ref. In the iteration scheme
1035 case, initialize the invariant conditions in front of the loop if
1036 deemed profitable. Use gnu_loop_stack.
1037 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
1038 <N_Raise_Constraint_Error>: Always process the reason. In the range
1039 check and related cases, and if loop unswitching is enabled, compute
1040 invariant conditions and push this information onto the stack.
1041 Do not translate again the condition if it has been already translated.
1042 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
1043 DECL_LOOP_PARM_P isn't set.
1044 (convert_to_index_type): New function.
1045 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
1046 to convert the index from the base index type to sizetype.
1047 (gnat_invariant_expr): New function.
1049 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1051 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
1052 two parallel arrays to hold standard builtin declarations, and
1053 replace it with a function based interface that can support
1054 creating builtins on the fly in the future.
1055 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
1056 (gnat_to_gnu): Ditto.
1058 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
1061 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
1062 * gcc-interface/utils.c (global_context): New variable.
1063 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
1064 that are either public external or at top level. Use "No" macro.
1065 (end_subprog_body): Call decl_function_context.
1066 (rest_of_subprog_body_compilation): Likewise.
1068 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
1070 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
1071 (rest_of_subprog_body_compilation): Likewise.
1072 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
1073 test for useless conversions by means of gnat_useless_type_conversion.
1074 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
1075 (language_function): Add named_ret_val and other_ret_val.
1076 (f_named_ret_val): New macro.
1077 (f_other_ret_val): Likewise.
1078 (gigi): Call rest_of_subprog_body_compilation.
1079 (struct nrv_data): New structure.
1080 (is_nrv_p): New predicate.
1081 (prune_nrv_r): New helper function.
1082 (prune_nrv_in_block): New function.
1083 (finalize_nrv_r): New helper function.
1084 (finalize_nrv): New function.
1085 (return_value_ok_for_nrv_p): New predicate.
1086 (build_return_expr): If optimization is enabled, record candidates for
1087 the Named Return Value optimization.
1088 (build_function_stub): Call rest_of_subprog_body_compilation.
1089 (Subprogram_Body_to_gnu): If optimization is enabled and there are
1090 candidates, finalize the Named Return Value optimization.
1091 Call rest_of_subprog_body_compilation.
1092 (call_to_gnu): At the end, if a return value is needed, simplify the
1093 result before wrapping it up in a COMPOUND_EXPR.
1094 * gcc-interface/utils.c (end_subprog_body): Split into...
1095 (rest_of_subprog_body_compilation): ...this. New function.
1096 (gnat_useless_type_conversion): Likewise.
1098 2011-10-06 Thomas Quinot <quinot@adacore.com>
1100 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
1101 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
1102 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
1103 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
1104 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1105 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
1106 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
1107 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
1109 2011-10-06 Ed Schonberg <schonberg@adacore.com>
1111 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
1114 2011-10-06 Matthew Heaney <heaney@adacore.com>
1116 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
1117 (Dequeue_Only_High_Priority): Protected procedure now implemented.
1119 2011-10-06 Vincent Celier <celier@adacore.com>
1121 * g-trasym.adb: Replace old implementation with the default
1122 implementation that returns list of addresses as "0x...".
1123 * g-trasym.ads: Update the list of platforms with the full
1124 capability. Indicate that there is a default implementation
1125 for other platforms.
1126 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
1127 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
1128 is now a default implementation for all platforms without the full
1131 2011-10-06 Robert Dewar <dewar@adacore.com>
1133 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
1134 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
1135 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
1136 reorganization (use conditional expressions).
1138 2011-10-06 Robert Dewar <dewar@adacore.com>
1140 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
1141 floating divide by zero.
1143 2011-10-06 Ed Schonberg <schonberg@adacore.com>
1145 * sem_ch6.adb: Limited interfaces that are not immutably limited
1146 are OK in return statements.
1148 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
1150 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
1151 change to powerpc section.
1153 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
1155 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
1158 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1160 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
1161 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
1162 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
1164 * a-coorma.ads: Minor reformmating.
1165 * einfo.ads: Improve the comment describing the
1166 Directly_Designated_Type function.
1167 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
1169 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1172 2011-09-27 Robert Dewar <dewar@adacore.com>
1174 * a-comutr.ads: Minor reformatting.
1176 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1178 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
1179 iterators to multiway trees.
1181 2011-09-27 Yannick Moy <moy@adacore.com>
1183 * debug.adb (d.D): New option for strict Alfa mode.
1184 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1185 permissions as strictly as possible.
1186 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1187 Alfa mode, now, interpret ranges of base types like GNAT does; in
1188 strict mode, simply change the range of the implicit base Itype.
1189 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1191 2011-09-27 Robert Dewar <dewar@adacore.com>
1193 * exp_ch9.adb: Minor comment fixes.
1195 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1197 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1200 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1202 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1203 instead of Directly_Designated_Type in the indirect array case.
1205 2011-09-27 Robert Dewar <dewar@adacore.com>
1207 * exp_util.adb, exp_aggr.adb: Minor reformatting.
1209 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1211 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1212 on subtype declarations.
1213 * exp_aggr.adb: Minor comment update.
1215 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1217 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1218 test in the N_Explicit_Dereference case. Fold double logical
1219 negation in the special loop case and conditionalize it on
1220 Variable_Ref being true.
1222 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1224 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1225 single protected object and the selector is a discriminant or an
1226 entry family, this is a non-overloaded candidate interpretation,
1227 and possible primitive operations of the type must not be
1230 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1232 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1234 2011-09-27 Pascal Obry <obry@adacore.com>
1236 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1237 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1238 Add dummy definitions for pthread_rwlock_t
1239 and pthread_rwlockattr_t on all POSIX platforms.
1240 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1242 (Finalize_Lock): Likewise.
1243 (Write_Lock): Likewise.
1246 2011-09-27 Tristan Gingold <gingold@adacore.com>
1248 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1251 2011-09-27 Pascal Obry <obry@adacore.com>
1253 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1254 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1255 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1256 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1257 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1258 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1259 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1260 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1261 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1262 s-taprop-posix.adb: Revert previous changes.
1263 (Lock): Now a record containing the two possible lock
1264 (mutex and read/write) defined in OS_Interface.
1265 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1267 (Initialize_Protection): Likewise.
1269 (Lock_Read_Only): Likewise.
1272 2011-09-27 Pascal Obry <obry@adacore.com>
1274 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1275 OS_Interface.pthread_rwlock_t.
1277 2011-09-27 Robert Dewar <dewar@adacore.com>
1279 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1280 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1281 sem_ch5.adb, sem_util.adb: Minor reformatting.
1283 2011-09-27 Pascal Obry <obry@adacore.com>
1285 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1286 (Finalize_Lock)[RW_Lock]: Likewise.
1287 (Write_Lock)[RW_Lock]: Likewise.
1288 (Unlock)[RW_Lock]: Likewise.
1289 (Read_Lock): Define L as RW_Lock (instead of Lock).
1290 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1291 routine for r/w lock.
1292 (Finalize_Lock)[RW_Lock]: Likewise.
1293 (Write_Lock)[RW_Lock]: Likewise.
1294 (Unlock)[RW_Lock]: Likewise.
1295 (Read_Lock): Define L as RW_Lock (instead of Lock).
1297 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1298 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1299 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1300 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1301 routine for standard lock.
1302 (Finalize_Lock)[RW_Lock]: Likewise.
1303 (Write_Lock)[RW_Lock]: Likewise.
1304 (Unlock)[RW_Lock]: Likewise.
1305 (Read_Lock): Define L as RW_Lock (instead of Lock).
1306 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1307 in the record definition.
1308 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1309 lock for 'R' locking policy.
1310 (Initialize_Protection): Likewise.
1312 (Lock_Read_Only): Likewise.
1314 * s-taspri-posix.ads (RW_Lock): New type defined as
1315 OS_Interface.pthread_rwlock_t.
1317 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1318 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1319 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1320 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1322 2011-09-27 Pascal Obry <obry@adacore.com>
1324 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1326 2011-09-27 Pascal Obry <obry@adacore.com>
1328 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1329 s-osinte-hpux.ads, s-osinte-irix.ads,
1330 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1332 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1333 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1334 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1335 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1336 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1337 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1339 2011-09-27 Pascal Obry <obry@adacore.com>
1341 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1342 (RE_Id): Add RE_Lock_Read_Only.
1343 (RE_Unit_Table): Likewise.
1344 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1345 to lift restriction on first character. Handle now the
1346 Name_Concurrent_Readers_Locking where policy character is set to
1348 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1350 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1351 read only lock for function in protected object.
1352 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1353 this routine is now used.
1355 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1357 * s-atocou-x86.adb (Decrement): Use %;.
1358 (Increment): Likewise.
1360 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1362 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1363 dereference of the pointer to the storage area. Remove useless type
1364 conversions and factor out common code.
1366 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1368 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1369 variable and use it throughout.
1370 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1371 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1372 first step. Also convert to the unpadded type as a last step.
1374 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1376 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1377 DECL_CHAIN in comment.
1378 * gcc-interface/trans.c (gigi): Likewise.
1379 (Attribute_to_gnu): Likewise.
1380 (build_function_stub): Likewise.
1381 (gnat_to_gnu): Likewise.
1382 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1383 (convert_vms_descriptor64): Likewise.
1384 (convert_vms_descriptor32): Likewise.
1386 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1388 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1389 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1390 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1391 the type of the record is TYPE_READONLY.
1393 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1394 Robert Dewar <dewar@adacore.com>
1396 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1397 OUT formal parameter which is of an null-exclusion access subtype.
1399 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1401 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1402 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1403 (gnat_to_gnu_param): Likewise.
1404 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1405 maybe_unconstrained_array instead of doing the work manually.
1406 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1407 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1408 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1409 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1410 (gnat_stabilize_reference): Likewise.
1412 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1414 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1415 (SET_TYPE_NULL_BOUNDS): Likewise.
1416 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1417 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1418 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1420 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1421 check that the initializer is a valid constant expression for use in
1422 initializing a static variable. Add missing guard.
1423 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1424 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1425 pointer for the bounds.
1426 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1427 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1429 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1431 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1432 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1433 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1434 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1435 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1436 to the indirect case.
1437 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1438 the TREE_THIS_NOTRAP flag.
1440 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1442 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1443 iteration scheme, always generate the do-while form if optimization
1444 is enabled. Use more straightforward test at the end.
1446 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1448 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1449 XNEW instead of xmalloc. Do not build useless pointer type.
1450 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1451 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1452 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1454 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1456 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1457 the alignment if this doesn't prevent BLKmode access to the object.
1459 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1461 * gcc-interface/Makefile.in (darwin): Do not issue the
1462 '-flat_namespace' linker flag during Ada build.
1463 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1464 default shared library options.
1466 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1468 * gcc-interface/decl.c (annotate_value): Look up expression for
1469 insertion in the cache at the end.
1471 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1473 * gcc-interface/Make-lang.in: Update dependencies.
1475 2011-09-19 Steve Baird <baird@adacore.com>
1477 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1478 configuration pragma names so that Is_Configuration_Pragma_Name
1479 will return True for Name_Annotate. Make corresponding change in
1480 Pragma_Id enumeration type. This is needed to allow an Annotate
1481 pragma to occur in a configuration pragma file (typically,
1483 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1484 * gnat_rm.texi: Note that pragma Annotate may be used as a
1485 configuration pragma.
1487 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1489 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1490 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1492 2011-09-19 Yannick Moy <moy@adacore.com>
1494 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1495 for expansion of set membership.
1496 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1497 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1498 visible for use in Alfa expansion.
1499 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1500 variable in Alfa mode.
1502 2011-09-19 Thomas Quinot <quinot@adacore.com>
1504 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1506 2011-09-19 Thomas Quinot <quinot@adacore.com>
1508 * exp_ch9.adb: Minor reformatting.
1510 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1512 * freeze.adb (Build_Renamed_Body): Generic subprograms
1513 instantiations cannot be poperly inlined by the compiler, do
1514 not set the Body_To_Inline attribute in such cases.
1515 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1516 inlining-related flags from the generic subprogram declaration.
1518 2011-09-19 Thomas Quinot <quinot@adacore.com>
1520 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1521 (Build_Stub_Type): Remove, instead copy components from
1522 System.Partition_Interface.RACW_Stub_Type.
1523 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1524 (Copy_Component_List): New subprogram.
1526 2011-09-19 Yannick Moy <moy@adacore.com>
1528 * lib-xref.adb (Generate_Reference): Ignore references to
1529 constants in Standard.
1531 2011-09-19 Robert Dewar <dewar@adacore.com>
1533 * err_vars.ads, errout.ads: Minor reformatting.
1535 2011-09-19 Robert Dewar <dewar@adacore.com>
1537 * aspects.ads (Impl_Defined_Aspects): New array
1538 * lib-writ.adb (No_Dependences): New name for No_Dependence
1539 * restrict.adb (No_Dependences): New name for No_Dependence
1540 (Check_Restriction_No_Specification_Of_Aspect): New
1542 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1543 (Restricted_Profile_Result): New variable
1544 (No_Specification_Of_Aspects): New variable
1545 (No_Specification_Of_Aspect_Warning): New variable
1546 * restrict.ads (No_Dependences): New name for No_Dependence
1547 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1548 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1549 * s-rident.ads: Add restriction
1550 No_Implementation_Aspect_Specifications, this is also added to
1551 the No_Implementation_Extensions profile.
1552 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1553 No_Implementation_Defined_Aspects
1554 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1555 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1556 No_Implementation_Aspects
1557 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1558 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1560 2011-09-19 Yannick Moy <moy@adacore.com>
1562 * lib-xref.adb (Generate_Reference): Take into account multiple
1563 renamings for Alfa refs.
1565 2011-09-19 Thomas Quinot <quinot@adacore.com>
1567 * g-socthi-mingw.adb: Minor reformatting.
1569 2011-09-19 Yannick Moy <moy@adacore.com>
1571 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1572 expansion to False in mode Alfa
1574 2011-09-19 Pascal Obry <obry@adacore.com>
1576 * mingw32.h: Remove obsolete code needed for old versions
1579 2011-09-19 Robert Dewar <dewar@adacore.com>
1581 * errout.ads: Minor reformatting.
1583 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1585 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1586 function is transformed into a declaration and a body, insert
1587 body at the end of the declarative part, to prevent premature
1588 freeze actions, and preserve original specification in the
1589 subprogram declaration.
1591 2011-09-19 Vincent Celier <celier@adacore.com>
1593 * projects.texi: Minor editing.
1595 2011-09-19 Robert Dewar <dewar@adacore.com>
1597 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1598 exp_aggr.adb: Minor reformatting.
1600 2011-09-19 Yannick Moy <moy@adacore.com>
1602 * lib-xref.adb (Generate_Reference): Change entity referenced
1603 to underlying object if any, or else reference to the HEAP.
1605 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1607 * gcc-interface/Make-lang.in: Update dependencies.
1609 2011-09-15 Robert Dewar <dewar@adacore.com>
1611 * tree_io.ads: Minor reformatting.
1612 * a-intnam.ads: Fix bad header.
1614 2011-09-15 Thomas Quinot <quinot@adacore.com>
1616 * a-exexpr-gcc.adb: Minor reformatting.
1618 2011-09-15 Yannick Moy <moy@adacore.com>
1620 * sem_ch6.adb: Propagate information that an expression function comes
1621 from source (otherwise references to this entity are not stored).
1623 2011-09-15 Robert Dewar <dewar@adacore.com>
1625 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1626 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1627 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1629 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1631 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1632 if the expression function is not a completion, create a
1633 new specification for the generated declaration, and keep the
1634 original specification in the generated body. Shorter code also
1635 ensures that proper warnings are generated for unused formals
1638 2011-09-15 Sergey Rybin <rybin@adacore.com>
1640 * tree_io.ads: Update ASIS_Version_Number because of the changes
1641 in the tree structures for expression functions.
1643 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1645 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1646 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1647 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1648 (CLOCK_REALTIME): Fix wrong value on some OSes.
1649 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1651 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1653 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1654 to unconstrained array case, deal with each branch of a COND_EXPR.
1655 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1656 a COND_EXPR in the initializer, if present.
1658 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1660 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1661 of an addressable type.
1662 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1663 Deal with those cases for which creating a temporary is mandatory.
1665 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1667 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1668 this is a real formal parameter before testing whether it is by ref.
1670 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1672 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1673 (build_call_1_expr): Likewise.
1674 (build_call_2_expr): Likewise.
1675 (build_call_n_expr): New prototype.
1676 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1677 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1678 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1679 (Exception_Handler_to_gnu_zcx): Likewise.
1680 (gnat_to_gnu): Likewise.
1681 (build_binary_op_trapv): Likewise.
1682 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1683 (build_call_1_expr): Likewise.
1684 (build_call_2_expr): Likewise.
1685 (build_call_n_expr): New function.
1686 (build_call_raise): Use build_call_n_expr.
1687 (build_call_raise_range): Likewise.
1688 (build_call_raise_column): Likewise.
1689 (build_call_alloc_dealloc_proc): Likewise.
1690 (maybe_wrap_malloc): Likewise.
1691 (maybe_wrap_free): Likewise.
1693 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1695 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1697 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1698 the result type is null if ENABLE_CHECKING. Set operation_type at the
1699 end unconditionally if not set in the previous cases.
1700 Use build2 and void_type_node for MODIFY_EXPR.
1701 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1703 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1705 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1706 precision when converting to or from an integral type whose precision
1707 is not equal to its size.
1709 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1711 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1713 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1715 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1717 * system-darwin-ppc64.ads: New file.
1719 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1721 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1724 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1726 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1727 size switches to the link phase for shared libs.
1729 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1731 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1732 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1734 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1736 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1737 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1738 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1740 (TOOLS_FLAGS_TO_PASS): New.
1741 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1743 2011-09-06 Robert Dewar <dewar@adacore.com>
1745 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1746 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1748 2011-09-06 Robert Dewar <dewar@adacore.com>
1750 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1751 * s-rident.ads: New restriction No_Implementation_Units
1752 (this restriction is also part of the profile
1753 No_Implementation_Extensions)
1754 * sem_ch10.adb (Analyze_With_Clause): Add check for
1755 No_Implementation_Units restriction.
1757 2011-09-06 Jerome Guitton <guitton@adacore.com>
1759 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1762 2011-09-06 Thomas Quinot <quinot@adacore.com>
1764 * s-solita.adb: Minor reformatting.
1766 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1768 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1769 is a rewriting of an expression function does not freeze previous
1772 2011-09-06 Robert Dewar <dewar@adacore.com>
1774 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1776 2011-09-06 Tristan Gingold <gingold@adacore.com>
1778 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1779 powerpc-wrs-vxworksae.
1781 2011-09-06 Thomas Quinot <quinot@adacore.com>
1783 * s-os_lib.ads (Spawn): Minor documentation clarification,
1784 Success is True for a zero exit status.
1786 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1788 * sem_ch5.adb: Add message for common iterator error.
1790 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1792 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1793 selected component discriminated by a current instance, replace
1794 the constraint with a reference to the target object, regardless
1795 of whether the context is an init_proc.
1797 2011-09-06 Robert Dewar <dewar@adacore.com>
1799 * exp_attr.adb: Descriptor_Size is never static.
1801 2011-09-06 Robert Dewar <dewar@adacore.com>
1803 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1805 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1807 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1810 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1812 * sem_res.adb (Resolve): An expression that is the body of an
1813 expression function does not freeze.
1815 2011-09-06 Matthew Heaney <heaney@adacore.com>
1817 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1818 a-cuprqu.adb: Changed copyright notice to indicate current
1821 2011-09-06 Vincent Celier <celier@adacore.com>
1823 * prj.adb: Minor spelling error fix in comment
1824 * sem_res.adb: Minor reformatting
1826 2011-09-06 Pascal Obry <obry@adacore.com>
1828 * sysdep.c (winflush_nt): Removed as not needed anymore.
1829 (winflush_95): Likewise.
1830 (winflush_init): Likewise.
1831 (winflush_function): Likewise.
1832 (getc_immediate_common): Remove call to winflush_function.
1834 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1836 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1837 processing for Descriptor_Size.
1838 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1839 to account for its broader usage.
1840 * sem_attr.adb (Analyze_Attribute): Change the error detection
1841 circuitry for Descriptor_Size as the attribute is now applicable
1844 2011-09-06 Robert Dewar <dewar@adacore.com>
1846 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1848 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1850 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1851 in a parameter association must not set the Referenced flag on
1853 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1855 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1857 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1859 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1861 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1862 gnatlink-re): Speed up by using -j0.
1864 2011-09-06 Yannick Moy <moy@adacore.com>
1866 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1867 Set_Corresponding_Aspect when creating pragma from aspect.
1868 (Add_Predicates): Use new field Corresponding_Aspect.
1869 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1870 name when present, for the purpose of issuing error messages;
1871 remove local procedure Error_Pragma_Arg_Alternate_Name.
1872 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1874 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1877 2011-09-06 Robert Dewar <dewar@adacore.com>
1879 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1881 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1883 * exp_ch6.adb (Build_Heap_Allocator): Add new
1884 local variable Desig_Typ. Code and comment reformatting. Add
1885 machinery to ensure that the allocation uses a fat pointer when
1886 the type of the return object is a constrained array and the
1887 function return type is an unconstrained array.
1889 2011-09-06 Vincent Celier <celier@adacore.com>
1891 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1892 parameters in subprograms.
1894 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1896 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1898 2011-09-06 Thomas Quinot <quinot@adacore.com>
1900 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1901 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1903 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1904 is null, destroy task specific data, to make API consistent with
1905 other platforms, and thus compatible with the shared version
1907 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1908 Document the above assumption.
1910 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1912 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1913 variable for type of return value when return type is
1914 unconstrained and context is an assignment.
1916 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1918 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1919 class-wide operation if expansion is not enabled.
1921 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1923 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1926 2011-09-06 Yannick Moy <moy@adacore.com>
1928 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1929 Aspect_Invariant): Do not issue error at this point on illegal
1930 pragma placement, as this is checked later on when analyzing
1931 the corresponding pragma.
1932 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1933 similar to Error_Pragma_Arg, except the source name of the
1934 aspect/pragma to use in warnings may be equal to parameter
1935 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1936 message to distinguish source name of pragma/aspect, and whether
1937 the illegality resides in the type being public, or being private
1938 without a public declaration
1940 2011-09-06 Thomas Quinot <quinot@adacore.com>
1942 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1943 size check (fd_set is implemented differently on that platform).
1945 2011-09-06 Thomas Quinot <quinot@adacore.com>
1947 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1948 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1949 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1950 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1951 (ATCB_Allocation): New subpackage of
1952 System.Tasking.Primitive_Operations, shared across all targets
1953 with full tasking runtime.
1954 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1956 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1957 taking care of establishing a local temporary ATCB if the one
1958 being deallocated is Self, to avoid a reference to the freed
1959 ATCB in Abort_Undefer.
1961 2011-09-06 Thomas Quinot <quinot@adacore.com>
1963 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1964 terminated, mark it for deallocation upon termination.
1965 (Terminate_Task): Call Free_Task again if the task is marked
1966 for automatic deallocation upon termination.
1968 2011-09-06 Robert Dewar <dewar@adacore.com>
1970 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1971 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1972 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1973 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1974 a-intnam-solaris.ads, a-intnam-tru64.ads,
1975 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1976 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1977 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1978 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1979 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1980 Add new profile No_Implementation_Extensions
1981 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1982 profile No_Implementation_Extensions
1983 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1984 Check violation of restriction No_Implementation_Identifiers
1985 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1986 Add entry for Name_No_Implementation_Extensions
1988 2011-09-06 Robert Dewar <dewar@adacore.com>
1990 * impunit.ads: Minor reformatting.
1992 2011-09-06 Robert Dewar <dewar@adacore.com>
1994 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1996 2011-09-06 Pascal Obry <obry@adacore.com>
1998 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
2001 2011-09-06 Robert Dewar <dewar@adacore.com>
2003 * g-socket.adb: Minor reformatting
2005 2011-09-06 Javier Miranda <miranda@adacore.com>
2007 * ali.adb (Scan_ALI): Add missing support to load references of
2008 entities imported from other languages.
2009 * ali.ads (Xref_Record): Adding new fields to store the language and
2010 name of an imported entity.
2011 * lib-xref.adb (Output_Import_Export_Info): Fix typo
2014 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2016 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
2017 is allowed on a full type declaration if it is the completion of
2018 a private declarations.
2019 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
2020 aspect is allowed on a full type declaration in the private part
2023 2011-09-06 Robert Dewar <dewar@adacore.com>
2025 * sem_ch8.ads: Minor reformatting
2027 2011-09-06 Thomas Quinot <quinot@adacore.com>
2029 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
2030 Guard against socket values that are not in [0;FD_SETSIZE[
2032 2011-09-06 Robert Dewar <dewar@adacore.com>
2034 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
2037 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2039 * s-linux-alpha.ads: Minor reformatting
2040 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
2041 Use sizeof instead of corresponding C defines in s-oscons template.
2043 2011-09-06 Vadim Godunko <godunko@adacore.com>
2045 * a-convec.ads, a-iteint.ads: Minor reformatting.
2047 2011-09-06 Vincent Celier <celier@adacore.com>
2049 * projects.texi: Add menus and @node lines.
2051 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2053 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
2054 where the return type is an unconstrained array and the context
2055 is an assignment. Optimize the case when the target of the
2056 assignment is a selected component.
2058 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2060 * s-solita.adb: Update comments.
2062 2011-09-06 Pascal Obry <obry@adacore.com>
2064 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
2065 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
2066 * s-oscons-tmplt.c: Add support for generating pthread related
2067 types size on GNU/Linux as done for Darwin.
2068 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
2070 2011-09-06 Robert Dewar <dewar@adacore.com>
2072 * exp_ch6.adb: Fix minor typo.
2074 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2076 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2077 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
2078 (Double_Size_Of): Alphabetized. Update the comment on usage.
2079 (Make_Finalize_Address_Stmts): Update comments and reformat code.
2080 (Nearest_Multiple_Rounded_Up): New routine.
2081 (Size_Of): Update comment on usage. The generated expression now
2082 accounts for alignment gaps by rounding the size of the type to the
2083 nearest multiple rounded up of the type's alignment.
2085 2011-09-06 Robert Dewar <dewar@adacore.com>
2087 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
2089 2011-09-06 Steve Baird <baird@adacore.com>
2091 * exp_ch4.adb (Expand_Allocator_Expression): Look through
2092 derived subprograms in checking for presence of an
2093 Extra_Accessibility_Of_Result formal parameter.
2094 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
2095 checking for presence of an Extra_Accessibility_Of_Result formal
2097 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
2098 case where the Parameter_Associatiations attribute is already set,
2099 but set to an empty list.
2100 (Needs_Result_Accessibility_Level):
2101 Unconditionally return False. This is a temporary
2102 change, disabling the Extra_Accessibility_Of_Result
2104 (Expand_Simple_Function_Return): Check for
2105 Extra_Accessibility_Of_Result parameter's presence instead of
2106 testing Ada_Version when generating a runtime accessibility
2107 check which makes use of the parameter.
2109 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2111 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
2112 expression in a given case alternative must be attached to the
2113 statement list of the ccrresponding case statement alternative
2114 They cannot be propagated ahead of the case statement, because
2115 the validity of the expression that generated the action may
2116 hold only for that alternative.
2118 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2120 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2121 (Alignment_Of): Remove the code for strict alignment targets.
2122 (Double_Alignment_Of): Removed.
2123 (Double_Size_Of): New routine.
2124 (Make_Finalize_Address_Stmts): Change the
2125 calculation of the dope's size. Update relevant comments.
2126 (Size_Of): New routine.
2128 2011-09-06 Steve Baird <baird@adacore.com>
2130 * einfo.ads (Extra_Accessibility): Update associated comment to use
2131 the term "present" correctly ("present" just means that it is not
2132 an error to query the value of the attribute - it does not imply
2133 that the value must be non-null).
2134 (Extra_Constrained): Ditto.
2135 (Is_Visible_Formal): Ditto.
2136 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
2137 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
2138 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
2139 * exp_ch6.adb (Expand_Call): The callee may require an
2140 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
2141 < Ada_2012. This can occur if the callee is exported from a Gnat
2142 runtimes unit. Also improve a comment.
2144 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2146 * exp_ch7.adb: Add with and use clauses for Get_Targ.
2147 (Alignment_Of): Rename formal parameter Some_Typ
2148 to Typ, update related comment. Use the allocator alignment on
2149 strict alignment targets such as SPARC.
2150 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
2153 2011-09-06 Gary Dismukes <dismukes@adacore.com>
2155 * sem_ch9.adb (Check_Interfaces): Test
2156 Is_Limited_Type rather than Is_Limited_Record when checking that
2157 the partial view of a synchronized full view must be limited.
2159 2011-09-06 Emmanuel Briot <briot@adacore.com>
2161 * g-comlin.adb (Free): Fix memory leak.
2163 2011-09-06 Robert Dewar <dewar@adacore.com>
2165 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
2167 2011-09-06 Steve Baird <baird@adacore.com>
2169 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
2170 (Ada2012) cases described in AI05-0234 where the accessibility
2171 level of a function result is "determined by the point of
2172 call", an implicit parameter representing that accessibility
2173 level is passed in. Extra_Accessibilty_Of_Result yields this
2174 additional formal parameter. Extra_Accessibility_Of_Result
2175 is analogous to the existing Extra_Accessibility
2176 function used in the implementation of access parameters.
2177 (Set_Extra_Accessibility_Of_Result): New procedure; sets
2178 Extra_Accessibility_Of_Result attribute.
2179 * einfo.adb (Extra_Accessibility_Of_Result): New function.
2180 (Set_Extra_Accessibility_Of_Result): New procedure.
2181 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2182 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2183 an accessibility level literal to Natural; introduce a nested
2184 function, Make_Level_Literal, to do this.
2185 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2186 determines whether a given function (or access-to-function
2187 type) needs to have an implicitly-declared accessibility-level
2188 parameter added to its profile.
2189 (Add_Extra_Actual_To_Call): Export an existing procedure which was
2190 previously declared in the body of Exp_Ch6.
2191 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2193 (Has_Unconstrained_Access_Discriminants): New Function; a
2194 predicate on subtype entities which returns True if the given
2195 subtype is unconstrained and has one or more access discriminants.
2196 (Expand_Call): When expanding a call to a function which takes an
2197 Extra_Accessibility_Of_Result parameter, pass in the appropriate
2198 actual parameter value. In the case of a function call which is
2199 used to initialize an allocator, this may not be possible because
2200 the Etype of the allocator may not have been set yet. In this
2201 case, we defer passing in the parameter and handle it later in
2202 Expand_Allocator_Expression.
2203 (Expand_Simple_Function_Return): When returning from a function which
2204 returns an unconstrained subtype having at least one access
2205 discriminant, generate the accessibility check needed to ensure that
2206 the function result will not outlive any objects designated by its
2208 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2210 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2211 is used to initialize an allocator, we may need to pass in "the
2212 accessibility level determined by the point of call" (AI05-0234)
2213 to the function. Expand_Call, where such actual parameters are
2214 usually generated, is too early in this case because the Etype of
2215 the allocator (which is used in determining the level to be passed
2216 in) may not have been set yet when Expand_Call executes. Instead,
2217 we generate code to pass in the appropriate actual parameter
2218 in Expand_Allocator_Expression.
2219 * sem_ch6.adb (Create_Extra_Formals): Create
2220 the new Extra_Accessibility_Of_Result formal if
2221 Needs_Result_Accessibility_Level returns True. This includes the
2222 introduction of a nested procedure, Check_Against_Result_Level.
2224 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2226 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2229 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2231 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2232 for the synchronization. Move the test for null from
2233 s-stposu.Allocate_Any_Controlled to this routine since the check
2234 needs to be protected too.
2235 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2236 synchronization code.
2237 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2238 explaining the context in which this routine is used.
2239 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2240 to s-finmas.Set_Finalize_Address.
2242 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2244 * einfo.ads: Document that itypes have no parent field.
2246 2011-09-05 Robert Dewar <dewar@adacore.com>
2248 * rtsfind.adb (Check_CRT): Check for overloaded entity
2249 * rtsfind.ads: Document that entities to be found by rtsfind
2250 cannot be overloaded
2251 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2252 (Lock_Entries_With_Status): New name for Lock_Entries with two
2253 arguments (changed to meet rtsfind no overloading rule).
2255 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2257 * s-finmas.adb (Set_Finalize_Address (Address,
2258 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2259 (Set_Finalize_Address (in out Finalization_Master,
2260 Finalize_Address_Ptr): Add synchronization code.
2261 * s-finmas.ads (Set_Finalize_Address (Address,
2262 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2263 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2264 Set_Finalize_Address for the heterogeneous case.
2266 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2268 * sem_ch3.adb: Undo previous change, not suitable after all.
2270 2011-09-05 Robert Dewar <dewar@adacore.com>
2272 * einfo.ads: Minor comment clarification.
2274 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2276 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2277 no longer needs to search through the entities of the return
2278 statement scope to find the _chain.
2279 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2280 (Analyze_Block_Statement): Add local variable
2281 Is_BIP_Return_Statement. Add machinery to install all entities
2282 produced by the expansion of the return object declaration.
2283 (Install_Return_Entities): New routine.
2284 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2286 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2288 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2289 of subunit is incomplete.
2290 (Analyze_Proper_Body): If parent spec is not available, do not
2293 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2295 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2296 interface type conversions, that are expanded into dereferences.
2298 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2300 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2301 Examine the parameter and return profile of a subprogram and swap
2302 any incomplete types coming from a limited context with their
2303 corresponding non-limited views.
2304 (Exchange_Limited_Views): New routine.
2306 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2308 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2309 of internal entity to the subtype declaration, so that when
2310 entities are subsequently exchanged in a package body, the tree
2311 remains properly formatted for ASIS.
2313 2011-09-05 Johannes Kanig <kanig@adacore.com>
2315 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2317 (Display_Help): display the user given help message, if available.
2319 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2321 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2322 is legal if the original node is an identifier that is a
2323 parameterless function call.
2325 2011-09-05 Pascal Obry <obry@adacore.com>
2327 * prj-nmsc.adb: Minor reformatting.
2328 Add support for standalone aggregate library.
2329 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2330 * projects.texi: Fix documentation for aggregate library projects.
2332 2011-09-05 Robert Dewar <dewar@adacore.com>
2334 * sem_ch6.adb: Minor reformatting.
2336 2011-09-05 Matthew Gingell <gingell@adacore.com>
2338 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2339 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2340 the bottom of the stack is not overwritten.
2342 2011-09-05 Thomas Quinot <quinot@adacore.com>
2344 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2346 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2348 * sem_ch3.adb (Access_Definition): If an access type declaration
2349 appears in a child unit, the scope of whatever anonymous type
2350 may be generated is the child unit itself.
2352 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2354 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2355 Comes_From_Source on rewritten body.
2356 (Analyze_Subprogram_Body_Helper): Check that the original node for
2357 the body comes from source, when determining whether expansion
2358 of a protected operation is needed.
2360 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2362 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2363 a selected component and the right-hand side is a self-referential
2364 access, the proper prefix of the rewritten attribute is a copy
2365 of the left-hand side, not of its prefix.
2367 2011-09-05 Robert Dewar <dewar@adacore.com>
2369 * sem_ch5.adb: Minor reformatting.
2370 * sem_ch3.adb: Minor code clean up.
2372 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2374 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2375 restriction No_Dynamic_Attachment is in effect or not should
2376 not influence the default priority associated to a protected
2377 object. With this change, when the restriction is in effect (as
2378 is the case for the Ravenscar profile) the default priority of
2379 a protected object with an interrupt handler is in the range of
2380 interrupt priorities (Default_Interrupt_Priority) as required
2383 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2385 * a-iteint.ads: Fix header.
2387 2011-09-05 Vincent Celier <celier@adacore.com>
2389 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2390 with a directory separator to avoid output such as:
2391 "/path/to/objauto.cgpr" has been deleted.
2393 2011-09-05 Robert Dewar <dewar@adacore.com>
2395 * sem_ch3.adb: Minor reformatting.
2397 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2399 * sem_ch5.adb: Better error message.
2401 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2403 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2404 (Expand_Array_Aggregate): Detect a special case of an aggregate
2405 which contains tasks in the context of an unexpanded return
2406 statement of a build-in-place function.
2407 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2408 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2409 which contains tasks and expand it now that the original simple
2410 return statement has been rewritten.
2411 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2412 reformatting. Do not create a chain for an extended return
2413 statement if one is already available.
2414 (Has_Activation_Chain): New routine.
2416 2011-09-05 Marc Sango <sango@adacore.com>
2418 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2419 the wrong test and add the correct test to detect the violation
2420 of illegal use of unconstrained string type in SPARK mode.
2422 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2424 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2425 message on an iterator over an array.
2427 2011-09-05 Robert Dewar <dewar@adacore.com>
2429 * lib-xref-alfa.adb: Minor reformatting.
2431 2011-09-05 Robert Dewar <dewar@adacore.com>
2433 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2434 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2436 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2438 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2440 2011-09-05 Johannes Kanig <kanig@adacore.com>
2442 * lib-xref-alfa.adb: Update comments.
2444 2011-09-05 Thomas Quinot <quinot@adacore.com>
2446 * sem_res.adb: Minor reformatting
2448 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2450 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2451 present, create them now. Needed in case the return type was
2452 a limited view in the function declaration.
2453 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2454 tasks, build the activation chain for it. Pass a reference to
2455 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2456 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2457 with build_in_place calls.
2458 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2459 incomplete, inatialize its Corresponding_Record_Type component.
2460 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2463 2011-09-05 Johannes Kanig <kanig@adacore.com>
2465 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2468 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2470 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2471 appears within a package specification and the token after "IS"
2472 is not a parenthesis, assume that this is an unparenthesized
2473 expression function, even if the token appears in a line by
2475 * par.adb: Clarify use of Labl field of scope stack in error
2478 2011-09-05 Bob Duff <duff@adacore.com>
2480 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2481 conversions instead of normal type conversions in all cases where a
2482 type conversion would be illegal. In particular, use unchecked
2483 conversions when the operand types are private.
2485 2011-09-05 Johannes Kanig <kanig@adacore.com>
2487 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2488 objects of task type or protected type.
2490 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2492 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2493 function comes from source, indicate that so does its rewriting,
2494 so it is compatible with any subsequent expansion of the
2495 subprogram body (e.g. when it is a protected operation).
2496 * sem_ch4.adb: minor reformatting
2498 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2500 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2501 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2502 may lead to wrong ancestor package in the case of instantiated subunit
2503 bodies. If a subunit is instantiated, follow the chain of instantiations
2504 rather than the stub structure.
2506 2011-09-02 Robert Dewar <dewar@adacore.com>
2508 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2509 * gcc-interface/Make-lang.in: Update dependencies.
2511 2011-09-02 Marc Sango <sango@adacore.com>
2513 * sem_ch3.adb (Analyze_Object_Declaration): Change
2514 comment and add additional check to differentiate constant of
2515 type string from others unconstrained type.
2517 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2519 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2520 present in incomplete type declarations to refine the error
2521 message the full declaration is in the same unit.
2522 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2523 an incomplete type, set the Premature_Use for additional message.
2524 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2525 and Premature_Use is set, place additional information at the
2526 point of premature use.
2528 2011-09-02 Bob Duff <duff@adacore.com>
2530 * sem_ch6.adb: (Check_Post_State): Suppress warning
2531 "postcondition refers only to pre-state" when the expression has not
2532 yet been analyzed, because it causes false alarms. This can happen when
2533 the postcondition contains a quantified expression, because those are
2534 analyzed later. This is a temporary/partial fix.
2535 (Process_Post_Conditions): Minor: change wording of warning.
2537 2011-09-02 Marc Sango <sango@adacore.com>
2539 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2540 illegal use of unconstrained string type in SPARK mode.
2541 * sem_res.adb (Analyze_Operator_Symbol): Set the
2542 right place where the string operand of concatenation should be
2543 violate in SPARK mode.
2545 2011-09-02 Robert Dewar <dewar@adacore.com>
2547 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2548 exp_ch3.adb: Minor reformatting.
2550 2011-09-02 Vincent Celier <celier@adacore.com>
2552 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2553 as the compiler driver so Is_Compilable returns True for sources.
2554 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2557 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2559 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2560 condition, a reference to a controlling formal must be interpreted
2561 as having the class-wide type (or an access to such) so that the
2562 inherited condition can be properly applied to any overriding
2563 operation (see ARM12 6.6.1 (7)).
2565 2011-09-02 Tristan Gingold <gingold@adacore.com>
2567 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2570 2011-09-02 Javier Miranda <miranda@adacore.com>
2572 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2573 initializing expression of a class-wide interface object declaration
2574 if its type is limited.
2576 2011-09-02 Johannes Kanig <kanig@adacore.com>
2578 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2579 literals, take into account the type name; the type is *not*
2580 the scope for an enumeration literal.
2582 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2584 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2585 to reject an overriding indicator on a user-defined Adjust
2586 subprogram for a limited controlled type.
2588 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2590 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2591 for an actual that is a function call returning an unconstrained
2592 limited controlled type.
2594 2011-09-02 Tristan Gingold <gingold@adacore.com>
2596 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2598 2011-09-02 Johannes Kanig <kanig@adacore.com>
2600 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2601 from "HEAP" to __HEAP Change comment that refers to that variable
2602 * put_alfa.adb: Change comment that refers to that variable
2604 2011-09-02 Robert Dewar <dewar@adacore.com>
2606 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2608 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2610 * exp_util.adb (Extract_Renamed_Object): Renamed to
2611 Find_Renamed_Object. This routine has been reimplemented and now uses
2612 tree traversal to locate a renamed object.
2613 (Is_Aliased): Replace call to Extract_Renamed_Object with
2614 Find_Renamed_Object.
2616 2011-09-02 Tristan Gingold <gingold@adacore.com>
2618 * init.c: (__gnat_is_vms_v7): New function.
2620 2011-09-02 Olivier Hainque <hainque@adacore.com>
2622 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2623 that have a misaligned backchain, necessarily bogus.
2625 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2627 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2628 TSS routine Finalize_Address when compiling in Alfa mode.
2629 (Expand_Freeze_Record_Type): Do not create TSS routine
2630 Finalize_Address when compiling in Alfa mode.
2631 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2632 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2634 (Expand_N_Allocator): Do not produce a call to
2635 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2636 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2637 produce a call to primitive Set_Finalize_Address in Alfa mode because
2638 Finalize_Address is not built.
2639 * exp_ch7.adb (Build_Finalization_Master): Do not create
2640 finalization masters in Afa mode since they are not needed.
2641 (Build_Finalizer): Do not create scope and library-level
2642 finalizers in Alfa mode since they are not needed.
2643 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2644 "new" and "free" when applied to controlled objects in Alfa mode since
2647 2011-09-02 Vincent Celier <celier@adacore.com>
2649 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2650 only library names with the syntax of Ada identifiers, to avoid errors
2651 when compiling the binder generated files.
2652 * projects.texi: Document restriction on SAL library names
2654 2011-09-02 Thomas Quinot <quinot@adacore.com>
2656 * a-chtgbo.adb: Minor comment fix.
2658 2011-09-02 Robert Dewar <dewar@adacore.com>
2660 * lib-xref.adb: Minor reformatting
2662 2011-09-02 Vincent Celier <celier@adacore.com>
2664 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2665 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2666 --version and --help in usage.
2667 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2669 2011-09-02 Bob Duff <duff@adacore.com>
2671 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2672 compilers don't understand it.
2674 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2676 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2677 underlying subtype rather than its base type on the call to
2678 Build_Record_Or_Elementary_Input_Function, so that any
2679 constraints on a discriminated subtype will be available for
2680 doing the check required by AI05-0192.
2681 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2682 If the prefix subtype of the 'Input attribute is a constrained
2683 discriminated subtype, then check each constrained discriminant value
2684 against the corresponding value read from the stream.
2686 2011-09-02 Yannick Moy <moy@adacore.com>
2688 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2689 warnings on suspicious contracts, and enable them with -gnatwa.
2691 2011-09-02 Robert Dewar <dewar@adacore.com>
2693 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2696 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2698 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2699 which ensure that restriction No_Dynamic_Attachment has not been
2701 (Make_Initialize_Protection): Protected types with attach or
2702 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2703 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2704 which ensures that restriction No_Dynamic_Attachment has not been
2706 * sem_attr.adb: (Eval_Attribute): Transform
2707 VAX_Float_Type'First and 'Last into references to
2708 the temporaries which store the corresponding bounds. The
2709 transformation is needed since the back end cannot evaluate
2710 'First and 'Last on VAX.
2711 (Is_VAX_Float): New routine.
2713 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2715 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2716 generic unit is not intrinsic and has an explicit convention,
2717 the instance inherits it.
2719 2011-09-02 Robert Dewar <dewar@adacore.com>
2721 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2722 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2724 2011-09-02 Thomas Quinot <quinot@adacore.com>
2726 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2727 Guard against a prefix that is an N_Has_Entity but has no
2730 2011-09-02 Yannick Moy <moy@adacore.com>
2732 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2735 2011-09-02 Yannick Moy <moy@adacore.com>
2737 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2738 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2740 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2741 procedure looking for suspicious postconditions.
2742 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2743 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2744 options -gnatw.t and -gnatw.T.
2746 2011-09-02 Pascal Obry <obry@adacore.com>
2748 * prj.adb: Minor code refactoring. Move check for null project in
2750 * projects.texi: Fix minor typos.
2752 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2754 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2755 of iteration is an expression, its value must be captured in a
2756 renaming declaration, so that modification of the elements is
2757 propagated to the original container.
2759 2011-09-02 Pascal Obry <obry@adacore.com>
2761 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2762 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2763 prj-tree.adb: Minor reformatting and style fixes.
2765 2011-09-02 Robert Dewar <dewar@adacore.com>
2767 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2768 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2769 No_Implicit_Aliasing
2770 (Analyze_Attribute, case Address): ditto
2771 (Analyze_Attribute, case Unrestricted_Access): ditto
2772 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2773 No_Implicit_Aliasing restriction.
2774 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2776 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2778 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2779 is an unchecked conversion, apply test to its expression.
2781 2011-09-02 Javier Miranda <miranda@adacore.com>
2783 * sem_ch3.adb (Check_Abstract_Overriding): When
2784 traversing the chain of aliased subprograms avoid reporting a
2785 redundant error on the current entity.
2787 2011-09-02 Sergey Rybin <rybin@adacore.com>
2789 * gnat_ugn.texi: Minor clean up.
2791 2011-09-02 Bob Duff <duff@adacore.com>
2793 * s-htable.adb (Set_If_Not_Present): Use renaming
2794 instead of ":=", because the type Key is limited in the generic (even
2795 if not in the instances).
2797 2011-09-02 Robert Dewar <dewar@adacore.com>
2799 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2800 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2803 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2805 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2806 inherited component with the enclosing derived type. Code reformatting.
2808 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2810 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2811 return done when overflow checks are enabled, since comparisons against
2812 Lor and Hir should not be done when OK1 is False.
2814 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2816 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2817 Add new formal Master_Exp. When present, add that expression to the
2818 call as an extra actual.
2819 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2820 Fmaster_Actual and in the case of a BIP call initializing a return
2821 object of an enclosing BIP function set it to a
2822 new reference to the implicit finalization master
2823 formal of the enclosing function. Fmaster_Actual is
2824 then passed to the new formal Master_Exp on the call to
2825 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2826 initializations of Enclosing_Func to its declaration.
2828 2011-09-02 Thomas Quinot <quinot@adacore.com>
2830 * csets.ads: Minor reformatting
2832 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2834 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2835 the full view of a private type coming from an instantiation.
2836 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2837 loop to iterate over the declarations rather than use the
2838 First_Entity / Next_Entity scheme.
2840 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2842 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2843 X'range (N) into X'First (N) .. X'Last (N), do not share the
2844 dimension indicator N, if present. Even though it is a static
2845 constant, its source location may be modified when printing
2846 expanded code under -gnatDL, and node sharing will lead to chaos
2847 in Sprint on large files, by generating a sloc value that does
2848 not correspond to any source file.
2850 2011-09-02 Bob Duff <duff@adacore.com>
2852 * einfo.adb: (Has_Xref_Entry): Do not call
2853 Implementation_Base_Type. Lib.Xref has been
2854 rewritten to avoid the need for it, and it was costly.
2855 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2856 functions in support of efficient xref.
2857 * lib-xref-alfa.adb: Misc changes related to Key component of
2859 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2860 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2861 no longer does. This is the one place where it is needed.
2863 2011-09-02 Johannes Kanig <kanig@adacore.com>
2865 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2866 similar interface as the other Getopt function.
2868 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2870 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2871 a call to Set_Finalize_Address if there is no allocator available.
2872 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2873 a case of allocator expansion where the allocator is not expanded but
2874 needs a custom allocate routine. Code reformatting.
2875 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2876 Ren_Obj. Code reformatting.
2877 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2878 through the use of 'reference.
2879 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2880 as part of build-in-place expansion. They are intentionally marked as
2881 coming from source, but their parents are not.
2883 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2885 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2886 is the generated subprogram declaration for a child unit body
2887 that acts as spec, use the original body in the with_clause,
2888 to prevent binding errors.
2890 2011-09-02 Vincent Celier <celier@adacore.com>
2892 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2893 qualifier /MULTI_UNIT_INDEX=
2895 2011-09-02 Johannes Kanig <kanig@adacore.com>
2897 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2898 instead of calling the callback function
2900 2011-09-02 Robert Dewar <dewar@adacore.com>
2902 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2903 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2905 2011-09-02 Vincent Celier <celier@adacore.com>
2907 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2908 explicitly declared in an extending project, do not warn if a source
2909 for an inherited naming exception is not found.
2911 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2913 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2914 expansion is inactive.
2916 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2918 * sem_util.adb (Note_Possible_Modification): If the entity
2919 being modified is the renaming generated for an Ada2012 iterator
2920 element, the enclosing container or array is modified as well.
2922 2011-09-02 Jose Ruiz <ruiz@adacore.com>
2924 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2925 Initialize): Define and initialize the
2926 mutex attributes and condition variable attributes locally.
2928 2011-09-02 Vincent Celier <celier@adacore.com>
2930 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2931 exception replaced in an extending project.
2932 (Check_Object): No error when the other source is locally removed.
2934 2011-09-02 Yannick Moy <moy@adacore.com>
2936 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2939 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2941 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2943 * gcc-interface/Make-lang.in: Update dependencies.
2945 2011-09-01 Robert Dewar <dewar@adacore.com>
2947 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2949 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2951 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2952 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2953 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2954 specific for systems where their glibc version does not define the
2955 routines to handle dynamically allocated CPU sets.
2957 2011-09-01 Vincent Celier <celier@adacore.com>
2959 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2960 prj-env.adb: Implement inheritance of naming exceptions in extending
2963 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
2965 * gnatls.adb: Display simple message instead of content of
2968 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2970 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2971 access discriminant and anonymous access component scopes.
2972 (Inherit_Component): Reuse the itype of an access discriminant
2973 or anonymous access component by copying it in order to set the proper
2974 scope. This is done only when the parent and the derived type
2975 are in different scopes.
2976 (Set_Anonymous_Etype): New routine.
2978 2011-09-01 Robert Dewar <dewar@adacore.com>
2980 * a-convec.adb: Minor reformatting throughout.
2982 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2984 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2985 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2986 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2987 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2988 CPU_SET_S respectively because we are now using dynamically allocated
2989 CPU sets which are more portable across different glibc versions.
2990 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2991 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2992 masks dynamically according to the number of processors in the target
2994 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2995 respectively, so we need to pass the size of the masks as
2997 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2998 created cpu_set_t masks
2999 with the number of processors available in the target platform,
3000 instead of static bit arrays. It enhances portability because
3001 it uses the information from the target platform.
3002 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
3003 are using a restricted run-time library, use the flag
3004 Configurable_Run_Time_Mode instead of Restricted_Profile.
3006 2011-09-01 Vincent Celier <celier@adacore.com>
3008 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
3009 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
3011 2011-09-01 Nicolas Roche <roche@adacore.com>
3013 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
3014 on VxWorks in kernel mode.
3016 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3018 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
3019 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
3020 directly the bit array.
3021 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
3022 the linux macros with the same name.
3023 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
3024 wrappers around the CPU_ZERO and CPU_SET linux macros.
3026 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3028 * exp_ch7.adb (Find_Insertion_List): Removed.
3029 (Process_Transient_Objects): Insert the declarations of the hook
3030 access type and the hook object before the associated transient object.
3032 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3034 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
3035 package System.Aux_Dec when using restricted run-time libraries which
3036 do not have this package.
3038 2011-09-01 Tristan Gingold <gingold@adacore.com>
3040 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
3042 2011-09-01 Bob Duff <duff@adacore.com>
3044 * sem_attr.adb (Analyze_Access_Attribute): Do not call
3045 Kill_Current_Values for P'Unrestricted_Access, where P is library level
3047 2011-09-01 Thomas Quinot <quinot@adacore.com>
3049 * exp_ch5.adb: Minor reformatting
3050 * gnat_ugn.texi: Fix minor typos.
3051 * gcc-interface/Make-lang.in: Update dependencies.
3053 2011-09-01 Robert Dewar <dewar@adacore.com>
3055 * inline.adb, sem_aggr.adb: Minor reformatting.
3057 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3059 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
3061 2011-09-01 Robert Dewar <dewar@adacore.com>
3063 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
3065 2011-09-01 Bob Duff <duff@adacore.com>
3067 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
3068 body" the same as "in inlined body", because visibility shouldn't
3071 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
3073 * inline.adb (Add_Inlined_Body): Refine previous change.
3075 2011-09-01 Gary Dismukes <dismukes@adacore.com>
3077 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
3078 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3079 Test for case where call
3080 initializes an object of a return statement before testing for
3081 a constrained call, to ensure that all such cases get handled
3082 by simply passing on the caller's parameters. Also, in that
3083 case call Needs_BIP_Alloc_Form to determine whether to pass on
3084 the BIP_Alloc_Form parameter of the enclosing function rather
3085 than testing Is_Constrained. Add similar tests for the return
3086 of a BIP call to later processing to ensure consistent handling.
3087 (Needs_BIP_Alloc_Form): New utility function.
3088 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
3089 a BIP_Alloc_Form formal with call to new utility function
3090 Needs_BIP_Alloc_Form.
3092 2011-09-01 Pascal Obry <obry@adacore.com>
3094 * prj-part.adb: Minor reformatting.
3096 2011-09-01 Vincent Celier <celier@adacore.com>
3098 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
3099 half character in the unit name.
3101 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3103 * exp_ch4.adb: Minor code and comment reformatting.
3105 2011-09-01 Thomas Quinot <quinot@adacore.com>
3107 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
3108 for Is_Limited_Type and Is_Tagged_Type in condition checking
3109 for by-reference type.
3110 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
3111 subprograms may have a completion because of a previous
3112 Inline_Always clause, but the enclosing package must be marked
3113 inlined for the subprogram body to become visible to the backend.
3115 2011-09-01 Thomas Quinot <quinot@adacore.com>
3117 * sem_aux.adb, exp_ch4.adb: Minor reformatting
3119 2011-09-01 Pascal Obry <obry@adacore.com>
3121 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
3123 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3125 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
3126 the formals of a subprogram stub that acts as a spec.
3128 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3130 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
3131 type, declare a renaming for it, not an object declaration.
3133 2011-09-01 Yannick Moy <moy@adacore.com>
3135 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
3136 Ignore_Errors to ignore failures to read ALI files when True.
3138 2011-09-01 Javier Miranda <miranda@adacore.com>
3140 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
3141 constructor calls associated with non-tagged record types.
3143 2011-09-01 Robert Dewar <dewar@adacore.com>
3145 * g-socthi-vms.adb: Minor reformatting.
3147 2011-09-01 Nicolas Roche <roche@adacore.com>
3149 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
3150 in order to avoid impact of imcompatible changes.
3151 * cstreams.c: Likewise
3153 * aux-io.c: Likewise
3155 2011-09-01 Yannick Moy <moy@adacore.com>
3157 * lib-writ.adb (Write_With_Lines): Always output complete information
3158 on "with" line in Alfa mode, as this is required by formal verification
3161 2011-09-01 Tristan Gingold <gingold@adacore.com>
3163 * g-socthi-vms.adb: Add comments.
3165 2011-09-01 Pascal Obry <obry@adacore.com>
3167 * prj.ads: Minor reformatting.
3169 2011-09-01 Vincent Celier <celier@adacore.com>
3171 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
3172 exceptions in the config pragmas file.
3174 2011-09-01 Tristan Gingold <gingold@adacore.com>
3176 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
3178 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3180 * exp_ch7.adb (Find_Insertion_List): New routine.
3181 (Process_Transient_Objects): Add code to handle the abnormal
3182 finalization of a controlled transient associated with a subprogram
3183 call. Since transients are cleaned up right after the associated
3184 context, an exception raised during a subprogram call may bypass the
3187 2011-09-01 Robert Dewar <dewar@adacore.com>
3189 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3192 2011-09-01 Robert Dewar <dewar@adacore.com>
3194 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3196 2011-09-01 Robert Dewar <dewar@adacore.com>
3198 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3200 2011-09-01 Thomas Quinot <quinot@adacore.com>
3202 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3203 GNATRTL_NONTASKING_OBJS.
3205 2011-09-01 Robert Dewar <dewar@adacore.com>
3207 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3208 possibility of this flag being set for formals in Ada 2012 mode.
3209 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3211 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3213 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3215 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3218 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3220 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3221 insertion node in a tree of nested Expression_With_Actions nodes.
3222 (Process_Transient_Object): In the case where a complex if statement
3223 has been converted into nested Expression_With_Actions nodes, the
3224 "hook" object and the associated access type must be inserted before
3225 the top most Expression_With_Actions.
3227 2011-09-01 Robert Dewar <dewar@adacore.com>
3229 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3230 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3232 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3234 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3236 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3238 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3240 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3241 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3242 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3243 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3244 Dispatching_Domains_Frozen): Move this local data to package
3245 System.Tasking because with the CPU aspect we need to have access
3246 to this data when creating the task in System.Tasking.Stages.Create_Task
3247 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3248 Move these variables from the body of
3249 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3250 we need to have access to this data when creating the task in
3251 System.Tasking.Stages.Create_Task.
3252 * s-taskin.adb (Initialize): Signal the allocation of the environment
3253 task to a CPU, if any, so that we know whether the CPU can be
3254 transferred to a different dispatching domain.
3255 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3256 is being allocated belongs to the dispatching domain where the task
3257 lives. Signal the allocation of the task to a CPU, if any, so that we
3258 know whether the CPU can be transferred to a different dispatching
3261 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3263 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3264 attributes Same_Storage and Overlaps_Storage.
3266 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3268 * exp_strm.adb: Remove with and use clause for Opt.
3269 (Build_Array_Input_Function): Remove the version-dependent generation
3270 of the return statement. The Ada 2005 tree is now the default.
3272 2011-09-01 Yannick Moy <moy@adacore.com>
3274 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3275 it is never empty when compiling in Alfa mode.
3277 2011-09-01 Robert Dewar <dewar@adacore.com>
3279 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3280 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3281 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3282 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3284 2011-09-01 Matthew Heaney <heaney@adacore.com>
3286 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3287 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3288 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3289 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3290 unbounded queue container.
3291 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3292 bounded queue container.
3293 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3294 unbounded priority queue container.
3295 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3296 bounded priority queue container.
3298 2011-08-31 Pascal Obry <obry@adacore.com>
3300 * a-direct.adb: Do not try to create an UNC path on Windows.
3301 (Create_Path): Skip leading computer name in UNC path if any.
3303 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3305 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3306 version-dependent generation of the return statement. The Ada 2005 tree
3309 2011-08-31 Thomas Quinot <quinot@adacore.com>
3311 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3312 types Stream_Element_Offset and Storage_Offset have a different native
3313 type depending on whether the platform is 32 or 64 bits. When
3314 exchanging them, always convert to 64 bits.
3316 2011-08-31 Yannick Moy <moy@adacore.com>
3318 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3319 --force-alfa to gnat2why.
3321 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3323 * sem_ch12.adb (Save_References): If the node has aspects, save
3324 references within the corresponding expressions in a separate step,
3325 because the aspects are not directly in the tree for the declaration
3326 to which they belong.
3328 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3330 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3331 in CodePeer mode, since representation clauses are partially ignored.
3332 * gcc-interface/Make-lang.in: Update dependencies.
3334 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3336 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3337 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3338 to any dispatching domain.
3340 2011-08-31 Thomas Quinot <quinot@adacore.com>
3342 * exp_ch4.adb: Minor reformatting.
3344 2011-08-31 Bob Duff <duff@adacore.com>
3346 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3347 on nodes for which it is not defined.
3348 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3351 2011-08-31 Bob Duff <duff@adacore.com>
3353 * sem_ch3.adb (Process_Full_View): Disable legality check if
3354 In_Instance, to avoid spurious errors.
3355 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3356 if In_Instance, to avoid spurious errors.
3358 2011-08-31 Pascal Obry <obry@adacore.com>
3360 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3361 directory speparators.
3362 (Compose): Use Dir_Seps to handle both forms.
3363 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3365 (Extension): Use Dir_Seps to handle both forms.
3367 2011-08-31 Pascal Obry <obry@adacore.com>
3369 * prj-conf.adb: Minor reformatting.
3371 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3373 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3374 dispatching domain aspect.
3375 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3377 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3378 Dispatching_Domain aspect in a similar way as we do for the Priority
3380 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3381 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3383 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3384 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3385 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3386 Dispatching_Domain and add it to the task definition.
3387 (Sig_Flags): Add Pragma_Dispatching_Domain.
3388 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3389 support to find the types Dispatching_Domain and
3390 Dispatching_Domain_Access.
3391 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3392 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3393 query the availability of a pragma Dispatching_Domain.
3394 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3395 the expander to pass the Dispatching_Domain when creating a task.
3396 (Name_Dispatching_Domain): Add this new name for a pragma.
3397 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3398 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3399 task has been allocated at creation time.
3400 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3401 Ravenscar is always null.
3402 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3403 the task has been allocated at creation time.
3404 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3405 a specific dispatching domain.
3406 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3407 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3408 and CPU are specified for the task, and the CPU value is not contained
3409 within the range of processors for the domain.
3411 2011-08-31 Vincent Celier <celier@adacore.com>
3413 * make.adb (Original_Gcc) : New constant String_Access.
3414 (Gnatmake): For VM targets, do not use VM version of the compiler if
3415 --GCC= has been specified.
3417 2011-08-31 Thomas Quinot <quinot@adacore.com>
3419 * sem_ch5.adb: Minor reformatting.
3421 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3423 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3426 2011-08-31 Bob Duff <duff@adacore.com>
3428 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3429 the access type is private; we don't care about privacy in expansion.
3431 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3433 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3434 subcomponents tnat may be limited, because they originate in view
3435 conflicts. If the original aggregate is legal and the actuals are
3436 legal, the aggregate itself is legal.
3438 2011-08-31 Matthew Heaney <heaney@adacore.com>
3440 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3443 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3445 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3448 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3450 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3451 Interrupt_Priority aspects, force the analysis of the aspect expression
3452 (when building the equivalent pragma). Otherwise, its analysis is done
3453 too late, after the task or protected object has been created.
3454 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3455 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3456 to the object declaration because they are needed in the type
3459 2011-08-31 Robert Dewar <dewar@adacore.com>
3461 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3462 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3465 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3467 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3468 if the corresponding type is malformed due to restriction violations.
3470 2011-08-31 Robert Dewar <dewar@adacore.com>
3472 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3474 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3476 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3477 would cause the generation of Set_Finalize_Address if the target is a
3478 VM and the designated type is not derived from [Limited_]Controlled.
3480 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3482 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3484 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3485 case of a compilation error.
3487 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3489 * init.c (__gnat_error_handler): Standardize the stack overflow or
3490 erroneous memory access message.
3491 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3492 or erroneous memory access message.
3494 2011-08-31 Robert Dewar <dewar@adacore.com>
3496 * sem_ch4.adb: Minor reformatting.
3497 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3499 2011-08-31 Thomas Quinot <quinot@adacore.com>
3501 * scos.ads: Minor documentation clarification.
3502 * put_scos.adb: Do not generate SCO unit header line for a unit that
3505 2011-08-31 Robert Dewar <dewar@adacore.com>
3507 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3509 2011-08-31 Tristan Gingold <gingold@adacore.com>
3511 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3512 hold variables between these following subprograms.
3513 (Build_Exception_Handler, Build_Object_Declarations,
3514 Build_Raise_Statement): Use the above type as parameter.
3515 Make the above adjustments.
3516 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3518 2011-08-31 Pascal Obry <obry@adacore.com>
3520 * projects.texi: Minor reformatting.
3522 2011-08-31 Tristan Gingold <gingold@adacore.com>
3524 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3525 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3527 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3529 * exp_ch5.adb: Minor code cleanup.
3530 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3531 prevent cascaded errors.
3532 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3533 variable of an iterator specification in current scope.
3534 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3535 postconditions on the stack, as they contain no return statements.
3537 2011-08-31 Yannick Moy <moy@adacore.com>
3539 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3540 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3541 call Qualify_Entity_Names.
3542 (Expand_Alfa): call Qualify_Entity_Names in more cases
3543 * lib-xref-alfa.adb: Take into account system package.
3544 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3545 CodePeer mode in which we are interested in finding bugs even if
3546 compiler cannot compile source.
3547 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3550 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3552 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3553 denoted by the subtype mark to ensure getting the concurrent type in
3554 the case where the subtype mark denotes a private subtype of a
3555 concurrent type (needed when using -gnatc).
3556 (Process_Subtype): For the processing specific to type kinds, case on
3557 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3558 subtype denotes a private subtype whose base type is nonprivate (needed
3559 for subtypes of private fulfilled by task types when compiling with
3562 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3564 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3565 late primitives that override interface operations when the full
3566 expander is not active, to avoid blowups in Register_Primitive when
3567 types don't have associated secondary dispatch tables.
3569 2011-08-31 Yannick Moy <moy@adacore.com>
3571 * alfa_test.adb: Code clean up.
3573 2011-08-31 Marc Sango <sango@adacore.com>
3575 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3576 by Comes_From_Source (Original_Node (N)) in order to treat also the
3577 nodes which have been rewritten.
3578 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3579 explicit dereference and slice violation in spark mode on the nodes
3580 coming only from the source code.
3582 2011-08-31 Robert Dewar <dewar@adacore.com>
3584 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3585 lib-xref-alfa.adb: Minor reformatting.
3587 2011-08-31 Matthew Heaney <heaney@adacore.com>
3589 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3591 2011-08-31 Javier Miranda <miranda@adacore.com>
3593 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3594 only for class-wide subprograms conflicting with entities of concurrent
3597 2011-08-31 Matthew Heaney <heaney@adacore.com>
3599 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3602 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3604 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3605 general description of the routine.
3607 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3609 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3610 doubly-linked lists.
3612 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3614 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3615 check is needed for a left-hand side that is a dereference, and the
3616 base type is private without discriminants (whereas the full type does
3617 have discriminants), an extra retrieval of the underlying type may be
3618 needed in the case where the subtype is a record subtype whose base
3619 type is private. Update comments.
3621 2011-08-31 Javier Miranda <miranda@adacore.com>
3623 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3624 found check if there is a class-wide subprogram covering the primitive.
3626 2011-08-31 Yannick Moy <moy@adacore.com>
3628 * sem_res.adb: Further cases where full expansion test is needed,
3629 rather than expansion test.
3631 2011-08-31 Pascal Obry <obry@adacore.com>
3633 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3635 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3637 * exp_ch5.adb: Handle iterators over derived container types.
3639 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3641 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3642 (Has_Anonymous_Master): New routine.
3643 (Set_Has_Anonymous_Master): New routine.
3644 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3645 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3646 (Current_Anonymous_Master): New routine.
3647 (Current_Unit_First_Declaration): Removed.
3648 (Current_Unit_Scope): Removed.
3649 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3650 their objects on a per-unit heterogeneous finalization master.
3652 2011-08-31 Matthew Heaney <heaney@adacore.com>
3654 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3657 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3659 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3662 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3664 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3665 where the actual is an unexpanded call to 'Input.
3667 2011-08-31 Yannick Moy <moy@adacore.com>
3669 * sem_ch4.adb: Code clean up.
3671 2011-08-31 Yannick Moy <moy@adacore.com>
3673 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3675 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3677 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3678 and TSS primitive Finalize_Address if finalization is suppressed.
3679 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3680 primitive Finalize_Address if finalization is suppressed.
3682 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3684 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3685 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3686 sure that the underlying task has already been created before trying
3687 to change its affinity.
3688 (Set_CPU): Use the term processor instead of CPU, as we do in
3691 2011-08-31 Vincent Celier <celier@adacore.com>
3693 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3694 * prj-nmsc.adb (Process_Compiler): Process attribute
3695 Source_File_Switches.
3696 * prj.ads (Language_Config): New name list component
3697 Name_Source_File_Switches.
3698 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3700 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3702 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3703 discriminated component of an actual, expand at once to prevent
3704 ouf-of-order references with generated subtypes.
3706 2011-08-31 Yannick Moy <moy@adacore.com>
3708 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3709 reference to operator in Alfa xrefs.
3711 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3713 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3714 where the parent instance was frozen before the current instance due to
3715 the presence of a source body. Update calls to Insert_After_Last_Decl.
3716 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3717 Update the comment which illustrates the purpose of the routine.
3718 Package instances are now frozen by source bodies which appear after
3719 the instance. This ensures that entities coming from within the
3720 instance are available for use in the said bodies.
3721 (Install_Body): Add code to handle the case where the parent instance
3722 was frozen before the current instance due to the presence of a source
3723 body. Update calls to Insert_After_Last_Decl.
3725 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3727 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3729 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3731 2011-08-31 Yannick Moy <moy@adacore.com>
3733 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3735 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3736 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3737 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3738 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3739 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3740 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3741 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3742 ALFA in Alfa (we dropped acronym).
3743 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3744 operations in a case where it returned previously No_Elist.
3746 2011-08-31 Robert Dewar <dewar@adacore.com>
3748 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3749 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3750 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3751 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3752 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3753 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3756 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3758 * sem_ch12 (Check_Private_View): Revert previous change.
3759 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3760 conversion is in a generic instance.
3762 2011-08-31 Matthew Heaney <heaney@adacore.com>
3764 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3765 * a-chtgbo.adb (Free): Allow 0 as index value.
3767 2011-08-31 Matthew Heaney <heaney@adacore.com>
3769 * a-cborma.adb (Insert): Add comment to explain why no element
3772 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3774 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3775 spec discriminant is already a concurrent type, in which case just use
3776 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3778 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3780 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3781 system-linux-mips.ads, system-linux-mipsel.ads,
3782 system-linux-mips64el.ads, system-linux-ppc64.ads,
3783 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3785 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3787 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3788 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3789 (build_unary_op): Likewise.
3791 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3793 * raise-gcc.c: Do not include coretypes.h and tm.h.
3794 (setup_to_install): Remove test for compiler macro.
3795 * targext.c: Document use for the library.
3796 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3798 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3800 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3801 the expression to the nominal type if the latter is a record type with
3802 a variant part and the type of the former is a record type without one.
3804 2011-08-30 Yannick Moy <moy@adacore.com>
3806 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3807 expansion in Alfa mode.
3808 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3809 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3811 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3812 * sem_res.adb: Ditto.
3813 * gcc-interface/Make-lang.in: Update dependencies.
3815 2011-08-30 Thomas Quinot <quinot@adacore.com>
3817 * g-socket.ads: Minor documentation adjustment.
3819 2011-08-30 Robert Dewar <dewar@adacore.com>
3821 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3823 2011-08-30 Yannick Moy <moy@adacore.com>
3825 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3826 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3827 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3828 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3829 Revert change which introduced files for "light"
3830 expansion, to be replaced by a single file for Alfa expansion.
3832 2011-08-30 Robert Dewar <dewar@adacore.com>
3834 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3835 Minor code reorg/reformatting.
3837 2011-08-30 Yannick Moy <moy@adacore.com>
3839 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3840 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3841 used for testing full expansion, that is active expansion not in the
3842 reduced mode for Alfa
3843 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3844 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3845 of the verbose (Expander_Active and not ALFA_Mode)
3847 2011-08-30 Tristan Gingold <gingold@adacore.com>
3849 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3850 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3851 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3852 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3854 2011-08-30 Gary Dismukes <dismukes@adacore.com>
3856 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3857 access conversions to check that the conversion is a rewritten node,
3858 rather than just having Comes_From_Source set to False, which wasn't
3861 2011-08-30 Robert Dewar <dewar@adacore.com>
3863 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3864 g-socket.ads: Minor reformatting.
3866 2011-08-30 Thomas Quinot <quinot@adacore.com>
3868 * sem_util.adb: Minor reformatting.
3870 2011-08-30 Tristan Gingold <gingold@adacore.com>
3872 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3873 to be compliant with the ABI.
3875 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3877 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3878 of a designated type when the related access type is an actual in an
3879 instance. This ensures that the full view of designated type is
3880 available when inside the body of the instance.
3882 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3884 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3885 in a position to be modified, a slice is treated like an indexed
3888 2011-08-30 Thomas Quinot <quinot@adacore.com>
3890 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3891 field tv_sec in struct timeval.
3893 2011-08-30 Yannick Moy <moy@adacore.com>
3895 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3896 blocks of code doing full expansion, previously only guarded by
3897 Expander_Active, by anding the test that ALFA_Mode is not set
3899 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3901 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3902 add the function to the list of private dependents, for subsequent
3903 legality check on Taft amendment types.
3904 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3905 Private_Dependents, as for other incomplete types.
3906 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3907 Taft-amendment type is used as the return type of a function.
3909 2011-08-30 Javier Miranda <miranda@adacore.com>
3911 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3912 which emits an error by a call to a new routine which report the error.
3913 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3914 entity does not cover an existing interface.
3915 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3917 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3918 protected procedures or entries whose mode is not conformant.
3919 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3920 an error by a call to a new routine which report the error.
3922 2011-08-30 Robert Dewar <dewar@adacore.com>
3924 * gnat_rm.texi: Minor change.
3925 * exp_attr_light.adb: Minor reformatting.
3927 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3929 * sem_ch3.adb: Patch inheritance of aspects in
3930 Complete_Private_Subtype, to avoid infinite loop.
3932 2011-08-30 Javier Miranda <miranda@adacore.com>
3934 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3935 been reported and a subprogram covering an interface primitive is not
3936 found then skip generating the internal entity. Done to avoid crashing
3938 (Check_Abstract_Overriding): Change text of error of wrong formal of
3939 protected subprogram or entry. Done for consistency to emit exactly the
3940 same error reported by Check_Synchronized_Overriding. In addition, the
3941 error is restricted to protected types (bug found working on AI05-0090)
3943 2011-08-30 Yannick Moy <moy@adacore.com>
3945 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3946 expansion in Alfa mode.
3947 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3948 * exp_light.adb, exp_light.ads: New package defining light expansion.
3949 * expander.adb (Expand): Call light expansion in Alfa mode
3950 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3952 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3954 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3955 * gnat1drv.adb (Adjust_Global_Switches): Comment
3957 2011-08-30 Yannick Moy <moy@adacore.com>
3959 * lib-xref-alfa.adb: Minor refactoring.
3961 2011-08-30 Yannick Moy <moy@adacore.com>
3963 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3965 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3966 expansion in Alfa mode.
3967 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3970 2011-08-30 Robert Dewar <dewar@adacore.com>
3972 * debug_a.adb: Update comment.
3974 2011-08-30 Robert Dewar <dewar@adacore.com>
3976 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3977 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3978 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3979 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3981 2011-08-30 Robert Dewar <dewar@adacore.com>
3983 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3986 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3988 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3989 Build_Finalization_Master by supplying an insertion node and enclosing
3990 scope. In its old version, the call did not generate a finalization
3992 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3993 recognize anonymous access-to-controlled components. Rewrite the
3994 machinery which creates finalization masters to service anonymous
3995 access-to-controlled components of a record type. In its current state,
3996 only one heterogeneous master is necessary to handle multiple anonymous
3998 (Freeze_Type): Comment reformatting.
3999 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
4001 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
4002 associates TSS primitive Finalize_Address with either the master itself
4003 or with the internal hash table depending on the mode of operation of
4006 2011-08-30 Javier Miranda <miranda@adacore.com>
4008 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
4009 interface type then do not generate code to compare this component.
4010 Required since they have no components and their equality operator is
4013 2011-08-30 Steve Baird <baird@adacore.com>
4015 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
4016 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
4017 returns the (static) accessibility level of the object. Otherwise, the
4018 same as Type_Access_Level.
4019 (Dynamic_Accessibility_Level): New function; given an expression which
4020 could occur as the rhs of an assignment to a saooaaat (i.e., an
4021 expression of an access-to-object type), return the new value for the
4022 saooaaat's associated Extra_Accessibility object.
4023 (Effective_Extra_Accessibility): New function; same as
4024 Einfo.Extra_Accessibility except that object renames are looked through.
4026 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
4027 (Dynamic_Accessibility_Level): New function; see sem_util.ads
4029 (Effective_Extra_Accessibility): New function; see sem_util.ads
4031 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
4032 (Extra_Accessibility): Update comments.
4033 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
4034 except RM_Size field (which is only for types) is unaffected.
4036 (Extra_Accessibility): Expand domain to allow objects, not just formals.
4037 (Set_Extra_Accessibility): Expand domain to allow objects, not just
4039 (Init_Size): Add assertion that we are not trashing the
4040 Extra_Accessibility attribute of an object.
4041 (Init_Size_Align): Add assertion that we are not trashing the
4042 Extra_Accessibility attribute of an object.
4043 (Init_Object_Size_Align): New procedure; see einfo.ads description.
4044 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
4045 differently for the type of a (non-library-level) saooaaat depending
4046 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
4047 is queried in this set of changes - everything else (in particular,
4048 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
4049 driven off of the setting of the Is_Local_Anonymous_Access attribute.
4050 The special treatment of library-level saooaaats is an optimization,
4051 not required for correctnesss. This is based on the observation that the
4052 Ada2012 rules (static and dynamic) for saooaaats turn out to be
4053 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
4055 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
4056 false for the type of a saooaaat, declare and initialize its
4057 accessibility level object and set the Extra_Accessibility attribute
4058 of the saooaaat to refer to this object.
4059 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
4060 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
4061 calls to Effective_Extra_Accessibility in order to support
4062 renames of saooaaats.
4063 (Expand_N_Type_Conversion): Add new local function,
4064 Has_Extra_Accessibility, and call it when determining whether an
4065 accessibility check is needed.
4066 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
4067 evaluate to True (without raising an exception).
4069 (Expand_N_Assignment_Statement): When assigning to an Ada2012
4070 saooaaat, update its associated Extra_Accessibility object (if
4071 it has one). This includes an accessibility check.
4072 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
4073 a saooaaat, update its Extra_Accessibility object too (if it
4075 (Expand_Call): Replace a couple of calls to Type_Access_Level
4076 with calls to Dynamic_Access_Level to handle cases where
4077 passing a literal (any literal) is incorrect.
4078 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
4079 checks associated with "Saooaat := Some_Object'Access;"; this must
4080 be rejected if Some_Object is declared in a more nested scope
4082 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
4083 assignment to a saooaaat even if Is_Local_Anonymous_Access
4084 returns False for its type (indicating a 2012-style saooaaat).
4086 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
4087 (which is only appropriate for objects, not types) with a call
4088 of Init_Object_Size_Align in order to avoid trashing the
4089 Extra_Accessibility attribute of a rename (the two attributes
4092 (Valid_Conversion) Replace six calls to Type_Access_Level with
4093 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
4094 Ada2012 non-library-level saooaaat, the former returns library level
4095 while the latter returns the (static) accessibility level of the
4096 saooaaat. A type conversion to the anonymous type of a saooaaat
4097 can only occur as part of an assignment to the saooaaat, so we
4098 know that such a conversion must be in a lhs context, so Deepest
4099 yields the result that we need. If such a conversion could occur,
4100 say, as the operand of an equality operator, then this might not
4101 be right. Also add a test so that static accessibilty checks are
4102 performed for converting to a saooaaat's type even if
4103 Is_Local_Anonymous_Access yields False for the type.
4105 2011-08-30 Javier Miranda <miranda@adacore.com>
4107 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
4108 controls generation of a warning associated with late declaration of
4109 dispatching functions. Required to avoid generating spurious
4112 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4114 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
4115 return object has an anonymous access type and the function's type is
4116 a named access type.
4117 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
4118 conversions on implicit conversions, since such conversions can occur
4119 for anonymous access cases due to expansion. Issue error for attempt
4120 to rename an anonymous expression as an object of a named access type.
4121 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
4122 to indicate whether this function should report errors on invalid
4124 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
4125 the expression is of an anonymous access type and the expected type is
4126 a named general access type, rewrite the expression as a type
4127 conversion, unless this is an expression of a membership test.
4128 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
4129 calling of Error_Msg_N on new formal Report_Errs.
4130 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
4131 calling of Error_Msg_NE on new formal Report_Errs.
4132 (Valid_Conversion): Move declaration of this function to the package
4133 spec, to allow calls from membership test processing. For Ada 2012,
4134 enforce legality restrictions on implicit conversions of anonymous
4135 access values to general access types, disallowing such conversions in
4136 cases where the expression has a dynamic accessibility level (access
4137 parameters, stand-alone anonymous access objects, or a component of a
4138 dereference of one of the first two cases).
4139 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
4140 in the context of a named general access expected type.
4141 * exp_ch4.adb Add with and use of Exp_Ch2.
4142 (Expand_N_In): Add processing for membership tests applied to
4143 expressions of an anonymous access type. First, Valid_Conversion is
4144 called to check whether the test is statically False, and then the
4145 conversion is expanded to test that the expression's accessibility
4146 level is no deeper than that of the tested type. In the case of
4147 anonymous access-to-tagged types, a tagged membership test is applied
4149 (Tagged_Membership): Extend to handle access type cases, applying the
4150 test to the designated types.
4151 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
4152 accessibility level, and the actual is a 'Access applied to a current
4153 instance, pass the accessibility level of the type of the current
4154 instance rather than applying Object_Access_Level to the prefix. Add a
4155 ??? comment, since this level isn't quite right either (will eventually
4156 need to pass an implicit level parameter to init procs).
4158 2011-08-30 Bob Duff <duff@adacore.com>
4160 * s-taskin.ads: Minor comment fix.
4162 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4164 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
4165 component and the selector is a dispatching operation, check if it is
4166 a prefixed call before rewriting as a parameterless function call.
4168 2011-08-29 Jakub Jelinek <jakub@redhat.com>
4170 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
4171 tsystem.h into $(RTSDIR) instead of rts.
4173 2011-08-29 Robert Dewar <dewar@adacore.com>
4175 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4177 * gcc-interface/Make-lang.in: Update dependencies.
4179 2011-08-29 Yannick Moy <moy@adacore.com>
4181 * alfa.ads (Name_Of_Heap_Variable): New constant name.
4182 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4183 table to hold dereferences.
4184 (Add_ALFA_Xrefs): Take into account dereferences as special
4185 reads/writes to the variable "HEAP".
4186 (Enclosing_Subprogram_Or_Package): Move subprogram here.
4187 (Generate_Dereference): New procedure to store a read/write dereferencew
4189 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4190 the special "HEAP" var.
4191 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4193 * sem_util.adb (Note_Possible_Modification): Store write dereference
4196 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4198 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4199 ensures that the level of the subpool access type is not deeper than
4200 that of the pool object.
4201 * sem_util.adb (Object_Access_Level): Expand to handle defining
4203 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4204 subpool handle name of a rewritten allocator.
4206 2011-08-29 Robert Dewar <dewar@adacore.com>
4208 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4210 2011-08-29 Thomas Quinot <quinot@adacore.com>
4212 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4213 values, we generate multiple triples of parameters in the TypeCode.
4214 Bump Choice_Index for each such triple so that a subsequent default
4215 choice is associated with the correct index in the typecode.
4217 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4219 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4221 (First, Last): Handle properly an iterator over a null container.
4223 2011-08-29 Bob Duff <duff@adacore.com>
4225 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4226 processing if we run across a node with no Scope. This can happen if
4227 we're with-ing an library-level instance, and that instance got errors
4228 that caused "instantiation abandoned".
4229 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4230 an exception instead of using Assert, so it won't go into an infinite
4231 loop, even when assertions are turned off.
4233 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4235 * a-coorse.adb: Proper handling of empty ordered sets.
4237 2011-08-29 Johannes Kanig <kanig@adacore.com>
4239 * debug.adb: Add comments.
4241 2011-08-29 Thomas Quinot <quinot@adacore.com>
4243 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4246 2011-08-29 Yannick Moy <moy@adacore.com>
4248 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4249 declaration for Itypes in Alfa mode.
4251 2011-08-29 Robert Dewar <dewar@adacore.com>
4253 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4254 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4255 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4258 2011-08-29 Tristan Gingold <gingold@adacore.com>
4260 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4262 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4263 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4266 2011-08-29 Robert Dewar <dewar@adacore.com>
4268 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4270 2011-08-29 Javier Miranda <miranda@adacore.com>
4272 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4273 renamings of formal subprograms when the actual for a formal type is
4276 2011-08-29 Matthew Heaney <heaney@adacore.com>
4278 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4281 2011-08-29 Matthew Heaney <heaney@adacore.com>
4283 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4284 components of record type.
4285 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4288 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4290 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4291 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4294 2011-08-29 Robert Dewar <dewar@adacore.com>
4296 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4299 2011-08-29 Matthew Heaney <heaney@adacore.com>
4301 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4302 components of record type.
4304 2011-08-29 Bob Duff <duff@adacore.com>
4306 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4307 by the termination handler.
4309 2011-08-29 Yannick Moy <moy@adacore.com>
4311 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4312 created in Alfa mode, instead of inserting artificial declarations of
4313 non-Itypes in the tree.
4314 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4315 know if an Itype has a corresponding declaration, as defined in
4318 2011-08-29 Yannick Moy <moy@adacore.com>
4320 * gnat1drv.adb: Minor rewrite.
4322 2011-08-29 Bob Duff <duff@adacore.com>
4324 * s-tasuti.adb (Make_Passive): Work around race condition in
4325 Make_Independent, which can cause Wait_Count to be zero. So instead of
4326 asserting that Wait_Count > 0, and then decrementing it, decrement it
4327 only if Wait_Count > 0.
4328 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4329 should be nonnegative, so declare them Natural instead of Integer.
4331 2011-08-29 Robert Dewar <dewar@adacore.com>
4333 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4334 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4335 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4336 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4337 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4339 2011-08-29 Tristan Gingold <gingold@adacore.com>
4341 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4343 2011-08-29 Vadim Godunko <godunko@adacore.com>
4345 * s-parint.ads: Minor comment clarification.
4347 2011-08-29 Vincent Celier <celier@adacore.com>
4349 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4350 may be used as identifiers.
4352 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4354 * a-coinho.ads: Minor reformating.
4356 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4358 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4359 container of a derived type.
4361 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4363 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4364 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4366 2011-08-29 Pascal Obry <obry@adacore.com>
4368 * exp_disp.adb: Minor comment fix.
4369 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4370 to avoid warnings when compiling with -Wall.
4371 (Make_Disp_Conditional_Select_Body): Likewise.
4372 (Make_Disp_Timed_Select_Body): Likewise.
4374 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4376 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4377 an entity name, generate reference for it.
4379 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4381 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4383 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4384 the class-wide type.
4385 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4387 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4389 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4390 subtype for an object whose type is an unconstrained union.
4392 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4394 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4395 is allowed in a component definition, by AI95-406.
4397 2011-08-29 Matthew Heaney <heaney@adacore.com>
4399 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4401 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4403 * a-except-2005.adb: Alphabetize all routines.
4404 (Triggered_By_Abort): New routine.
4405 * a-except-2005.ads (Triggered_By_Abort): New routine.
4406 * a-except.adb Alphabetize all routines.
4407 (Triggered_By_Abort): New routine.
4408 * a-except.ads (Triggered_By_Abort): New routine.
4409 * exp_ch7.adb: Update all comments involving the detection of aborts in
4411 (Build_Object_Declarations): Do not generate code to detect the
4412 presence of an abort at the start of finalization code, use a runtime
4414 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4416 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4417 allocate a task on a subpool.
4418 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4419 The flag disables all actions related to the maintenance of
4420 Finalize_Address_Table when subpools are not in use.
4421 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4423 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4424 performs costly task locking when subpools are not in use.
4426 2011-08-29 Yannick Moy <moy@adacore.com>
4428 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4429 types and dispatching calls in Alfa mode.
4430 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4431 correspondance between body and spec scopes, to reuse utility functions
4432 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4433 by testing the presence of the library unit for the body
4434 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4435 mode the expansion of accept statements is skipped
4436 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4437 the unique entity corresponding to the one returned by
4438 Unique_Defining_Entity applied to the enclosing declaration of the
4441 2011-08-29 Bob Duff <duff@adacore.com>
4443 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4444 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4445 an alias for pn. ppp is an alias for pt.
4447 2011-08-29 Javier Miranda <miranda@adacore.com>
4449 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4450 aggregate to take a consistent decision on the need to convert into
4451 assignments aggregates that initialize constant objects.
4453 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4455 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4456 Build_Allocate_Deallocate_Proc in order to handle allocation of
4457 non-controlled objects on subpools.
4458 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4459 to be end-user visible.
4460 * s-finmas.adb: Add with and use clause for System.HTable.
4461 Add an instantiation of Simple_HTable which provides a mapping between
4462 the address of a controlled object and the corresponding
4463 Finalize_Address used to clean up the object. The table is used when a
4464 master is operating in heterogeneous mode.
4465 (Attach): Explain why the input node is not verified on being already
4467 (Delete_Finalize_Address): New routine.
4468 (Detach): Add pragma Assert which ensures that a node is already
4470 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4471 since nodes are no longer removed on traversal. Explain why node
4472 detachment is undesirable in this case.
4473 (Get_Finalize_Address): New routine.
4474 (Hash): New routine.
4475 (Is_Empty_List): Removed.
4476 (pm): Renamed to Print_Master. Add output for discriminant
4478 Comment reformatting.
4479 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4480 * s-finmas.ads: Various comments additions / improvements.
4481 Type Finalization_Master has a discriminant which determines the mode of
4483 (Delete_Finalize_Address): New routine.
4484 (Get_Finalize_Address): New routine.
4485 (pm): Renamed to Print_Master.
4486 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4487 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4488 use clause for System.IO.
4489 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4490 Finalize_Address depending on the mode of allocation and the mode of
4492 (Deallocate_Any_Controlled): Remove the relation pair object -
4493 Finalize_Address regardless of the master mode. Add comment explaining
4495 (Detach): Ensure that fields Prev and Next are null after detachment.
4496 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4497 scheme to check whether the list of subpools is empty. There is no
4498 longer need to store the next subpool or advance the current pointer.
4499 (Is_Empty_List): New routine.
4500 (Print_Pool): New routine.
4501 (Print_Subpool): New routine.
4502 * s-stposu.ads: Various comments additions / improvements.
4503 Field Master of type Root_Subpool is now a heterogeneous collection.
4504 (Print_Pool): New routine.
4505 (Print_Subpool): New routine.
4507 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4509 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4510 forms, using aspects of container types.
4511 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4512 Has_Implicit_Dereference flags, that may be set on the partial view.
4513 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4514 container type with an indexing aspect.
4515 (Analyze_Quantified_Expression): Analyze construct with expansion
4516 disabled, because it will be rewritten as a loop during expansion.
4517 (Try_Container_Indexing): The prefix itself may be a container type
4518 with an indexing aspect, as with a vector of vectors.
4519 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4520 the original doamin of iteration, for name capture.
4521 (Analyze_Iterator_Specification): If the domain is an expression that
4522 needs finalization, create a separate declaration for it.
4523 For an iterator with "of" retrieve default iterator info from aspect of
4524 container type. For "in" iterator, retrieve type of Iterate function.
4525 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4526 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4527 analysis, to prevent spurious errors about late attributes.
4528 * sprint.adb: Handle quantified expression with either loop or iterator
4530 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4533 2011-08-29 Vincent Celier <celier@adacore.com>
4535 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4536 Binder or Linker of the main project file.
4538 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4540 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4543 2011-08-29 Yannick Moy <moy@adacore.com>
4545 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4547 2011-08-29 Yannick Moy <moy@adacore.com>
4549 * exp_ch11.adb: Minor expansion of comment.
4551 2011-08-29 Yannick Moy <moy@adacore.com>
4553 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4555 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4557 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4558 interpretation, set the type before resolving the operands, because
4559 legality checks on an exponention operand need to know the type of the
4562 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4564 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4565 cleanups on a master if the instance is within a generic unit.
4566 Complement to the corresponding fix to inline.adb for K520-030.
4568 2011-08-29 Tristan Gingold <gingold@adacore.com>
4570 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4572 * exp_intr.adb: Minor comment fix.
4574 2011-08-29 Bob Duff <duff@adacore.com>
4576 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4577 Delay_Required was used as an uninitialized variable.
4579 2011-08-29 Robert Dewar <dewar@adacore.com>
4581 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4582 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4583 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4585 2011-08-29 Thomas Quinot <quinot@adacore.com>
4587 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4588 Remove unused variables.
4590 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4592 * sem_res.adb: Remove Build_Explicit_Dereference.
4593 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4594 from sem_res.adb, used in analysis of additional constructs.
4595 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4596 expansion of iterators.
4597 (Is_Object_Reference): Recognize variables rewritten as explicit
4598 dereferences in Ada2012.
4599 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4600 Reversible_Iterator names, for expansion of Ada2012 iterators.
4601 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4602 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4603 linked list container.
4604 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4605 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4607 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4609 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4612 2011-08-29 Vincent Celier <celier@adacore.com>
4614 * make.adb (Gnatmake): Get the maximum number of simultaneous
4615 compilation processes after the Builder switches has been scanned, as
4616 there may include -jnn.
4618 2011-08-29 Matthew Heaney <heaney@adacore.com>
4620 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4622 2011-08-29 Tristan Gingold <gingold@adacore.com>
4624 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4625 GNAT_DRIVER_COMMAND_LINE to 255.
4627 2011-08-29 Pascal Obry <obry@adacore.com>
4629 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4630 reformatting and style fix (class attribute casing).
4632 2011-08-29 Yannick Moy <moy@adacore.com>
4634 * exp_ch11.adb: Yet another case where expansion should be common
4635 between CodePeer and Alfa.
4637 2011-08-29 Yannick Moy <moy@adacore.com>
4639 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4641 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4643 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4644 incomplete type and its completion match.
4646 2011-08-29 Yannick Moy <moy@adacore.com>
4648 * exp_ch13.adb: Adjust previous change.
4650 2011-08-29 Robert Dewar <dewar@adacore.com>
4652 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4653 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4656 2011-08-29 Emmanuel Briot <briot@adacore.com>
4658 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4659 initialize aggregated projects.
4661 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4663 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4664 depth of candidates to resolve a potentially spurious ambiguity between
4665 two visible subprograms.
4667 2011-08-29 Yannick Moy <moy@adacore.com>
4669 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4671 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4672 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4675 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4677 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4680 2011-08-29 Thomas Quinot <quinot@adacore.com>
4682 * sem_res.adb: Minor reformatting.
4684 2011-08-29 Johannes Kanig <kanig@adacore.com>
4686 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4688 * gnat1drv.adb (Adjust_Global_Switches): Set
4689 Use_Expressions_With_Actions to False in ALFA mode.
4690 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4693 2011-08-29 Yannick Moy <moy@adacore.com>
4695 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4696 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4697 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4698 tagged types and dispatching calls in Alfa mode.
4700 2011-08-29 Javier Miranda <miranda@adacore.com>
4702 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4703 we do not report an error on an Empty node.
4705 2011-08-29 Geert Bosch <bosch@adacore.com>
4707 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4708 a-nlrear.o and a-nurear.o.
4710 2011-08-29 Robert Dewar <dewar@adacore.com>
4712 * freeze.adb: Minor code reorganization.
4714 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4715 sem_ch6.adb: Minor reformatting
4717 2011-08-29 Tristan Gingold <gingold@adacore.com>
4719 * s-except.ads, s-except.adb: Provide dummy body.
4721 2011-08-29 Yannick Moy <moy@adacore.com>
4723 * sem_warn.adb (Within_Postcondition): Take into account the case of
4724 an Ensures component in a Test_Case.
4726 2011-08-29 Tristan Gingold <gingold@adacore.com>
4728 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4729 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4730 System_Exceptions_Debug
4731 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4732 * a-except.adb: With and use System.Exceptions_Debug instead of
4734 * a-except-2005.adb: Likewise.
4735 * s-assert.adb: Likewise.
4736 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4737 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4738 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4739 s-excdeb. Update dependencies.
4740 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4741 as these no longer need external libraries.
4743 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4745 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4746 exponentiation operator on universal values in a context that requires
4749 2011-08-29 Tristan Gingold <gingold@adacore.com>
4751 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4752 before calling notify_handled_exception.
4753 * a-exextr.adb: Fix comment.
4755 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4757 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4758 Finalize_Address of the access type's finalization master.
4759 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4760 access type's finalization master. Add a guard to prevent
4761 Associated_Storage_Pool from being set on .NET/JVM.
4762 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4763 attribute Finalize_Address of the access type's finalization master.
4764 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4765 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4766 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4768 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4769 use clause for System.IO
4770 (Detach): Relax the assertion, to be reinstated later.
4771 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4772 Relax the assertion on Finalize_Address, to be reinstated later.
4773 (Is_Empty_List): New routine.
4774 (pm): New debug routine.
4775 (Set_Finalize_Address): New routine.
4776 * s-finmas.ads (pm): New debug routine.
4777 (Set_Finalize_Address): New routine.
4778 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4780 2011-08-29 Tristan Gingold <gingold@adacore.com>
4782 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4783 Remove convention C.
4785 2011-08-29 Tristan Gingold <gingold@adacore.com>
4787 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4788 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4789 (Finalize_TCB): Remove its finalization.
4790 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4791 * s-soflin.adb (NT_Exc_Stack): Remove
4792 (Get_Exc_Stack_Addr_NT): Likewise.
4793 (Get_Exc_Stack_Addr_Soft): Likewise.
4794 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4795 (Get_Exc_Stack_Addr): Likewise.
4796 (Get_Exc_Stack_Addr_Soft): Likewise
4797 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4798 (Exc_Stack_Ptr_T): Likewise.
4799 (Private_Data): Remove Exc_Stack_Ptr component.
4801 2011-08-29 Tristan Gingold <gingold@adacore.com>
4803 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4805 2011-08-29 Tristan Gingold <gingold@adacore.com>
4807 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4809 2011-08-29 Geert Bosch <bosch@adacore.com>
4811 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4812 L2_Norm, Swap_Column): New generic subprograms
4813 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4814 L2_Norm, Swap_Column): Implement new subprograms in order to
4815 eliminate dependency on BLAS and LAPACK libraries in
4816 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4817 version. Forward_Eliminate/Back_Substitute can be used to put a
4818 matrix in row echelon or reduced row echelon form using partial
4820 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4821 Swap_Column): Instantiate from System.Generic_Array_Operations.
4822 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4823 (Sqrt): Local function for simple computation of square root without
4824 adding dependencies on Generic_Elementary_Functions.
4825 (Swap): New subprogram to exchange floating point numbers.
4826 (Inverse): Reimplement using Jordan-Gauss elimination.
4827 (Jacobi): New procedure implementing Jacobi's method for computation
4828 of eigensystems, based on Rutishauser's implementation.
4829 (L2_Norm): Implement directly using the inner product.
4830 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4831 decreasing eigenvalue as required by the Ada RM.
4832 (Swap_Column): New helper procedure for Sort_Eigensystem.
4833 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4834 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4837 2011-08-29 Thomas Quinot <quinot@adacore.com>
4839 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4842 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4844 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4845 than the current node.
4846 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4847 Finalization_Master. The list headers have two fields instead of three.
4848 This should fix alignment issue but subpool allocations are now
4849 unusable. Alphabetize subprograms.
4850 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4851 the size of the header when converting the beginning of the object to
4852 a FM_Node. Set the master's Finalize_Address attribute if not already
4854 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4855 header when converting the beginning of the object to a FM_Node.
4857 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4859 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4860 reraise when compiling for CodePeer.
4862 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4864 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4865 now needed by a-convec.adb. Fix warning.
4867 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4869 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4870 processing of TSS routine Finalize_Address when compiling in
4873 2011-08-29 Thomas Quinot <quinot@adacore.com>
4875 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4876 sem_warn.adb: Minor reformatting.
4878 2011-08-29 Emmanuel Briot <briot@adacore.com>
4880 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4881 languages from aggregated projects.
4883 2011-08-29 Yannick Moy <moy@adacore.com>
4885 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4886 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4887 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4888 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4889 for stubs are traversed too when parameter is set
4890 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4891 (Traverse_Declarations_Or_Statements): Do the special traversing for
4892 stubs when required.
4893 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4894 return subprogram or package body from stub.
4895 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4896 stubs without prior subprogram decl.
4898 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4900 * gnat_ugn.texi: Fix typo.
4902 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4904 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4905 which accounts for size vs alignment issues and calculates the size of
4907 (Deallocate_Any_Controlled): Ditto.
4908 (Nearest_Multiple_Rounded_Up): New routine.
4910 2011-08-29 Tristan Gingold <gingold@adacore.com>
4912 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4913 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4914 (Set_Exception_Msg): Ditto.
4915 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4917 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4918 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4919 (Raise_With_Msg): Remove Cleanup_Flag.
4920 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4921 Clean_Flag and Private_Data components.
4923 2011-08-29 Yannick Moy <moy@adacore.com>
4925 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4927 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4928 of an explicitly declared type, so that the base types of the original
4929 type and this generated type are the same, and a "type" (not a subtype
4931 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4932 small" in Alfa mode, like in CodePeer mode.
4933 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4934 clauses in Alfa mode.
4936 2011-08-29 Javier Miranda <miranda@adacore.com>
4938 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4939 function to the package spec.
4940 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4941 internally generated bodies of null procedures locate the internally
4942 generated spec enforcing mode conformance.
4943 (Is_Interface_Conformant): Ensure that the controlling formal of the
4946 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4948 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4949 reject the pragma if it appears to apply to a formal subprogram.
4951 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4953 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4954 inner expression, to prevent double evaluation.
4956 2011-08-29 Tristan Gingold <gingold@adacore.com>
4958 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4960 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4961 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4962 (Raise_Current_Excep): Adjust call.
4963 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4965 2011-08-29 Thomas Quinot <quinot@adacore.com>
4967 * exp_disp.adb: Minor reformatting.
4969 2011-08-29 Tristan Gingold <gingold@adacore.com>
4971 * a-exexpr.adb (Setup_Exception): Removed.
4972 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4973 * a-except.adb (Exception_Propagation): Removed.
4974 * a-except-2005.adb (Setup_Exception): Removed.
4975 (Reraise): Remove call to Setup_Exception.
4976 (Reraise_Occurrence): Ditto.
4977 (Reraise_Occurrence_Always): Ditto.
4978 (Reraise_Occurrence_No_Defer): Ditto.
4979 (Transfer_Occurrence): Ditto.
4980 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4981 (Set_Exception_Msg): Ditto.
4983 2011-08-29 Robert Dewar <dewar@adacore.com>
4985 * a-convec.adb, exp_disp.adb: Minor reformatting.
4987 2011-08-29 Tristan Gingold <gingold@adacore.com>
4989 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4991 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4993 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4994 Exception_Handlers to No_List instead of Empty_List in the case where
4995 there are no handlers.
4997 2011-08-29 Tristan Gingold <gingold@adacore.com>
4999 * gcc-interface/gigi.h (enum standard_datatypes): Add
5000 ADT_reraise_zcx_decl
5001 (reraise_zcx_decl): New macro.
5002 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
5003 (gigi): Set reraise_zcx_decl.
5004 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
5005 (gnat_to_gnu): Handle N_Raise_Statement.
5007 2011-08-29 Robert Dewar <dewar@adacore.com>
5009 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
5010 a-undesu.adb: Minor reformatting.
5012 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5014 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
5015 table, accept an unfrozen untagged component if it is an actual for a
5016 formal incomplete type.
5017 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
5018 provide new iterator forms over vectors.
5019 Introduce type Iterator in package body to implement operations of
5020 Reversible_Iterator interface.
5021 * a-iteint.ads: Make package pure so it is usable with new container
5022 packages, that are categorized Remote_Types.
5024 2011-08-29 Robert Dewar <dewar@adacore.com>
5026 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
5028 2011-08-29 Bob Duff <duff@adacore.com>
5030 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
5031 of <>, because this is the routine that checks for dimensionality
5032 errors (for example, for a two-dimensional array, (others => <>) should
5033 be (others => (others => <>)).
5035 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5037 * impunit.adb: Add new run-time units.
5038 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
5039 s-stposu.ads, s-stposu.adb: Code clean up.
5040 Handle protected class-wide or task class-wide types
5041 Handle C/C++/CIL/Java types.
5042 * s-spsufi.adb, s-spsufi.ads: New files.
5044 2011-08-29 Yannick Moy <moy@adacore.com>
5046 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
5047 library-level subprogram.
5048 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
5050 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
5052 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
5054 * gnat_rm.texi: Update doc for Test_Case pragma.
5056 2011-08-29 Tristan Gingold <gingold@adacore.com>
5058 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
5060 (GCC_Exception_Access): New type.
5061 (Unwind_DeleteException): New imported procedure
5062 (Foreign_Exception): Import it.
5063 (GNAT_GCC_Exception): Simply have the occurrence inside.
5064 (To_GCC_Exception): New function.
5065 (To_GNAT_GCC_Exception): New function.
5066 (GNAT_GCC_Exception_Cleanup): New procedure..
5067 (Propagate_GCC_Exception): New procedure.
5068 (Reraise_GCC_Exception): New procedure.
5069 (Setup_Current_Excep): New procedure.
5070 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
5071 (Unwind_RaiseException): Ditto.
5072 (Unwind_ForcedUnwind): Ditto.
5074 (Begin_Handler): Change type of parameter.
5075 (End_Handler): Ditto. Now delete the exception if still present.
5076 (Setup_Key): Removed.
5077 (Is_Setup_And_Not_Propagated): Removed.
5078 (Set_Setup_And_Not_Propagated): Ditto.
5079 (Clear_Setup_And_Not_Propagated): Ditto.
5080 (Save_Occurrence_And_Private): Ditto.
5081 (EID_For): Add 'not null' constraint on parameter.
5082 (Setup_Exception): Does nothing.
5083 (Propagate_Exception): Simplified.
5084 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
5085 re-raise is not expanded anymore.
5086 * s-except.ads (Foreign_Exception): New exception - placeholder for
5088 * raise-gcc.c (__gnat_setup_current_excep): Declare
5089 (CXX_EXCEPTION_CLASS): Define (not yet used)
5090 (GNAT_EXCEPTION_CLASS): Define.
5091 (is_handled_by): Handle foreign exceptions.
5092 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
5094 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5096 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
5098 2011-08-29 Thomas Quinot <quinot@adacore.com>
5100 * a-synbar-posix.adb: Minor reformatting.
5102 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5104 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
5105 a-exetim-default.ads (Interrupt_Clocks_Supported,
5106 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5107 definitions to be compliant with AI-0171. The target systems do not
5108 support separate account for the execution time of interrupt handlers.
5110 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5112 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
5113 in the barrier to put first the easiest to evaluate (and the one which
5114 will be True more often). More efficient.
5116 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5118 * s-atocou-x86.adb: Fix constraint in machine code insertion.
5120 2011-08-29 Bob Duff <duff@adacore.com>
5122 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
5123 attributes that are now aspects, as specified by AI05-0229-1.
5124 * sem_ch13.adb (Analyze_Aspect_Specifications,
5125 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
5126 pragmas or attribute references, as appropriate.
5128 2011-08-29 Robert Dewar <dewar@adacore.com>
5130 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
5131 a-synbar-posix.ads: Minor reformatting.
5133 2011-08-29 Yannick Moy <moy@adacore.com>
5135 * snames.ads-tmpl: Add name Force.
5137 2011-08-29 Pascal Obry <obry@adacore.com>
5139 * prj-nmsc.adb: Minor reformatting.
5141 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5143 * a-exetim.ads (Interrupt_Clocks_Supported,
5144 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5145 definitions to be compliant with AI-0171.
5147 2011-08-29 Robert Dewar <dewar@adacore.com>
5149 * a-ngelfu.adb: Add comments.
5151 2011-08-29 Geert Bosch <bosch@adacore.com>
5153 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
5154 the closest machine number to Pi / 2.0.
5156 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5158 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
5159 package Ada.Synchronous_Barriers.
5160 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
5161 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
5162 default implementation using protected objects and another one
5163 a-synbar-posix using POSIX barriers as the underlying support.
5164 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
5165 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
5166 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
5167 Clean up dependencies.
5168 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
5170 2011-08-29 Robert Dewar <dewar@adacore.com>
5172 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
5173 exp_dist.adb: Minor code reorganization.
5176 2011-08-29 Thomas Quinot <quinot@adacore.com>
5178 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
5179 primitive operation must support external streaming if it is not a
5180 controlling access result.
5182 2011-08-29 Thomas Quinot <quinot@adacore.com>
5184 * sinfo.ads, sem_ch7.adb: Minor reformatting.
5186 2011-08-29 Bob Duff <duff@adacore.com>
5188 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5189 restriction on allocators, as required by AI05-0013-1.
5190 * restrict.ads: Minor comment fix.
5192 2011-08-29 Tristan Gingold <gingold@adacore.com>
5194 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5195 (To_Jmpbuf_Address): Ditto
5196 (builtin_longjmp): Ditto
5198 2011-08-29 Thomas Quinot <quinot@adacore.com>
5200 * sem_res.adb: Minor reformatting.
5202 2011-08-29 Vincent Celier <celier@adacore.com>
5204 * make.adb (Gnatmake): Move special processing for VM targets after the
5205 call to Get_Target_Parameters.
5207 2011-08-29 Thomas Quinot <quinot@adacore.com>
5209 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5211 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5213 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5214 where an anonymous access discriminant of a limited designated type
5215 appears in a non-immutably limited discriminated type and issue an
5216 error message. Add local variable Desig_T and replace all occurrences
5219 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5221 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5222 implementation is compliant to RM D.15(15/2) after the modification
5223 imposed by AI05-0094-1 (binding interpretation).
5225 2011-08-29 Robert Dewar <dewar@adacore.com>
5227 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5228 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5230 2011-08-29 Thomas Quinot <quinot@adacore.com>
5232 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5233 the scope name, do not report a missing label as a style violation (it
5234 will be diagnosed as an illegality).
5235 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5236 variant records: Get_Enum_Lit_From_Pos already returns a usage
5237 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5238 on Expr in Integer_Literal case so that it can be used by
5241 2011-08-29 Tristan Gingold <gingold@adacore.com>
5243 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5245 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5246 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5248 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5249 Build_Abort_Block_Handler to build the exception handler. Do not
5250 undefer aborts for the Abort_Signal exception handler if back-end
5251 exception mechanism.
5252 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5253 back_end exceptions for all others and abort_signal.
5254 * s-except.ads (ZCX_By_Default): New constant.
5255 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5256 (Raise_Exception_Always): Ditto.
5257 (Raise_From_Signal_Handler): Ditto.
5258 (Raise_With_Location_And_Msg): Ditto.
5259 (Raise_With_Msg): Ditto.
5261 (Reraise_Occurence): Ditto.
5262 (Reraise_Occurrence_Always): Ditto.
5263 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5264 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5266 2011-08-29 Thomas Quinot <quinot@adacore.com>
5268 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5270 2011-08-29 Robert Dewar <dewar@adacore.com>
5272 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5273 Minor code reorganization.
5275 2011-08-29 Bob Duff <duff@adacore.com>
5277 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5278 2012, not just Ada 2005.
5280 2011-08-29 Vincent Celier <celier@adacore.com>
5282 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5283 with a project file or with gprbuid, if -gnatep= is specified, the
5284 builder may need to be invoked with -x.
5286 2011-08-29 Tristan Gingold <gingold@adacore.com>
5288 * a-exexpr-gcc.adb: Minor comment fix.
5290 2011-08-29 Robert Dewar <dewar@adacore.com>
5292 * sem_ch8.adb: Minor reformatting.
5294 2011-08-29 Bob Duff <duff@adacore.com>
5296 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5297 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5298 treating "some" as unreserved in earlier Ada versions. This is now
5299 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5300 rather than Name_Some, since Tok_Some is now recognized as reserved.
5301 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5303 * scans.ads: Minor comment fixes.
5304 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5305 for other language versions.
5306 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5307 treating "some" as unreserved in earlier Ada versions. This is now
5308 handled in Snames.Is_Keyword_Name.
5309 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5311 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5312 unreserved in earlier Ada versions. This is now handled in
5313 Snames.Is_Keyword_Name.
5314 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5315 words as for other language versions.
5316 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5317 Ada 2012, not just Ada 2005.
5319 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5321 * sem_ch13.adb: Additional semantic checks for aspects involved in
5324 2011-08-29 Matthew Heaney <heaney@adacore.com>
5326 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5327 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5328 Container parameter.
5329 (Ancestor_Find): ditto.
5331 2011-08-29 Thomas Quinot <quinot@adacore.com>
5333 * par-endh.adb: Minor reformatting.
5335 2011-08-29 Tristan Gingold <gingold@adacore.com>
5337 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5338 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5339 (Adjust_N_CLeanups_For): Remove.
5340 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5342 (Propgate_Exception): Adjust.
5343 * raise-gcc.c: Add a few static/const.
5344 (Adjust_N_Cleanups_For): Remove declaration.
5345 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5347 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5349 * sem_ch8.adb: Use type of function return when rewriting as object
5352 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5354 * sem_type.adb: Minor reformatting.
5356 2011-08-29 Robert Dewar <dewar@adacore.com>
5358 * makeutl.adb: Minor reformatting.
5360 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5362 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5363 function call of a limited type, the expansion of the renaming is
5364 complicated by the presence of various temporaries and subtypes that
5365 capture constraints of the renamed object.
5366 Rewrite node as an object declaration, whose expansion is simpler.
5367 Given that the object is limited there is no copy involved and no
5370 2011-08-29 Robert Dewar <dewar@adacore.com>
5372 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5373 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5375 2011-08-29 Tristan Gingold <gingold@adacore.com>
5377 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5378 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5379 system-linux-hppa.ads, system-linux-s390.ads,
5380 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5381 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5382 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5383 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5384 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5385 system-solaris-sparc.ads, system-lynxos-x86.ads,
5386 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5387 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5388 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5389 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5390 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5391 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5392 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5393 * opt.ads: Adjust comment.
5394 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5395 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5396 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5398 2011-08-29 Emmanuel Briot <briot@adacore.com>
5400 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5401 file name is specified on the gnatmake or gprbuild command line, and
5402 before we search for that file in the project.
5404 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5406 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5407 used to determine whether a possible interpretation for an overloadable
5408 entity is declared within the current instantiation and should be
5409 included in the candidate set.
5411 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5413 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5415 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5417 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5418 access subtype is access_to_subprogram, when applying checks for
5421 2011-08-29 Matthew Heaney <heaney@adacore.com>
5423 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5424 for sibling when common parent.
5426 2011-08-29 Thomas Quinot <quinot@adacore.com>
5428 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5431 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5433 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5434 for the return type when in ASIS mode.
5436 2011-08-29 Vincent Celier <celier@adacore.com>
5438 * make.adb (Gnatmake): Get the default search dirs, then the target
5439 parameters after getting the Builder switches, as the Builder switches
5440 may include --RTS= and that could change the default search dirs.
5442 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5444 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5445 Make_Final_Call. Move the processing for class-wide types before the
5446 processing for derivations from [Limited_]Controlled.
5447 (Make_Final_Call): Move the processing for class-wide types before the
5448 processing for derivations from [Limited_]Controlled.
5449 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5450 Add code to account for alignments larger than the list header. Add a
5451 comment illustrating the structure of the allocated object + padding +
5453 (Deallocate_Any_Controlled): Add code to account for alignments larger
5454 than the list header.
5456 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5458 * sinfo.ads, sinfo.adb: New node kind
5459 N_Formal_Incomplete_Type_Definition, related flags.
5460 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5461 Parse formal incomplete types.
5462 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5464 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5465 Formal incomplete types do not need completion.
5466 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5467 Validate_Incomplete_Type_Instance): New procedures to handle formal
5469 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5470 that corresponds to a formal incomplete type.
5471 * sprint.adb: Handle formal incomplete type declarations.
5472 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5475 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5477 * a-fihema.ads, a-fihema.adb: Unit removed.
5478 * a-undesu.ads, a-undesu.adb: New unit implementing
5479 Ada.Unchecked_Deallocate_Subpool.
5480 * einfo.adb: Remove Associated_Collection from the node usage.
5481 Add Finalization_Master to the node usage.
5482 (Associated_Collection): Removed.
5483 (Finalization_Master): New routine.
5484 (Set_Associated_Collection): Removed.
5485 (Set_Finalization_Master): New routine.
5486 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5487 Finalization_Master to the output.
5488 * einfo.ads: Remove attribute Associated_Collection and its uses in
5490 Add new attribute Finalization_Master along with its uses in entitites.
5491 (Associated_Collection): Removed along with its pragma import.
5492 (Finalization_Master): New routine along with a pragma import.
5493 (Set_Associated_Collection): Removed along with its pragma import.
5494 (Set_Finalization_Master): New routine along with a pragma import.
5495 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5496 Build_Finalization_Collection with Build_Finalization_Master.
5497 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5498 before the bodies of the predefined routines. Add comment explaining
5499 this. Replace call to Build_Finalization_Collection with
5500 Build_Finalization_Master.
5501 (Freeze_Type): Replace call to Build_Finalization_Collection with
5502 Build_Finalization_Master.
5503 (Make_Finalize_Address_Body): Comment reformatting.
5504 (Make_Predefined_Primitive_Specs): Code reformatting.
5505 (Stream_Operation_OK): Update comment mentioning finalization
5506 collections. Replace RE_Finalization_Collection with
5507 RE_Finalization_Master.
5508 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5509 Associated_Collection with Finalization_Master. Replace call to
5510 Build_Finalization_Collection with Build_Finalization_Master.
5511 (Expand_Allocator_Expression): Replace call to Associated_Collection
5512 with Finalization_Master. Replace call to Set_Associated_Collection with
5513 Set_Finalization_Master. Remove the generation of
5514 Set_Finalize_Address_Ptr.
5515 (Expand_N_Allocator): Replace call to Associated_Collection with
5516 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5517 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5518 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5519 comment on usage. Replace call to Needs_BIP_Collection with
5520 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5521 BIP_Finalization_Master. Update all comments which mention finalization
5522 collections. Replace Associated_Collection with
5523 Finalization_Master. Replace Build_Finalization_Collection with
5524 Build_Finalization_Master.
5525 (BIP_Formal_Suffix): Update BIP_Collection's case.
5526 (Build_Heap_Allocator): Update the related comment. Rename local
5527 variable Collect to Fin_Mas_Id and update its occurrences. Update
5528 comments which mention finalization collections. Replace
5529 Set_Associated_Collection with Set_Finalization_Master.
5530 (Expand_Call): Update the code which detects a special piece of library
5532 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5533 Add_Collection_Actual_To_Build_In_Place_Call with
5534 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5535 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5536 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5537 Add_Collection_Actual_To_Build_In_Place_Call with
5538 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5539 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5540 Add_Collection_Actual_To_Build_In_Place_Call with
5541 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5542 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5543 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5544 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5545 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5546 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5547 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5548 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5549 Replace the call to Associated_Collection with Finalization_Master.
5550 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5551 Update the way finalization master names are generated. Update the
5552 retrieval of the correct access type which will carry the pool and
5554 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5555 (Make_Finalize_Address_Body): Abstract types do not need
5556 Finalize_Address. Code reformatting.
5557 (Make_Finalize_Address_Stmts): Update comment on usage.
5558 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5559 (Process_Declarations): Update comments.
5560 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5561 Build_Finalization_Master. Update associated comment.
5562 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5563 * exp_ch13.adb: Update comments which mention finalization collections.
5564 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5565 with Finalization_Master.
5566 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5567 create calls to routines Allocate_Any_Controlled and
5568 Deallocate_Any_Controlled.
5569 (Find_Finalize_Address): New routine.
5570 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5572 (Requires_Cleanup_Actions): Update the comment on freeze node
5574 * exp_util.ads: Remove comment on generated code for
5575 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5576 is better to simply look in the body.
5577 * freeze.adb (Freeze_All): Update the comment of finalization
5578 collections. Replace the call to Associated_Collection with
5579 Finalization_Master. Replace the call to Build_Finalization_Collection
5580 with Build_Finalization_Master.
5581 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5582 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5584 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5585 Ada.Finalization. Add processing for children of System.Storage_Pools.
5586 * rtsfind.ads: Remove the naming of second level children of
5588 Remove Ada_Finalization_Heap_Management from the list of units.
5589 Remove subtype Ada_Finalization_Child.
5590 Remove the following subprogram entities:
5594 RE_Finalization_Collection
5595 RE_Finalization_Collection_Ptr
5596 RE_Set_Finalize_Address_Ptr
5598 Add the naming of second level children of System.Storage_Pools.
5599 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5601 Add subtype System_Storage_Pools_Child.
5602 Add the following subprogram entities to System.Finalization_Masters:
5604 RE_Finalization_Master
5605 RE_Finalization_Master_Ptr
5607 Add the following subprogram entities to System.Storage_Pools.Subpools:
5609 RE_Allocate_Any_Controlled
5610 RE_Deallocate_Any_Controlled
5611 RE_Root_Storage_Pool_With_Subpools
5615 Move the following subprogram entities from
5616 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5618 RE_Add_Offset_To_Address
5623 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5624 Set_Associated_Collection with Set_Finalization_Master.
5625 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5626 BIP_Finalization_Master is created.
5627 * s-finmas.adb: New unit System.Finalization_Masters.
5628 * s-finmas.ads: New unit System.Finalization_Masters.
5629 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5630 * s-stposu.ads, s-stposu.adb: New unit implementing
5631 System.Storage_Pools.Subpools.
5633 2011-08-29 Bob Duff <duff@adacore.com>
5635 * tbuild.adb: Add assertion.
5637 2011-08-29 Thomas Quinot <quinot@adacore.com>
5639 * s-pooglo.adb: Minor reformatting.
5641 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5643 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5644 an indexed component of a packed array whose element type is a record
5645 with a representation clause different from that of the right-hand
5646 side, generate a temporary to minimuze the number of bit-field
5647 operations generated.
5649 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5651 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5652 declarations, and thus are likely insertion points for actions.
5654 2011-08-29 Bob Duff <duff@adacore.com>
5656 * einfo.ads: Minor comment fix.
5658 2011-08-29 Robert Dewar <dewar@adacore.com>
5660 * frontend.adb, gnat1drv.adb: Minor reformatting.
5662 2011-08-29 Tristan Gingold <gingold@adacore.com>
5664 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5665 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5666 space in front of the header.
5668 2011-08-29 Johannes Kanig <kanig@adacore.com>
5670 * frontend.adb (Frontend): Exit after creating Standard package when
5671 -gnatd.H is present.
5672 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5675 2011-08-29 Robert Dewar <dewar@adacore.com>
5677 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5678 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5679 snames.ads-tmpl: Minor reformatting.
5681 2011-08-29 Philippe Gil <gil@adacore.com>
5683 * prj.adb (Reset_Units_In_Table): New procedure.
5684 Reset units to avoid access to freed memory.
5686 2011-08-29 Thomas Quinot <quinot@adacore.com>
5688 * get_scos.adb: When reading a P statement SCO without a pragma name
5689 (from an older ALI file), ensure that the Pragma_Name component is set
5690 to Unknown_Pragma (not left uninitialized).
5692 2011-08-29 Vincent Celier <celier@adacore.com>
5694 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5695 modified to compute correctly the object path of a SAL project that is
5696 extending another library project.
5697 (Write_Path_File): New procedure.
5698 * makeutl.ads (Directories): New table moved from Buildgpr
5699 (Get_Directories): New procedure moved from Buildgpr
5700 (Write_Path_File): New procedure
5701 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5702 paths before binding SALs, instead of Set_Ada_Paths.
5703 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5705 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5706 (Current_Source_Path_File_Of): New function
5707 (Set_Current_Object_Path_File_Of): New procedure
5708 (Current_Source_Object_File_Of): New function
5709 (Set_Current_Object_Path_File_Of): New procedure
5710 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5711 (Current_Source_Path_File_Of): New function
5712 (Set_Current_Object_Path_File_Of): New procedure
5713 (Current_Source_Object_File_Of): New function
5714 (Set_Current_Object_Path_File_Of): New procedure
5716 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5718 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5719 packed entity, use a bit-field assignment only if there is no change of
5722 2011-08-29 Thomas Quinot <quinot@adacore.com>
5724 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5725 Is_RTU instead of using Chars comparisons.
5727 2011-08-29 Thomas Quinot <quinot@adacore.com>
5729 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5730 temporary object if the actual is constrained, and the discriminants
5731 read from the stream don't match.
5733 2011-08-29 Tristan Gingold <gingold@adacore.com>
5735 * sem_attr.adb, exp_attr.adb: Add handling of
5736 Attribute_System_Allocator_Alignment
5737 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5738 Attribute_System_Allocator_Alignment.
5739 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5740 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5741 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5742 get_target_system_allocator_alignment.
5744 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5746 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5749 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5751 * exp_ch3.adb (In_Runtime): Fix typo.
5753 2011-08-29 Bob Duff <duff@adacore.com>
5755 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5757 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5759 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5760 and a separate tag assignment is generated, ensure that the tag
5761 assignment is analyzed.
5763 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5765 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5766 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5767 of statement lists that may contain local declarations.
5768 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5769 duplicate the triggering statements needed for the expansion of this
5770 construct, when the trigger is a dispatching call to a synchronized
5773 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5775 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5776 * bindgen.adb: Add comments.
5777 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5780 2011-08-29 Robert Dewar <dewar@adacore.com>
5782 * exp_attr.adb: Minor reformatting.
5783 Minor code reorganization and commenting.
5784 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5787 2011-08-29 Thomas Quinot <quinot@adacore.com>
5789 * get_scos.adb: Ignore chaining indicators not currently supported
5792 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5794 * system.ads: Minor editing.
5796 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5798 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5800 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5801 Attribute_Elab_Subp_Body.
5802 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5803 * sem_util.adb: Update comments.
5805 2011-08-29 Thomas Quinot <quinot@adacore.com>
5807 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5808 pragma name for each SCO statement corresponding to a pragma.
5810 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5812 * opt.ads: Minor editing.
5814 2011-08-29 Yannick Moy <moy@adacore.com>
5816 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5817 that only made sense for CodePeer mode.
5819 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5821 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5822 which is no longer used.
5823 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5824 handling of the 64-bit division check.
5825 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5827 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5830 2011-08-29 Thomas Quinot <quinot@adacore.com>
5832 * get_scos.adb: Minor reformatting.
5834 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5836 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5837 statement list is wrapped in a block, the block is explicitly analyzed
5838 in order to properly redecorate the entities and create a servicing
5841 2011-08-29 Tristan Gingold <gingold@adacore.com>
5843 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5844 (Set_Zero_Cost_Handling): Remove.
5846 2011-08-29 Thomas Quinot <quinot@adacore.com>
5848 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5850 2011-08-29 Geert Bosch <bosch@adacore.com>
5852 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5853 instruction, as the latter may produce -0.0, which is not a valid VAX
5855 (Neg_G): Likewise for VAX F float.
5857 2011-08-29 Robert Dewar <dewar@adacore.com>
5859 * exp_util.adb: Minor reformatting.
5861 2011-08-29 Yannick Moy <moy@adacore.com>
5863 * sem_ch3.adb: Minor comment update.
5865 2011-08-29 Thomas Quinot <quinot@adacore.com>
5867 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5870 2011-08-29 Thomas Quinot <quinot@adacore.com>
5872 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5873 current statement sequence on a generic instantiation or a subprogram
5876 2011-08-29 Robert Dewar <dewar@adacore.com>
5878 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5881 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5883 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5884 Correct the check which involves the freeze node of a controlled or
5885 access-to-controlled type.
5887 2011-08-29 Geert Bosch <bosch@adacore.com>
5889 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5891 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5894 2011-08-29 Yannick Moy <moy@adacore.com>
5896 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5897 for every index type and component type that is not a subtype_mark.
5898 (Process_Subtype): Set Etype of subtype.
5900 2011-08-29 Robert Dewar <dewar@adacore.com>
5902 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5903 reorganization. Minor reformatting.
5905 2011-08-29 Steve Baird <baird@adacore.com>
5907 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5908 for CodePeer and ALFA modes.
5910 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5912 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5913 that comes from an enclosing scope if it is not the renaming of an
5914 actual, to handle properly a spurious ambiguity in an instance.
5916 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5918 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5919 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5920 use it instead of the Esize of the first parameter.
5921 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5923 <Size>: Likewise. Call it for composite types on the RM size.
5925 2011-08-29 Yannick Moy <moy@adacore.com>
5927 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5928 * sem_util.adb (Unique_Name): Correct behaviour for names of
5931 2011-08-29 Yannick Moy <moy@adacore.com>
5933 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5934 verification mode, analyze pragma expression for correctness, for
5935 pre/post on library-level subprogram, as it is not expanded later.
5937 2011-08-29 Yannick Moy <moy@adacore.com>
5939 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5940 in formal verification.
5942 2011-08-29 Thomas Quinot <quinot@adacore.com>
5944 * sem_util.adb: Minor reformatting.
5945 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5947 * par_sco.ads, par_sco.adb: Update comments.
5949 2011-08-29 Yannick Moy <moy@adacore.com>
5951 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5952 associated getter/setter.
5953 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5955 2011-08-29 Vincent Celier <celier@adacore.com>
5957 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5958 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5959 with declarations for Language_Kind and Dependency_Kind for Ada.
5960 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5961 (Process_Compiler): Take into account the new attributes Dependency_Kind
5963 (Check_Configuration): Check if language kind is unit based, not if the
5964 language name is Ada.
5965 (Process_Exceptions_Unit_Based): Ditto
5966 (Add_Language): Remove default additions of language and dependency kind
5967 * prj.ads: Minor comment change
5968 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5970 2011-08-29 Johannes Kanig <kanig@adacore.com>
5972 * debug.adb: Update comments.
5974 2011-08-24 Joseph Myers <joseph@codesourcery.com>
5976 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5977 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5978 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5979 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5980 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5982 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5984 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5985 (GNATLIBCFLAGS_FOR_C): Replace
5986 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5987 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5988 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5989 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5991 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5993 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5995 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5997 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5999 2011-08-05 Nicolas Roche <roche@adacore.com>
6001 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
6002 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
6004 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
6006 2011-08-05 Matthew Heaney <heaney@adacore.com>
6008 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
6009 subprogram bodies declared out-of-order.
6011 2011-08-05 Yannick Moy <moy@adacore.com>
6013 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
6014 entities directly in package Standard, otherwise skip the standard
6017 2011-08-05 Robert Dewar <dewar@adacore.com>
6019 * a-cbmutr.adb: Minor reformatting
6020 (Allocate_Node): refactor node allocation algorithm
6022 2011-08-05 Robert Dewar <dewar@adacore.com>
6024 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
6025 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
6027 (Analyze_Pragma, case Check_Policy): Ditto.
6028 * sem_prag.ads (Check_Disabled): New function
6029 * snames.ads-tmpl: Add Name_Disable.
6031 2011-08-05 Robert Dewar <dewar@adacore.com>
6033 * gnat_rm.texi: Document implementation-defined policy DISABLE for
6034 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
6036 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6038 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
6039 that appears in a generic formal part and applies to a formal
6042 2011-08-05 Robert Dewar <dewar@adacore.com>
6044 * a-cbmutr.ads: Minor reformatting.
6046 2011-08-05 Matthew Heaney <heaney@adacore.com>
6048 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
6049 to check count, check sign of value instead.
6050 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
6051 (Copy_Subtree): allocate copy of source element
6052 (Equal_Subtree): compare elements, not access objects
6054 2011-08-05 Vincent Celier <celier@adacore.com>
6056 * gnat_ugn.texi: Fix VMS alternative.
6058 2011-08-05 Thomas Quinot <quinot@adacore.com>
6060 * sem_ch11.adb: Add comment.
6062 2011-08-05 Robert Dewar <dewar@adacore.com>
6064 * exp_util.adb: Minor comment fix.
6066 2011-08-05 Robert Dewar <dewar@adacore.com>
6068 * scng.adb (Error_Unterminated_String): Improve flag position when
6071 2011-08-05 Matthew Heaney <heaney@adacore.com>
6073 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
6075 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
6076 multiway tree containers.
6078 2011-08-05 Robert Dewar <dewar@adacore.com>
6080 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
6081 * stylesw.adb: Implement -gnatyC to control comment spacing
6082 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
6084 * usage.adb: Add line for -gnatyC.
6086 2011-08-05 Robert Dewar <dewar@adacore.com>
6088 * gnat_ugn.texi: Document -gnatyC.
6089 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
6090 synonym for COMMENTS2).
6092 2011-08-05 Robert Dewar <dewar@adacore.com>
6094 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
6095 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
6096 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
6097 a-comutr.ads, lib-xref.adb: Minor reformatting.
6099 2011-08-05 Robert Dewar <dewar@adacore.com>
6101 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
6102 warning if there is an exception handler present.
6104 2011-08-05 Pascal Obry <obry@adacore.com>
6106 * a-iteint.ads: Fix copyright year.
6108 2011-08-05 Thomas Quinot <quinot@adacore.com>
6110 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
6111 statement SCO for a USE clause or a representation clause.
6113 2011-08-05 Yannick Moy <moy@adacore.com>
6115 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
6116 between body and spec for stub.
6117 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
6118 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
6119 pragma precondition or postcondition, for which the enclosing
6120 subprogram or package in the AST is not the desired one, return empty.
6122 2011-08-05 Thomas Quinot <quinot@adacore.com>
6124 * g-expect.adb: Minor reformatting.
6126 2011-08-05 Bob Duff <duff@adacore.com>
6128 * a-fihema.adb: Comment out OS_Lib.
6130 2011-08-05 Matthew Heaney <heaney@adacore.com>
6132 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
6133 (unbounded multiway tree containers) and a-iteint.ads.
6134 * a-comutr.ads, a-comutr.adb:
6135 This is the new Ada 2012 unit for unbounded multiway tree containers
6136 * a-cimutr.ads, a-cimutr.adb
6137 This is the new Ada 2012 unit for indefinite multiway tree containers
6138 * a-iteint.ads: New file.
6140 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6142 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
6144 2011-08-05 Bob Duff <duff@adacore.com>
6146 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
6148 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
6150 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6152 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
6153 general indexing aspects of Ada2012. Called when analyzing indexed
6154 components when other interpretations fail.
6155 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
6156 in an expression context where overloading is meaningful. This excludes
6157 the occurrence in an aspect specification (efficiency only).
6158 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
6159 related to iterators can be set by an attribute specification, but
6161 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
6162 Constant_Indexing and Variable_Indexing.
6163 (Check_Indexing_Functions): New procedure to perform legality checks.
6164 Additional semantic checks at end of declarations.
6166 2011-08-05 Sergey Rybin <rybin@adacore.com>
6168 * tree_io.ads: Update ASIS_Version_Number because of the change of the
6169 order of calling Tree_Write/Tree_Read routines made for aspects.
6171 2011-08-05 Bob Duff <duff@adacore.com>
6173 * a-fihema.adb (Finalize): Fix race condition.
6175 2011-08-05 Yannick Moy <moy@adacore.com>
6177 * sem_ch12.adb (Analyze_Package_Instantiation,
6178 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6181 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6183 * sem_type.adb (Specific_Type): in an instance, the type-specific
6184 operand of an equality check that involves null may have a private
6185 type. Use full view to determine legality of construct.
6187 2011-08-05 Vincent Celier <celier@adacore.com>
6189 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6190 delete or close the file when the call to gnatmake was successful.
6192 2011-08-05 Yannick Moy <moy@adacore.com>
6194 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6195 Global_Discard_Names.
6197 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6199 * sinfo.ads: comments on use of entity field for aspect specifications.
6201 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6203 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6204 node is not itself an entity but a selected component, it is a
6205 rewritten parameterless call to an en enclosing synchronized operation,
6206 and this expansion will be performed again in the instance, so there is
6207 no global information to preserve.
6209 2011-08-05 Javier Miranda <miranda@adacore.com>
6211 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6212 for renamings of predefined primitives.
6213 (In_Predef_Prims_DT): New subprogram.
6215 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6217 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6218 possible interpretation of name is a reference type, add an
6219 interpretation that is the designated type of the reference
6220 discriminant of that type.
6221 * sem_res.adb (resolve): If the interpretation imposed by context is an
6222 implicit dereference, rewrite the node as the deference of the
6223 reference discriminant.
6224 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6225 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6226 parent type or base type.
6227 * sem_ch4.adb (Process_Indexed_Component,
6228 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6229 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6230 Check for implicit dereference.
6231 (List_Operand_Interps): Indicate when an implicit dereference is
6233 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6235 2011-08-05 Thomas Quinot <quinot@adacore.com>
6237 * scos.ads: Update documentation of SCO table. Pragma statements can now
6238 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6239 * par_sco.ads, par_sco.adb: Implement the above change.
6240 (Process_Decisions_Defer): Generate a P decision for the first parameter
6241 of a dyadic pragma Debug.
6242 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6244 * put_scos.adb: Code simplification based on above change.
6246 2011-08-05 Robert Dewar <dewar@adacore.com>
6248 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6249 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6250 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6251 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6253 2011-08-05 Bob Duff <duff@adacore.com>
6255 * a-stunau.ads, g-spipat.adb: Update comments.
6257 2011-08-05 Bob Duff <duff@adacore.com>
6259 * a-fihema.ads: Minor comment fix.
6260 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6262 (Attach, Detach): Remove some unnecessary code.
6263 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6265 2011-08-05 Bob Duff <duff@adacore.com>
6267 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6268 allocation for Objects component. This simplifies the code somewhat. It
6269 is also a little more efficient in the not-so-unusual case where there
6270 are no controlled objects allocated.
6271 Make Finalization_Started flag atomic.
6272 (Finalize): Avoid unnecessary detachment of items from the list.
6273 (pcol): Minor cleanup.
6275 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6277 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6278 package whose name is the same as that of the generic unit, or its
6281 2011-08-05 Bob Duff <duff@adacore.com>
6283 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6284 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6285 Minor comment fixes.
6287 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6289 * make.adb (Linking_Phase): No longer need to set source search path
6290 before calling gnatlink in CodePeer mode.
6291 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6292 gcc in CodePeer mode, since the binder generated file no longer has a
6294 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6295 * switch-c.adb: Update comment.
6297 2011-08-05 Thomas Quinot <quinot@adacore.com>
6299 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6301 2011-08-05 Nicolas Roche <roche@adacore.com>
6303 * gnat_ugn.texi: Fix minor syntax error issue.
6305 2011-08-05 Vincent Celier <celier@adacore.com>
6307 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6308 delete or close the file when the call to gnatmake returns a non
6309 successful return code.
6311 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6313 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6314 check, indicate that the copy of the original node does not come from
6315 source, to prevent an infinite recursion of the expansion.
6317 2011-08-05 Johannes Kanig <kanig@adacore.com>
6319 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6320 VC generation for subprogram bodies.
6322 2011-08-05 Yannick Moy <moy@adacore.com>
6325 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6326 the base type with the smallest allowed base type.
6328 2011-08-05 Sergey Rybin <rybin@adacore.com>
6330 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6333 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6335 * sem_ch12.ads: minor comment updates.
6337 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6339 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6340 instantiation and a formal package the compiler generates a package
6341 renaming declaration so that the generic name within the declaration
6342 is interpreted as a renaming of the instance. At the end of a formal
6343 package declaration, this renaming must become invisible.
6345 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6347 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6348 comparison and rely on concrete entities instead.
6350 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6352 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6353 and discriminants, to indicate that the type has an access discriminant
6354 that supports implicit dereference.
6355 * snames.ads-tmpl: Add names of aspects and attributes related to
6356 Ada2012 iterators: constant_indexing, default_iterator,
6357 iterator_element, implicit_dereference, variable_indexing.
6358 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6359 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6360 iterator-related aspects.
6361 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6363 2011-08-05 Sergey Rybin <rybin@adacore.com>
6365 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6366 metrics in gnatmetric to cover new kinds of coupling mentrics.
6368 2011-08-05 Steve Baird <baird@adacore.com>
6370 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6371 of calling the user-defined main subprogram.
6372 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6373 is set) Call_Main_Subprogram ahead of, as opposed to
6375 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6376 generation of a "with" of the user-defined main subprogram.
6377 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6378 (which is now called from Gen_Main instead).
6380 2011-08-05 Emmanuel Briot <briot@adacore.com>
6382 * projects.texi: Added reference to the Makefile package.
6384 2011-08-05 Thomas Quinot <quinot@adacore.com>
6386 * exp_ch7.adb: Minor comment rewording.
6388 2011-08-05 Ed Falis <falis@adacore.com>
6390 * env.c: Fix comment.
6392 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6394 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6395 character comparison and rely on concrete entities instead.
6397 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6399 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6400 suggested by AI95-0068.
6402 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6404 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6405 the two potential initialization calls. This accounts for any
6406 access-before-elaboration checks which may precede the initialization
6408 (Next_Suitable_Statement): New routine. Returns the next real statement
6409 after the input node while skipping generated checks.
6410 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6411 with comment on usage.
6412 Do not generate Elaborate_All when the trigger is a finalization call
6413 coming from a type init proc.
6414 (Check_Elab_Call): Propagate the initialization procedure context to
6415 subsequent calls to Check_A_Call.
6416 (Check_Internal_Call_Continue): Propagate the initialization procedure
6417 context to subsequent calls to Check_Elab_Call.
6418 (Is_Finalization_Procedure): New routine. Returns True if the input
6419 entity denotes a [Deep_]Finalize routine.
6420 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6421 along with comment on usage.
6423 2011-08-05 Vadim Godunko <godunko@adacore.com>
6425 * s-atocou.ads: Add list of supported platforms.
6427 2011-08-05 Yannick Moy <moy@adacore.com>
6429 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6431 * opt.ads (Disable_ALI_File): new Boolean flag
6432 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6434 2011-08-05 Ed Falis <falis@adacore.com>
6436 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6437 environ is properly defined.
6439 2011-08-05 Vincent Celier <celier@adacore.com>
6441 * make.adb (Compilation_Phase): Exit immediately when all objects have
6442 been found up to date, to avoid multiple exit messages.
6443 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6444 same project for languages with no compiler.
6445 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6447 2011-08-05 Robert Dewar <dewar@adacore.com>
6449 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6450 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6451 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6452 s-atocou-builtin.adb: Minor reformatting.
6454 2011-08-05 Yannick Moy <moy@adacore.com>
6456 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6457 if the node to wrap is a pragma check, this node and enclosed
6458 expression are not expanded, so do not apply any transformations here.
6459 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6460 introducing transient scopes.
6462 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6464 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6465 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6466 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6467 routine is available, so we use the default implementation of these
6469 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6470 support for copying attributes on VxWorks 6.
6472 2011-08-05 Yannick Moy <moy@adacore.com>
6474 * debug.adb: Remove use of -gnatd.D.
6475 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6476 * opt.ads: Simplify variables for ALFA mode, to keep one only
6477 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6480 2011-08-05 Vincent Celier <celier@adacore.com>
6482 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6483 Builder'Default_Switches.
6485 2011-08-05 Vincent Celier <celier@adacore.com>
6487 * makeusg.adb: Add lines for --create-map-file switches.
6489 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6491 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6492 profile is incomplete and the full view is available, replace it with
6494 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6495 incomplete, freezing the subprogram is delayed until the full view is
6497 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6498 fixed-point multiplication operator and the predefined operator is
6499 resolved in favor of the user-defined one.
6501 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6503 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6506 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6508 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6509 whether a type lacks user-defined Read or Write operations, or has a
6510 component that lacks them.
6511 * sem_attr.adb (Check_Stream_Attribute): if restriction
6512 No_Default_Stream_Attributes is active, verify that all subcomponent
6513 types of the target have user-defined stream operations, and report
6515 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6516 * exp_strm.adb: Build_Elementary_Input_Call,
6517 Build_Elementary_Write_Call): remove checks for restriction
6518 No_Default_Stream_Attributes, now checked in semantics.
6520 2011-08-04 Vincent Celier <celier@adacore.com>
6522 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6523 switches on the command line, look for all valid --RTS switches in the
6524 Builder switches and for each language use the first runtime name found
6525 to invoke gprconfig.
6526 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6527 command line and there is no auto-configuration.
6528 (Runtime_Name_Set_For): New function.
6530 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6532 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6533 elaborate initialization expression for variable Abort when processing
6534 a package body or a declaration.
6535 (Create_Finalizer): Propagate the package context when creating the
6536 exception-related variables.
6537 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6538 For_Package along with usage comment.
6540 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6542 * gcc-interface/Makefile.in: Clean up targets.
6543 Enable new package for atomic counters and copy-on-write implementation
6544 of unbounded strings on x86 platforms.
6545 * gcc-interface/Make-lang.in: Update dependencies.
6547 2011-08-04 Robert Dewar <dewar@adacore.com>
6549 * exp_ch7.adb: Minor reformatting.
6551 2011-08-04 Robert Dewar <dewar@adacore.com>
6553 * exp_strm.adb: Minor reformatting.
6555 2011-08-04 Vadim Godunko <godunko@adacore.com>
6557 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6558 operations are not supported.
6559 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6560 * s-atocou-x86.adb: New file.
6561 * Makefile.rtl: Add s-atocou.o file
6563 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6565 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6566 (Compilation_Phase): ... here.
6567 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6569 2011-08-04 Thomas Quinot <quinot@adacore.com>
6571 * Make-generated.in: Fix minor typo in comment.
6573 2011-08-04 Thomas Quinot <quinot@adacore.com>
6575 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6578 2011-08-04 Robert Dewar <dewar@adacore.com>
6580 * a-coinho.adb: Minor reformatting.
6582 2011-08-04 Robert Dewar <dewar@adacore.com>
6584 * a-coinho.ads: Minor reformatting.
6586 2011-08-04 Vadim Godunko <godunko@adacore.com>
6588 * s-atocou.ads, s-atocou.adb: New files.
6589 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6590 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6591 direct use of GCC's atomic builtins and replace them by use of new
6592 atomic counter package.
6594 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6596 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6598 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6600 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6601 with a call to Get_External_Tag.
6602 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6603 subprogram usage. Remove the guard against package declarations and
6604 bodies since Build_Cleanup_Statements is no longer invoked in that
6606 (Build_Components): Initialize Tagged_Type_Stmts when the context
6607 contains at least one library-level tagged type.
6608 (Build_Finalizer): New local variables Has_Tagged_Types and
6609 Tagged_Type_Stmts along with associated comments on usage. Update the
6610 logic to include tagged type processing.
6611 (Create_Finalizer): Insert all library-level tagged type unregistration
6612 code before the jump block circuitry.
6613 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6614 (Expand_N_Package_Declaration): Remove the call to
6615 Build_Cleanup_Statements.
6616 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6617 unregister the external tag of a tagged type.
6618 (Processing_Actions): Reimplemented to handle tagged types.
6619 (Process_Declarations): Detect the declaration of a library-level
6620 tagged type and carry out the appropriate actions.
6621 (Unregister_Tagged_Types): Removed. The machinery has been directly
6622 merged with Build_Finalizer.
6624 2011-08-04 Robert Dewar <dewar@adacore.com>
6626 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6627 gnatls.adb, exp_ch3.adb: Minor reformatting.
6629 2011-08-04 Marc Sango <sango@adacore.com>
6631 * sem_attr.adb (Analyze_Attribute): Replace the message
6632 "invisible attribute of}" of the spark restriction violation in
6633 attribute reference by the simple message "invisible attribute of type".
6634 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6635 two insertion characters: '&' and '}'.
6637 2011-08-04 Vadim Godunko <godunko@adacore.com>
6639 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6640 * a-coinho.ads, a-coinho.adb: New file.
6641 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6643 2011-08-04 Nicolas Roche <roche@adacore.com>
6645 * alfa_test.adb: Not all ali files are containing alfa information even
6646 if compiled with -gnatd.F. So suppress warning about missing ALFA
6649 2011-08-04 Yannick Moy <moy@adacore.com>
6651 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6653 * put_alfa.adb: Check that scope name is not empty.
6655 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6657 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6658 Needs_Elementary_Stream_Operation, to determine whether user-defined
6659 Read and Write attributes are available for the elementary components
6660 of the given type. If only the predefined attributes are available,
6661 then when restriction No_Default_Stream_Attributes is active the
6662 predefined stream attributes for the composite type cannot be created.
6664 2011-08-04 Robert Dewar <dewar@adacore.com>
6666 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6667 Put routines in alpha order
6669 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6671 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6672 * gcc-interface/Make-lang.in: Update dependencies.
6674 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6676 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6677 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6680 2011-08-04 Robert Dewar <dewar@adacore.com>
6682 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6683 lib-xref-alfa.adb: Minor reformatting.
6685 2011-08-04 Marc Sango <sango@adacore.com>
6687 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6688 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6689 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6692 2011-08-04 Tristan Gingold <gingold@adacore.com>
6694 * bindgen.adb (Gen_Adainit_C): Remove.
6695 (Gen_Adafinal_C): Ditto.
6696 (Gen_Elab_Externals_C): Ditto.
6697 (Gen_Elab_Calls_C): Ditto.
6698 (Gen_Elab_Order_C): Ditto.
6699 (Gen_Elab_Defs_C): Ditto.
6700 (Gen_Finalize_Library_C): Ditto.
6701 (Gen_Finalize_Library_Defs_C): Ditto.
6702 (Gen_Main_C): Ditto.
6703 (Gen_Output_File_C): Ditto.
6704 (Gen_Restrictions_C): Ditto.
6705 (Gen_Versions_C): Ditto.
6706 (Write_Info_Ada_C): Ditto.
6707 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6708 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6709 Always call Gen_Output_File_Ada.
6710 * gnatlink.adb (Begin_Info): Now a constant.
6712 (Ada_Bind_File): Remove
6713 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6714 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6715 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6716 * opt.ads (Ada_Bind_File): Remove.
6718 2011-08-04 Thomas Quinot <quinot@adacore.com>
6720 * projects.texi: Document target-specific directory in default project
6723 2011-08-04 Thomas Quinot <quinot@adacore.com>
6725 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6728 2011-08-04 Yannick Moy <moy@adacore.com>
6730 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6731 opt.ads, lib-xref.ads: Code clean up.
6733 2011-08-04 Yannick Moy <moy@adacore.com>
6735 * gnat_rm.texi: Update description of Test_Case
6736 * gnat_ugn.texi: Typo.
6738 2011-08-04 Ed Falis <falis@adacore.com>
6740 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6742 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6744 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6745 it is of type Root_Controlled. This action eliminates fields Prev and
6746 Next from type equality.
6748 2011-08-04 Yannick Moy <moy@adacore.com>
6750 * lib-xref-alfa.adb: Correct typo.
6752 2011-08-04 Matthew Heaney <heaney@adacore.com>
6754 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6757 2011-08-04 Yannick Moy <moy@adacore.com>
6759 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6760 (Analyze_Pragma): allow static string expression for name of Test_Case,
6761 instead of simply string literals.
6762 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6765 2011-08-04 Vincent Celier <celier@adacore.com>
6767 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6768 case suffixes to find truncated main sources.
6770 2011-08-04 Tristan Gingold <gingold@adacore.com>
6772 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6773 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6774 (Compute_Current_Task): Ditto.
6776 2011-08-04 Tristan Gingold <gingold@adacore.com>
6778 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6780 2011-08-04 Yannick Moy <moy@adacore.com>
6782 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6783 library-level constant.
6784 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6785 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6786 used as selector of parameter association, in ALFA mode.
6788 2011-08-04 Robert Dewar <dewar@adacore.com>
6790 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6791 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6794 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6796 * make.adb (Linking_Phase): Set source search path before calling
6797 gnatlink in CodePeer mode.
6799 2011-08-04 Javier Miranda <miranda@adacore.com>
6801 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6802 Remove code which takes care of building TSDs.
6803 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6804 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6805 the accessibility check in VM targets.
6806 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6807 (Building_Static_DT): Now returns false for VM targets.
6808 (Build_VM_TSDs): Removed.
6809 (Expand_Interface_Conversion): Generate missing runtime check for
6810 conversions to interface types whose target type is unknown at compile
6812 (Make_VM_TSD): Add missing code to disable the generation of calls to
6813 Check_TSD if the tagged type is not defined at library level, or not
6814 has a representation clause specifying its external tag, or -gnatdQ is
6816 * exp_disp.ads (Build_VM_TSDs): Removed.
6817 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6818 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6819 register primitives in the dispatch tables in VM targets.
6820 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6821 initialization of class-wide interface objects in VM targets.
6822 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6825 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6827 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6828 when dotnet-ld cannot be found.
6830 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6832 * bindgen.adb: Simplify significantly generation of binder body file in
6834 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6835 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6838 2011-08-04 Yannick Moy <moy@adacore.com>
6840 * sem_prag.adb, sem.ads: Code cleanup.
6842 2011-08-04 Tristan Gingold <gingold@adacore.com>
6844 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6845 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6846 results if possible.
6847 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6848 * gnat_ugn.texi: Update dynamic stack usage section.
6850 2011-08-04 Steve Baird <baird@adacore.com>
6852 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6853 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6854 contains only a call to the user-defined main subprogram.
6855 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6856 call the "wrapper" subprogram instead of directly
6857 calling the user-defined main subprogram.
6859 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6861 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6862 alternatives of a case statement for controlled objects. Rename local
6863 variable A to Dead_Alt.
6864 (Expand_N_If_Statement): Check the then and else statements of an if
6865 statement for controlled objects. Check the then statements of all
6866 elsif parts of an if statement for controlled objects.
6867 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6869 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6870 detects a loop associated with the expansion of an array object.
6871 Augment the processing of the loop statements to account for a possible
6872 wrap done by Process_Statements_For_Controlled_Objects.
6873 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6874 statements and abortable part of an asynchronous select for controlled
6876 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6877 conditional entry call for controlled objects.
6878 (Expand_N_Selective_Accept): Check the alternatives of a selective
6879 accept for controlled objects.
6880 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6881 alternatives of a timed entry call for controlled objects.
6882 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6883 exception handler for controlled objects.
6884 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6885 Add formal parameter Nested_Constructs along with its associated
6887 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6888 Requires_Cleanup_Actions.
6889 (Process_Statements_For_Controlled_Objects): New routine.
6890 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6891 routine. Inspect a node which contains a non-handled sequence of
6892 statements for controlled objects. If such an object is found, the
6893 statements are wrapped in a block.
6895 2011-08-04 Bob Duff <duff@adacore.com>
6897 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6898 need to compare with Class_Wide_Type (T2), in order to get at the
6899 original class-wide type node.
6900 * sem_type.ads (Covers): Improve the comment.
6901 * einfo.ads (Class_Wide_Type): Improve the comment.
6902 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6903 the type of the Deref.
6905 2011-08-04 Yannick Moy <moy@adacore.com>
6907 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6908 separate declarations.
6909 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6910 check identifier of pragma argument.
6911 (Chain_TC): check that no other test case associated to the same entity
6912 share the same name.
6913 (Check_Test_Case): disallow test case inside subprogram body
6914 (Analyze_Pragma): correct call to check identifier and not argument
6915 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6916 function gets name from test case pragma.
6918 2011-08-04 Yannick Moy <moy@adacore.com>
6920 * gnat_rm.texi: Document new pragma and aspect.
6921 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6922 (No_Duplicates_Allowed): new constant array defining whether duplicates
6923 aspects of each kind can appear on the same declaration.
6924 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6925 field, which points to a node holding the previous Spec_PPC_List.
6926 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6927 through the indirection with Contract.
6928 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6929 * par-prag.adb (Prag): do nothing on Test_Case pragma
6930 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6932 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6933 component Ensures of Test_Case.
6934 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6935 (Analyze_Generic_Subprogram_Declaration,
6936 Analyze_Subprogram_Instantiation,
6937 Analyze_Abstract_Subprogram_Declaration,
6938 Analyze_Subprogram_Body_Helper,
6939 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6940 insert contract in subprogram node at point of definition
6942 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6943 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6944 corresponding pragma
6945 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6946 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6947 similar to the analysis of pre/post
6948 (Derive_Subprogram): insert contract in subprogram node at point of
6950 * sem_prag.adb, sem_prag.ads
6951 (Check_Arg_Is_String_Literal, Check_Identifier):
6952 new checking procedures to be called in treatment of pragmas
6953 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6954 pragma is well-formed. This does not check currently that 'Result is
6955 used only in the Ensures component of a Test_Case.
6956 (Analyze_Pragma): add case for Test_Case
6957 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6958 components of a Test_Case.
6959 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6960 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6961 pragma, treated as spec expressions.
6962 (Sig_Flags): add value -1 for Test_Case.
6963 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6964 Get_Requires_From_Test_Case_Pragma): getters for both expression
6965 components of a Test_Case.
6966 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6967 indirection between an entry or [generic] subprogram entity and its
6968 pre/post + test-cases.
6969 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6970 get/set for fields of an N_Contract node.
6971 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6972 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6973 names and pragma for Test_Case.
6974 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6976 2011-08-04 Vincent Celier <celier@adacore.com>
6978 * gnat_ugn.texi: Improve documentation of gnatmake switch
6979 --source-info-file=.
6981 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6983 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6984 type). Initialize Atyp to the appropriate type which is later checked
6985 for completion. Rewrite the assertion associated with private type
6988 2011-08-04 Ed Falis <falis@adacore.com>
6990 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6991 initialize the number of CPUs.
6993 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6995 * sem_type.adb (Disambiguate): New subsidiary routine
6996 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6997 equality on an anonymous access type whose designated type is private
6998 does not lead to an ambiguity with the universal access equality
6999 operator in the body or child units of the defining package. The same
7000 is true for a multiplication operator on a private type completed with
7003 2011-08-04 Javier Miranda <miranda@adacore.com>
7005 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
7006 (Normalize_Scalars_Config): Removed.
7008 (Register_Opt_Config_Switches): Remove registering config values of
7009 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
7010 (Restore_Opt_Config_Switches): Remove code which restores the values of
7011 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7012 Init_Or_Norm_Scalars.
7013 (Save_Opt_Config_Switches): Remove code which saves values of
7014 Init_Or_Norm_Scalars and Normalize_Scalars.
7015 (Set_Opt_Config_Switches): Remove code which restores config values of
7016 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7017 Init_Or_Norm_Scalars.
7019 2011-08-04 Yannick Moy <moy@adacore.com>
7021 * frontend.adb (Frontend): remove previous patch to avoid full
7022 qualification in ALFA mode.
7023 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
7024 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
7025 unique name for an entity, which could be used to identify the entity
7026 across compilation units.
7028 2011-08-04 Thomas Quinot <quinot@adacore.com>
7031 (Initialize_Default_Project_Path): Add target specific directory
7032 ($prefix/$target/lib/gnat) in front of project path in all cases
7033 (making gnatmake's behaviour consistent with gprbuild).
7034 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
7035 Pass target name from Sdefault to project subsystem.
7036 * gnatls.adb: Show new target specific default project directory.
7038 2011-08-04 Johannes Kanig <kanig@adacore.com>
7040 * cstand.adb: Add Information to Identifier in Standard
7041 (Identifer_For): Set Entity to the corresponding entity
7043 2011-08-04 Sergey Rybin <rybin@adacore.com>
7045 * gnat_ugn.texi: Update doc on gnatcheck.
7047 2011-08-04 Yannick Moy <moy@adacore.com>
7049 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
7052 2011-08-04 Yannick Moy <moy@adacore.com>
7054 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
7055 performing expansion.
7056 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
7057 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
7058 it is not called in ALFA mode.
7060 2011-08-04 Emmanuel Briot <briot@adacore.com>
7062 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
7063 after all, so removed.
7065 2011-08-04 Sergey Rybin <rybin@adacore.com>
7067 * vms_data.ads: Add missing VMS qualifiers.
7069 2011-08-04 Emmanuel Briot <briot@adacore.com>
7071 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
7072 the list of files on the command line after processing it through
7075 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7077 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
7078 processing for .NET/JVM. These targets can now benefit from
7079 Raise_From_Controlled_Operation and they share the same processing with
7081 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
7082 These targets need transient scopes in order to properly finalize short
7083 lived controlled objects.
7084 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
7085 NET/JVM. These targets can now benefit from
7086 Raise_From_Controlled_Operation and they share the same processing with
7089 2011-08-04 Geert Bosch <bosch@adacore.com>
7091 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
7093 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7095 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
7096 Expand_Record_Aggregate, to determine whether aggregate must be
7097 expanded into assignments. This is the case if the ancestor part is
7098 private, regarless of the setting of the flag Has_Private_Ancestor.
7100 2011-08-04 Ed Falis <falis@adacore.com>
7102 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
7104 2011-08-04 Bob Duff <duff@adacore.com>
7106 * sinfo.ads: Fix comment.
7108 2011-08-04 Steve Baird <baird@adacore.com>
7110 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
7111 choose a package name in much the same way as is
7112 done for JGNAT when VM_Target /= No_VM, except that
7113 a slightly more distinctive prefix string is used.
7115 2011-08-04 Emmanuel Briot <briot@adacore.com>
7117 * makeutl.adb (Complete_Mains): no longer accept unit names on the
7118 gnatmake command line.
7119 This behavior was never documented (and was supported only because of
7120 an early bug in the code). This case might lead to ambiguous cases
7121 (between unit names and truncated base names without suffixes).
7123 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7125 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
7126 Remove the external tag of a tagged type from the internal hash table.
7127 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
7128 expanded usage of the routine. Strenghten the check for Is_Master. Add
7129 processing for tagged types.
7130 (Build_Finalizer): Create all the necessary lists used in finalizer
7131 creation when the processed context is a package that may contain
7133 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
7134 Requires_Cleanup_Actions.
7135 (Expand_N_Package_Body): Package bodies may need clean up code
7136 depending on whether they contain tagged types.
7137 (Expand_N_Package_Declaration): Package declarations may need clean up
7138 code depending on whether they contain tagged types.
7139 (Unregister_Tagged_Types): New routine. Search through a list of
7140 declarations or statements, looking for non-abstract Ada tagged types.
7141 For each such type, generate code to unregister the external tag.
7142 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
7143 Requires_Cleanup_Actions.
7144 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
7145 through a list of declarations or statements looking for non-abstract
7146 Ada tagged types or controlled objects.
7147 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
7148 Requires_Cleanup_Actions.
7149 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
7150 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
7153 2011-08-04 Vincent Celier <celier@adacore.com>
7155 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
7156 has Ada sources, not project Project, because if the root project
7157 Project has no sources of its own, all projects will be deemed without
7160 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7162 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
7163 of the No_Param_Proc acc-to-subp type used for initialization of
7164 __gnat_finalize_library_objects so that it's declared at library level
7165 rather than nested inside of the adainit routine.
7167 2011-08-04 Javier Miranda <miranda@adacore.com>
7169 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
7170 if the tagged type has a representation clause which specifies its
7173 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7175 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
7176 Remove previous procedure with that name.
7177 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
7179 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7180 subtype mark, the ancestor cannot have unknown discriminants.
7181 (Resolve_Record_Aggregate): if the type has invisible components
7182 because of a private ancestor, the aggregate is illegal.
7184 2011-08-04 Vincent Celier <celier@adacore.com>
7186 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7187 account switches -gnat2005, -gnat12 and -gnat2012.
7189 2011-08-04 Bob Duff <duff@adacore.com>
7191 * s-tasdeb.ads: Minor comment fix.
7193 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7195 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7197 * switch.ads, switch.adb (Is_Language_Switch): New function.
7199 2011-08-04 Vincent Celier <celier@adacore.com>
7201 * switch-c.adb: Minor comment addition.
7203 2011-08-04 Vincent Celier <celier@adacore.com>
7205 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7206 ending with '=' is followed by a space (missing file name).
7208 2011-08-04 Pascal Obry <obry@adacore.com>
7210 * g-regist.ads: Fix size of HKEY on x86_64-windows.
7212 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7214 * sem_ch12.adb (Analyze_Associations): New routine
7215 Check_Overloaded_Formal_Subprogram to reject a formal package when
7216 there is a named association or a box initialisation for an overloaded
7217 formal subprogram of the corresponding generic.
7219 2011-08-04 Yannick Moy <moy@adacore.com>
7221 * alfa.ads (ALFA_Xref_Record): add component for type of entity
7222 * get_alfa.adb, put_alfa.adb: Read and write new component of
7224 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7226 2011-08-04 Pascal Obry <obry@adacore.com>
7228 * urealp.adb: Minor reformatting.
7230 2011-08-04 Tristan Gingold <gingold@adacore.com>
7232 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7233 Handle the case when Cleanup_Protected_Object returns Empty.
7235 2011-08-04 Yannick Moy <moy@adacore.com>
7237 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7239 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7241 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7242 call, ignore functions.
7244 2011-08-04 Geert Bosch <bosch@adacore.com>
7246 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7249 2011-08-04 Emmanuel Briot <briot@adacore.com>
7251 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7252 as an index for Builder'Switches. This conforms to the documentation.
7253 * make.adb (Insert_Project_Sources): avoid duplicate code
7255 2011-08-04 Emmanuel Briot <briot@adacore.com>
7257 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7258 name on the command line (for instance "../dummy"), never assume it can
7261 2011-08-04 Tristan Gingold <gingold@adacore.com>
7263 * bindgen.adb: Remove code the reference or create the
7264 Break_Start/__gnat_break_start procedure.
7265 * s-stalib.adb (Break_Start): Removed.
7267 2011-08-04 Emmanuel Briot <briot@adacore.com>
7269 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7270 shared with gprbuild.
7272 2011-08-04 Yannick Moy <moy@adacore.com>
7274 * par-ch4.adb (P_Primary): preferentially issue an error message about
7275 a missing parenthesis arount a conditional or case expression in Ada
7276 2012 mode, if we detect that the alignment is not correct for a
7279 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7281 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7282 tag-to-class-wide conversion as needing finalization actions.
7283 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7284 a tag-to-class-wide conversion as needing finalization actions.
7285 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7286 conversion does not need finalization actions.
7287 (Is_Tag_To_CW_Conversion): New routine.
7288 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7289 whether an object is the result of a tag-to-class-wide conversion.
7291 2011-08-04 Yannick Moy <moy@adacore.com>
7293 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7294 the left-hand-side and right-hand-side of a conjunct are inserted when
7295 translating a pre- or postcondition
7296 * sem_ch6.adb: Correct typo in comment
7298 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7300 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7301 Unchecked_Conversion and Unchecked_Deallocation.
7303 2011-08-04 Thomas Quinot <quinot@adacore.com>
7305 * make.adb: Minor reformatting.
7307 2011-08-04 Emmanuel Briot <briot@adacore.com>
7309 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7310 sources in the project and its imported projects, but not in the whole
7313 2011-08-04 Emmanuel Briot <briot@adacore.com>
7315 * make.adb: Remove debug trace.
7317 2011-08-04 Vincent Celier <celier@adacore.com>
7319 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7320 path in canonical form, to be able to compare path names on platforms
7321 such as Windows or Darwin.
7323 2011-08-04 Thomas Quinot <quinot@adacore.com>
7325 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7326 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7327 * scos.ads: Update documentation accordingly.
7328 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7331 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7333 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7334 attribute only if prefix type is scalar.
7336 2011-08-04 Emmanuel Briot <briot@adacore.com>
7338 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7339 in gnatmake for specifying mains on the command line that do not belong
7340 to the main project. These mains must currently all belong to the same
7342 (Ultimate_Extension_Of): removed, since duplicated
7343 Ultimate_Extending_Project.
7345 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7347 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7349 (CodePeer_Mode_String): New.
7350 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7352 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7353 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7354 mode, since no useful elaboration subprogram is needed by CodePeer.
7355 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7356 In this mode, compile binder file with -gnatC and do stop after this
7359 2011-08-04 Vincent Celier <celier@adacore.com>
7361 * exp_ch7.adb: Minor comment fix.
7363 2011-08-04 Robert Dewar <dewar@adacore.com>
7365 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7366 exp_ch4.adb, makeutl.adb: Minor reformatting.
7368 2011-08-04 Emmanuel Briot <briot@adacore.com>
7370 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7371 Create several new subprograms to move code out of Make. This makes the
7372 code more readable, removes code duplication, and is a preparation work
7373 for adding support for aggregate projects.
7375 2011-08-04 Tristan Gingold <gingold@adacore.com>
7377 * s-po32gl.ads, s-po32gl.adb: New files.
7378 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7379 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7380 (Build_Finalization_Collection): Use it.
7381 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7382 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7384 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7385 * gcc-interface/Make-lang.in: Update dependencies.
7387 2011-08-04 Emmanuel Briot <briot@adacore.com>
7389 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7392 2011-08-04 Emmanuel Briot <briot@adacore.com>
7394 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7395 command line is not a file name, also check whether it could be a unit
7398 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7400 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7401 the header of the finalization routine.
7402 If the unit has no finalizer but is a body whose spec has one, then
7403 generate the decrement of the elaboration entity only.
7404 If the unit has a finalizer and is a spec, then do not generate the
7405 decrement of the elaboration entity.
7406 (Gen_Finalize_Library_C): Likewise.
7408 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7410 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7411 (Bounds_Size_Expression): Removed.
7412 (Double_Alignment_Of): New subsidiary routine.
7413 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7414 for a hole in the dope vector of unconstrained arrays due to different
7415 index and element alignments.
7417 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7419 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7420 raise program_error because body has not been seen yet.
7422 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7424 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7427 2011-08-04 Vincent Celier <celier@adacore.com>
7429 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7431 2011-08-04 Yannick Moy <moy@adacore.com>
7433 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7434 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7436 2011-08-04 Thomas Quinot <quinot@adacore.com>
7438 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7439 instantiation in RCI.
7441 2011-08-04 Emmanuel Briot <briot@adacore.com>
7443 * make.adb: Share more code with gprbuild
7445 2011-08-04 Emmanuel Briot <briot@adacore.com>
7447 * projects.texi: Added documentation for the IDE'Gnat project file
7450 2011-08-04 Nicolas Roche <roche@adacore.com>
7452 * gnat_rm.texi: Minor editing.
7454 2011-08-04 Javier Miranda <miranda@adacore.com>
7456 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7457 and the library case for VM targets.
7458 (Gen_Adainit_Ada): Likewise.
7460 2011-08-04 Robert Dewar <dewar@adacore.com>
7462 * g-altive.ads: Minor comment updates.
7463 * prj-nmsc.adb: Minor reformatting.
7465 2011-08-04 Javier Miranda <miranda@adacore.com>
7468 (Normalize_Scalars_Config): Value of the configuration switch set by
7469 pragma Normalize_Scalars when it appears in the gnat.adc file.
7470 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7471 to save and restore settings of this pragma.
7473 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7474 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7476 2011-08-04 Vincent Celier <celier@adacore.com>
7478 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7480 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7482 * makeutl.adb: Minor reformatting.
7484 2011-08-04 Olivier Hainque <hainque@adacore.com>
7486 * g-altive.ads: Update comments to reflect that only the soft
7487 binding is available today.
7489 2011-08-04 Robert Dewar <dewar@adacore.com>
7491 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7492 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7493 * gcc-interface/Make-lang.in: Update dependencies.
7495 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7497 * prj-env.adb: Remove local debug traces.
7499 2011-08-04 Yannick Moy <moy@adacore.com>
7501 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7502 was used instead of Hi_OK, which could cause a read of an uninitialized
7503 value later on. Detected while working on the new warning.
7504 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7506 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7507 in more cases, in order to detect more unreferenced values.
7508 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7509 object for expression, if any.
7511 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7513 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7514 the operand types instead of the Esize.
7516 2011-08-04 Steve Baird <baird@adacore.com>
7518 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7519 enable CodePeer_Mode.
7520 * bindusg.adb (Display): Add help message describing -P binder switch.
7521 * gnat_ugn.texi: Document -P binder switch.
7522 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7523 user-defined main program directly.
7524 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7525 user-defined main program in the context clause of the package body.
7527 2011-08-04 Yannick Moy <moy@adacore.com>
7529 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7530 duplicate of Defining_Entity
7531 (Get_Unique_Entity_For_Decl): rename function into
7532 Unique_Defining_Entity
7533 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7534 (Formal_Proof_On): remove synthesized flag
7535 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7536 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7537 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7538 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7539 Annotate (Formal_Proof)
7541 2011-08-04 Emmanuel Briot <briot@adacore.com>
7543 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7544 source files with non-standard naming schemes, in imported projects
7546 2011-08-04 Emmanuel Briot <briot@adacore.com>
7548 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7549 specified on the gprbuild command line, we need to compile all units
7550 within that file, not just the first one we find
7551 Fix error message for mains that are not found.
7553 2011-08-04 Thomas Quinot <quinot@adacore.com>
7555 * sem_ch6.adb: Update comment.
7556 * sem_ch12.adb: Minor reformatting.
7558 2011-08-04 Bob Duff <duff@adacore.com>
7560 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7561 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7562 race condition whose symptom is to fail to lock Parent. That, in turn,
7563 causes Parent.Awake_Count to be accessed without locking Parent, which
7564 causes another race condition whose symptom is that Parent.Awake_Count
7565 can be off by 1 (either too high or too low). The solution is to lock
7566 Parent unconditionally, and then lock Acceptor, before reading
7567 Acceptor.Terminate_Alternative.
7569 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7571 * debug.adb: Update comment.
7573 2011-08-04 Robert Dewar <dewar@adacore.com>
7575 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7576 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7577 exp_ch6.adb: Minor reformatting.
7579 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7581 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7584 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7586 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7588 2011-08-04 Thomas Quinot <quinot@adacore.com>
7590 * sinfo.ads: Minor reformatting.
7592 2011-08-04 Emmanuel Briot <briot@adacore.com>
7594 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7595 even if there is no location.
7597 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7599 * sem_res.adb, sem_ch4.adb: move check for restriction
7600 No_Task_Hierarchy to resolve_allocator.
7602 2011-08-04 Thomas Quinot <quinot@adacore.com>
7604 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7605 This flag of N_Pragma nodes is not used, remove it as well as all of
7606 the associated circuitry.
7608 2011-08-04 Javier Miranda <miranda@adacore.com>
7610 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7611 runtime check on duplicated externa tags
7612 * debug.adb Document switch -gnatdQ.
7614 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7616 * a-fihema.ads: Minor typo fix.
7618 2011-08-04 Yannick Moy <moy@adacore.com>
7620 * sem_ch10.adb: Minor comment update.
7622 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7624 * einfo.adb: Update the node field usage to reflect the renaming of
7625 Return_Flag to Return_ Flag_Or_Transient_Decl.
7626 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7627 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7628 (Write_Field15_Name): Change Return_Flag to
7629 Return_Flag_Or_Transient_Decl.
7630 * einfo.ads: Rename node field Return_Flag to
7631 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7632 occurrences in entities.
7633 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7634 associated Inline pragma.
7635 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7636 associated Inline pragma.
7637 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7639 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7640 Return_Flag and Set_Return_Flag.
7641 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7642 objects generated for controlled transients declared inside an
7643 Exception_With_Actions. Update the calls to Return_Flag.
7644 (Process_Object_Declaration): Add code to add a null guard for hook
7645 objects generated for controlled transients declared inside an
7646 Exception_With_Actions. Update related comment.
7647 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7648 objects generated for controlled transients declared inside an
7649 Exception_With_Actions. Update the calls to Return_Flag.
7650 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7652 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7654 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7655 positional aggregate.
7657 2011-08-04 Vincent Celier <celier@adacore.com>
7659 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7660 SLOC only for pragmas.
7662 2011-08-04 Emmanuel Briot <briot@adacore.com>
7664 * projects.texi: Minor typo fix.
7666 2011-08-04 Emmanuel Briot <briot@adacore.com>
7668 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7669 on case-sensitive file systems.
7671 2011-08-04 Thomas Quinot <quinot@adacore.com>
7673 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7674 nested in a disabled pragma.
7675 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7676 enclosing pragma, if any, for X decisions.
7678 2011-08-04 Thomas Quinot <quinot@adacore.com>
7680 * sem_prag.adb: Minor reformatting.
7682 2011-08-04 Vincent Celier <celier@adacore.com>
7684 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7685 allowed in no run time mode.
7687 2011-08-04 Vincent Celier <celier@adacore.com>
7689 * make.adb (Check): When -gnatc is used, check for the source file
7690 inside the ALI file with a canonical case file name.
7692 2011-08-04 Emmanuel Briot <briot@adacore.com>
7694 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7695 overriding the separator.
7697 2011-08-04 Robert Dewar <dewar@adacore.com>
7699 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7700 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7702 2011-08-04 Robert Dewar <dewar@adacore.com>
7704 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7706 2011-08-04 Yannick Moy <moy@adacore.com>
7708 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7709 'Result only appears in postcondition of function.
7711 2011-08-04 Thomas Quinot <quinot@adacore.com>
7713 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7714 external tag, include the value of the external tag in the exception
7717 2011-08-04 Yannick Moy <moy@adacore.com>
7719 * sem_attr.adb (Result): modify error message for misplaced 'Result
7721 2011-08-04 Sergey Rybin <rybin@adacore.com>
7723 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7724 clear that the second argument must be an identifier.
7726 2011-08-04 Thomas Quinot <quinot@adacore.com>
7728 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7729 -fpreserve-control-flow, insert an IF statement on the barrier
7730 condition to ensure that a conditional branch instruction is generated.
7732 2011-08-04 Emmanuel Briot <briot@adacore.com>
7734 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7735 (Processing_Flags.Ignore_Missing_With): new flag.
7737 2011-08-04 Emmanuel Briot <briot@adacore.com>
7739 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7740 Source_List_File on case-insensitive systems where the file is actually
7741 on a case-sensitive file system (NFS,...).
7743 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7745 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7746 function return contains a controlled [extension] aggregate and the
7747 return statement is not part of a handled sequence of statements, wrap
7748 the return in a block. This ensures that all controlled temporaries
7749 generated during aggregate resolution will be picked up by the
7750 finalization machinery.
7752 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7754 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7755 components, freeze type before resolution, to ensure that default
7756 initializations are present for all components.
7757 * sem_res.adb (Resolve_Actuals): the designated object of an
7758 accces-to-constant type is a legal actual in a call to an
7759 initialization procedure.
7761 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7763 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7764 N_Unchecked_Type_Conversion to the possible containers of a renamed
7767 2011-08-04 Yannick Moy <moy@adacore.com>
7769 * par-ch13.adb (Aspect_Specifications_Present): recognize
7770 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7771 is issued in Strict mode.
7772 * par.adb: Fix typos in comments.
7774 2011-08-04 Yannick Moy <moy@adacore.com>
7776 * sem_attr.adb (Result): modify error message to take into account Post
7777 aspect when compiling Ada 2012 (or newer) code.
7779 2011-08-04 Nicolas Roche <roche@adacore.com>
7781 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7782 remove need for GCC exceptions.
7784 2011-08-04 Vincent Celier <celier@adacore.com>
7786 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7787 project, not the source file name.
7788 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7789 excluded, continue looking. This excluded source will only be returned
7790 if there is no other source with the same base name that is not locally
7793 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7795 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7796 private and one of the operands is a real literal, use a qualified
7797 expression rather than a conversion which is not meaningful to the
7800 2011-08-04 Yannick Moy <moy@adacore.com>
7802 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7803 corresponding aspect X'Class are allowed, proceed with analysis of the
7804 aspect instead of skipping it.
7806 2011-08-04 Tristan Gingold <gingold@adacore.com>
7808 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7809 This will allow to have an Ada implementation for the subprogram.
7811 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7813 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7814 completion and aspects are present, apply them to the entity for the
7815 type which is currently the partial view, but which is the one that
7817 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7818 applies to a partial view, indicate that the full view has predicates
7819 and delayed aspects.
7820 (Replace_Type_Reference): Handle properly predicates that apply to the
7821 full view of a private completion.
7823 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7825 * layout.adb (Layout_Type): For composite types, do not set Esize.
7826 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7828 (Size_Known): Look at the RM size of components instead of the Esize.
7829 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7830 issue warning and activate Implicit_Packing.
7831 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7832 if the Esize is not known.
7833 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7834 for elementary types only.
7835 (Analyze_Record_Representation_Clause): Look at the RM size instead
7836 of the Esize to issue errors.
7837 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7839 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
7841 Look at the RM size instead of the Esize for types if the latter is
7843 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7845 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7847 * sem_type.adb: proper handling of equality not involving anonymous
7850 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7852 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7853 Vis_Decls. When creating a library-level finalizer for a package spec,
7854 both the declaration and body of the finalizer are inserted either in
7855 the visible or private declarations of the package spec.
7857 2011-08-04 Javier Miranda <miranda@adacore.com>
7859 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7860 use of the full-view of a type when invoking Is_Ancestor.
7861 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7862 the full-view of private parents is requested, then use also the
7863 full-view of the parent of the first derivation.
7865 2011-08-04 Tristan Gingold <gingold@adacore.com>
7867 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7868 instead of the locally imported procedure.
7869 * s-taprop-mingw.adb (Enter_Task): Ditto.
7870 * s-valrea.adb (Scan_Real): Ditto.
7871 * s-imgrea.adb (Set_Image_Real): Ditto.
7872 * s-flocon.ads: Make the package pure.
7874 2011-08-04 Thomas Quinot <quinot@adacore.com>
7876 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7877 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7878 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7879 New subprogram, moved here from...
7880 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7881 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7882 rewriting of the last argument into a procedure call statement here...
7883 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7886 2011-08-04 Thomas Quinot <quinot@adacore.com>
7888 * par_sco.adb: Minor reformatting.
7890 2011-08-04 Robert Dewar <dewar@adacore.com>
7892 * erroutc.adb: Minor reformatting.
7894 2011-08-04 Thomas Quinot <quinot@adacore.com>
7896 * par_sco.adb: Comment update.
7898 2011-08-04 Tristan Gingold <gingold@adacore.com>
7900 * s-flocon.ads: New file.
7901 * g-flocon.ads: Now a renaming of s-flocon.
7902 * Makefile.rtl: Add s-flocon.o
7904 2011-08-04 Javier Miranda <miranda@adacore.com>
7906 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7907 constrained, do not attempt to build a subtype of it.
7909 2011-08-04 Yannick Moy <moy@adacore.com>
7911 * errout.ads Change comments: remove 'R'M as an example where quotes
7912 are needed; add ALFA as another case where quotes are not needed
7913 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7914 case where quotes are not needed.
7915 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7916 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7917 Remove all occurrences of 'A'L'F'A
7919 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7921 * sem_ch13.adb: check legality of invariant pragma.
7923 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7925 * bindgen.adb: Add comments.
7927 2011-08-04 Yannick Moy <moy@adacore.com>
7929 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7931 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7932 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7934 2011-08-04 Robert Dewar <dewar@adacore.com>
7936 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7937 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7938 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7940 2011-08-04 Thomas Quinot <quinot@adacore.com>
7942 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7944 2011-08-04 Thomas Quinot <quinot@adacore.com>
7947 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7950 2011-08-04 Robert Dewar <dewar@adacore.com>
7952 * einfo.ads, exp_ch4.adb: Minor reformatting.
7954 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7956 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7958 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7960 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7961 type in all cases to compute list of primitive operations, because full
7962 view may be an itype that is not attached to the list of declarations.
7964 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7966 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7967 library has already been finalized.
7968 (Gen_Adafinal_C): Likewise.
7969 (Gen_Adainit_Ada): Generate an early return if the library has
7970 already been elaborated.
7971 (Gen_Adainit_C): Likewise.
7972 (Gen_Output_File_Ada): Generate an elaboration flag.
7973 (Gen_Output_File_C): Likewise.
7975 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7977 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7978 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7979 built in the first place.
7980 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7981 for CodePeer because Finalize_Address was not built to begin with.
7982 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7984 2011-08-04 Pascal Obry <obry@adacore.com>
7986 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7987 filenames, this ensures unicity of filenames across processes.
7989 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7991 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7992 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7993 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7994 Add False as the actual to From_Abort in the generated call to
7995 Raise_From_Controlled_Operation.
7997 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7999 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
8000 so that the ali file name can be retrieved from outside of this package.
8001 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
8002 doing nothing in the general case, but used to update the object file
8003 timestamp if directly generated by the backend.
8004 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
8005 to a later time than the ali file one.
8007 2011-08-04 Yannick Moy <moy@adacore.com>
8009 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
8010 entities whose body contains an Annotate pragma which forces formal
8012 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8013 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
8014 Mark_Non_ALFA_Subprogram to pass in a message and node.
8015 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
8016 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
8017 surrounding subprogram.
8018 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
8019 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
8020 as not in ALFA is annotated with Formal_Proof being On, then an error
8021 is issued based on the additional parameters for message and node.
8022 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
8023 * gcc-interface/Make-lang.in: Update dependencies.
8025 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8027 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
8028 Finalize_Address when CodePeer is enabled.
8030 2011-08-04 Pascal Obry <obry@adacore.com>
8032 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
8033 the latter returns a pointer to a static buffer which is deallocated
8034 at the end of the routine.
8036 2011-08-04 Yannick Moy <moy@adacore.com>
8038 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
8039 after index creation; mark unconstrained base array type generated as
8040 being in/not in ALFA as well
8041 (Make_Index): mark subtype created as in/not in ALFA
8042 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
8043 over a loop as in/not in ALFA, depending on its type and form of loop
8046 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8048 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
8049 directly to False on .NET and JVM.
8051 2011-08-04 Yannick Moy <moy@adacore.com>
8053 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
8054 constraint that subtype must come from source code to be in ALFA, so
8055 that anonymous subtypes can be in ALFA too.
8057 2011-08-04 Yannick Moy <moy@adacore.com>
8059 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
8060 reference for ALFA mode.
8061 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
8062 procedure public so as to use it from formal verification back-end.
8064 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8066 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
8067 invalid checks of the Parameter, making Remove_Switch not working
8070 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8072 * targparm.ads: Update header: no run-time exception is needed on this
8075 2011-08-04 Vincent Celier <celier@adacore.com>
8077 * a-fihema.adb: Use System.IO instead of GNAT.IO
8079 2011-08-04 Thomas Quinot <quinot@adacore.com>
8081 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
8082 are forbidden in Compiler_Unit mode.
8084 2011-08-04 Robert Dewar <dewar@adacore.com>
8086 * sem_util.adb: Minor reformatting.
8088 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8090 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
8091 library-level finalizers.
8092 (Gen_Finalize_Library_C): Update the import string for library-level
8094 (Gen_Finalize_Library_Defs_C): Update the definition name of a
8095 library-level finalizer.
8096 * exp_ch7.adb: Remove with and use clauses for Stringt.
8097 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
8098 Spec_Decl. Add local variable Body_Id. The names of library-level
8099 finalizers are now manually fully qualified and are no longer external.
8100 A single name is now capable of servicing .NET, JVM and non-VM targets.
8101 Pragma Export is no longer required to provide visibility for the name.
8102 (Create_Finalizer_String): Removed.
8103 (New_Finalizer_Name): New routine which mimics New_..._Name.
8105 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8107 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
8108 elaboration counter to Standard_Short_Integer.
8109 * sem_util.adb (Build_Elaboration_Entity): Likewise.
8110 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
8111 (Gen_Elab_Externals_C): Likewise.
8113 2011-08-04 Ed Falis <falis@adacore.com>
8115 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
8116 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
8117 system-vxworks-mips.ads, system-vxworks-x86.ads
8118 (Always_Compatible_Rep): set to False for all VxWorks targets.
8120 2011-08-04 Robert Dewar <dewar@adacore.com>
8122 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
8123 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
8124 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
8125 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
8126 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
8127 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
8128 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
8129 Minor reformatting and code reorganization.
8131 2011-08-04 Emmanuel Briot <briot@adacore.com>
8133 * projects.texi: Added doc for aggregate projects.
8135 2011-08-04 Emmanuel Briot <briot@adacore.com>
8137 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
8138 Add support for overriding the Project_Path in aggregate projects.
8140 2011-08-04 Robert Dewar <dewar@adacore.com>
8142 * a-cofove.ads: Minor reformatting.
8144 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8146 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
8147 on the generated code.
8148 (Build_Finalize_Statements): Update the comment on the generated code.
8149 (Build_Initialize_Statements): Update the comment on the generated code.
8150 (Build_Object_Declarations): Add local variable Result. The object
8151 declarations are now built in sequence.
8152 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
8155 2011-08-04 Robert Dewar <dewar@adacore.com>
8157 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
8159 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8161 * einfo.ads (Elaboration_Entity): Document new definition and use.
8162 (Elaboration_Entity_Required): Adjust to above change.
8163 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
8164 * exp_ch12.adb: And with and use for Snames.
8165 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
8166 * exp_util.adb (Set_Elaboration_Flag): Likewise.
8167 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
8168 <Check_Unit_Name>: Deal with N_Expanded_Name.
8169 <Attribute_Elaborated>: Extend to all unit names.
8170 * sem_elab.adb: And with and use for Uintp.
8171 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
8172 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
8173 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
8174 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
8175 from Gen_Adainit_Ada.
8176 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
8177 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
8178 case, do not call System.Standard_Library.Adafinal; instead call
8179 finalize_library if needed.
8180 (Gen_Adafinal_C): Likewise.
8181 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8182 non-main program case.
8183 (Gen_Adainit_C): Generate a couple of external declarations here.
8184 In the main program case, set SSL.Finalize_Library_Objects.
8185 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8186 (Gen_Elab_Calls_C): Likewise.
8187 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
8188 (Gen_Finalize_Library_C): Likewise. Generate a full function.
8189 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8191 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8192 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
8194 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8195 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
8196 of external declarations. Call Gen_Finalize_Library_C.
8198 2011-08-04 Emmanuel Briot <briot@adacore.com>
8200 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8201 Compute_Compilation_Phases): new subprogram.
8202 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8203 The number of mains as well as the various compilation phases that
8204 need to be run are now project tree specific, since various
8205 aggregated trees might have different requirements. In particular,
8206 they do not all require bind or link phases.
8208 2011-08-04 Emmanuel Briot <briot@adacore.com>
8210 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8211 (Project_Tree_Appdata): New type.
8212 It is now possible to associate application-specific data to a project
8213 tree. In particular, this is used in the gprbuild builder to avoid a
8214 number of global tables and htables, especially now that there can be
8215 several project trees loaded at once because of aggregate projects.
8216 (Debug_Name): new procedure.
8217 * projects.texi: Clarify syntax of "**" for Source_Dirs
8219 2011-08-03 Emmanuel Briot <briot@adacore.com>
8221 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8222 the "roots" for a main.
8223 (Fill_From_Project): add support for aggregate projects. Main units
8224 in aggregated projects are now automatically added in the list of
8225 files to build (although this fails later on in gprbuild, because
8226 these files are not using the root proejct tree, so this needs
8228 * gcc-interface/Make-lang.in: Update dependencies.
8230 2011-08-03 Yannick Moy <moy@adacore.com>
8232 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8233 conditional expression in ALFA.
8234 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8235 expressions as not in ALFA.
8237 2011-08-03 Robert Dewar <dewar@adacore.com>
8239 * a-cofove.adb: Minor reformatting.
8241 2011-08-03 Emmanuel Briot <briot@adacore.com>
8243 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8244 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8246 These packages are more logically placed in the Queue package, since
8247 they manipulate the queue. It is also likely that they can be adapted
8248 for gnatmake, thus sharing more code.
8249 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8250 that we could move the above.
8252 2011-08-03 Emmanuel Briot <briot@adacore.com>
8254 * errutil.adb (Finalize): clean up the list of error messages on exit.
8255 Calling this subprogram multiple times will no longer show duplicate
8256 error messages on stderr.
8258 2011-08-03 Emmanuel Briot <briot@adacore.com>
8260 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8261 Getopt_Switches when we have already define a command line
8264 2011-08-03 Yannick Moy <moy@adacore.com>
8266 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8267 in ALFA. Instead, they are considered as assertions to prove.
8268 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8269 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8270 if they have no ELSE part, or if they occur in pre- and postconditions,
8271 where the Condition cannot have side-effects in ALFA
8272 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8273 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8274 Instead, include type conversion between scalar types in ALFA.
8275 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8276 if-and-only-if its type is in ALFA.
8278 2011-08-03 Thomas Quinot <quinot@adacore.com>
8280 * scos.adb, get_scos.adb, put_scos.adb
8281 New code letter for decisions: G (entry guard)
8283 (Traverse_Subprogram_Body): Rename to...
8284 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8285 (Traverse_Protected_Body): New subprogram
8286 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8287 protected bodies and entry bodies.
8289 2011-08-03 Yannick Moy <moy@adacore.com>
8291 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8292 entities with get/set subprograms, which is set on procedure entities
8293 generated by the compiler for a postcondition.
8294 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8295 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8296 entity for a declaration
8297 (Get_Unique_Entity_For_Decl): new function returning an entity which
8298 represents a declaration, so that matching spec and body have the same
8301 2011-08-03 Robert Dewar <dewar@adacore.com>
8303 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8304 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8306 2011-08-03 Yannick Moy <moy@adacore.com>
8308 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8309 library-level because retriction No_Implicit_Dynamic_Code in the
8310 front-end prevents its definition as a local subprogram
8311 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8312 for reuse in other contexts
8313 (Traverse_Declarations_Or_Statements,
8314 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8315 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8316 procedures take a callback parameter to be called on all declarations
8318 (Traverse_All_Compilation_Units): new generic function to traverse a
8319 compilation unit and call a callback parameter on all declarations
8321 2011-08-03 Javier Miranda <miranda@adacore.com>
8323 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8324 in Java since they are always enclosed in a namespace that
8325 differentiates them, and overloaded entities are supported by the VM.
8327 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8329 * checks.adb (Determine_Range): If a computed bound of an operation is
8330 outside the range of the base type of the expression, and overflow
8331 checks are enabled, the result is unknown and cannot be used for any
8332 subsequent constant folding.
8333 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8334 unknown, so is the result of the comparison.
8336 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8338 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8339 From_Abort. When finalization was triggered by an abort, propagate
8340 Standard'Abort_Signal rather than Program_Error.
8341 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8343 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8344 From_Abort. When finalization was triggered by an abort, propagate
8345 Standard'Abort_Signal rather than Program_Error.
8346 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8348 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8349 Abort_Id. Update the calls to Build_Object_Declarations and
8350 Build_Raise_Statement to include Abort_Id.
8351 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8352 calls to Build_Object_Declarations and Build_Raise_Statement to include
8354 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8355 calls to Build_Object_Declarations and Build_Raise_Statement to include
8357 (Build_Components): Create an entity for Abort_Id when exceptions are
8358 allowed on the target.
8359 (Build_Finalizer): New local variable Abort_Id.
8360 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8361 calls to Build_Object_Declarations and Build_Raise_Statement to include
8363 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8364 declaration of flag Abort_Id to preserve the original abort status
8365 before finalization code is executed.
8366 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8367 runtime routine Raise_From_Controlled_Operation.
8368 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8369 Abort_Id. Update the call to Build_Object_Declarations to include
8370 Abort_Id. Update the layout of the finalizer body.
8371 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8372 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8373 clunky code to create all flags and objects related to
8374 exception propagation and replace it with a call to
8375 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8377 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8378 Add new formal Abort_Id and associated comment on its use.
8379 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8381 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8382 Remove the clunky code to create all flags and objects related to
8383 exception propagation and replace it with a call to
8384 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8386 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8388 * s-tassta.adb: Fix minor typos.
8390 2011-08-03 Robert Dewar <dewar@adacore.com>
8392 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8393 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8395 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8397 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8398 to packages. This ensures that the finalizer body will not end up
8399 inside the freeze node.
8400 (Process_Declarations): Add code to detect whether a freeze node has a
8401 nested finalization collection.
8403 2011-08-03 Pascal Obry <obry@adacore.com>
8405 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8406 (Current_Session): Return a not null access to Session_Type.
8407 (Default_Session): Likewise.
8409 2011-08-03 Robert Dewar <dewar@adacore.com>
8411 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8412 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8414 2011-08-03 Pascal Obry <obry@adacore.com>
8416 * g-awk.ads: Minor comment fix.
8418 2011-08-03 Sergey Rybin <rybin@adacore.com>
8420 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8421 the tree structure related to discriminant constraints.
8422 Original_Discriminant cannot be used any more for computing the
8423 defining name for the reference to a discriminant.
8425 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8427 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8428 function is not visibly tagged, this is not a dispatching call and
8429 therfore is not Tag_Indeterminate, even if the function is marked as
8430 dispatching on result.
8432 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8434 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8435 (Expand_N_Free_Statement): Add a guard to protect against run-times
8436 which do not support controlled types.
8437 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8438 against run-times which do not support controlled types.
8439 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8440 against run-times which do not support controlled types.
8441 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8442 against run-times which do not support controlled types.
8443 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8444 protect against run-times which do not support controlled types.
8446 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8448 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8449 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8451 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8453 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8454 modified in the source, to prevent spurious warnings when compiling
8457 2011-08-03 Thomas Quinot <quinot@adacore.com>
8459 * a-except-2005.adb: Minor reformatting.
8461 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8463 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8464 is a renaming declaration in the private part of a package, do not emit
8465 a warning that the with_clause could be moved because the renaming may
8466 be used in the body or in a child unit.
8468 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8470 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8471 Propagate the Comes_From_Source attribute from the original return
8472 object to the renaming.
8474 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8476 * exp_ch7.adb (Build_Raise_Statement): Do not call
8477 Raise_From_Controlled_Operation when this routine is not present in
8478 the run-time library.
8479 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8480 libraries (Ravenscar), tasks are non-terminating, and protected objects
8481 and tasks can only appear at library level, so we do not want
8482 finalization of protected objects nor tasks.
8483 * exp_intr.adb: Minor clarification in comment.
8484 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8485 Gen_Output_File_C): Remove references to finalization of library-level
8486 objects when using restricted run-time libraries.
8488 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8490 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8491 Original_Discriminant only if the parent type is a generic formal.
8493 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8495 * exp_ch13.adb: Add with and use clause for Targparm;
8496 (Expand_N_Free_Statement): Prevent the generation of a custom
8497 Deallocate on .NET/JVM targets since this requires pools and address
8499 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8500 .NET/JVM targets, attach the newly allocated object to the access
8501 type's finalization collection. Do not generate a call to
8502 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8503 exist in the runtime.
8504 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8505 create a custom Allocate for object that do not require initialization.
8506 Attach a newly allocated object to the access type's finalization
8507 collection on .NET/JVM.
8508 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8509 assignment of controlled types on .NET/JVM. The two hidden pointers
8510 Prev and Next and stored and later restored after the assignment takes
8512 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8513 kludge for .NET/JVM to recognize a particular piece of code coming from
8514 Heap_Management and change the call to Finalize into Deep_Finalize.
8515 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8516 finalization collections on .NET/JVM only for types derived from
8517 Controlled. Separate the association of storage pools with a collection
8518 and only allow it on non-.NET/JVM targets.
8519 (Make_Attach_Call): New routine.
8520 (Make_Detach_Call): New routine.
8521 (Process_Object_Declarations): Suppress the generation of
8522 build-in-place return object clean up code on .NET/JVM since it uses
8524 * exp_ch7.ads (Make_Attach_Call): New routine.
8525 (Make_Detach_Call): New routine.
8526 * exp_intr.adb Add with and use clause for Targparm.
8527 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8528 on .NET/JVM targets.
8529 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8530 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8531 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8532 names used in finalization.
8534 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8536 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8537 (Attach, Detach): Lock the current task when chaining an object onto a
8540 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8542 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8543 Rewritten to create the message strings when the exception is not
8544 raised by an abort during finalization.
8545 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8546 Raise_From_Controlled_Operation and update its associated comment.
8547 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8548 Ada.Finalization.Heap_Management provides key functionality
8549 associated with controlled objects on the heap, their creation,
8550 finalization and reclamation. Type Finalization_Collection is
8551 effectively a wrapper which sits ontop of a storage pool and performs
8552 all necessary bookkeeping for all the objects it contains. Each
8553 access-to-controlled or access-to-class-wide type receives a collection
8554 as part of its expansion. The compiler generates buffer code and
8555 invokes Allocate / Deallocate to create and destroy allocated
8557 * a-finali.adb ("="): Removed.
8558 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8559 fields Prev and Next.
8560 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8561 A library unit with at least one controlled object on the library level
8562 has a special finalizer which is invoked by the binder. To signal this,
8563 ali files carry field PF.
8564 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8565 associated comment on field usage.
8566 * a-tags.adb (Get_RC_Offset): Removed.
8567 (Needs_Finalization): New routine.
8568 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8569 Dispatch tables now carry field Needs_Finalization which provides
8570 runtime indication whether a type is controlled or has controlled
8571 components or both. Remove field RC_Offset.
8572 (Get_RC_Offset): Removed along with its associated pragma Export.
8573 Since tagged types with controlled components no longer carry hidden
8574 field _controller, the special mechanism to retrieve its location is no
8576 (Needs_Finalization): New routine.
8577 * atree.ads, atree.adb (Elist24): New routine.
8578 (Set_Elist24): New routine.
8579 * atree.h: Add a define clause for Elist24.
8580 * bindgen.adb New library-level variable Lib_Final_Built.
8581 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8582 presence of a VM target, the routine generates calls to the proper
8583 library finalization routine.
8584 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8585 targets. Set the correct library finalization routine depending on
8586 whether the library has controlled objects or this is a VM compilation.
8587 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8588 to library-level finalizers of compiled units in reverse order of
8589 elaboration. It also produces exception management code and reraises a
8590 potential exception after all units have been finalized.
8591 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8592 library-level finalizers of compiled units in reverse order of
8594 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8595 definitions of all library-level finalizers available to the compilation
8596 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8598 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8599 System.Standard_Library.Adafinal directly. If the library needs
8600 finalization actions, create the sequence of finalization calls.
8601 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8602 Generate a with clause for System.Soft_Links when compiling for a VM.
8603 Remove the code which imports System.Standard_Library.Adafinal as
8604 Do_Finalize. Generate the library finalization routine.
8605 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8606 If the library needs finalization actions, create all the definitions
8607 of library- level finalizers.
8608 (Has_Finalizer): New routine. Determines whether at least one compiled
8609 unit has a library-level finalizer.
8610 Add type Qualification_Mode.
8611 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8612 * einfo.adb: New usage of field 15 as Return_Flag.
8613 Remove Finalization_Chain_Entity from the usages of field 19.
8614 Remove Associated_Final_Chain from the usages of field 23.
8615 New usage of field 23 as Associated_Collection.
8616 New usage of field 24 as Finalizer.
8617 New usage of flag 252 as Is_Processed_Transient.
8618 (Associated_Final_Chain): Removed.
8619 (Associated_Collection): New routine.
8620 (Finalization_Chain_Entity): Removed.
8621 (Finalizer): New routine.
8622 (Is_Finalizer): New routine.
8623 (Is_Processed_Transient): New routine.
8624 (Return_Flag): New routine.
8625 (Set_Associated_Final_Chain): Removed.
8626 (Set_Associated_Collection): New routine.
8627 (Set_Finalization_Chain_Entity): Removed.
8628 (Set_Finalizer): New routine.
8629 (Set_Is_Processed_Transient): New routine.
8630 (Set_Return_Flag): New routine.
8631 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8633 (Write_Field8_Name): Alphabetize the output.
8634 (Write_Field11_Name): Alphabetize the output.
8635 (Write_Field12_Name): Alphabetize the output.
8636 (Write_Field13_Name): Alphabetize the output.
8637 (Write_Field14_Name): Alphabetize the output.
8638 (Write_Field15_Name): Alphabetize the output.
8639 (Write_Field16_Name): Alphabetize the output.
8640 (Write_Field17_Name): Alphabetize the output.
8641 (Write_Field18_Name): Alphabetize the output.
8642 (Write_Field19_Name): Alphabetize the output. Remove the output of
8643 Finalization_Chain_Entity.
8644 (Write_Field20_Name): Alphabetize the output.
8645 (Write_Field21_Name): Alphabetize the output.
8646 (Write_Field22_Name): Alphabetize the output.
8647 (Write_Field23_Name): Alphabetize the output. Remove the output of
8648 Associated_Final_Chain. Add output for Associated_Collection.
8649 (Write_Field24_Name): Alphabetize the output.
8650 (Write_Field25_Name): Add output for Finalizer.
8651 (Write_Field26_Name): Alphabetize the output.
8652 (Write_Field27_Name): Alphabetize the output.
8653 (Write_Field28_Name): Alphabetize the output.
8654 * einfo.ads: Add new field description for Associated_Collection and
8656 Remove Associated_Final_Chain and its uses in nodes.
8657 Remove Finalization_Chain_Entity and its uses in nodes.
8658 Add new field description for Finalizer and its uses in nodes.
8659 Add new synthesized attribute Is_Finalizer.
8660 Add new flag description for Is_Processed_Transient and its uses in
8662 Add new field description for Return_Flag and its uses in nodes.
8663 (Associated_Final_Chain): Removed along with its pragma Inline.
8664 (Associated_Collection): New routine and pragma Inline.
8665 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8666 (Finalizer): New routine and pragma Inline.
8667 (Is_Finalizer): New routine and pragma Inline.
8668 (Is_Processed_Transient): New routine and pragma Inline.
8669 (Return_Flag): New routine and pragma Inline.
8670 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8671 (Set_Associated_Collection): New routine and pragma Inline.
8672 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8673 (Set_Finalizer): New routine and pragma Inline.
8674 (Set_Is_Processed_Transient): New routine and pragma Inline.
8675 (Set_Return_Flag): New routine and pragma Inline.
8676 * exp_aggr.adb: Alphabetize subprograms.
8677 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8678 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8679 associated comments. Remove local variables External_Final_List and
8681 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8682 Ancestor. Remove the retrieval of finalization lists. Update the call to
8684 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8685 lists. Update the call to Late_Expansion.
8686 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8687 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8688 (Gen_Assign): Remove the retrieval of the finalization list used to
8689 build the assignment. Update the calls to Make_Init_Call and
8691 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8692 Remove the mechanism to determine attachment levels and finalization
8693 list retrieval. Remove the processing for coextensions.
8694 (Init_Controller): Removed. Controllers no longer exist.
8695 (Late_Expansion): Remove formals Flist and Obj along with their
8696 associated comments. Update the calls to Build_Record_Aggr_Code and
8697 Build_Array_Aggr_Code.
8698 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8699 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8700 appear in entry bodies, protected subprograms and task bodies.
8701 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8702 * exp_ch3.adb (Add_Final_Chain): Removed.
8703 (Build_Array_Init_Proc): Alphabetize local variables.
8704 (Build_Assignment): Alphabetize local variables. Update the call to
8706 (Build_Class_Wide_Master): Rename local variables to better reflect
8708 (Build_Discriminant_Assignments): Code reformatting.
8709 (Build_Init_Call_Thru): Code reformatting.
8710 (Build_Init_Procedure): Code reformatting. Generate a special version
8711 of Deep_Finalize which is capable of finalizing all initialized
8712 components and ignore the rest.
8713 (Build_Init_Statements): Rename local variables to better reflect their
8715 Reimplement the mechanism to include the creation and update of an index
8716 variable called a "counter". It is used as a bookmark for tracing
8717 initialized and non-initialized components.
8718 (Build_Initialization_Call): Remove local variable Controller_Typ.
8719 Alphabetize all local variables. Remove the initialization of the
8720 record controller and update the call to Make_Init_Call.
8721 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8722 New local variable Counter.
8723 (Constrain_Array): Alphabetize.
8724 (Expand_Freeze_Array_Type): Create a collection instead of a
8726 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8727 Finalize_Address which is used in conjunction with allocated controlled
8729 (Expand_N_Object_Declaration): Remove the creation of a finalization
8730 list for anonymous access types. Update the calls to Make_Init_Call and
8732 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8733 retrieval of finalization lists. Remove the expansion of the record
8734 controller. Create TSS primitive Finalize_Address used in conjunction
8735 with controlled objects on the heap. Create finalization collections
8736 for access-to-controlled record components.
8737 (Expand_Record_Controller): Removed.
8738 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8739 class-wide types now requires additional processing. Create
8740 finalization collections for access-to-controlled types.
8741 (Increment_Counter): New routine.
8742 (Make_Counter): New routine.
8743 (Make_Eq_If): Remove the mention of Name_uController.
8744 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8745 types coming from System.Finalization_Root.
8746 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8747 (Predefined_Primitive_Bodies): There is no longer need to skip types
8748 coming from System.Finalization_Root.
8749 (Stream_Operation_OK): Do not generate stream routines for
8750 type Ada.Finalization.Heap_Management.Finalization_Collection.
8751 * exp_ch3.ads: Alphabetize subprograms.
8752 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8753 Add with and use clause for Lib.
8754 (Complete_Coextension_Finalization): Removed.
8755 (Complete_Controlled_Allocation): New routine. Create a finalization
8756 collection for anonymous access-to-controlled types. Create a custom
8757 Allocate which interfaces with the back end and the machinery in
8759 (Expand_Allocator_Expression): Add necessary calls to
8760 Complete_Controlled_Allocation. Remove the retrieval of finalization
8761 lists. Update the calls to Make_Adjust_Call. Generate a call to
8762 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8763 the associated collection.
8764 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8765 Code clean up. Remove the retrieval of finalization lists and
8767 Update the call to Make_Init_Call. Generate a call to
8768 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8769 the associated collection.
8770 (Get_Allocator_Final_List): Removed. Finalization lists are not
8772 (Suitable_Element): Remove the mention of Name_uController.
8773 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8774 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8775 the left hand side, carry out the assignment and adjust the left hand
8777 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8778 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8779 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8780 BIP_Collection and BIPcollection.
8781 (Build_Heap_Allocator): New routine used to allocate the return object
8782 of a build-in-place function onto a collection.
8783 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8784 (Expand_Call): Do not replace direct calls to Deep routines with their
8786 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8787 and update their occurrences. Add a special return flag to monitor the
8788 [ab]normal execution of the function. The flag is set right before the
8790 Rewrite the mechanism used to allocate a build-in-place return object
8791 on the heap or on a storage pool.
8792 (Is_Direct_Deep_Call): New routine.
8793 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8794 build-in-place function call instead of a final list. Build a call to
8795 Set_Finalize_Address_Ptr to decorate the associated collection.
8796 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8797 order to name the build-in-place function call's result for later
8798 finalization. Add a collection to a build-in-place function call
8799 instead of a final list.
8800 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8801 build-in-place function call instead of a final list. Remove the code
8802 which moves one final list and transforms it into the actual in a
8803 nested build-in-place call.
8804 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8805 build-in-place function call instead of a final list.
8806 (Move_Final_List): Removed.
8807 (Needs_BIP_Collection): New routine.
8808 (Needs_BIP_Final_List): Removed.
8809 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8810 enumeration type BIP_Formal_Kind.
8811 Update the related comment.
8812 (Needs_BIP_Collection): New routine.
8813 (Needs_BIP_Final_List): Removed.
8814 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8815 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8816 majority of subprograms in this unit. Add Name_Finalize_Address to
8817 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8818 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8819 statements for an array type.
8820 (Build_Adjust_Statements): Create the adjust statements for a record
8822 (Build_Cleanup_Statements): New routine. A procedure which given any
8823 construct containing asynchronous calls, references to _master, or is a
8824 task body, a task allocation or a protected body produces the necessary
8825 runtime calls to clean up these constructs.
8826 (Build_Exception_Handler): New routine.
8827 (Build_Final_List): Removed.
8828 (Build_Finalization_Collection): New routine. A core procedure which
8829 creates a collection to service heap allocated controlled objects
8830 associated with an access-to-controlled type.
8831 (Build_Finalize_Statements): Create the finalization statements for a
8833 (Build_Finalizer): New routine. A core procedure which given any
8834 construct with declarations and/or statements detects all objects which
8835 need any type of clean up (controlled objects, protected objects) and
8836 generates all necessary code to clean up the said objects in the proper
8838 (Build_Finalizer_Call): New routine.
8839 (Build_Initialize_Statements): Create the initialization statements for
8840 an array type. The generated routine contains code to finalize partially
8842 (Build_Object_Declarations): New routine.
8843 (Build_Raise_Statement): New routine.
8844 (Clean_Simple_Protected_Objects): Removed.
8845 (Controller_Component): Removed.
8846 (Enclosing_Function): New routine.
8847 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8848 either declarations or statements or both.
8849 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8850 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8852 (Find_Final_List): Removed.
8853 (Global_Flist_Ref): Removed.
8854 (In_Finalization_Root): Removed.
8855 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8856 scope in terms of tree nodes. Process all transient variables within
8858 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8859 generated after the adjust.
8860 (Make_Attach_Call): Removed.
8861 (Make_Call): New routine.
8862 (Make_Clean): Removed.
8863 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8865 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8867 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8869 (Make_Final_Call): Modified to simply create a call to either
8870 Deep_Finalize or Finalize.
8871 (Make_Finalize_Address_Body): New routine.
8872 (Make_Finalize_Address_Stmts): New routine. A function which produces
8873 TSS primitive Finalize_Address used in conjunction with heap allocated
8875 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8876 (Make_Init_Call): Rewritten. There is no longer an attach call
8877 generated after initialization.
8878 (Make_Local_Deep_Finalize): New routine.
8879 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8880 (Make_Transient_Block): Remove the finalization list retrieval and
8882 (Needs_Finalization): Moved to Exp_Util.
8883 (Parent_Field_Type): New routine.
8884 (Preprocess_Components): New routine.
8885 (Process_Transient_Objects): New routine.
8886 (Wrap_HSS_In_Block): New routine.
8887 (Wrap_Transient_Declaration): Remove finalization list management and
8888 controller insertion.
8889 (Wrap_Transient_Expression): Code reformatting.
8890 (Wrap_Transient_Statement): Code reformatting.
8891 * exp_ch7.ads (Build_Final_List): Removed.
8892 (Build_Finalization_Collection): New routine.
8893 (Build_Raise_Statement): New routine.
8894 (Controller_Component): Removed.
8895 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8896 (Find_Final_List): Removed.
8897 (In_Finalization_Root): Removed.
8898 (Is_Simple_Protected_Type): Update related comment.
8899 (Make_Adjust_Call): New parameter profile and associated comments.
8900 (Make_Attach_Call): Removed.
8901 (Make_Final_Call): New parameter profile and associated comments.
8902 (Make_Finalize_Address_Body): New routine.
8903 (Make_Init_Call): New parameter profile and associated comments.
8904 (Make_Local_Deep_Finalize): New routine.
8905 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8906 (Needs_Finalization): Moved to Exp_Util.
8907 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8908 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8909 (Find_Protection_Type): Moved to Exp_Util.
8910 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8911 (Make_DT): Update sequence of dispatch table initialization. Remove the
8912 initialization of field RC_Offset. Add initialization of field Needs_
8914 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8915 Reimplement how an object is first finalized, then deallocated.
8916 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8918 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8919 Register TSS_Finalize_Address with type TSS_Names.
8920 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8921 procedure provides the interface between an allocation / deallocation
8922 and the support machinery in Ada.Finalization.Heap_Management.
8923 (Find_Init_Call): Code reformatting.
8924 (Find_Init_Call_In_List): Code reformatting.
8925 (Find_Protection_Type): Moved from Exp_Ch9.
8926 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8927 (Has_Controlled_Coextensions): Removed.
8928 (Has_Controlled_Objects): New routine.
8929 (In_Library_Level_Package_Body): New routine.
8930 (Insert_Action_After): New routine.
8931 (Is_Finalizable_Transient): New routine. This predicate determines
8932 whether an object declaration is one of the many variants of controlled
8934 (Is_Null_Access_BIP_Func_Call): New routine.
8935 (Is_Non_BIP_Func_Call): New routine.
8936 (Is_Related_To_Func_Return): New routine.
8937 (Needs_Finalization): Moved from Exp_Ch7.
8938 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8939 (Find_Protection_Type): Moved from Exp_Ch9.
8940 (Has_Controlled_Coextensions): Removed.
8941 (Has_Controlled_Objects): New routine.
8942 (In_Library_Level_Package_Body): New routine.
8943 (Insert_Action_After): New routine.
8944 (Is_Finalizable_Transient): New routine.
8945 (Is_Null_Access_BIP_Func_Call): New routine.
8946 (Is_Non_BIP_Func_Call): New routine.
8947 (Is_Related_To_Func_Return): New routine.
8948 (Needs_Finalization): Moved from Exp_ch7.
8949 * expander.adb (Expand): Add a case for N_Free_Statement.
8950 * freeze.adb (Freeze_All): Replace the generation of a finalization
8951 list with a collection for access-to-controlled types.
8952 (Freeze_Entity): Code reformatting.
8953 (Freeze_Record_Type): Remove the freezing of a record controller
8955 (Freeze_Subprogram): Code reformatting.
8956 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8958 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8959 has a library-level finalizer.
8960 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8961 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8962 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8963 files. Add a-fihema to the list of object files.
8965 Alphabetize the associations in type Is_Parameterless_Attribute.
8966 * rtsfind.ads: Ada.Finalization_List.Controller and
8967 System.Finalization_Implementation are no longer a GNAT unit.
8968 Update the range of type Ada_Finalization_Child. Remove the following
8969 recoverable entities:
8971 RE_Attach_To_Final_List
8975 RE_Finalizable_Ptr_Ptr
8976 RE_Global_Final_List
8977 RE_Limited_Record_Controller
8980 RE_Record_Controller
8981 RE_Simple_List_Controller
8983 Add the following recoverable entities:
8985 RE_Add_Offset_To_Address
8989 RE_Exception_Identity
8990 RE_Finalization_Collection
8991 RE_Finalization_Collection_Ptr
8992 RE_Needs_Finalization
8993 RE_Save_Library_Occurrence
8994 RE_Set_Finalize_Address_Ptr
8995 RE_Set_Storage_Pool_Ptr
8997 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8999 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
9000 (First_Stored_Discriminant): Remove the mention of Name_uController.
9001 * sem_aux.ads: Comment reformatting.
9002 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
9003 to redecorate an already existing class-wide type.
9004 (Decorate_Tagged_Type): New parameter profile and associated comment.
9005 Create a "shadow class-wide type" for a shadow entity.
9006 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
9007 of the final chain along with the associated comment.
9008 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
9009 Full_Desig and set it to the full view of the designated type.
9010 Initialize the finalization collection to empty.
9011 (Build_Derived_Record_Type): Alphabetize local variables. Code
9013 (Collect_Fixed_Components): Remove the mention of Name_uController.
9014 (Create_Constrained_Components): Remove the mention of Name_uController.
9015 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
9016 class-wide type of a shadow entity.
9017 (Process_Full_View): Update the machinery which marks type
9018 Limited_Controlled's entity as limited.
9019 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
9020 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
9021 list, instead make a collection build-in-place formal.
9022 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
9023 a designated type in order to establish a match between the renaming
9024 and the renamed entity.
9025 (Find_Selected_Component): Add guard to prevent spurious exceptions
9026 from being raised on .NET/JVM.
9027 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
9028 to the list of primitive that need special processing. Update arrays
9029 C_Names and D_Names.
9030 (Replace_Types): Handle class-wide types.
9031 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
9032 different parameter profile, look at the first formal.
9033 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
9034 use clauses for Exp_Util.
9035 * sem_res.adb: Remove with and use clauses for Elists.
9036 (Propagate_Coextensions): Removed.
9037 (Resolve_Allocator): Do not propagate the list of coextensions from one
9038 allocator to another.
9039 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
9040 Deaccessed_T to Desig_Typ.
9041 (Enter_Name): Remove the mention of Name_uController.
9042 (Gather_Components): Remove the mention of Name_uController.
9043 (Incomplete_Or_Private_View): New routine.
9044 (Is_Coextension_Root): Removed.
9045 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
9046 * sem_util.ads (Incomplete_Or_Private_View): New routine.
9047 (Is_Coextension_Root): Removed.
9048 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
9049 Controlled types are now derived from a null tagged record. Remove
9050 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
9051 * sinfo.adb (Coextensions): Removed.
9052 (Set_Coextensions): Removed.
9053 * sinfo.ads: Remove Coextensions from the explanation of node fields
9054 and its uses in nodes.
9055 Update the field usage of N_Allocator.
9056 (Coextensions): Removed along with its pragma Inline.
9057 (Set_Coextensions): Removed along with its pragma Inline.
9058 * snames.ads-tmpl: Remove names
9063 Name_uLocal_Final_List
9064 Name_Finalization_Root
9071 Name_Finalize_Address
9072 * s-pooglo.adb (Allocate): Add overriding indicator.
9073 (Deallocate): Add overriding indicator.
9074 (Storage_Size): Add overriding indicator.
9075 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
9076 than Finalize_Global_List.
9077 (Null_Finalize_Global_List): Removed.
9078 (Save_Library_Occurrence): New routine.
9079 * s-soflin.ads: Remove variable Finalize_Global_List along with its
9080 initialization. Add variable Finalize_Library_Objects along with its
9081 pragma Export. Add variables Library_Exception and
9082 Library_Exception_Set along with their pragma Export.
9083 (Null_Finalize_Global_List): Removed.
9084 (Save_Library_Occurrence): New routine.
9085 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
9086 rather than Finalize_Global_List.
9087 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
9088 of the constructed node.
9090 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9092 * link.c: Include "auto-host.h" before system headers.
9094 2011-08-03 Vincent Celier <celier@adacore.com>
9096 * make.adb (Gnatmake): Add to table Library_Projs only library projects
9097 that are not extended. Do not check if a library project that is
9098 extended should be regenerated. Do not add to table Library_Paths the
9099 libraries that are in extended projects. Link only with libraries that
9100 are in libray projects that are not extended.
9101 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
9102 for a library project that is extended.
9104 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9106 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
9107 conforming subprogram renamings that appear to be completions if they
9108 are not fully conformant.
9109 Such renamings are homographs but not completions.
9110 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
9111 names in a subprogram renaming that appears in an instance.
9113 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9115 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
9116 not immutably limited, build actual subtype from expression to provide
9117 proper bounds to caller.
9119 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9121 * sem_ch8.adb: Minor comment correction.
9123 2011-08-03 Thomas Quinot <quinot@adacore.com>
9125 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
9126 returning a limited array, use an extended return statement.
9128 2011-08-03 Vincent Celier <celier@adacore.com>
9130 * make.adb (Initialize): If --subdirs= is used, but no project file is
9131 specified, attempt to create the specify subdir if it does not already
9132 exist and use it as the object directory as if -D had been specified.
9134 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9136 * s-tpopsp-vms.adb: New file.
9137 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
9138 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
9140 2011-08-03 Emmanuel Briot <briot@adacore.com>
9142 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
9145 2011-08-03 Yannick Moy <moy@adacore.com>
9147 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
9148 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
9149 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
9150 detect that an array has static bounds.
9152 2011-08-03 Thomas Quinot <quinot@adacore.com>
9154 * exp_dist.adb: Minor reformatting.
9156 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9158 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
9159 (ATCB_Key): Removed, not always used.
9161 2011-08-03 Emmanuel Briot <briot@adacore.com>
9163 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
9164 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
9165 most remaining global variables.
9167 2011-08-03 Robert Dewar <dewar@adacore.com>
9169 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
9170 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
9173 2011-08-03 Javier Miranda <miranda@adacore.com>
9175 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
9176 that must be passed by copy in VM targets.
9178 2011-08-03 Emmanuel Briot <briot@adacore.com>
9180 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9181 duplicates a similar htable now in the project tree.
9183 2011-08-03 Claire Dross <dross@adacore.com>
9185 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9186 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9187 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9188 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9189 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9190 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9191 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9194 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9196 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9197 (ATCB_Key): Removed, not always used.
9198 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9200 * s-tpopsp-tls.adb: New file.
9201 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9202 x86/x64/ia64/powerpc/sparc Linux.
9204 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9206 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9207 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9209 2011-08-03 Thomas Quinot <quinot@adacore.com>
9211 * rtsfind.ads, exp_dist.adb, exp_dist.ads
9212 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9213 Fix type selection for mapping integer types to PolyORB types.
9215 2011-08-03 Bob Duff <duff@adacore.com>
9217 * sem_ch7.adb: Minor comment clarification.
9219 2011-08-03 Bob Duff <duff@adacore.com>
9221 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9222 an error analyzing a choice, skip further processing. Further
9223 processing could cause a crash or cascade errors.
9225 2011-08-03 Emmanuel Briot <briot@adacore.com>
9227 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9228 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9229 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9230 prj-env.ads (Shared_Project_Tree_Data): new type
9231 An aggregate project and its aggregated trees need to share the common
9232 data structures used for lists of strings, packages,... This makes the
9233 code simpler since otherwise we have to pass the root tree (also used
9234 for the configuration file data) in addition to the current project
9235 tree. This also avoids ambiguities as to which tree should be used.
9236 And finally this saves a bit of memory.
9237 (For_Every_Project_Imported): new parameter Tree.
9238 Since aggregated projects are using a different tree, we need to let
9239 the caller know which tree to use to manipulate the returned project.
9241 2011-08-03 Robert Dewar <dewar@adacore.com>
9243 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9244 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9245 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9246 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9248 2011-08-03 Javier Miranda <miranda@adacore.com>
9250 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9251 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9253 2011-08-03 Bob Duff <duff@adacore.com>
9255 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9258 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9260 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9261 g-sehash.ads: Fix typo. Update header.
9263 2011-08-03 Thomas Quinot <quinot@adacore.com>
9265 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9268 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9270 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9271 prefixes of private types along with records, since the selector may be
9273 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9274 private types along with records, since the selector may be a
9277 2011-08-03 Emmanuel Briot <briot@adacore.com>
9279 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9281 2011-08-03 Javier Miranda <miranda@adacore.com>
9283 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9284 Tagged_Type_Expansion.
9286 2011-08-03 Yannick Moy <moy@adacore.com>
9288 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9289 violation when the argument of concatenation is the name of a
9292 2011-08-03 Emmanuel Briot <briot@adacore.com>
9294 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9295 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9296 (Process_Declarative_Items): new parameter Child_Env.
9298 2011-08-03 Yannick Moy <moy@adacore.com>
9300 * alfa.ads: Update format of ALFA section in ALI file in order to
9301 add a mapping from bodies to specs when both are present.
9302 (ALFA_Scope_Record): Add components for spec file/scope.
9303 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9305 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9306 collected, fill in the spec information when relevant.
9307 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9310 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9312 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9313 code unit to decide whether to add internally generated subprograms.
9315 2011-08-03 Javier Miranda <miranda@adacore.com>
9317 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9318 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9319 be handled by copy in VM targets.
9321 2011-08-03 Emmanuel Briot <briot@adacore.com>
9323 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9324 code with Makeutl.Get_Switches.
9325 * prj-tree.adb: Update comment.
9327 2011-08-03 Thomas Quinot <quinot@adacore.com>
9329 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9330 subprogram with a limited formal that does not support external
9333 2011-08-03 Yannick Moy <moy@adacore.com>
9335 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9337 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9338 not from current unit in two phases, because it is not possible to
9339 change the table while iterating over its content.
9340 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9342 2011-08-03 Sergey Rybin <rybin@adacore.com>
9344 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9345 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9347 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9349 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9350 and the component type is composite, this is ambiguous for predefined
9351 concatenation, but if the node is not overloaded and the entity is a use
9352 -defined function its profile can be used to resolve that aggregate.
9354 2011-08-03 Robert Dewar <dewar@adacore.com>
9356 * exp_ch4.adb: Minor code cleanup.
9358 2011-08-03 Thomas Quinot <quinot@adacore.com>
9360 * exp_dist.adb: Do not generate distribution stubs if serious errors
9361 have been diagnosed.
9363 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9365 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9366 the first formal of a primitive operation, go to the base type to
9367 handle properly an access to a derived type with constrained
9369 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9370 user-defined function that is only use-visible.
9372 2011-08-03 Robert Dewar <dewar@adacore.com>
9374 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9375 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9376 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9377 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9378 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9379 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9380 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9381 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9383 2011-08-03 Robert Dewar <dewar@adacore.com>
9385 * repinfo.adb (List_Mechanism): Add handling of
9386 Convention_Ada_Pass_By_XXX.
9387 * sem_mech.adb (Set_Mechanism): Ditto.
9388 * sem_prag.adb (Process_Convention): Add entries for
9389 Convention_Ada_Pass_By_XXX.
9390 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9392 2011-08-03 Pascal Obry <obry@adacore.com>
9394 * makeutl.adb: Minor reformatting.
9396 2011-08-03 Vincent Celier <celier@adacore.com>
9399 (Get_File_Name) If the file cannot be found when there are no config
9400 pragmas file and May_Fail is True, return No_File instead of the file
9401 name, to be consistent.
9403 2011-08-03 Pascal Obry <obry@adacore.com>
9405 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9408 2011-08-03 Javier Miranda <miranda@adacore.com>
9411 (Same_Representation): In VM targets the representation of arrays with
9412 aliased components differs from arrays with non-aliased components.
9414 2011-08-03 Emmanuel Briot <briot@adacore.com>
9416 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9417 not systematically lower case attribute indexes that contain no "."
9418 Fix definition of several Naming attributes, which take
9419 a unit name as index and therefore should be case insensitive.
9420 Minor refactoring (reduce length of variable names).
9422 2011-08-03 Emmanuel Briot <briot@adacore.com>
9424 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9426 2011-08-03 Emmanuel Briot <briot@adacore.com>
9428 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9429 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9430 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9431 prj-tree.ads (Prj.Tree.Environment): new type.
9433 2011-08-03 Emmanuel Briot <briot@adacore.com>
9435 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9436 prj-tree.adb, prj-tree.ads (Environment): new type.
9438 2011-08-03 Emmanuel Briot <briot@adacore.com>
9440 * prj-tree.ads: Remove unused variable.
9442 2011-08-03 Yannick Moy <moy@adacore.com>
9444 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9445 issuing messages related to SPARK restriction violation.
9447 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9449 * sem_ch6.adb: guard against error nodes in return statements.
9451 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9453 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9454 a warning can only appear on a configuration file, so emit warning
9455 without further checks.
9457 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9459 * s-interr.ads: add overriding keyword.
9461 2011-08-03 Geert Bosch <bosch@adacore.com>
9463 * exp_attr.adb: Fix minor typo.
9465 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9467 * par-ch4.adb: improve error recovery.
9469 2011-08-03 Emmanuel Briot <briot@adacore.com>
9471 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9472 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9475 2011-08-03 Emmanuel Briot <briot@adacore.com>
9477 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9478 "external" as an attribute name in aggregate projects.
9480 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9482 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9483 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9484 from 0, so we need to adjust.
9486 2011-08-03 Emmanuel Briot <briot@adacore.com>
9488 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9489 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9491 2011-08-03 Yannick Moy <moy@adacore.com>
9493 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9494 restriction on overloaded entity if the entity is not an operator.
9496 2011-08-03 Yannick Moy <moy@adacore.com>
9498 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9499 restrict.ads: Rename remaining Check_Formal_Restriction* into
9500 Check_SPARK_Restriction*.
9502 2011-08-03 Emmanuel Briot <briot@adacore.com>
9504 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9505 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9507 (Project_Empty): removed
9508 (Empty_Project): new parameter Qualifier
9509 This is used to have fields specific to aggregate projects, cleaner
9510 New field to store the list of aggregated projects.
9511 (Check_Aggregate_Project): removed
9512 (Process_Aggregated_Projects, Free): new subprograms.
9514 2011-08-03 Olivier Hainque <hainque@adacore.com>
9516 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9518 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9520 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9521 explicit dereference of an unconstrained type, create a constrained
9522 subtype for it, as is done for function calls that return an
9525 2011-08-03 Thomas Quinot <quinot@adacore.com>
9527 * g-pehage.adb (Finalize): Avoid possible double-free.
9529 2011-08-03 Steve Baird <baird@adacore.com>
9531 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9532 Elab_Spec/Body attrs in CodePeer_Mode.
9534 2011-08-03 Javier Miranda <miranda@adacore.com>
9536 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9537 low bound is not known at compile time but they have no others choice.
9538 Done because in this case the bounds can be obtained directly from the
9541 2011-08-03 Ed Falis <falis@adacore.com>
9543 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9544 on VxWorks SMP. Remove unusable constant ANY_CPU.
9546 2011-08-03 Emmanuel Briot <briot@adacore.com>
9548 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9549 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9550 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9551 Prj.Env.Initialize_Empty): new subprograms
9552 (Get_Env, Find_Project): remove parameter Target_Name.
9554 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9556 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9557 as a condition for the delayed call to Derived_Subprograms done for the
9558 case of the rewriting of a derived type that constrains the
9559 discriminants of its parent type.
9560 Avoids redundant subprogram derivations for private subtype derivations.
9562 2011-08-03 Javier Miranda <miranda@adacore.com>
9564 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9565 Build_Record_Aggr_Code.
9566 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9567 discriminants in extension aggregates.
9569 2011-08-03 Emmanuel Briot <briot@adacore.com>
9571 * prj-pp.adb (Print): also output project qualifiers, since in
9572 particular "aggregate" is mandatory in an aggregate project.
9574 2011-08-03 Emmanuel Briot <briot@adacore.com>
9576 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9577 (Debug_Output): new function.
9579 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9581 * gnat_ugn.texi: Document -Wstack-usage.
9582 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9584 2011-08-03 Thomas Quinot <quinot@adacore.com>
9586 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9587 have keyword LIMITED.
9589 2011-08-03 Yannick Moy <moy@adacore.com>
9591 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9592 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9593 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9594 section (does not happen in compiler, only if code directly calls
9596 * get_alfa.adb, get_alfa.ads: New files.
9597 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9599 * lib-xref-alfa.adb: New file.
9600 * lib-xref.adb, lib-xref.ads
9601 (Xref_Entry): redefine information needed in cross-references for ALFA.
9602 Push ALFA treatments in separated local package.
9603 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9604 identifiers. Return entity of package body instead of spec. Return
9605 Empty for a scope with no location.
9606 (Generate_Reference): adapt to new components for ALFA information.
9607 Remove the need for D references on definitions.
9608 (Is_Local_Reference): moved to ALFA local package
9609 (Output_References): extract subfunction as Extract_Source_Name
9610 (Output_Local_References): remove procedure, replaced by filtering of
9611 cross-references in package ALFA and printing in Put_ALFA.
9612 (Write_Entity_Name): remove procedure
9613 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9614 print exact name of entity as it appears in source file
9615 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9616 * put_alfa.adb, put_alfa.ads: New files.
9617 * xref_lib.adb (Search_Xref): protect read of cross-references against
9618 reading other sections of the ALI file, in gnatxref
9619 (Search): protect read of cross-references against reading other
9620 sections of the ALI file, in gnatfind.
9621 * gcc-interface/Make-lang.in: Update dependencies.
9623 2011-08-03 Thomas Quinot <quinot@adacore.com>
9625 * sem_ch3.adb: Minor reformatting.
9627 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9629 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9630 raising an exception.
9632 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9634 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9635 type, always use 1 as the lower bound or string, even if lower bound of
9636 context is not static, to handle properly null strings in a non-static
9639 2011-08-03 Bob Duff <duff@adacore.com>
9641 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9642 always legal on the right-hand side of an assignment statement; there
9643 is always an applicable index constraint in this case. Therefore, the
9644 check for Pkind = N_Assignment_Statement is now unconditional -- it
9645 doesn't depend on whether Is_Constrained (Typ).
9647 2011-08-03 Robert Dewar <dewar@adacore.com>
9649 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9651 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9653 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9654 for an itype created within a generic unit.
9656 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9658 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9659 suppresses all inlining.
9661 2011-08-03 Robert Dewar <dewar@adacore.com>
9663 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9664 exp_aggr.adb: Minor reformatting.
9666 2011-08-03 Thomas Quinot <quinot@adacore.com>
9668 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9669 tagged assignment when discriminant checks are suppressed. This is
9670 useless and extremely costly in terms of static stack usage.
9672 2011-08-03 Bob Duff <duff@adacore.com>
9674 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9675 of generics, because this leads to the wrong entity in the wrong scope,
9676 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9678 (Process_Interface_Name): Follow Alias for instances of generics, to
9679 correct for the above change.
9681 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9683 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9684 is an integer literal it is always safe to replace the reference. In
9685 addition, if the reference appears in the generated code for an object
9686 declaration it is necessary to copy because otherwise the reference
9687 might be to the uninitilized value of the discriminant of the object
9690 2011-08-03 Pascal Obry <obry@adacore.com>
9692 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9693 ACL used, in this case we want to check for ending .exe, not .exe
9694 anywhere in the path.
9696 2011-08-03 Sergey Rybin <rybin@adacore.com>
9698 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9699 the tree structure (semantic decoration of references to record
9702 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9704 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9705 choices of a named array aggregate, bail out when any choices are
9706 marked as Errors_Posted.
9708 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9710 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9711 in which entity is frozen, to handle properly loop variables in
9714 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9716 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9717 subtype is not static, compute the upper bound using attributes, to
9718 handle properly index types that are not integer types.
9720 2011-08-03 Bob Duff <duff@adacore.com>
9722 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9723 Update copyright notice.
9725 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9727 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9728 Original_Discriminant if within an instance.
9729 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9731 2011-08-03 Thomas Quinot <quinot@adacore.com>
9733 * einfo.ads: Minor reformatting.
9735 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9737 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9738 composite type with an unfrozen subcomponent, in the profile of a
9739 primitive operation.
9741 2011-08-03 Robert Dewar <dewar@adacore.com>
9743 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9745 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9747 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9748 unconstrained type with discriminants is initialized with an aggregate,
9749 use the constrained subtype of the aggregate as the type of the object,
9750 because it is immutable, and this allows the back-end to generate no
9751 code for the object declaration.
9753 2011-08-03 Robert Dewar <dewar@adacore.com>
9755 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9756 comparison operand is variable, and turns out to be zero or negative.
9758 2011-08-03 Javier Miranda <miranda@adacore.com>
9761 (Expand_Dispatching_Constructor_Call): Disable expansion of
9762 code required for native targets. Done to avoid generating
9763 references to unavailable runtime entities in VM targets.
9765 (Expand_N_Object_Declaration): Add missing support to handle
9766 the explicit initialization of class-wide interface objects.
9769 2011-08-03 Matthew Heaney <heaney@adacore.com>
9771 * a-cobove.adb (Merge): Move source onto target, instead of using
9774 2011-08-03 Matthew Heaney <heaney@adacore.com>
9776 * a-cbdlli.adb (Splice): Move source items from first to last.
9778 2011-08-03 Yannick Moy <moy@adacore.com>
9780 * sem_util.ads: Add comment.
9782 2011-08-03 Javier Miranda <miranda@adacore.com>
9785 (Expand_Record_Aggregate): In VM targets disable the expansion into
9786 assignments of aggregates whose type is not known at compile time.
9788 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9790 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9791 protected entries and task entries, to build the proper renaming
9792 declaration for entry formals, used in debugging.
9793 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9794 parameters in the same way.
9796 2011-08-02 Robert Dewar <dewar@adacore.com>
9798 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9799 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9800 code reorganization.
9802 2011-08-02 Robert Dewar <dewar@adacore.com>
9804 * debug.adb: Debug flag d.P to suppress length comparison optimization
9805 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9806 comparison of Length by comparing First/Last instead.
9808 2011-08-02 Matthew Heaney <heaney@adacore.com>
9810 * a-cobove.ads: Code clean up.
9812 2011-08-02 Vincent Celier <celier@adacore.com>
9814 * adaint.c (file_names_case_sensitive_cache): New static int.
9815 (__gnat_get_file_names_case_sensitive): Cache the return value in
9816 file_names_case_sensitive_cache at the first invocation, to avoid
9817 multiple calls to getenv.
9819 2011-08-02 Bob Duff <duff@adacore.com>
9821 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9823 2011-08-02 Yannick Moy <moy@adacore.com>
9825 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9826 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9827 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9828 indicate that we are in a precondition or postcondition. This is used in
9829 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9830 decide whether to flag the spec or body of the current subprogram as
9833 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
9835 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9837 * a-extiin.ads: New file.
9839 2011-08-02 Bob Duff <duff@adacore.com>
9841 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9842 now raises Name_Error instead of Use_Error in certain cases. The other
9843 parts of this AI were already implemented properly.
9845 2011-08-02 Vincent Celier <celier@adacore.com>
9847 * link.c: Only import "auto-host.h" when building the gnattools.
9849 2011-08-02 Yannick Moy <moy@adacore.com>
9851 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9852 which calls a local subprogram, so extract subprogram
9853 from Mark_Non_ALFA_Subprogram_Body.
9855 2011-08-02 Javier Miranda <miranda@adacore.com>
9858 (Extract_Dispatching_Call): If the type of the dispatching object is an
9859 access type then return an explicit dereference in the Object out-mode
9862 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9864 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9865 compatibility checks for all indexes of an array subtype, not just the
9866 first. Reset Has_Dynamic_Range_Check on the subtype before each
9867 potential check to ensure that Insert_Range_Checks will not elide any
9868 of the dynamic checks.
9870 2011-08-02 Yannick Moy <moy@adacore.com>
9872 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9873 SPARK restriction at parsing time.
9874 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9875 directive only if the SPARK restriction is set for this unit.
9877 2011-08-02 Yannick Moy <moy@adacore.com>
9879 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9880 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9881 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9882 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9883 Mark_Non_ALFA_Subprogram_Body.
9884 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9887 2011-08-02 Yannick Moy <moy@adacore.com>
9889 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9892 2011-08-02 Robert Dewar <dewar@adacore.com>
9894 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9895 exp_ch3.adb: Minor reformatting.
9897 2011-08-02 Emmanuel Briot <briot@adacore.com>
9899 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9900 files, not any regular file.
9901 (__gnat_locate_file_with_predicate): new subprogram.
9903 2011-08-02 Yannick Moy <moy@adacore.com>
9905 * sinfo.adb, sinfo.ads: Restrict the use of flags
9906 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9907 nodes, plus N_Subtype_Declaration for the 2nd one.
9909 2011-08-02 Sergey Rybin <rybin@adacore.com>
9911 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9912 - fix bugs in the description of Source_Trace;
9913 - get rid of UNIT_NAME;
9915 2011-08-02 Javier Miranda <miranda@adacore.com>
9918 (Build_Dispatching_Requeue): Adding support for VM targets
9919 since we cannot directly reference the Tag entity.
9920 * exp_sel.adb (Build_K): Adding support for VM targets.
9921 (Build_S_Assignment): Adding support for VM targets.
9923 (Default_Prim_Op_Position): In VM targets do not restrict availability
9924 of predefined interface primitives to compiling in Ada 2005 mode.
9925 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9926 restricted to compiling in Ada 2005 mode.
9927 (Make_VM_TSD): Generate code that declares and initializes the OSD
9928 record. Needed to support dispatching calls through synchronized
9931 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9932 primitives associated with synchronized interfaces.
9933 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9934 primitives associated with synchronized interfaces.
9936 2011-08-02 Yannick Moy <moy@adacore.com>
9938 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9939 statements hidden in SPARK if preceded by the HIDE directive
9940 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9941 exception handlers as hidden in SPARK if preceded by the HIDE directive
9942 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9943 if starting with the HIDE directive
9944 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9945 starting with the HIDE directive; mark the declarations in a private
9946 part as hidden in SPARK if the private part starts with the HIDE
9948 * restrict.adb, restrict.ads
9949 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9950 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9951 argument node belongs to a part which is hidden in SPARK
9952 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9953 parts in SPARK; protect the possibly costly call to
9954 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9955 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9956 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9957 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9959 (Scan): recognize special comment starting with '#' and followed by
9960 SPARK keyword "hide" as a HIDE directive.
9962 2011-08-02 Yannick Moy <moy@adacore.com>
9964 * types.ads, erroutc.ads: Minor reformatting.
9966 2011-08-02 Vincent Celier <celier@adacore.com>
9968 * link.c: Add response file support for cross platforms.
9970 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9972 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9973 in an association, set parent field of copy before partial analysis.
9974 * sem_res.adb (Resolve_Slice): create reference to itype only when
9975 expansion is enabled.
9977 2011-08-02 Yannick Moy <moy@adacore.com>
9979 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9980 for new flag denoting which subprogram bodies are in ALFA
9981 * restrict.adb, sem_ch7.adb: Update comment
9982 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9983 sem_ch9.adb, sem_res.adb: Add calls to
9984 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9985 * sem_ch6.adb (Analyze_Function_Return): add calls to
9986 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9987 middle of the body, and extended return.
9988 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9989 False when missing return.
9990 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9991 to True for subprograms whose spec is in ALFA. Remove later on the flag
9992 on the entity used for a subprogram body when there exists a separate
9994 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9995 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9996 False, otherwise do nothing.
9998 2011-08-02 Robert Dewar <dewar@adacore.com>
10000 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10002 2011-08-02 Yannick Moy <moy@adacore.com>
10004 * sem_ch4.ads: minor formatting.
10006 2011-08-02 Yannick Moy <moy@adacore.com>
10008 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10009 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10010 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10011 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10012 opt.ads: cleanup of SPARK mode
10014 2011-08-02 Yannick Moy <moy@adacore.com>
10016 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10018 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10019 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10021 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10022 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10023 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10024 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10026 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10028 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10029 functions whose return type is not in ALFA.
10030 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10032 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10033 parameter's type is not in ALFA.
10034 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10037 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10039 * sem_ch6 (Analyze_Expression_Function): treat the function as
10040 Inline_Always, and introduce a subprogram declaration for it when it is
10042 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10043 expression functions, so that the back-end can determine whether they
10044 can in fact be inlined.
10045 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10046 a function body comes from an expression function.
10048 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10050 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10051 null exclusions to test Can_Never_Be_Null on the anonymous access types
10052 of the formals rather than testing the formals themselves. Exclude this
10053 check in cases where the Old_Formal is marked as a controlling formal,
10054 to avoid issuing spurious errors for bodies completing dispatching
10055 operations (due to the flag not getting set on controlling access
10056 formals in body specs).
10057 (Find_Corresponding_Spec): When checking full and subtype conformance of
10058 subprogram bodies in instances, pass Designated and E in that order, for
10059 consistency with the expected order of the formals (New_Id followed by
10062 2011-08-02 Robert Dewar <dewar@adacore.com>
10064 * sem_ch8.adb: Minor reformatting.
10066 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10068 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10069 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10070 primitive operations of class-wide actuals.
10072 2011-08-02 Javier Miranda <miranda@adacore.com>
10074 * exp_atag.ads, exp_atag.adb
10075 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10076 since its value is implicitly passed in argument Typ.
10077 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10078 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10079 Build_Common_Dispatching_Select_Statements.
10081 2011-08-02 Robert Dewar <dewar@adacore.com>
10083 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10084 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10085 Minor reformatting.
10087 2011-08-02 Robert Dewar <dewar@adacore.com>
10089 * sem_res.adb: Minor reformatting.
10090 * sem_prag.adb: Minor reformatting.
10092 2011-08-02 Javier Miranda <miranda@adacore.com>
10094 * exp_atag.adb, exp_atags.ads
10095 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10096 by the tagged type Entity. Required to use this routine in the VM
10097 targets since we do not have available the Tag entity in the VM
10100 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10101 Ada.Tags has not been previously loaded.
10103 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10104 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10106 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10107 view of enclosing scopes. Required to handle enclosing scopes that
10108 are synchronized types whose full view is a task type.
10110 (Build_VM_TSDs): Minor code improvement to avoid generating and
10111 analyzing lists with empty nodes.
10112 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10113 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10114 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10115 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10116 (Make_Select_Specific_Data_Table): Add support for VM targets.
10117 (Make_VM_TSD): Generate code to initialize the SSD structure of
10120 2011-08-02 Yannick Moy <moy@adacore.com>
10122 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10123 cross-references section in ALI.
10124 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10125 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10127 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10128 subprogram or package entity of a node
10129 (Is_Local_Reference_Type): new function returns True for references
10130 selected in local cross-references.
10131 (Lt): function extracted from Lt in Output_References
10132 (Write_Entity_Name): function extracted from Output_References
10133 (Generate_Definition): generate reference with type 'D' for definition
10134 of objects (object declaration and parameter specification), with
10135 appropriate locations and units, for use in local cross-references.
10136 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10137 references of type 'I' for initialization in object definition.
10138 (Output_References): move part of function Lt and procedure
10139 Write_Entity_Name outside of the body. Ignore references of types 'D'
10140 and 'I' introduced for local cross-references.
10141 (Output_Local_References): new procedure to output the local
10142 cross-references sections.
10143 (Lref_Entity_Status): new array defining whether an entity is a local
10144 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10145 with 'I' type when initialization expression is present.
10146 * get_scos.adb, get_scos.ads: Correct comments and typos
10148 2011-08-02 Javier Miranda <miranda@adacore.com>
10150 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10152 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10154 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10157 2011-08-02 Vincent Celier <celier@adacore.com>
10159 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10160 (No_Space_Img): New function
10161 (Find_Excluded_Sources): When reading from a file, record the file name
10162 and the line number for each excluded source.
10163 (Mark_Excluded_Sources): When reporting an error, if the excluded
10164 sources were read from a file, include file name and line number in
10167 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10169 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10171 2011-08-02 Robert Dewar <dewar@adacore.com>
10173 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10175 2011-08-02 Javier Miranda <miranda@adacore.com>
10177 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10178 generation of TSDs to the DOTNET compiler.
10179 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10180 generation of TSDs to the DOTNET compiler.
10182 2011-08-02 Javier Miranda <miranda@adacore.com>
10184 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10185 record of all the tagged types declared inside library level package
10186 declarations, library level package bodies or library level subprograms.
10187 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10188 associated with a given tagged type.
10189 (Build_VM_TSDs): New subprogram.
10190 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10191 compilation units that are subprograms.
10192 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10193 compilation units that are package bodies.
10194 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10195 units that are a package declaration or a package instantiation.
10196 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10197 reorganization to improve the error generated by the frontend when the
10198 function Ada.Tags.Secondary_Tag is not available.
10199 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10200 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10202 2011-08-02 Javier Miranda <miranda@adacore.com>
10204 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10206 2011-08-02 Robert Dewar <dewar@adacore.com>
10208 * s-imenne.ads: Minor reformatting.
10210 2011-08-02 Robert Dewar <dewar@adacore.com>
10212 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10213 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10214 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10216 2011-08-02 Robert Dewar <dewar@adacore.com>
10218 * einfo.ads (Materialize_Entity): Document this is only for renamings
10219 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10220 required debug information in the case where we transform the object
10221 declaration into a renaming declaration.
10222 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10224 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10225 Materialize_Entity.
10227 2011-08-02 Robert Dewar <dewar@adacore.com>
10229 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10230 Suppress_Init_Procs.
10231 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10232 Suppress_Initialization/Initialization_Suppressed.
10233 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10234 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10235 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10236 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10238 2011-08-02 Robert Dewar <dewar@adacore.com>
10240 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10241 Minor reformatting.
10243 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10245 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10246 only have inheritable classwide pre/postconditions.
10248 2011-08-02 Javier Miranda <miranda@adacore.com>
10250 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10251 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10252 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10253 checks if the external tag of a type is the same as the external tag
10254 of some other declaration.
10256 2011-08-02 Thomas Quinot <quinot@adacore.com>
10258 * s-taskin.ads: Minor reformatting.
10260 2011-08-02 Emmanuel Briot <briot@adacore.com>
10262 * g-comlin.adb (Display_Help): swap the order in which it prints the
10263 short help and the general usage.
10265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10267 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10268 the aspect declarations and attach them to the generic copy for
10269 subsequent analysis.
10270 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10271 declarations of the generic tree to the new subprogram declarations.
10272 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10273 conditions that apply to a subprogram instance.
10275 2011-08-02 Robert Dewar <dewar@adacore.com>
10277 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10279 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10281 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10282 private type with a tagged full view is not derived in the immediate
10283 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10285 2011-08-02 Robert Dewar <dewar@adacore.com>
10287 * exp_ch4.adb: Minor reformatting.
10289 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10291 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10292 Ada2012 iterator, the loop will be rewritten during expansion into a
10293 while loop with a cursor and an element declaration. Do not analyze the
10294 body in this case, because if the container is for indefinite types the
10295 actual subtype of the elements will only be determined when the cursor
10296 declaration is analyzed.
10298 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10300 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10301 size/alignment related attributes in CodePeer_Mode.
10303 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10305 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10306 Prepend_Element, since this can result in the operation getting the
10307 wrong slot in the full type's dispatch table if the full type has
10308 inherited operations. The incomplete type's operation will get added
10309 to the proper position in the full type's primitives
10310 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10311 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10312 dispatching operations, since there are cases where nonprimitive
10313 subprograms can get added to the list of incomplete dependents (such
10314 as subprograms in nested packages).
10315 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10316 private part when determining whether to add a primitive with a
10317 parameter of a tagged incomplete type to the Private_Dependents list.
10318 Such primitives can also occur in the visible part, and should not have
10319 been excluded from being private dependents.
10320 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10321 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10322 list of a Taft-amendment incomplete type is a primitive before issuing
10323 an error that the full type must appear in the same unit. There are
10324 cases where nonprimitives can be in the list (such as subprograms in
10326 * sem_disp.adb (Derives_From): Use correct condition for checking that
10327 a formal's type is derived from the type of the corresponding formal in
10328 the parent subprogram (the condition was completely wrong). Add
10329 checking that was missing for controlling result types being derived
10330 from the result type of the parent operation.
10332 2011-08-02 Yannick Moy <moy@adacore.com>
10334 * errout.adb (First_Node): minor renaming
10335 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10338 2011-08-02 Yannick Moy <moy@adacore.com>
10340 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10341 before accessing operands.
10342 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10343 decide whether an initialization expression respects SPARK rules, as
10344 the plain node is the expanded one. This allows for more valid warnings
10346 * gnat_rm.texi: Minor update.
10348 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10350 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10353 2011-08-02 Robert Dewar <dewar@adacore.com>
10355 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10357 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10359 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10360 loop statements and the element renaming declaration with a block when
10361 the element type is controlled.
10363 2011-08-02 Yannick Moy <moy@adacore.com>
10365 * sinfo.ads: Minor formatting.
10367 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10369 * sem_aggr.adb (Add_Association): if the association has a box and no
10370 expression, use the Sloc of the aggregate itself for the new
10372 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10375 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10377 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10378 When a container is provided via a function call, generate a renaming
10379 of the function result. This avoids the creation of a transient scope
10380 and the premature finalization of the container.
10381 * exp_ch7.adb (Is_Container_Cursor): Removed.
10382 (Wrap_Transient_Declaration): Remove the supression of the finalization
10383 of the list controller when the declaration denotes a container cursor,
10386 2011-08-02 Yannick Moy <moy@adacore.com>
10388 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10389 node is from source, instead of the original node being from source.
10391 (Resolve_Array_Aggregate): refine the check for a static expression, to
10392 recognize also static ranges
10393 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10394 Array_Type_Declaration): postpone the test for the type being a subtype
10395 mark after the type has been resolved, so that component-selection and
10396 expanded-name are discriminated.
10397 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10398 to distinguish the case of an iteration scheme, so that an error is
10399 issed on a non-static range in SPARK except in an iteration scheme.
10400 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10401 In_Iter_Schm = True.
10402 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10403 user-defined operators so that they are allowed in renaming
10405 (Find_Selected_Component): refine the check for prefixing of operators
10406 so that they are allowed in renaming. Move the checks for restrictions
10407 on selector name after analysis discriminated between
10408 component-selection and expanded-name.
10409 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10410 concatenation argument of string type if it is static.
10411 * sem_util.adb, sem_util.ads
10412 (Check_Later_Vs_Basic_Declarations): add a new function
10413 Is_Later_Declarative_Item to decice which declarations are allowed as
10414 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10415 mode, add that renamings are considered as later items.
10416 (Enclosing_Package): new function to return the enclosing package
10417 (Enter_Name): correct the rule for homonyms in SPARK
10418 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10419 from source (result of expansion) to avoid issuing wrong warnings.
10421 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10423 * errout.adb: On anything but an expression First_Node returns its
10426 2011-08-02 Pascal Obry <obry@adacore.com>
10428 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10430 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10432 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10433 Set the associated loop as the related expression of internally
10435 * exp_ch7.adb (Is_Container_Cursor): New routine.
10436 (Wrap_Transient_Declaration): Supress the finalization of the list
10437 controller when the declaration denotes a container cursor.
10439 2011-08-02 Yannick Moy <moy@adacore.com>
10441 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10443 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10444 expression is a simple expression. This check cannot be performed in
10445 the semantics, so just drop it.
10446 (P_Index_Or_Discriminant_Constraint): move check that the index or
10447 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10448 semantics. Other cases were previously checked in the semantics.
10449 * par-ch4.adb (P_Name): move checks that a selector name is not
10450 character literal or an operator symbol to Find_Selected_Component in
10452 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10453 declarations are not placed after later declarations in a separate
10454 procedure in Sem_Util (possibly not the best choice?), to be used both
10455 during parsing, for Ada 83 mode, and during semantic analysis, for
10457 * par-endh.adb (Check_End): move check that end label is not missing
10458 to Process_End_Label in the semantics
10459 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10460 the special case for SPARK restriction
10461 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10462 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10463 parameter Force to issue the error message even on internal node (used
10464 for generated end label). Call Check_Restriction to check when an error
10465 must be issued. In SPARK mode, issue an error message even if the
10466 restriction is not set.
10467 (Check_Restriction): new procedure with an additional out parameter to
10468 inform the caller that a message has been issued
10469 * sem_aggr.adb: Minor modification of message
10470 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10471 instead of issuing an error message directly
10472 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10473 declarations are not placed after later declarations, by calling
10474 Check_Later_Vs_Basic_Declarations
10475 (Analyze_Subtype_Declaration): move here the check that an index or
10476 discriminant constraint must be a subtype mark. Change the check that
10477 a subtype of String must start at one so that it works on subtype marks.
10478 * sem_ch4.adb (Analyze_Call): move here the check that a named
10479 association cannot follow a positional one in a call
10480 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10481 instead of issuing an error message directly
10482 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10483 selector name is not a character literal or an operator symbol. Move
10484 here the check that the prefix of an expanded name cannot be a
10485 subprogram or a loop statement.
10486 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10487 procedure called from parsing and semantics to check that basic
10488 declarations are not placed after later declarations
10489 (Process_End_Label): move here the check that end label is not missing
10491 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10493 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10494 representation clause in codepeer mode, since it confuses CodePeer and
10495 does not bring useful info.
10497 2011-08-02 Ed Falis <falis@adacore.com>
10499 * init.c: initialize fp hw on MILS.
10501 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10503 * errout.adb (First_Node): for bodies, return the node itself (small
10504 optimization). For other nodes, do not check source_unit if the node
10505 comes from Standard.
10507 2011-08-02 Robert Dewar <dewar@adacore.com>
10509 * exp_ch3.adb: Minor comment additions.
10510 * sem_ch13.adb: Minor reformatting.
10512 2011-08-02 Pascal Obry <obry@adacore.com>
10514 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10516 2011-08-02 Robert Dewar <dewar@adacore.com>
10518 * sem_attr.adb: Minor reformatting.
10520 2011-08-02 Robert Dewar <dewar@adacore.com>
10522 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10523 (Has_Default_Component_Value): Removed
10524 * einfo.ads Comment updates
10525 (Has_Default_Aspect): Replaces Has_Default_Value
10526 (Has_Default_Component_Value): Removed
10528 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10530 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10531 (Get_Simple_Init_Val): Handle Default_Value aspect
10532 (Needs_Simple_Initialization): Handle Default_Value aspect
10533 * exp_ch3.ads: Needs_Simple_Initialization
10534 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10535 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10537 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10538 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10539 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10541 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10543 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10544 package containing iteration primitives.
10545 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10547 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10549 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10550 "of", pre-analyze expression in case it is a function call with
10551 finalization actions that must be placed ahead of the loop.
10552 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10553 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10555 2011-08-02 Geert Bosch <bosch@adacore.com>
10557 * cstand.adb (Create_Float_Types): Only consider C's long double for
10558 Long_Long_Float, in addition to double.
10560 2011-08-02 Robert Dewar <dewar@adacore.com>
10562 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10563 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10564 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10565 Minor reformatting.
10567 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10569 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10572 2011-08-02 Javier Miranda <miranda@adacore.com>
10574 * einfo.ads, einfo.adb
10575 (Original_Access_Type): Move this attribute to Node26 since there was
10576 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10577 which causes conflicts and breaks the generation of the .NET compiler.
10578 (Interface_Name): Add missing documentation on JGNAT only uses of
10581 2011-08-02 Geert Bosch <bosch@adacore.com>
10583 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10584 (Find_Back_End_Float_Type): Likewise
10585 (Create_Back_End_Float_Types): Likewise
10586 (Create_Float_Types): Likewise
10587 (Register_Float_Type): Likewise
10588 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10589 Nlist and split out type selection in new local Find_Base_Type function.
10590 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10592 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10594 2011-08-02 Robert Dewar <dewar@adacore.com>
10596 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10598 * opt.ads: Minor comment change.
10599 * sem_ch12.adb: Minor code reorganization.
10601 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10603 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10604 subtype's list of rep items to the list on the full subtype in the case
10605 where the lists are the same.
10607 2011-08-02 Geert Bosch <bosch@adacore.com>
10609 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10610 using the one from System.Strings, which also deallocates all strings.
10612 2011-08-02 Geert Bosch <bosch@adacore.com>
10614 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10616 * gcc-interface/Make-lang.in: Update dependencies.
10618 2011-08-02 Olivier Hainque <hainque@adacore.com>
10620 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10623 2011-08-02 Javier Miranda <miranda@adacore.com>
10625 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10626 associated with anonymous access to subprograms.
10628 2011-08-02 Geert Bosch <bosch@adacore.com>
10631 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10632 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10633 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10634 (Add_Symbol_Definition): Move to switch-c.adb
10635 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10636 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10637 (Add_Symbol_Definition): Move to switch-c.adb.
10638 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10640 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10641 Move to warnsw.adb.
10642 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10643 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10644 Move to warnsw.adb.
10645 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10646 (Add_Symbol_Definition): Moved from Prepcomp.
10647 * switch-c.ads: Update copyright notice. Use String_List instead of
10648 Argument_List, removing dependency on System.OS_Lib.
10650 2011-08-02 Yannick Moy <moy@adacore.com>
10652 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10653 mode on initialization expression which does not respect SPARK
10655 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10656 if the tree referenced by its argument represents an initialization
10657 expression in SPARK, suitable for initializing an object in an object
10660 2011-08-02 Javier Miranda <miranda@adacore.com>
10662 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10663 internally generated access to subprogram with its associated protected
10665 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10667 2011-08-02 Geert Bosch <bosch@adacore.com>
10669 * cstand.adb (Register_Float_Type): Print information about type to
10670 register, if the Debug_Flag_Dot_B is set.
10671 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10672 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10673 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10674 with a requested precision of more than Max_Digits digits and no more
10675 than Max_Base_Digits digits, if a range specification is present and the
10676 Predefined_Float_Types list has a suitable type to derive from.
10677 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10678 case of type completion with pragma Import
10680 (Process_Import_Predefined_Type): Processing to complete a type
10681 with pragma Import. Currently supports floating point types only.
10682 (Set_Convention_From_Pragma): Do nothing without underlying type.
10683 (Process_Convention): Guard against absence of underlying type,
10684 which may happen when importing incomplete types.
10685 (Process_Import_Or_Interface): Handle case of importing predefined
10686 types. Tweak error message.
10688 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10690 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10691 functions to previous change. Reorganize code slightly.
10693 2011-08-02 Geert Bosch <bosch@adacore.com>
10695 * back_end.ads (Register_Type_Proc): New call back procedure type for
10696 allowing the back end to provide information about available types.
10697 (Register_Back_End_Types): New procedure to register back end types.
10698 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10700 * cstand.adb (Back_End_Float_Types): New list for floating point types
10701 supported by the back end.
10702 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10703 (Copy_Float_Type): New procedure to make new copies of predefined types.
10704 (Register_Float_Type): New call back procedure to populate the BEFT list
10705 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10706 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10707 (Create_Float_Types): New procedure to create entities for floating
10708 point types predefined in Standard, and put these and any remaining
10709 BEFTs on the Predefined_Float_Types list.
10710 * stand.ads (Predefined_Float_Types): New list for predefined floating
10711 point types that do not have declarations in package Standard.
10713 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10715 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10716 entity node for the unit containing the parameter.
10717 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10718 (Add_Inlined_Subprogram): Likewise.
10719 * gcc-interface/Make-lang.in: Update dependencies.
10721 2011-08-02 Thomas Quinot <quinot@adacore.com>
10723 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10726 2011-08-02 Geert Bosch <bosch@adacore.com>
10728 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10730 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10732 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10733 computed value of Base_Type.
10735 2011-08-02 Yannick Moy <moy@adacore.com>
10737 * restrict.adb (Check_Restriction): issue an error for any use of
10738 class-wide, even if the No_Dispatch restriction is not set.
10739 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10740 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10741 when completing a private extension, the type named in the private part
10742 is not the same as that named in the visible part.
10743 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10744 of an inherited primitive operations of a tagged type or type extension
10745 that returns the tagged type.
10746 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10747 function which returns True for an implicit operation inherited by the
10748 derived type declaration for the argument type.
10749 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10752 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10754 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10755 Process_Bounds, to perform analysis with expansion of a range or an
10756 expression that is the iteration scheme for a loop.
10757 (Analyze_Iterator_Specification): If domain of iteration is given by a
10758 function call with a controlled result, as is the case if call returns
10759 a predefined container, ensure that finalization actions are properly
10761 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10763 2011-08-02 Javier Miranda <miranda@adacore.com>
10765 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10766 * gcc-interface/Make-lang.in: Update dependencies.
10768 2011-08-02 Javier Miranda <miranda@adacore.com>
10770 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10771 determine if the analysis is performed using N or Original_Node (N).
10772 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10773 functionality of routine Is_Variable avoids code duplication.
10774 * checks.adb (Determine_Range): Handle temporaries generated by
10775 Remove_Side_Effects.
10777 2011-08-02 Javier Miranda <miranda@adacore.com>
10779 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10780 expansion of the condition. Required since the previous analysis was
10781 done with expansion disabled (see Resolve_Quantified_Expression) and
10782 hence checks were not inserted and record comparisons have not been
10785 2011-08-02 Ed Falis <falis@adacore.com>
10787 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10790 2011-08-02 Bob Duff <duff@adacore.com>
10792 * opt.ads: Minor comment fix.
10794 2011-08-02 Bob Duff <duff@adacore.com>
10796 * sem_ch12.adb (Analyze_Package_Instantiation,
10797 Analyze_Subprogram_Instantiation): Turn off style checking while
10798 analyzing an instance. Whatever style checks that apply to the generic
10799 unit should apply, so it makes no sense to apply them in an instance.
10800 This was causing trouble when compiling an instance of a runtime
10801 unit that violates the -gnatyO switch.
10802 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10803 one of the two case statements, causing spurious errors.
10805 2011-08-02 Robert Dewar <dewar@adacore.com>
10807 * uname.adb: Minor reformatting.
10808 * gnatcmd.adb: Minor reformatting.
10809 * exp_attr.adb: Minor reformatting.
10811 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10813 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10814 No_Dispatching_Calls, do not look for the Assign primitive, because
10815 predefined primitives are not created in this case.
10817 2011-08-02 Bob Duff <duff@adacore.com>
10819 * stylesw.ads: Minor comment fixes.
10821 2011-08-02 Robert Dewar <dewar@adacore.com>
10823 * freeze.adb (Add_To_Result): New procedure.
10825 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10827 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10828 time, if the specific run-time routines for handling streams of strings
10829 are not available, use the default mechanism.
10831 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10833 * s-regpat.ads: Fix typo.
10835 2011-08-02 Vincent Celier <celier@adacore.com>
10837 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10838 not null, call it to create the in memory config project file without
10839 parsing an existing default config project file.
10841 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10843 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10845 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10847 * sem_elim.adb: an abstract subprogram does not need an eliminate
10848 pragma for its descendant to be eliminable.
10850 2011-08-02 Ed Falis <falis@adacore.com>
10852 * init.c: revert to handling before previous checkin for VxWorks
10853 * s-intman-vxworks.adb: delete unnecessary declarations related to
10854 using Ada interrupt facilities for handling signals.
10855 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10856 * s-intman-vxworks.ads: Import __gnat_install_handler as
10857 Initialize_Interrupts.
10858 * s-taprop-vxworks.adb: Delete Signal_Mask.
10859 (Abort_Handler): change construction of mask to unblock exception
10862 2011-08-02 Jerome Guitton <guitton@adacore.com>
10864 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10865 Debug_Raise_Exception before propagation starts.
10867 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10869 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10870 to Restriction_Check_Required.
10871 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10872 * sem_res.adb (Resolve_Call): Likewise.
10873 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10875 2011-08-02 Bob Duff <duff@adacore.com>
10877 * stylesw.ads: Update comment.
10878 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10879 * errout.ads: Remove obsolete comment.
10881 2011-08-02 Javier Miranda <miranda@adacore.com>
10883 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10884 (Set_Is_Safe_To_Reevaluate): new procedure.
10885 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10886 assignment is allowed on safe-to-reevaluate variables.
10887 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10888 temporary created to remove side effects in expressions that use
10889 the secondary stack as safe-to-reevaluate.
10890 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10891 variables that are not true constants.
10893 2011-08-02 Robert Dewar <dewar@adacore.com>
10895 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10896 sem_res.adb, sem_ch6.adb: Minor reformatting.
10898 2011-08-02 Jerome Guitton <guitton@adacore.com>
10900 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10902 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10904 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10905 not set Overridden_Operation if subprogram is an initialization
10908 2011-08-02 Yannick Moy <moy@adacore.com>
10910 * par-ch6.adb: Correct obsolete name in comments
10911 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10912 which takes two message arguments (existing function takes one), with
10913 second message used for continuation.
10914 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10915 block statements that originate from a source block statement, not
10916 generated block statements
10917 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10918 symmetry with procedure case
10919 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10920 function to issue an error in formal mode if a package specification
10921 contains more than one tagged type or type extension.
10922 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10923 parameters matching formals of tagged types are objects (or ancestor
10924 type conversions of objects), not general expressions. Issue an error
10925 on view conversions that are not involving ancestor conversion of an
10927 (Resolve_Type_Conversion): in formal mode, issue an error on the
10928 operand of an ancestor type conversion which is not an object
10929 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10930 procedure so that it works also for actuals of function calls
10931 (Is_Actual_Tagged_Parameter): new function which determines if its
10932 argument is an actual parameter of a formal of tagged type in a
10934 (Is_SPARK_Object_Reference): new function which determines if the tree
10935 referenced by its argument represents an object in SPARK
10937 2011-08-02 Robert Dewar <dewar@adacore.com>
10939 * sem_ch3.adb: Minor reformatting
10940 Minor comment addition
10941 Minor error msg text change
10943 2011-08-02 Javier Miranda <miranda@adacore.com>
10945 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10946 function. Used to be more precise when we generate a variable plus one
10947 assignment to remove side effects in the evaluation of the Bound
10949 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10950 of the bound expression to force its re-analysis and thus expand the
10951 associated transient scope (if required). Code cleanup replacing the
10952 previous code that declared the constant entity by an invocation to
10953 routine Force_Evaluation which centralizes this work in the frontend.
10955 2011-08-02 Robert Dewar <dewar@adacore.com>
10957 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10958 (Base_Type): Now uses improved Is_Base_Type function
10959 * einfo.ads (Base_Type): Inline this function
10961 2011-08-02 Robert Dewar <dewar@adacore.com>
10963 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10964 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10966 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10968 * gcc-interface/Make-lang.in: Update dependencies.
10969 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10972 2011-08-02 Yannick Moy <moy@adacore.com>
10974 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10975 non-simple expression used in delta constraint
10976 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10977 index constraint which is not a subtype mark
10978 * par.adb: With and use Restrict
10979 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10980 mode on component type which is not a subtype mark and default
10981 expression on component
10982 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10983 of string which does not have a lower index bound equal to 1
10984 (Array_Type_Declaration): issue an error in formal mode on index or
10985 component type which is not a subtype mark, and on aliased keyword on
10987 (Derived_Type_Declaration): issue an error in formal mode on interface,
10988 limited or abstract type
10989 (Record_Type_Declaration): issue an error in formal mode on interface
10990 (Record_Type_Definition): issue an error in formal mode on tagged types
10991 and type extensions not declared in the specification of a library unit
10992 package; on null non-tagged record; on variant part
10994 2011-08-02 Vincent Celier <celier@adacore.com>
10996 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10997 not declared for qualified library project when Library_Name is not
10998 declared, but Library_Dir is.
11000 2011-08-02 Robert Dewar <dewar@adacore.com>
11002 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11003 pragmas (affects aspects [Component_]Default_Value
11004 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11005 component type for the resolution
11007 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11009 * einfo.adb (Base_Type): Tune implementation for speed.
11011 2011-08-02 Robert Dewar <dewar@adacore.com>
11013 * freeze.adb: Minor reformatting.
11015 2011-08-02 Thomas Quinot <quinot@adacore.com>
11017 * scos.ads: Update comments.
11019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11021 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11022 base type, because the parent may be a subtype of a private type whose
11023 convention is established in a private part.
11025 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11027 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11028 statement in a block when the expansion of the return expression has
11029 created a finalization chain.
11030 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11031 with the parent node.
11032 Add N_Extended_Return_Statement to handle the case where a transient
11033 object declaration appears in the Return_Object_Declarations list of
11034 an extended return statement.
11036 2011-08-02 Matthew Gingell <gingell@adacore.com>
11038 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11039 unused parameter 'name'.
11041 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11043 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11044 inherited operation, check whether its alias, which is the source
11045 operastion that it renames, has been marked eliminated.
11047 2011-08-02 Javier Miranda <miranda@adacore.com>
11049 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11050 in-mode parameter whose type is an access type since it can be used to
11051 modify its designated object. Enforce code that handles as safe an
11052 access type that is not access-to-constant but it is the result of a
11053 previous removal of side-effects.
11054 (Remove_Side_Effects): Minor code reorganization of cases which require
11055 no action. Done to incorporate documentation on new cases uncovered
11056 working in this ticket: no action needed if this routine was invoked
11057 too early and the nodes are not yet decorated.
11058 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11059 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11060 were issued with actuals that are implicitly provided by
11063 2011-08-02 Robert Dewar <dewar@adacore.com>
11065 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11067 2011-08-02 Yannick Moy <moy@adacore.com>
11069 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11070 to issue an error in formal mode on attribute not supported in this mode
11071 (Analyze_Attribute): issue errors on standard attributes not supported
11073 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11074 comment, and issue error in formal mode on modulus which is not a power
11076 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11078 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11080 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11081 operator on modular type (except 'not').
11083 2011-08-02 Robert Dewar <dewar@adacore.com>
11085 * gnat_rm.texi: Minor reformatting.
11087 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11089 * s-osinte-linux.ads: Minor comment update and reformatting.
11090 * i-cexten.ads: Make this unit pure, as for its parent.
11091 Will allow its usage in more contexts if needed.
11093 2011-08-02 Robert Dewar <dewar@adacore.com>
11095 * s-utf_32.ads: Minor comment fix.
11097 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11099 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11100 operation of a tagged synchronized type, handle the case where the
11101 controlling argument is overloaded.
11103 2011-08-02 Yannick Moy <moy@adacore.com>
11105 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11106 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11107 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11108 SPARK mode and formal verification mode on processing SPARK restriction
11109 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11110 requiring consistency checking.
11112 2011-08-02 Robert Dewar <dewar@adacore.com>
11114 * sem_res.adb: Minor reformatting.
11116 2011-08-02 Robert Dewar <dewar@adacore.com>
11118 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11119 a-cforse.ads: Remove unneeded with of Ada.Containers
11120 Remove commented out pragma Inline's
11121 Move specifications of new subprograms to the actual specs
11123 2011-08-02 Yannick Moy <moy@adacore.com>
11125 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11126 a-cforse.ads: Update comments.
11128 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11130 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11132 2011-08-02 Robert Dewar <dewar@adacore.com>
11134 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11135 a-cforse.ads, a-cofove.ads: Minor reformatting.
11137 2011-08-02 Claire Dross <dross@adacore.com>
11139 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11140 a-cofove.ads: Add comments.
11142 2011-08-02 Yannick Moy <moy@adacore.com>
11144 * gnat_rm.texi: Document formal containers.
11146 2011-08-02 Emmanuel Briot <briot@adacore.com>
11148 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11149 are empty sections.
11151 2011-08-02 Robert Dewar <dewar@adacore.com>
11153 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11156 2011-08-02 Robert Dewar <dewar@adacore.com>
11158 * aspects.adb: New aspects Default_Value and Default_Component_Value
11159 New format of Aspect_Names table checks for omitted entries
11160 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11161 handling of boolean aspects for derived types.
11162 New aspects Default_Value and Default_Component_Value
11163 New format of Aspect_Names table checks for omitted entries
11164 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11165 (Has_Default_Value): New flag
11166 (Has_Default_Component_Value): New flag
11167 (Has_Default_Value): New flag
11168 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11170 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11171 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11172 Default_Value and Default_Component_Value
11173 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11174 New aspects Default_Value and Default_Component_Value
11175 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11176 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11178 2011-08-02 Vincent Celier <celier@adacore.com>
11180 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11181 inherit library kind.
11183 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11185 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11186 Minor reformatting.
11188 2011-08-02 Robert Dewar <dewar@adacore.com>
11190 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11192 2011-08-02 Yannick Moy <moy@adacore.com>
11194 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11196 2011-08-02 Robert Dewar <dewar@adacore.com>
11198 * impunit.adb: Add comment.
11200 2011-08-02 Yannick Moy <moy@adacore.com>
11202 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11203 qualification of aggregates in formal mode
11204 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11206 (Resolve_Aggregate): complete the test that an aggregate is adequately
11207 qualified in formal mode
11209 2011-08-02 Pascal Obry <obry@adacore.com>
11211 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11212 * mlib-prj.adb: Supress warning when compiling binder generated file.
11213 (Build_Library): Supress all warnings when compiling the binder
11216 2011-08-02 Yannick Moy <moy@adacore.com>
11218 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11220 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11221 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11222 Add with/use clauses to make Check_Formal_Restriction visible
11224 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11226 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11227 in-parameters when type of the generic formal is private in the generic
11228 spec and non-private in the body.
11230 2011-08-02 Claire Dross <dross@adacore.com>
11232 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11233 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11234 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11235 * impunit.adb, Makefile.rtl: Take new files into account.
11237 2011-08-02 Robert Dewar <dewar@adacore.com>
11239 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11240 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11242 2011-08-02 Yannick Moy <moy@adacore.com>
11244 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11246 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11247 matching static array bounds, taking into account the special case of
11249 * sem_ch3.adb: Typo in comment.
11251 2011-08-02 Yannick Moy <moy@adacore.com>
11253 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11254 which issues an error in formal mode if its argument node is originally
11256 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11257 has a discriminant specification so that it does not include the case
11259 (Derived_Type_Declaration): move here the test that a derived type has a
11260 discriminant specification
11261 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11262 first element of a component association before accessing its choices
11263 (presence of component association is not enough)
11264 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11265 declaration is a library item before accessing the next element in a
11266 list, as library items are not member of lists
11267 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11268 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11269 Check_Formal_Restriction whenever possible.
11271 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11273 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11274 reference when needed.
11276 2011-08-02 Bob Duff <duff@adacore.com>
11278 * gnat_ugn.texi: Fix typo.
11280 2011-08-02 Vincent Celier <celier@adacore.com>
11282 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11283 archive file name. Do not use the full path name of archives for Open
11286 2011-08-02 Robert Dewar <dewar@adacore.com>
11288 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11289 Analyze_Aspect_Specifications
11291 (Analyze_Aspect_Specifications): New handling for boolean aspects
11292 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11293 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11294 sequence for Analyze_Aspect_Specifications
11295 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11296 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11298 2011-08-02 Robert Dewar <dewar@adacore.com>
11300 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11301 aspects, since these no longer exist.
11303 2011-08-02 Robert Dewar <dewar@adacore.com>
11305 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11306 semicolon, do not try to see if there are aspects following it.
11307 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11310 2011-08-02 Robert Dewar <dewar@adacore.com>
11312 * sem_ch8.adb, aspects.ads: Minor reformatting.
11314 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11316 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11317 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11319 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11321 2011-08-02 Yannick Moy <moy@adacore.com>
11323 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11324 mode on subprogram declaration outside of package specification, unless
11325 it is followed by a pragma Import
11326 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11327 Access_Type_Declaration): issue error in formal mode on access type
11328 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11330 (Analyze_Object_Declaration): issue error in formal mode on object
11331 declaration which does not respect SPARK restrictions
11332 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11333 declaration which does not respect SPARK restrictions
11334 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11335 error in formal mode on digits or delta constraint
11336 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11337 decimal fixed point type
11338 (Derived_Type_Declaration): issue error in formal mode on derived type
11339 other than type extensions of tagged record types
11340 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11341 with check on access definition
11342 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11343 mode on protected definition.
11344 (Analyze_Task_Definition): issue error in formal mode on task definition
11346 2011-08-02 Robert Dewar <dewar@adacore.com>
11348 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11350 2011-08-02 Javier Miranda <miranda@adacore.com>
11352 * sem_ch6.adb (Can_Override_Operator): New function.
11353 (Verify_Overriding_Indicator): Add missing code to check overriding
11354 indicator in operators. Fixes regression.
11355 (Check_Overriding_Indicator): Minor reformating after replacing the
11356 code that evaluates if the subprogram can override an operator by
11357 invocations to the above new function.
11359 (Write_Field26_Name): Add missing code to ensure that, following
11360 the documentation in einfo.ads, this field is not shown as attribute
11361 "Static_Initialization" on non-dispatching functions.
11363 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11365 * sem_res.adb (Resolve_Call): A call to
11366 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11367 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11368 i.e., when the second parameter is of type Time_Span.
11370 2011-08-02 Vincent Celier <celier@adacore.com>
11372 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11373 with an archive instead of -L<library dir> -l<library name>.
11375 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11377 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11378 mark the base types In_Use in addition to making the operations
11381 2011-08-02 Ed Falis <falis@adacore.com>
11383 * init.c: add and setup __gnat_signal_mask for the exception signals
11384 * s-inmaop-vxworks.adb: new file.
11385 * s-intman-vxworks.adb: remove unnecessary initializations and
11387 * s-intman-vxworks.ads: remove unnecessary variable
11388 * s-taprop-vxworks.adb: simplify signal initialization
11390 2011-08-02 Robert Dewar <dewar@adacore.com>
11392 * sem_ch8.adb: Minor code reorganization, comment updates.
11394 2011-08-02 Robert Dewar <dewar@adacore.com>
11396 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11397 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11399 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11400 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11402 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11404 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11405 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11406 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11407 use_type_clauses, to handle more efficiently use_type and use_all_type
11409 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11410 Ada2012 Use_All_Type clause.
11411 (Use_Class_Wide_Operations): new procedure.
11413 2011-08-02 Robert Dewar <dewar@adacore.com>
11415 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11416 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11417 expression to expression function.
11419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11421 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11422 if types are compatible.
11424 2011-08-02 Yannick Moy <moy@adacore.com>
11426 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11427 returns True if its argument array types have same dimension and same
11428 static bounds at each index.
11429 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11430 OUT or IN OUT paramaters which are not view conversions in SPARK.
11431 (Resolve_Arithmetic_Op): issue an error in formal mode on
11432 multiplication or division with operands of fixed point types which are
11433 not qualified or explicitly converted.
11434 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11435 Boolean or array type (except String) operands.
11436 (Resolve_Equality_Op): issue an error in formal mode on equality
11437 operators for array types other than String with non-matching static
11439 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11440 for array types with non-matching static bounds. Factorize the code in
11441 Matching_Static_Array_Bounds.
11442 (Resolve_Qualified_Expression): issue an error in formal mode on
11443 qualified expressions for array types with non-matching static bounds.
11444 (Resolve_Type_Conversion): issue an error in formal mode on type
11445 conversion for array types with non-matching static bounds
11447 2011-08-02 Robert Dewar <dewar@adacore.com>
11449 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11451 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11453 * par-ch9.adb: save location of entry for proper error message.
11455 2011-08-02 Javier Miranda <miranda@adacore.com>
11457 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11458 (Use_Full_View) which permits this routine to climb through the
11459 ancestors using the full-view of private parents.
11460 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11461 Use_Full_View to true in calls to Is_Ancestor.
11462 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11463 true in call to Is_Ancestor.
11464 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11465 Use_Full_View to true in call to Is_Ancestor.
11466 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11467 call to Is_Ancestor.
11468 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11469 Use_Full_View to true in calls to Is_Ancestor.
11470 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11471 Make_Select_Specific_Data_Table, Register_Primitive,
11472 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11473 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11474 to true in call to Is_Ancestor.
11475 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11476 Use_Full_View to true in calls to Is_Ancestor.
11478 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11479 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11481 2011-08-02 Robert Dewar <dewar@adacore.com>
11483 * gnat_rm.texi: Minor reformatting.
11484 * sem_prag.adb: Minor reformatting.
11486 2011-08-02 Tristan Gingold <gingold@adacore.com>
11488 * vms_data.ads: Add VMS qualifier for -gnateP.
11490 2011-08-02 Robert Dewar <dewar@adacore.com>
11492 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11493 * par-ch7.adb (P_Package): Proper placement of aspects for package
11494 decl/instantiation.
11495 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11496 (End_Statements): Add Is_Sloc parameterr
11497 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11498 (Check_End): Ad Is_Sloc parameter
11499 (End_Statements): Add Is_Sloc parameterr
11501 2011-08-02 Vincent Celier <celier@adacore.com>
11503 * ug_words: Add VMS qualifier equivalent to -gnateP:
11504 /SYMBOL_PREPROCESSING.
11506 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11508 * gnat-style.texi: For hexadecimal numeric literals the typical
11509 grouping of digits is 4 to represent 2 bytes.
11510 A procedure spec which is split into several lines is indented two
11513 2011-08-02 Yannick Moy <moy@adacore.com>
11515 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11516 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11517 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11519 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11520 choice in array aggregate
11521 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11523 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11524 positional and named aggregate for record, or others in record
11525 aggregate, or multiple choice in record aggregate
11526 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11527 array operands to logical operations AND, OR and XOR do not have the
11528 same static lower and higher bounds
11529 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11531 2011-08-01 Robert Dewar <dewar@adacore.com>
11533 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11534 Replaces Last_Source_Node_In_Sequence.
11535 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11536 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11537 parens and blank in string (this was inconsistently implemented).
11539 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11540 blank in string (this was inconsistently implemented).
11542 (Set_Global_Switches): Set formal mode switches appropriately
11543 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11545 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11546 call Set_Error_Msg_Lang to set "spark" as language name.
11547 * par.adb: Remove unnecessary call to set formal language for errout
11548 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11549 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11551 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11552 calls to it, moved after resolution so that types are known
11553 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11554 result of concatenation is not of type String
11555 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11556 concatenation is not properly restricted
11557 * gnat_rm.texi: Add doc on pragma Spark_95.
11558 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11559 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11560 * gcc-interface/Make-lang.in: Update dependencies.
11562 2011-08-01 Javier Miranda <miranda@adacore.com>
11564 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11565 condition that detects if the overridden operation must replace an
11568 2011-08-01 Javier Miranda <miranda@adacore.com>
11570 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11571 code declarations inserted by Insert_Actions in each alternative of the
11572 N_Case_Expression node.
11574 2011-08-01 Robert Dewar <dewar@adacore.com>
11576 * sem_ch6.adb: Minor code reorganization.
11577 * sem_util.adb: Minor reformatting.
11579 2011-08-01 Pascal Obry <obry@adacore.com>
11581 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11582 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11584 2011-08-01 Yannick Moy <moy@adacore.com>
11586 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11587 literal or operator symbol which is prefixed
11588 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11589 mode on access attributes.
11590 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11591 that concatenation operands are properly restricted in formal mode
11592 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11593 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11594 result of the concatenation has a type different from String.
11595 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11596 Analyze_Quantified_Expression, Analyze_Slice,
11597 Analyze_Null): issue an error in formal mode on unsupported constructs
11599 (Analyze_Block_Statement): only issue error on source block statement
11600 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11601 function which returns the last node in a list of nodes for which
11602 Comes_From_Source returns True, if any
11603 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11604 Last_Source_Node_In_Sequence
11605 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11606 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11607 mode on unsupported constructs
11608 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11609 rest of the actions may be needed later on since the error is marked as
11611 * sinfo.ads: Typos in comments.
11613 2011-08-01 Pascal Obry <obry@adacore.com>
11615 * projects.texi: Minor editing.
11617 2011-08-01 Yannick Moy <moy@adacore.com>
11619 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11620 insertion character ~~
11621 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11622 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11623 with insertion character ~~
11624 (Set_Msg_Text): treat insertion character ~~
11625 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11626 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11627 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11628 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11629 errors related to the formal language restriction not serious
11630 (insertion character |).
11631 * par.adb (Par): set formal language for error messages if needed
11632 * sem_ch6.adb (Check_Missing_Return): take into account possible
11633 generated statements at the end of the function
11634 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11635 enumeration value to define a new pragma SPARK_95
11636 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11637 SPARK_Version): new type and variables to store the SPARK version
11639 (SPARK_Mode): return True when SPARK_Version is set
11640 * par-prag.adb: Correct indentation
11641 (Prag): take Pragma_SPARK_95 into account
11642 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11645 2011-08-01 Robert Dewar <dewar@adacore.com>
11647 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11648 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11649 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11651 2011-08-01 Pascal Obry <obry@adacore.com>
11653 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11654 Target_Name to Get_Path call.
11655 (Parse_Single_Project): Likewise.
11656 (Post_Parse_Context_Clause): Likewise.
11657 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11658 Call Initialise_Project_Path with the proper Target_Name.
11659 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11661 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11662 with the proper Target_Name.
11663 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11664 Part.Parse routine.
11665 (Parse_Project_And_Apply_Config): Likewise.
11666 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11667 This is fine as this part of the code is supporting only native
11669 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11670 is fine as this part of the code is supporting only native compilation.
11672 2011-08-01 Yannick Moy <moy@adacore.com>
11674 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11675 of homonym, unless the homonym is one of the cases allowed in SPARK
11676 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11677 package declaration occurring after a body.
11679 2011-08-01 Robert Dewar <dewar@adacore.com>
11681 * checks.adb, exp_ch4.adb: Minor reformatting.
11683 2011-08-01 Javier Miranda <miranda@adacore.com>
11685 * einfo.ads (Access_Disp_Table): Fix documentation.
11686 (Dispatch_Table_Wrappers): Fix documentation.
11688 2011-08-01 Pascal Obry <obry@adacore.com>
11690 * prj-env.adb, prj-env.ads: Minor reformatting.
11692 2011-08-01 Yannick Moy <moy@adacore.com>
11694 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11695 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11696 procedures out of these packages.
11697 * errout.ads, errout.adb
11698 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11699 procedures in of this package
11700 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11701 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11702 on misplaced later vs initial declarations, like in Ada 83
11703 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11704 formal mode on attribute of private type whose full type declaration
11706 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11707 package declaration inside a package specification
11708 (Analyze_Full_Type_Declaration): issue error in formal mode on
11709 controlled type or discriminant type
11710 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11711 user-defined operator means that it should come from the source
11712 (New_Overloaded_Entity): issue error in formal mode on overloaded
11714 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11716 2011-08-01 Thomas Quinot <quinot@adacore.com>
11718 * atree.adb: Minor reformatting.
11719 * checks.adb: Minor reformatting.
11721 2011-08-01 Vincent Celier <celier@adacore.com>
11723 * s-parame-vms-ia64.ads: Fix typo in comment
11725 * s-parame-vms-restrict.ads: Removed, unused.
11727 2011-08-01 Javier Miranda <miranda@adacore.com>
11730 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11732 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11733 * sem_ch3.ads, sem_ch3.adb
11734 (Is_Constant_Bound): New extended version of the subprogram that was
11735 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11736 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11737 * sem_aux.ads (Constant_Value): Fix typo in comment.
11738 * checks.adb (Generate_Index_Checks): New implementation which, for
11739 array objects with constant bounds, generates the runtime check
11740 referencing the bounds of the array type. For other cases this routine
11741 provides its previous behavior obtaining such values from the array
11743 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11745 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11746 we cannot have semantic interpretations of the new node.
11748 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11750 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11753 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11755 * sem_ch8.adb: Minor code editing.
11756 * s-vxwext.adb: Remove trailing space.
11757 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11758 consistency with other files.
11760 2011-08-01 Thomas Quinot <quinot@adacore.com>
11762 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11764 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11766 * par-ch10.adb: reject parameterized expressions as compilation unit.
11767 * sem_ch4.adb: handle properly conditional expression with overloaded
11768 then_clause and no else_clause.
11770 2011-08-01 Tristan Gingold <gingold@adacore.com>
11772 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11773 like done by System.Aux_DEC.
11774 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11776 2011-08-01 Yannick Moy <moy@adacore.com>
11778 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11779 missing label at end of declaration (subprogram or package)
11780 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11781 of positional and named parameter association
11782 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11783 Error_Msg_SP which adds a prefix to the error message giving the name
11784 of the formal language analyzed
11785 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11786 access result type in subprogram, unconstrained array as result type,.
11787 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11789 * sem_ch8.adb: Code clean up.
11791 2011-08-01 Javier Miranda <miranda@adacore.com>
11793 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11794 * einfo.ads (Access_Disp_Table): Fix documentation.
11795 (Dispatch_Table_Wrappers): Fix documentation.
11796 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11797 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11798 to enforce the documentation of this attribute.
11799 (Set_Is_Interface): Cleanup the assertion.
11800 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11801 the Underlying_Type entity before reading attribute Access_Disp_Table.
11802 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11803 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11804 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11805 the Underlying_Type entity before reading attribute Access_Disp_Table.
11806 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11807 Locate the Underlying_Type entity before reading attribute
11810 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11812 * s-poosiz.ads: Additional overriding indicators.
11814 2011-08-01 Yannick Moy <moy@adacore.com>
11816 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11818 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11819 parameter specification does not include a subtype mark.
11820 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11821 formal mode on abstract subprogram.
11822 (Analyze_Subprogram_Specification): issue error in formal mode on
11823 user-defined operator.
11824 (Process_Formals): issue error in formal mode on access parameter and
11825 default expression.
11826 * sem_ch9.adb (Analyze_Abort_Statement,
11827 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11828 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11829 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11830 Analyze_Requeue, Analyze_Selective_Accept,
11831 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11832 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11833 issue error in formal mode on user-defined raise statement.
11835 2011-08-01 Thomas Quinot <quinot@adacore.com>
11837 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11838 declaration being hidden when overriding an implicit inherited
11840 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11841 (-gnats), do not complain about a source file that contains only a
11844 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11846 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11847 variable if already set.
11849 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11851 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11852 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11853 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11854 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11855 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11856 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11857 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11858 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11859 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11860 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11861 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11862 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11863 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11864 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11865 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11866 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11867 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11868 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11869 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11870 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11871 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11872 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11873 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11874 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11875 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11876 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11877 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11878 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11879 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11880 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11881 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11882 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11883 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11884 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11885 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11886 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11887 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11888 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11889 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11890 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11891 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11892 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11893 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11894 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11895 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11896 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11897 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11898 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11899 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11900 Use GNAT instead of GNARL.
11902 2011-08-01 Bob Duff <duff@adacore.com>
11904 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11905 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11906 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11909 2011-08-01 Yannick Moy <moy@adacore.com>
11911 * debug.adb (d.D) reverve flag for the SPARK mode
11912 (d.E) reverve flag for SPARK generation mode
11913 (d.F) reverve flag for Why generation mode
11914 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11915 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11916 functions which return True when the corresponding modes are set
11917 (Formal_Language): return "spark" or "alfa" when in formal verification
11919 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11920 Error_Msg to prefix the error message with a tag giving the formal
11922 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11923 message with a tag giving the formal language
11924 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11926 (Analyze_Case_Statement): issue error in formal mode on case statement
11927 with a single "others" case alternative
11928 (Analyze_Exit_Statement): issue errors in formal mode on exit
11929 statements which do not respect SPARK restrictions
11930 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11931 (Check_Unreachable_Code): always issue an error (not a warning) in
11932 formal mode on unreachable code (concerns both code after an infinite
11933 loop and after an unconditional jump, both not allowed in SPARK)
11934 * sem_ch6.adb (Analyze_Return_Statement): add call to
11935 Set_Return_Present for a procedure containing a return statement
11936 (already done for functions in Analyze_Function_Return)
11937 (Analyze_Function_Return): issue error in formal mode on extended
11938 return or if return is not last statement in function
11939 (Check_Missing_Return): issue error in formal mode if function does
11940 not end with return or if procedure contains a return
11941 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11942 function to detect if there is an inner scope of its parameter S which
11945 2011-08-01 Thomas Quinot <quinot@adacore.com>
11947 * sem_ch6.ads: Minor reformatting.
11949 2011-08-01 Javier Miranda <miranda@adacore.com>
11951 * sem_util.adb (Abstract_Interface_List): Complete condition when
11952 processing private type declarations to avoid reading unavailable
11954 (Is_Synchronized_Tagged_Type): Complete condition when processing
11955 private extension declaration nodes to avoid reading unavailable
11958 2011-08-01 Thomas Quinot <quinot@adacore.com>
11960 * sem_ch3.adb: Minor reformatting.
11962 2011-08-01 Thomas Quinot <quinot@adacore.com>
11964 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11965 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11966 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11967 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11968 for VMS, instead parametrize the common implementation with
11969 System.Parameters declarations.
11971 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11973 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11975 2011-08-01 Tristan Gingold <gingold@adacore.com>
11977 * seh_init.c: Fix SEH handler installation on win64.
11979 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11981 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11982 double analysis of an anonymous access to subprogram, because it can
11983 lead to improper sharing of profiles and a back-end crash.
11985 2011-08-01 Robert Dewar <dewar@adacore.com>
11987 * make.adb, sem_ch4.adb: Minor reformatting.
11988 * gcc-interface/Make-lang.in: Update dependencies.
11989 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11991 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11993 * gnat_rm.texi: Fix definition of Long_Integer.
11995 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11997 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11998 to prevent storage exhaustion.
11999 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12000 finalized is a function body, insert the cleanup code before the final
12001 return statement, to prevent spurious warnings.
12002 * s-pooglo.ads: add overriding indicator.
12004 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12006 * sem_ch4.adb (Operator_Check): improve error message when both a
12007 with_clause and a use_clause are needed to make operator usage legal.
12008 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12009 determine whether a compilation unit is visible within an other,
12010 either through a with_clause in the current unit, or a with_clause in
12011 its library unit or one one of its parents.
12013 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12015 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12016 over an arbitrary expression of an array or container type.
12017 * lib-xref.adb: clarify comment.
12019 2011-08-01 Bob Duff <duff@adacore.com>
12021 * einfo.ads: Minor reformatting.
12022 * debug.adb: Minor comment improvement.
12024 2011-08-01 Javier Miranda <miranda@adacore.com>
12026 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12027 consider hidden subprograms as valid candidates.
12029 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12031 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12033 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12035 * gnat_ugn.texi: Fix typo.
12037 2011-08-01 Robert Dewar <dewar@adacore.com>
12039 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12040 lib-xref.adb: Minor reformatting
12042 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12044 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12045 when to generate a call to Move_Final_List.
12046 (Has_Controlled_Parts): Remove this function.
12048 2011-08-01 Geert Bosch <bosch@adacore.com>
12050 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12051 "," in choice list.
12053 2011-08-01 Thomas Quinot <quinot@adacore.com>
12055 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12056 explicit raise of a predefined exception as Comes_From_Source if the
12057 original N_Raise_Statement comes from source.
12059 2011-08-01 Robert Dewar <dewar@adacore.com>
12061 * sinfo.ads: Add comment.
12062 * sem_ch6.adb: Minor reformatting.
12064 2011-08-01 Robert Dewar <dewar@adacore.com>
12066 * freeze.adb (Freeze_Entity): Refine check for bad component size
12067 clause to avoid rejecting confirming clause when atomic/aliased present.
12069 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12071 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12072 better determine whether an entity reference is a write.
12073 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12075 * lib-xref.adb (Output_References): Do no suppress a read reference at
12076 the same location as an immediately preceeding modify-reference, to
12077 handle properly in-out actuals.
12079 2011-08-01 Tristan Gingold <gingold@adacore.com>
12081 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12083 2011-08-01 Quentin Ochem <ochem@adacore.com>
12085 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12086 heap to compute the result.
12088 2011-08-01 Robert Dewar <dewar@adacore.com>
12090 * atree.ads: Minor reformatting.
12092 2011-08-01 Emmanuel Briot <briot@adacore.com>
12094 * g-expect.adb (Get_Command_Output): Fix memory leak.
12096 2011-08-01 Geert Bosch <bosch@adacore.com>
12098 * cstand.adb (P_Float_Type): New procedure to print the definition of
12099 predefined fpt types.
12100 (P_Mixed_Name): New procedure to print a name using mixed case
12101 (Print_Standard): Use P_Float_Type for printing floating point types
12102 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12103 precision IEEE float.
12105 2011-08-01 Thomas Quinot <quinot@adacore.com>
12107 * sem_ch3.adb: Minor reformatting.
12109 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12111 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12112 the completion of a generic function, insert the new body rather than
12113 rewriting the original.
12115 2011-08-01 Yannick Moy <moy@adacore.com>
12117 * sinfo.ads, errout.ads: Typos in comments.
12119 2011-08-01 Robert Dewar <dewar@adacore.com>
12121 * par-endh.adb: Minor reformatting.
12123 2011-08-01 Robert Dewar <dewar@adacore.com>
12125 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12126 (Pre_Post_Aspects): New subtype.
12127 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12128 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12129 * par-ch7.adb (P_Package): Remove Decl parameter
12130 (P_Package): Handle new syntax for aspects (before IS)
12131 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12133 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12134 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12135 (P_Package): Remove Decl parameter
12136 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12138 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12140 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12141 * sinfo.ads: Document new syntax for aspects in packages etc.
12142 * sprint.adb: Handle new syntax of aspects before IS in package
12144 2011-08-01 Thomas Quinot <quinot@adacore.com>
12146 * atree.ads: Minor reformatting.
12147 * sem_prag.adb: Minor reformatting.
12149 2011-08-01 Robert Dewar <dewar@adacore.com>
12151 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12152 case expr alternative.
12154 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12156 * sem_ch12.adb: Fix typo.
12158 2011-08-01 Geert Bosch <bosch@adacore.com>
12160 * sem_prag.adb (Check_No_Link_Name): New procedure.
12161 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12162 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12163 instead of Standard_Long_Long_Float_Size global. Preparation for
12164 eventual removal of per type constants.
12165 * exp_util.ads (Get_Stream_Size): New function returning the stream
12166 size value of subtype E.
12167 * exp_util.adb (Get_Stream_Size): Implement new function.
12168 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12170 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12172 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12174 2011-08-01 Geert Bosch <bosch@adacore.com>
12176 * cstand.adb: Fix comments.
12177 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12178 count of arguments.
12180 2011-08-01 Robert Dewar <dewar@adacore.com>
12182 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12184 2011-08-01 Geert Bosch <bosch@adacore.com>
12186 * atree.ads: Fix comment.
12188 2011-08-01 Robert Dewar <dewar@adacore.com>
12190 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12191 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12192 * par.adb: Add with for Namet.Sp.
12193 * par-tchk.adb: Minor reformatting.
12195 2011-08-01 Vincent Celier <celier@adacore.com>
12197 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12198 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12199 of the init procedure of a SAL.
12200 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12203 2011-08-01 Thomas Quinot <quinot@adacore.com>
12205 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12208 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12210 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12212 2011-08-01 Thomas Quinot <quinot@adacore.com>
12214 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12215 conformant with its spec (return True only for types that have
12216 an overriding Initialize primitive operation that prevents them from
12217 having preelaborable initialization).
12218 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12219 initialization for controlled types in Ada 2005 or later mode.
12221 2011-08-01 Robert Dewar <dewar@adacore.com>
12223 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12225 (Same_Aspect): New function.
12226 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12227 Type_Invariant, Precondition, Postcondition.
12228 * snames.ads-tmpl: Add Name_Type_Invariant.
12230 2011-08-01 Robert Dewar <dewar@adacore.com>
12232 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12234 (Freeze_All_Ent): Fix error in handling inherited aspects.
12235 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12236 already analyzed, but don't skip entire processing of a declaration,
12237 that's wrong in some cases of declarations being rewritten.
12238 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12239 Don't delay for integer, string literals
12240 Treat predicates in usual manner for delay, remove special case code,
12242 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12243 (Build_Predicate_Function): Update saved expression in aspect
12244 (Build_Invariant_Procedure): Update saved expression in aspect
12245 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12246 of replacement of discriminant references if the reference is simple.
12248 2011-08-01 Robert Dewar <dewar@adacore.com>
12250 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12251 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12252 Static_Predicate and Dynamic_Predicate.
12253 (Build_Predicate_Function): Add processing for Static_Predicate
12254 and Dynamic_Predicate.
12255 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12256 (From_Static_Predicate): New flag
12257 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12259 2011-08-01 Robert Dewar <dewar@adacore.com>
12261 * usage.adb: Documentation cleanup for Ada version modes in usage.
12262 * expander.adb: Minor reformatting.
12264 2011-08-01 Robert Dewar <dewar@adacore.com>
12266 * atree.ads: Minor comment fix.
12267 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12268 a-witeio.ads, sem_prag.adb: Minor reformatting.
12270 2011-08-01 Doug Rupp <rupp@adacore.com>
12272 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12273 pointers. Use descrip.h header file for convenience. Add some
12276 2011-08-01 Robert Dewar <dewar@adacore.com>
12278 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12279 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12280 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12282 (Check_Aspect_At_End_Of_Declarations): New procedure
12283 (Analye_Aspect_Specification): Minor changes for above procedures
12284 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12285 specification node as well.
12287 2011-08-01 Pascal Obry <obry@adacore.com>
12289 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12290 Windows files. Use GetFilesAttributes() in this case to check for file
12291 existence instead of returning with an error code.
12293 2011-08-01 Vincent Celier <celier@adacore.com>
12295 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12296 High is above Source length.
12298 2011-08-01 Robert Dewar <dewar@adacore.com>
12300 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12302 2011-08-01 Robert Dewar <dewar@adacore.com>
12304 * aspects.ads (Boolean_Aspects): New subtype.
12305 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12306 for derived types in cases where the parent type and derived type have
12308 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12309 with aspects when parent type also has aspects.
12310 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12311 boolean expression at this point).
12312 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12313 accordance with final decision on the Ada 2012 feature.
12314 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12316 2011-08-01 Matthew Heaney <heaney@adacore.com>
12318 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12320 2011-08-01 Pascal Obry <obry@adacore.com>
12322 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12323 Fix Replace_Slice when High is above current string size.
12324 (Replace_Slice): Fix DL computation when High is above current
12327 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12329 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12331 2011-08-01 Matthew Heaney <heaney@adacore.com>
12333 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12336 2011-08-01 Pascal Obry <obry@adacore.com>
12338 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12341 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12343 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12344 access to protected subprograms in generic bodies.
12345 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12346 protected type, indicate that the convention of the subprogram is
12347 Convention_Protected, because it may be used in subsequent declarations
12348 within the protected declaration.
12350 2011-08-01 Vincent Celier <celier@adacore.com>
12352 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12353 and "final" procedures when the name of the library is "ada", to avoid
12354 duplicate symbols "adainit" and "adafinal" in executables.
12356 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12358 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12359 quantified expression that appears within a postcondition and uses the
12360 Ada2012 'Result attribute.
12362 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12364 * init.c (__gnat_error_handler): Cast reason to int.
12365 (__gnat_install_handler): Explain sa_sigaction use.
12367 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12369 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12370 subprogram has copy-in copy-out parameters, try to promote the mode of
12371 the return type if it is passed in registers.
12373 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12375 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12376 left operand as addressable.
12378 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12380 * gcc-interface/gigi.h (build_function_stub): Remove.
12381 (build_return_expr): Likewise.
12382 (convert_vms_descriptor): Declare.
12383 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12384 (build_function_stub): Move to...
12385 * gcc-interface/utils2.c (build_return_expr): Move to...
12386 * gcc-interface/trans.c (build_function_stub): ...here.
12387 (build_return_expr): ...here.
12388 (Subprogram_Body_to_gnu): Add local variable for language_function.
12389 Disconnect the parameter attributes cache, if any, once done with it.
12390 Call end_subprog_body only after setting the end_locus.
12391 Build the stub associated with the function, if any, at the very end.
12392 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12393 variables and streamline control flow.
12395 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12398 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12399 g-trasym-dwarf.adb.
12401 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12404 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12405 Assign to act.sa_sigaction.
12406 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12407 current->return_address to char * before arithmetic.
12409 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12411 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12412 Correct argument types.
12413 Extract code from reason.
12414 (__gnat_install_handler): Assign to act.sa_sigaction.
12416 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12418 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12419 (GNAT1_OBJS): ...here.
12421 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12424 * g-socthi-mingw.adb (Fill): Fix formatting.
12426 * gcc-interface/gigi.h: Move around comment.
12428 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12431 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12433 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12436 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12438 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12440 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12441 range comparison if Pmode is SImode.
12443 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12444 Eric Botcazou <ebotcazou@adacore.com>
12446 * adadecode.c: Wrap up in extern "C" block.
12447 * adadecode.h: Likewise.
12448 * adaint.c: Likewise. Remove 'const' keyword.
12449 * adaint.h: Likewise.
12450 * argv.c: Likewise.
12451 * atree.h: Likewise.
12453 * cstreams.c: Likewise.
12455 * exit.c: Likewise.
12457 * final.c: Likewise.
12458 * init.c: Likewise.
12459 * initialize.c: Likewise.
12460 * link.c: Likewise.
12461 * namet.h: Likewise.
12462 * nlists.h: Likewise.
12463 * raise.c: Likewise.
12464 * raise.h: Likewise.
12465 * repinfo.h: Likewise.
12466 * seh_init.c: Likewise.
12467 * targext.c: Likewise.
12468 * tracebak.c: Likewise.
12469 * uintp.h: Likewise.
12470 * urealp.h: Likewise.
12471 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12472 * xsinfo.adb: Likewise.
12473 * xsnamest.adb: Likewise.
12474 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12475 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12476 * gcc-interface/misc.c: Likewise.
12477 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12478 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12479 ada/targext.o here...
12480 (GNAT_ADA_OBJS): ...and not here.
12481 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12482 (GNATBIND_OBJS): Reorder.
12484 2011-07-07 Richard Henderson <rth@redhat.com>
12486 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12487 dwarf2out_frame_init.
12489 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12491 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12493 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12496 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12498 2011-07-06 Richard Guenther <rguenther@suse.de>
12500 * gcc-interface/misc.c (gnat_init): Merge calls to
12501 build_common_tree_nodes and build_common_tree_nodes_2.
12502 Re-initialize boolean_false_node.
12504 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12505 Olivier Hainque <hainque@adacore.com>
12506 Nicolas Setton <setton@adacore.com>
12508 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12509 the type according to the ARTIFICIAL_P parameter.
12510 (create_type_decl): Likewise.
12511 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12513 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12515 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12516 (gnatbind): Likewise.
12518 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12520 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12522 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12524 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12525 local variable throughout. Remove useless call to Base_Type.
12526 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12527 Take it also into account for the volatileness of the field. Set the
12528 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12530 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12532 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12533 on a dereference built for a by-ref object if it has an address clause.
12535 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12537 * einfo.ads (Address_Taken): Document use for the second argument of
12538 Asm_Input and Asm_Output attributes.
12539 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12540 argument is an entity name, then set Address_Taken on it.
12541 <Attribute_Asm_Output>: Likewise.
12542 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12543 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12544 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12545 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12547 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12549 PR middle-end/46500
12550 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12552 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12554 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12555 (ada/utils.o): Update dependencies.
12556 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12557 ../../../libcpp/libcpp.a.
12558 * gcc-interface/utils.c: Include common/common-target.h.
12559 (process_attributes): Use targetm_common.have_named_sections.
12561 2011-06-07 Richard Guenther <rguenther@suse.de>
12563 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12566 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12568 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12569 TREE_THIS_NOTRAP flag.
12571 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12573 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12576 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12578 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12579 constants whose full view has discriminants specially.
12581 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12583 * gcc-interface/utils.c: Include diagnostic.h.
12584 (gnat_write_global_declarations): Output debug information for all
12585 global type declarations before finalizing the compilation unit.
12586 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12588 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12590 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12592 2011-05-25 Kai Tietz <ktietz@redhat.com>
12594 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12595 initialization instead of const/none-const pointer assignment.
12597 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12599 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12600 $(EXTRA_GNAT1_OBJS).
12601 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12602 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12603 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12604 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12605 libcommon-target.a instead of prefix.o.
12607 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12610 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12612 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12614 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12615 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12616 instead of version.o.
12618 2011-05-18 Kai Tietz <ktietz@redhat.com>
12620 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12621 boolean_false_node instead of integer_zero_node.
12622 (convert_with_check): Likewise.
12623 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12625 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12627 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12628 type of the parameter is an unconstrained array, convert the actual to
12629 the type of the formal in the In Out and Out cases as well.
12631 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12633 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12634 call build_function_type_array or build_varargs_function_type_array
12636 (create_subprog_type): Don't call build_function_type; call
12637 build_function_type_vec instead.
12639 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12641 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12642 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12643 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12645 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12647 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12649 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12650 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12652 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12654 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12656 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12658 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12659 instead of accessing TYPE_ARG_TYPES directly.
12660 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12662 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12665 * gcc-interface/gigi.h (get_variant_part): Declare.
12666 * gcc-interface/decl.c (get_variant_part): Make global.
12667 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12668 types have the same constant size, are record types and T1 has a
12669 variant part while T2 doesn't.
12671 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12673 * gcc-interface/utils.c (begin_subprog_body): Do not call
12675 (end_subprog_body): Likewise.
12677 2011-05-04 Richard Guenther <rguenther@suse.de>
12679 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12681 (pos_to_constructor): Likewise.
12683 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12684 Eric Botcazou <ebotcazou@adacore.com>
12686 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12687 of build_function_type. Adjust calls to...
12688 (build_raise_check): ...this. Do not take a void_tree parameter.
12689 Call build_function_type_list instead of build_function_type.
12690 Fix head comment and swap couple of conditional blocks.
12692 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12694 * gnatvsn.ads (Library_Version): Bump to 4.7.
12695 (Current_Year): Bump to 2011.
12697 2011-04-29 Michael Matz <matz@suse.de>
12699 * gcc-interface/misc.c (gnat_handle_option): Set
12700 warn_maybe_uninitialized.
12702 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12704 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12705 the Watson/McCabe paper.
12707 2011-04-23 Jim Meyering <meyering@redhat.com>
12709 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12711 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12713 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12716 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12718 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12720 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12721 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12722 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12723 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12724 <all>: Do not set flags on the reused DECL node coming from an alias.
12725 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12726 don't need debug info here...
12727 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12728 (gigi): Adjust calls to create_subprog_decl.
12729 (build_raise_check): Likewise.
12730 (establish_gnat_vms_condition_handler): Likewise.
12731 (Compilation_Unit_to_gnu): Likewise.
12732 (gnat_to_gnu): Likewise.
12734 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12736 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12737 (NO_REORDER_ADAFLAGS): New variable.
12738 (EXTRA_GNATTOOLS): Always define.
12739 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12740 Clean up and adjust list of files compiled with special options.
12741 * gcc-interface/Make-lang.in: Likewise.
12742 (ada/decl.o): Cosmetical change.
12743 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12745 2011-04-20 Jim Meyering <meyering@redhat.com>
12747 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12749 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12751 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12752 $(CFLAGS) on the link line.
12754 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12756 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12757 padded type built for the return type if it is unconstrained.
12759 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12761 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12763 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12765 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12766 before calling TREE_CHAIN.
12767 * gcc-interface/misc.c (gnat_init_ts): New function.
12768 (LANG_HOOKS_INIT_TS): Define.
12770 2011-04-12 Martin Jambor <mjambor@suse.cz>
12772 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12773 instead of cgraph_node.
12775 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12777 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12778 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12781 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12783 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12784 of aggregate types that contain a placeholder.
12786 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12788 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12790 (handle_type_generic_attribute): Likewise.
12792 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12795 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12797 2011-04-04 Kai Tietz <ktietz@redhat.com>
12800 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12803 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12805 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12806 type case, do not strip a padding type around the array type.
12808 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12810 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12813 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12815 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12816 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12817 code for -feliminate-unused-debug-types.
12818 (gnat_post_options): Likewise.
12820 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12822 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12823 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12826 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12828 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12829 DECL_ARTIFICIAL flag on enumeration types.
12831 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12833 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12834 fat pointer types artificial unconditionally.
12835 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12838 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12840 * gcc-interface/gigi.h (get_dummy_type): Declare.
12841 (build_dummy_unc_pointer_types): Likewise.
12842 (finish_fat_pointer_type): Likewise.
12843 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12844 fat pointer type has been built, complete it in place.
12845 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12846 and thin pointers. Remove useless variable.
12847 (finish_fat_pointer_type): Make global and move to...
12848 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12849 (get_dummy_type): New function.
12850 (build_dummy_unc_pointer_types): Likewise.
12851 (gnat_pushdecl): Propage the name to the anonymous variants only.
12852 (update_pointer_to): Only adjust the pointer types in the unconstrained
12855 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12857 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12858 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12859 if this is a Taft amendment type and the full declaration is available.
12860 * gcc-interface/trans.c (process_type): Likewise.
12861 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12862 (process_freeze_entity): Likewise.
12863 * gcc-interface/utils.c (dummy_global): New static variable.
12864 (gnat_write_global_declarations): If there are types declared as used
12865 at the global level, insert them in the global hash table.
12867 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12869 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12870 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12871 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12873 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12874 flag of the type accordingly.
12875 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12877 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12879 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12880 finalizing types when updating the pointers to the designated type.
12881 <all>: Finalize the deferred types even if we didn't defer processing
12882 of incomplete types in this invocation.
12884 2011-04-01 Olivier Hainque <hainque@adacore.com>
12885 Nicolas Setton <setton@adacore.com>
12886 Eric Botcazou <ebotcazou@adacore.com>
12888 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12889 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12891 2011-03-28 Kai Tietz <ktietz@redhat.com>
12893 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12895 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12896 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12898 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12900 2011-03-28 Tristan Gingold <gingold@adacore.com>
12903 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12904 Use ada output of gnatbind.
12905 (ada/b_gnatb.adb): Ditto.
12906 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12907 (ada.mostlyclean, ada.stage1)
12908 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12909 (ada.stagefeedback): Adjust.
12910 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12911 Use ada output of gnatbind.
12912 (b_gnatm.adb): Ditto.
12913 (b_gnatl.o, b_gnatm.o): New rules.
12915 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12917 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12918 for the padded type built to support a specified size or alignment.
12920 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12922 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12923 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12924 unconditionally to the end of the unit when the designated type is
12926 <all>: Rename local variable. Attempt to un-defer types only and do it
12927 for limited_with'ed types as well.
12928 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12929 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12930 consistently and remove redundant call to finalize_from_with_types.
12932 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12934 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12935 subprograms without a previous spec declared in the same unit.
12936 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12937 subprograms at the end of the unit instead of at the beginning.
12938 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12939 isn't public for the special handling of non-inline functions nested
12940 inside inline external functions.
12942 2011-03-25 Jeff Law <law@redhat.com>
12944 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12946 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12948 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12949 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12950 to compute Set_Size_Depends_On_Discriminant.
12951 (Layout_Type): Call it on array types in back-end layout mode.
12952 * sem_util.adb (Requires_Transient_Scope): Return true for array
12953 types only if the size depends on the value of discriminants.
12954 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12955 type if the RHS is a call to a function that returns an unconstrained
12956 type with default discriminant.
12958 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12960 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12961 non-conversion to the nominal result type at the end.
12963 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12965 * gcc-interface/trans.c (create_temporary): New function taken from...
12966 (create_init_temporary): ...here. Call it.
12967 (call_to_gnu): Create the temporary for the return value early, if any.
12968 Create it for a function with copy-in/copy-out parameters if there is
12969 no target; in other cases of copy-in/copy-out, use another temporary.
12970 Push the new binding level lazily. Add and rename local variables.
12972 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12974 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12976 (set_rm_size): Likewise.
12978 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12980 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12981 for the padded type built in order to support a specified alignment.
12982 Fix incorrect formatting.
12984 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12987 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12989 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12991 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12992 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12993 to the end of the list. Adjust recursive call. Rename local variable.
12994 If REORDER is true, reorder components of the record type.
12995 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12996 components_to_record and adjust the parameter list.
12998 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13000 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13001 disabled, use the variable for bounds of loop iteration scheme.
13003 2011-03-21 Kai Tietz <ktietz@redhat.com>
13006 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13008 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13010 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13011 out whether the expression is read-only. Short-circuit placeholder
13012 case and rename a couple of local variables.
13014 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13016 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13017 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13018 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13019 (convert): Deal with conversions from a smaller form type specially.
13021 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13023 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13024 its argument, except for the special -I- switch.
13026 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13028 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13031 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13033 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13035 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13037 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13039 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13040 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13041 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13042 Do not generate the check directly, instead instantiate the template
13043 check present in the descriptor.
13044 (make_descriptor_field): Move around.
13045 (build_vms_descriptor32): Build a template check in the POINTER field.
13046 (build_vms_descriptor): Remove useless suffixes.
13047 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13049 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13052 * targext.c: Include target files if IN_RTS is defined.
13054 2011-01-26 Richard Guenther <rguenther@suse.de>
13057 * targext.c: Include config.h.
13058 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13061 2011-01-04 Pascal Obry <obry@adacore.com>
13062 Eric Botcazou <ebotcazou@adacore.com>
13064 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13066 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13068 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13069 end-of-case on the end label and its associated gotos, if any.
13071 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13073 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13074 expressions of the parameter cache within the statement group of
13075 the CICO mechanism.
13077 2011-01-04 Olivier Hainque <hainque@adacore.com>
13078 Eric Botcazou <ebotcazou@adacore.com>
13080 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13081 (set_end_locus_from_node): New function.
13082 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13083 make and the function end_locus.
13084 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13085 for the elaboration subprogram.
13086 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13087 set the end_locus of the expression as well.
13089 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13092 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13093 variables that are referenced in exception handlers volatile.
13097 Copyright (C) 2011 Free Software Foundation, Inc.
13099 Copying and distribution of this file, with or without modification,
13100 are permitted in any medium without royalty provided the copyright
13101 notice and this notice are preserved.
13103 * gnat_rm.texi: Ramification of pragma Eliminate documentation
13104 - fix bugs in the description of Source_Trace;
13105 - get rid of UNIT_NAME;
13107 2011-08-02 Javier Miranda <miranda@adacore.com>
13110 (Build_Dispatching_Requeue): Adding support for VM targets
13111 since we cannot directly reference the Tag entity.
13112 * exp_sel.adb (Build_K): Adding support for VM targets.
13113 (Build_S_Assignment): Adding support for VM targets.
13115 (Default_Prim_Op_Position): In VM targets do not restrict availability
13116 of predefined interface primitives to compiling in Ada 2005 mode.
13117 (Is_Predefined_Interface_Primitive): In VM targets this service is not
13118 restricted to compiling in Ada 2005 mode.
13119 (Make_VM_TSD): Generate code that declares and initializes the OSD
13120 record. Needed to support dispatching calls through synchronized
13123 (Make_Predefined_Primitive_Specs): Enable generation of predefined
13124 primitives associated with synchronized interfaces.
13125 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
13126 primitives associated with synchronized interfaces.
13128 2011-08-02 Yannick Moy <moy@adacore.com>
13130 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
13131 statements hidden in SPARK if preceded by the HIDE directive
13132 (Parse_Exception_Handlers): mark each exception handler in a sequence of
13133 exception handlers as hidden in SPARK if preceded by the HIDE directive
13134 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
13135 if starting with the HIDE directive
13136 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
13137 starting with the HIDE directive; mark the declarations in a private
13138 part as hidden in SPARK if the private part starts with the HIDE
13140 * restrict.adb, restrict.ads
13141 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
13142 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
13143 argument node belongs to a part which is hidden in SPARK
13144 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
13145 parts in SPARK; protect the possibly costly call to
13146 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
13147 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
13148 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
13149 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
13151 (Scan): recognize special comment starting with '#' and followed by
13152 SPARK keyword "hide" as a HIDE directive.
13154 2011-08-02 Yannick Moy <moy@adacore.com>
13156 * types.ads, erroutc.ads: Minor reformatting.
13158 2011-08-02 Vincent Celier <celier@adacore.com>
13160 * link.c: Add response file support for cross platforms.
13162 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13164 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
13165 in an association, set parent field of copy before partial analysis.
13166 * sem_res.adb (Resolve_Slice): create reference to itype only when
13167 expansion is enabled.
13169 2011-08-02 Yannick Moy <moy@adacore.com>
13171 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
13172 for new flag denoting which subprogram bodies are in ALFA
13173 * restrict.adb, sem_ch7.adb: Update comment
13174 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
13175 sem_ch9.adb, sem_res.adb: Add calls to
13176 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
13177 * sem_ch6.adb (Analyze_Function_Return): add calls to
13178 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
13179 middle of the body, and extended return.
13180 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13181 False when missing return.
13182 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13183 to True for subprograms whose spec is in ALFA. Remove later on the flag
13184 on the entity used for a subprogram body when there exists a separate
13186 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13187 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13188 False, otherwise do nothing.
13190 2011-08-02 Robert Dewar <dewar@adacore.com>
13192 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13194 2011-08-02 Yannick Moy <moy@adacore.com>
13196 * sem_ch4.ads: minor formatting.
13198 2011-08-02 Yannick Moy <moy@adacore.com>
13200 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13201 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13202 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13203 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13204 opt.ads: cleanup of SPARK mode
13206 2011-08-02 Yannick Moy <moy@adacore.com>
13208 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13210 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13211 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13213 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13214 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13215 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13216 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13218 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13220 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13221 functions whose return type is not in ALFA.
13222 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13224 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13225 parameter's type is not in ALFA.
13226 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13229 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13231 * sem_ch6 (Analyze_Expression_Function): treat the function as
13232 Inline_Always, and introduce a subprogram declaration for it when it is
13234 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13235 expression functions, so that the back-end can determine whether they
13236 can in fact be inlined.
13237 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13238 a function body comes from an expression function.
13240 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13242 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13243 null exclusions to test Can_Never_Be_Null on the anonymous access types
13244 of the formals rather than testing the formals themselves. Exclude this
13245 check in cases where the Old_Formal is marked as a controlling formal,
13246 to avoid issuing spurious errors for bodies completing dispatching
13247 operations (due to the flag not getting set on controlling access
13248 formals in body specs).
13249 (Find_Corresponding_Spec): When checking full and subtype conformance of
13250 subprogram bodies in instances, pass Designated and E in that order, for
13251 consistency with the expected order of the formals (New_Id followed by
13254 2011-08-02 Robert Dewar <dewar@adacore.com>
13256 * sem_ch8.adb: Minor reformatting.
13258 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13260 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13261 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13262 primitive operations of class-wide actuals.
13264 2011-08-02 Javier Miranda <miranda@adacore.com>
13266 * exp_atag.ads, exp_atag.adb
13267 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13268 since its value is implicitly passed in argument Typ.
13269 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13270 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13271 Build_Common_Dispatching_Select_Statements.
13273 2011-08-02 Robert Dewar <dewar@adacore.com>
13275 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13276 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13277 Minor reformatting.
13279 2011-08-02 Robert Dewar <dewar@adacore.com>
13281 * sem_res.adb: Minor reformatting.
13282 * sem_prag.adb: Minor reformatting.
13284 2011-08-02 Javier Miranda <miranda@adacore.com>
13286 * exp_atag.adb, exp_atags.ads
13287 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13288 by the tagged type Entity. Required to use this routine in the VM
13289 targets since we do not have available the Tag entity in the VM
13292 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13293 Ada.Tags has not been previously loaded.
13295 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13296 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13298 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13299 view of enclosing scopes. Required to handle enclosing scopes that
13300 are synchronized types whose full view is a task type.
13302 (Build_VM_TSDs): Minor code improvement to avoid generating and
13303 analyzing lists with empty nodes.
13304 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13305 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13306 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13307 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13308 (Make_Select_Specific_Data_Table): Add support for VM targets.
13309 (Make_VM_TSD): Generate code to initialize the SSD structure of
13312 2011-08-02 Yannick Moy <moy@adacore.com>
13314 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13315 cross-references section in ALI.
13316 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13317 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13319 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13320 subprogram or package entity of a node
13321 (Is_Local_Reference_Type): new function returns True for references
13322 selected in local cross-references.
13323 (Lt): function extracted from Lt in Output_References
13324 (Write_Entity_Name): function extracted from Output_References
13325 (Generate_Definition): generate reference with type 'D' for definition
13326 of objects (object declaration and parameter specification), with
13327 appropriate locations and units, for use in local cross-references.
13328 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13329 references of type 'I' for initialization in object definition.
13330 (Output_References): move part of function Lt and procedure
13331 Write_Entity_Name outside of the body. Ignore references of types 'D'
13332 and 'I' introduced for local cross-references.
13333 (Output_Local_References): new procedure to output the local
13334 cross-references sections.
13335 (Lref_Entity_Status): new array defining whether an entity is a local
13336 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13337 with 'I' type when initialization expression is present.
13338 * get_scos.adb, get_scos.ads: Correct comments and typos
13340 2011-08-02 Javier Miranda <miranda@adacore.com>
13342 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13344 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13346 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13349 2011-08-02 Vincent Celier <celier@adacore.com>
13351 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13352 (No_Space_Img): New function
13353 (Find_Excluded_Sources): When reading from a file, record the file name
13354 and the line number for each excluded source.
13355 (Mark_Excluded_Sources): When reporting an error, if the excluded
13356 sources were read from a file, include file name and line number in
13359 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13361 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13363 2011-08-02 Robert Dewar <dewar@adacore.com>
13365 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13367 2011-08-02 Javier Miranda <miranda@adacore.com>
13369 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13370 generation of TSDs to the DOTNET compiler.
13371 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13372 generation of TSDs to the DOTNET compiler.
13374 2011-08-02 Javier Miranda <miranda@adacore.com>
13376 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13377 record of all the tagged types declared inside library level package
13378 declarations, library level package bodies or library level subprograms.
13379 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13380 associated with a given tagged type.
13381 (Build_VM_TSDs): New subprogram.
13382 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13383 compilation units that are subprograms.
13384 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13385 compilation units that are package bodies.
13386 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13387 units that are a package declaration or a package instantiation.
13388 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13389 reorganization to improve the error generated by the frontend when the
13390 function Ada.Tags.Secondary_Tag is not available.
13391 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13392 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13394 2011-08-02 Javier Miranda <miranda@adacore.com>
13396 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13398 2011-08-02 Robert Dewar <dewar@adacore.com>
13400 * s-imenne.ads: Minor reformatting.
13402 2011-08-02 Robert Dewar <dewar@adacore.com>
13404 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13405 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13406 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13408 2011-08-02 Robert Dewar <dewar@adacore.com>
13410 * einfo.ads (Materialize_Entity): Document this is only for renamings
13411 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13412 required debug information in the case where we transform the object
13413 declaration into a renaming declaration.
13414 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13416 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13417 Materialize_Entity.
13419 2011-08-02 Robert Dewar <dewar@adacore.com>
13421 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13422 Suppress_Init_Procs.
13423 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13424 Suppress_Initialization/Initialization_Suppressed.
13425 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13426 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13427 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13428 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13430 2011-08-02 Robert Dewar <dewar@adacore.com>
13432 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13433 Minor reformatting.
13435 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13437 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13438 only have inheritable classwide pre/postconditions.
13440 2011-08-02 Javier Miranda <miranda@adacore.com>
13442 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13443 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13444 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13445 checks if the external tag of a type is the same as the external tag
13446 of some other declaration.
13448 2011-08-02 Thomas Quinot <quinot@adacore.com>
13450 * s-taskin.ads: Minor reformatting.
13452 2011-08-02 Emmanuel Briot <briot@adacore.com>
13454 * g-comlin.adb (Display_Help): swap the order in which it prints the
13455 short help and the general usage.
13457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13459 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13460 the aspect declarations and attach them to the generic copy for
13461 subsequent analysis.
13462 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13463 declarations of the generic tree to the new subprogram declarations.
13464 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13465 conditions that apply to a subprogram instance.
13467 2011-08-02 Robert Dewar <dewar@adacore.com>
13469 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13471 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13473 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13474 private type with a tagged full view is not derived in the immediate
13475 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13477 2011-08-02 Robert Dewar <dewar@adacore.com>
13479 * exp_ch4.adb: Minor reformatting.
13481 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13483 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13484 Ada2012 iterator, the loop will be rewritten during expansion into a
13485 while loop with a cursor and an element declaration. Do not analyze the
13486 body in this case, because if the container is for indefinite types the
13487 actual subtype of the elements will only be determined when the cursor
13488 declaration is analyzed.
13490 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13492 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13493 size/alignment related attributes in CodePeer_Mode.
13495 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13497 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13498 Prepend_Element, since this can result in the operation getting the
13499 wrong slot in the full type's dispatch table if the full type has
13500 inherited operations. The incomplete type's operation will get added
13501 to the proper position in the full type's primitives
13502 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13503 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13504 dispatching operations, since there are cases where nonprimitive
13505 subprograms can get added to the list of incomplete dependents (such
13506 as subprograms in nested packages).
13507 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13508 private part when determining whether to add a primitive with a
13509 parameter of a tagged incomplete type to the Private_Dependents list.
13510 Such primitives can also occur in the visible part, and should not have
13511 been excluded from being private dependents.
13512 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13513 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13514 list of a Taft-amendment incomplete type is a primitive before issuing
13515 an error that the full type must appear in the same unit. There are
13516 cases where nonprimitives can be in the list (such as subprograms in
13518 * sem_disp.adb (Derives_From): Use correct condition for checking that
13519 a formal's type is derived from the type of the corresponding formal in
13520 the parent subprogram (the condition was completely wrong). Add
13521 checking that was missing for controlling result types being derived
13522 from the result type of the parent operation.
13524 2011-08-02 Yannick Moy <moy@adacore.com>
13526 * errout.adb (First_Node): minor renaming
13527 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13530 2011-08-02 Yannick Moy <moy@adacore.com>
13532 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13533 before accessing operands.
13534 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13535 decide whether an initialization expression respects SPARK rules, as
13536 the plain node is the expanded one. This allows for more valid warnings
13538 * gnat_rm.texi: Minor update.
13540 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13542 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13545 2011-08-02 Robert Dewar <dewar@adacore.com>
13547 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13549 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13551 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13552 loop statements and the element renaming declaration with a block when
13553 the element type is controlled.
13555 2011-08-02 Yannick Moy <moy@adacore.com>
13557 * sinfo.ads: Minor formatting.
13559 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13561 * sem_aggr.adb (Add_Association): if the association has a box and no
13562 expression, use the Sloc of the aggregate itself for the new
13564 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13567 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13569 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13570 When a container is provided via a function call, generate a renaming
13571 of the function result. This avoids the creation of a transient scope
13572 and the premature finalization of the container.
13573 * exp_ch7.adb (Is_Container_Cursor): Removed.
13574 (Wrap_Transient_Declaration): Remove the supression of the finalization
13575 of the list controller when the declaration denotes a container cursor,
13578 2011-08-02 Yannick Moy <moy@adacore.com>
13580 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13581 node is from source, instead of the original node being from source.
13583 (Resolve_Array_Aggregate): refine the check for a static expression, to
13584 recognize also static ranges
13585 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13586 Array_Type_Declaration): postpone the test for the type being a subtype
13587 mark after the type has been resolved, so that component-selection and
13588 expanded-name are discriminated.
13589 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13590 to distinguish the case of an iteration scheme, so that an error is
13591 issed on a non-static range in SPARK except in an iteration scheme.
13592 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13593 In_Iter_Schm = True.
13594 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13595 user-defined operators so that they are allowed in renaming
13597 (Find_Selected_Component): refine the check for prefixing of operators
13598 so that they are allowed in renaming. Move the checks for restrictions
13599 on selector name after analysis discriminated between
13600 component-selection and expanded-name.
13601 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13602 concatenation argument of string type if it is static.
13603 * sem_util.adb, sem_util.ads
13604 (Check_Later_Vs_Basic_Declarations): add a new function
13605 Is_Later_Declarative_Item to decice which declarations are allowed as
13606 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13607 mode, add that renamings are considered as later items.
13608 (Enclosing_Package): new function to return the enclosing package
13609 (Enter_Name): correct the rule for homonyms in SPARK
13610 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13611 from source (result of expansion) to avoid issuing wrong warnings.
13613 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13615 * errout.adb: On anything but an expression First_Node returns its
13618 2011-08-02 Pascal Obry <obry@adacore.com>
13620 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13622 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13624 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13625 Set the associated loop as the related expression of internally
13627 * exp_ch7.adb (Is_Container_Cursor): New routine.
13628 (Wrap_Transient_Declaration): Supress the finalization of the list
13629 controller when the declaration denotes a container cursor.
13631 2011-08-02 Yannick Moy <moy@adacore.com>
13633 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13635 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13636 expression is a simple expression. This check cannot be performed in
13637 the semantics, so just drop it.
13638 (P_Index_Or_Discriminant_Constraint): move check that the index or
13639 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13640 semantics. Other cases were previously checked in the semantics.
13641 * par-ch4.adb (P_Name): move checks that a selector name is not
13642 character literal or an operator symbol to Find_Selected_Component in
13644 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13645 declarations are not placed after later declarations in a separate
13646 procedure in Sem_Util (possibly not the best choice?), to be used both
13647 during parsing, for Ada 83 mode, and during semantic analysis, for
13649 * par-endh.adb (Check_End): move check that end label is not missing
13650 to Process_End_Label in the semantics
13651 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13652 the special case for SPARK restriction
13653 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13654 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13655 parameter Force to issue the error message even on internal node (used
13656 for generated end label). Call Check_Restriction to check when an error
13657 must be issued. In SPARK mode, issue an error message even if the
13658 restriction is not set.
13659 (Check_Restriction): new procedure with an additional out parameter to
13660 inform the caller that a message has been issued
13661 * sem_aggr.adb: Minor modification of message
13662 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13663 instead of issuing an error message directly
13664 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13665 declarations are not placed after later declarations, by calling
13666 Check_Later_Vs_Basic_Declarations
13667 (Analyze_Subtype_Declaration): move here the check that an index or
13668 discriminant constraint must be a subtype mark. Change the check that
13669 a subtype of String must start at one so that it works on subtype marks.
13670 * sem_ch4.adb (Analyze_Call): move here the check that a named
13671 association cannot follow a positional one in a call
13672 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13673 instead of issuing an error message directly
13674 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13675 selector name is not a character literal or an operator symbol. Move
13676 here the check that the prefix of an expanded name cannot be a
13677 subprogram or a loop statement.
13678 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13679 procedure called from parsing and semantics to check that basic
13680 declarations are not placed after later declarations
13681 (Process_End_Label): move here the check that end label is not missing
13683 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13685 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13686 representation clause in codepeer mode, since it confuses CodePeer and
13687 does not bring useful info.
13689 2011-08-02 Ed Falis <falis@adacore.com>
13691 * init.c: initialize fp hw on MILS.
13693 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13695 * errout.adb (First_Node): for bodies, return the node itself (small
13696 optimization). For other nodes, do not check source_unit if the node
13697 comes from Standard.
13699 2011-08-02 Robert Dewar <dewar@adacore.com>
13701 * exp_ch3.adb: Minor comment additions.
13702 * sem_ch13.adb: Minor reformatting.
13704 2011-08-02 Pascal Obry <obry@adacore.com>
13706 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13708 2011-08-02 Robert Dewar <dewar@adacore.com>
13710 * sem_attr.adb: Minor reformatting.
13712 2011-08-02 Robert Dewar <dewar@adacore.com>
13714 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13715 (Has_Default_Component_Value): Removed
13716 * einfo.ads Comment updates
13717 (Has_Default_Aspect): Replaces Has_Default_Value
13718 (Has_Default_Component_Value): Removed
13720 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13722 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13723 (Get_Simple_Init_Val): Handle Default_Value aspect
13724 (Needs_Simple_Initialization): Handle Default_Value aspect
13725 * exp_ch3.ads: Needs_Simple_Initialization
13726 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13727 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13729 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13730 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13731 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13733 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13735 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13736 package containing iteration primitives.
13737 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13739 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13741 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13742 "of", pre-analyze expression in case it is a function call with
13743 finalization actions that must be placed ahead of the loop.
13744 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13745 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13747 2011-08-02 Geert Bosch <bosch@adacore.com>
13749 * cstand.adb (Create_Float_Types): Only consider C's long double for
13750 Long_Long_Float, in addition to double.
13752 2011-08-02 Robert Dewar <dewar@adacore.com>
13754 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13755 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13756 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13757 Minor reformatting.
13759 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13761 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13764 2011-08-02 Javier Miranda <miranda@adacore.com>
13766 * einfo.ads, einfo.adb
13767 (Original_Access_Type): Move this attribute to Node26 since there was
13768 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13769 which causes conflicts and breaks the generation of the .NET compiler.
13770 (Interface_Name): Add missing documentation on JGNAT only uses of
13773 2011-08-02 Geert Bosch <bosch@adacore.com>
13775 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13776 (Find_Back_End_Float_Type): Likewise
13777 (Create_Back_End_Float_Types): Likewise
13778 (Create_Float_Types): Likewise
13779 (Register_Float_Type): Likewise
13780 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13781 Nlist and split out type selection in new local Find_Base_Type function.
13782 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13784 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13786 2011-08-02 Robert Dewar <dewar@adacore.com>
13788 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13790 * opt.ads: Minor comment change.
13791 * sem_ch12.adb: Minor code reorganization.
13793 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13795 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13796 subtype's list of rep items to the list on the full subtype in the case
13797 where the lists are the same.
13799 2011-08-02 Geert Bosch <bosch@adacore.com>
13801 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13802 using the one from System.Strings, which also deallocates all strings.
13804 2011-08-02 Geert Bosch <bosch@adacore.com>
13806 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13808 * gcc-interface/Make-lang.in: Update dependencies.
13810 2011-08-02 Olivier Hainque <hainque@adacore.com>
13812 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13815 2011-08-02 Javier Miranda <miranda@adacore.com>
13817 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13818 associated with anonymous access to subprograms.
13820 2011-08-02 Geert Bosch <bosch@adacore.com>
13823 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13824 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13825 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13826 (Add_Symbol_Definition): Move to switch-c.adb
13827 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13828 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13829 (Add_Symbol_Definition): Move to switch-c.adb.
13830 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13832 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13833 Move to warnsw.adb.
13834 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13835 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13836 Move to warnsw.adb.
13837 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13838 (Add_Symbol_Definition): Moved from Prepcomp.
13839 * switch-c.ads: Update copyright notice. Use String_List instead of
13840 Argument_List, removing dependency on System.OS_Lib.
13842 2011-08-02 Yannick Moy <moy@adacore.com>
13844 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13845 mode on initialization expression which does not respect SPARK
13847 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13848 if the tree referenced by its argument represents an initialization
13849 expression in SPARK, suitable for initializing an object in an object
13852 2011-08-02 Javier Miranda <miranda@adacore.com>
13854 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13855 internally generated access to subprogram with its associated protected
13857 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13859 2011-08-02 Geert Bosch <bosch@adacore.com>
13861 * cstand.adb (Register_Float_Type): Print information about type to
13862 register, if the Debug_Flag_Dot_B is set.
13863 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13864 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13865 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13866 with a requested precision of more than Max_Digits digits and no more
13867 than Max_Base_Digits digits, if a range specification is present and the
13868 Predefined_Float_Types list has a suitable type to derive from.
13869 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13870 case of type completion with pragma Import
13872 (Process_Import_Predefined_Type): Processing to complete a type
13873 with pragma Import. Currently supports floating point types only.
13874 (Set_Convention_From_Pragma): Do nothing without underlying type.
13875 (Process_Convention): Guard against absence of underlying type,
13876 which may happen when importing incomplete types.
13877 (Process_Import_Or_Interface): Handle case of importing predefined
13878 types. Tweak error message.
13880 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13882 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13883 functions to previous change. Reorganize code slightly.
13885 2011-08-02 Geert Bosch <bosch@adacore.com>
13887 * back_end.ads (Register_Type_Proc): New call back procedure type for
13888 allowing the back end to provide information about available types.
13889 (Register_Back_End_Types): New procedure to register back end types.
13890 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13892 * cstand.adb (Back_End_Float_Types): New list for floating point types
13893 supported by the back end.
13894 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13895 (Copy_Float_Type): New procedure to make new copies of predefined types.
13896 (Register_Float_Type): New call back procedure to populate the BEFT list
13897 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13898 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13899 (Create_Float_Types): New procedure to create entities for floating
13900 point types predefined in Standard, and put these and any remaining
13901 BEFTs on the Predefined_Float_Types list.
13902 * stand.ads (Predefined_Float_Types): New list for predefined floating
13903 point types that do not have declarations in package Standard.
13905 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13907 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13908 entity node for the unit containing the parameter.
13909 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13910 (Add_Inlined_Subprogram): Likewise.
13911 * gcc-interface/Make-lang.in: Update dependencies.
13913 2011-08-02 Thomas Quinot <quinot@adacore.com>
13915 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13918 2011-08-02 Geert Bosch <bosch@adacore.com>
13920 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13922 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13924 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13925 computed value of Base_Type.
13927 2011-08-02 Yannick Moy <moy@adacore.com>
13929 * restrict.adb (Check_Restriction): issue an error for any use of
13930 class-wide, even if the No_Dispatch restriction is not set.
13931 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13932 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13933 when completing a private extension, the type named in the private part
13934 is not the same as that named in the visible part.
13935 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13936 of an inherited primitive operations of a tagged type or type extension
13937 that returns the tagged type.
13938 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13939 function which returns True for an implicit operation inherited by the
13940 derived type declaration for the argument type.
13941 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13944 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13946 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13947 Process_Bounds, to perform analysis with expansion of a range or an
13948 expression that is the iteration scheme for a loop.
13949 (Analyze_Iterator_Specification): If domain of iteration is given by a
13950 function call with a controlled result, as is the case if call returns
13951 a predefined container, ensure that finalization actions are properly
13953 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13955 2011-08-02 Javier Miranda <miranda@adacore.com>
13957 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13958 * gcc-interface/Make-lang.in: Update dependencies.
13960 2011-08-02 Javier Miranda <miranda@adacore.com>
13962 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13963 determine if the analysis is performed using N or Original_Node (N).
13964 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13965 functionality of routine Is_Variable avoids code duplication.
13966 * checks.adb (Determine_Range): Handle temporaries generated by
13967 Remove_Side_Effects.
13969 2011-08-02 Javier Miranda <miranda@adacore.com>
13971 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13972 expansion of the condition. Required since the previous analysis was
13973 done with expansion disabled (see Resolve_Quantified_Expression) and
13974 hence checks were not inserted and record comparisons have not been
13977 2011-08-02 Ed Falis <falis@adacore.com>
13979 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13982 2011-08-02 Bob Duff <duff@adacore.com>
13984 * opt.ads: Minor comment fix.
13986 2011-08-02 Bob Duff <duff@adacore.com>
13988 * sem_ch12.adb (Analyze_Package_Instantiation,
13989 Analyze_Subprogram_Instantiation): Turn off style checking while
13990 analyzing an instance. Whatever style checks that apply to the generic
13991 unit should apply, so it makes no sense to apply them in an instance.
13992 This was causing trouble when compiling an instance of a runtime
13993 unit that violates the -gnatyO switch.
13994 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13995 one of the two case statements, causing spurious errors.
13997 2011-08-02 Robert Dewar <dewar@adacore.com>
13999 * uname.adb: Minor reformatting.
14000 * gnatcmd.adb: Minor reformatting.
14001 * exp_attr.adb: Minor reformatting.
14003 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14005 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
14006 No_Dispatching_Calls, do not look for the Assign primitive, because
14007 predefined primitives are not created in this case.
14009 2011-08-02 Bob Duff <duff@adacore.com>
14011 * stylesw.ads: Minor comment fixes.
14013 2011-08-02 Robert Dewar <dewar@adacore.com>
14015 * freeze.adb (Add_To_Result): New procedure.
14017 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14019 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
14020 time, if the specific run-time routines for handling streams of strings
14021 are not available, use the default mechanism.
14023 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14025 * s-regpat.ads: Fix typo.
14027 2011-08-02 Vincent Celier <celier@adacore.com>
14029 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
14030 not null, call it to create the in memory config project file without
14031 parsing an existing default config project file.
14033 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14035 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
14037 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14039 * sem_elim.adb: an abstract subprogram does not need an eliminate
14040 pragma for its descendant to be eliminable.
14042 2011-08-02 Ed Falis <falis@adacore.com>
14044 * init.c: revert to handling before previous checkin for VxWorks
14045 * s-intman-vxworks.adb: delete unnecessary declarations related to
14046 using Ada interrupt facilities for handling signals.
14047 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
14048 * s-intman-vxworks.ads: Import __gnat_install_handler as
14049 Initialize_Interrupts.
14050 * s-taprop-vxworks.adb: Delete Signal_Mask.
14051 (Abort_Handler): change construction of mask to unblock exception
14054 2011-08-02 Jerome Guitton <guitton@adacore.com>
14056 * a-except-2005.adb (Raise_From_Signal_Handler): Call
14057 Debug_Raise_Exception before propagation starts.
14059 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14061 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
14062 to Restriction_Check_Required.
14063 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
14064 * sem_res.adb (Resolve_Call): Likewise.
14065 * sem_attr.adb (Check_Stream_Attribute): Likewise.
14067 2011-08-02 Bob Duff <duff@adacore.com>
14069 * stylesw.ads: Update comment.
14070 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
14071 * errout.ads: Remove obsolete comment.
14073 2011-08-02 Javier Miranda <miranda@adacore.com>
14075 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
14076 (Set_Is_Safe_To_Reevaluate): new procedure.
14077 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
14078 assignment is allowed on safe-to-reevaluate variables.
14079 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
14080 temporary created to remove side effects in expressions that use
14081 the secondary stack as safe-to-reevaluate.
14082 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
14083 variables that are not true constants.
14085 2011-08-02 Robert Dewar <dewar@adacore.com>
14087 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
14088 sem_res.adb, sem_ch6.adb: Minor reformatting.
14090 2011-08-02 Jerome Guitton <guitton@adacore.com>
14092 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
14094 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14096 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
14097 not set Overridden_Operation if subprogram is an initialization
14100 2011-08-02 Yannick Moy <moy@adacore.com>
14102 * par-ch6.adb: Correct obsolete name in comments
14103 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
14104 which takes two message arguments (existing function takes one), with
14105 second message used for continuation.
14106 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
14107 block statements that originate from a source block statement, not
14108 generated block statements
14109 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
14110 symmetry with procedure case
14111 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
14112 function to issue an error in formal mode if a package specification
14113 contains more than one tagged type or type extension.
14114 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
14115 parameters matching formals of tagged types are objects (or ancestor
14116 type conversions of objects), not general expressions. Issue an error
14117 on view conversions that are not involving ancestor conversion of an
14119 (Resolve_Type_Conversion): in formal mode, issue an error on the
14120 operand of an ancestor type conversion which is not an object
14121 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
14122 procedure so that it works also for actuals of function calls
14123 (Is_Actual_Tagged_Parameter): new function which determines if its
14124 argument is an actual parameter of a formal of tagged type in a
14126 (Is_SPARK_Object_Reference): new function which determines if the tree
14127 referenced by its argument represents an object in SPARK
14129 2011-08-02 Robert Dewar <dewar@adacore.com>
14131 * sem_ch3.adb: Minor reformatting
14132 Minor comment addition
14133 Minor error msg text change
14135 2011-08-02 Javier Miranda <miranda@adacore.com>
14137 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
14138 function. Used to be more precise when we generate a variable plus one
14139 assignment to remove side effects in the evaluation of the Bound
14141 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
14142 of the bound expression to force its re-analysis and thus expand the
14143 associated transient scope (if required). Code cleanup replacing the
14144 previous code that declared the constant entity by an invocation to
14145 routine Force_Evaluation which centralizes this work in the frontend.
14147 2011-08-02 Robert Dewar <dewar@adacore.com>
14149 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
14150 (Base_Type): Now uses improved Is_Base_Type function
14151 * einfo.ads (Base_Type): Inline this function
14153 2011-08-02 Robert Dewar <dewar@adacore.com>
14155 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
14156 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
14158 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14160 * gcc-interface/Make-lang.in: Update dependencies.
14161 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
14164 2011-08-02 Yannick Moy <moy@adacore.com>
14166 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
14167 non-simple expression used in delta constraint
14168 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
14169 index constraint which is not a subtype mark
14170 * par.adb: With and use Restrict
14171 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
14172 mode on component type which is not a subtype mark and default
14173 expression on component
14174 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
14175 of string which does not have a lower index bound equal to 1
14176 (Array_Type_Declaration): issue an error in formal mode on index or
14177 component type which is not a subtype mark, and on aliased keyword on
14179 (Derived_Type_Declaration): issue an error in formal mode on interface,
14180 limited or abstract type
14181 (Record_Type_Declaration): issue an error in formal mode on interface
14182 (Record_Type_Definition): issue an error in formal mode on tagged types
14183 and type extensions not declared in the specification of a library unit
14184 package; on null non-tagged record; on variant part
14186 2011-08-02 Vincent Celier <celier@adacore.com>
14188 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14189 not declared for qualified library project when Library_Name is not
14190 declared, but Library_Dir is.
14192 2011-08-02 Robert Dewar <dewar@adacore.com>
14194 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14195 pragmas (affects aspects [Component_]Default_Value
14196 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14197 component type for the resolution
14199 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14201 * einfo.adb (Base_Type): Tune implementation for speed.
14203 2011-08-02 Robert Dewar <dewar@adacore.com>
14205 * freeze.adb: Minor reformatting.
14207 2011-08-02 Thomas Quinot <quinot@adacore.com>
14209 * scos.ads: Update comments.
14211 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14213 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14214 base type, because the parent may be a subtype of a private type whose
14215 convention is established in a private part.
14217 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14219 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14220 statement in a block when the expansion of the return expression has
14221 created a finalization chain.
14222 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14223 with the parent node.
14224 Add N_Extended_Return_Statement to handle the case where a transient
14225 object declaration appears in the Return_Object_Declarations list of
14226 an extended return statement.
14228 2011-08-02 Matthew Gingell <gingell@adacore.com>
14230 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14231 unused parameter 'name'.
14233 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14235 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14236 inherited operation, check whether its alias, which is the source
14237 operastion that it renames, has been marked eliminated.
14239 2011-08-02 Javier Miranda <miranda@adacore.com>
14241 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14242 in-mode parameter whose type is an access type since it can be used to
14243 modify its designated object. Enforce code that handles as safe an
14244 access type that is not access-to-constant but it is the result of a
14245 previous removal of side-effects.
14246 (Remove_Side_Effects): Minor code reorganization of cases which require
14247 no action. Done to incorporate documentation on new cases uncovered
14248 working in this ticket: no action needed if this routine was invoked
14249 too early and the nodes are not yet decorated.
14250 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14251 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14252 were issued with actuals that are implicitly provided by
14255 2011-08-02 Robert Dewar <dewar@adacore.com>
14257 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14259 2011-08-02 Yannick Moy <moy@adacore.com>
14261 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14262 to issue an error in formal mode on attribute not supported in this mode
14263 (Analyze_Attribute): issue errors on standard attributes not supported
14265 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14266 comment, and issue error in formal mode on modulus which is not a power
14268 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14270 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14272 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14273 operator on modular type (except 'not').
14275 2011-08-02 Robert Dewar <dewar@adacore.com>
14277 * gnat_rm.texi: Minor reformatting.
14279 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14281 * s-osinte-linux.ads: Minor comment update and reformatting.
14282 * i-cexten.ads: Make this unit pure, as for its parent.
14283 Will allow its usage in more contexts if needed.
14285 2011-08-02 Robert Dewar <dewar@adacore.com>
14287 * s-utf_32.ads: Minor comment fix.
14289 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14291 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14292 operation of a tagged synchronized type, handle the case where the
14293 controlling argument is overloaded.
14295 2011-08-02 Yannick Moy <moy@adacore.com>
14297 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14298 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14299 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14300 SPARK mode and formal verification mode on processing SPARK restriction
14301 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14302 requiring consistency checking.
14304 2011-08-02 Robert Dewar <dewar@adacore.com>
14306 * sem_res.adb: Minor reformatting.
14308 2011-08-02 Robert Dewar <dewar@adacore.com>
14310 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14311 a-cforse.ads: Remove unneeded with of Ada.Containers
14312 Remove commented out pragma Inline's
14313 Move specifications of new subprograms to the actual specs
14315 2011-08-02 Yannick Moy <moy@adacore.com>
14317 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14318 a-cforse.ads: Update comments.
14320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14322 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14324 2011-08-02 Robert Dewar <dewar@adacore.com>
14326 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14327 a-cforse.ads, a-cofove.ads: Minor reformatting.
14329 2011-08-02 Claire Dross <dross@adacore.com>
14331 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14332 a-cofove.ads: Add comments.
14334 2011-08-02 Yannick Moy <moy@adacore.com>
14336 * gnat_rm.texi: Document formal containers.
14338 2011-08-02 Emmanuel Briot <briot@adacore.com>
14340 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14341 are empty sections.
14343 2011-08-02 Robert Dewar <dewar@adacore.com>
14345 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14348 2011-08-02 Robert Dewar <dewar@adacore.com>
14350 * aspects.adb: New aspects Default_Value and Default_Component_Value
14351 New format of Aspect_Names table checks for omitted entries
14352 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14353 handling of boolean aspects for derived types.
14354 New aspects Default_Value and Default_Component_Value
14355 New format of Aspect_Names table checks for omitted entries
14356 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14357 (Has_Default_Value): New flag
14358 (Has_Default_Component_Value): New flag
14359 (Has_Default_Value): New flag
14360 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14362 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14363 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14364 Default_Value and Default_Component_Value
14365 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14366 New aspects Default_Value and Default_Component_Value
14367 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14368 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14370 2011-08-02 Vincent Celier <celier@adacore.com>
14372 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14373 inherit library kind.
14375 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14377 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14378 Minor reformatting.
14380 2011-08-02 Robert Dewar <dewar@adacore.com>
14382 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14384 2011-08-02 Yannick Moy <moy@adacore.com>
14386 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14388 2011-08-02 Robert Dewar <dewar@adacore.com>
14390 * impunit.adb: Add comment.
14392 2011-08-02 Yannick Moy <moy@adacore.com>
14394 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14395 qualification of aggregates in formal mode
14396 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14398 (Resolve_Aggregate): complete the test that an aggregate is adequately
14399 qualified in formal mode
14401 2011-08-02 Pascal Obry <obry@adacore.com>
14403 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14404 * mlib-prj.adb: Supress warning when compiling binder generated file.
14405 (Build_Library): Supress all warnings when compiling the binder
14408 2011-08-02 Yannick Moy <moy@adacore.com>
14410 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14412 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14413 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14414 Add with/use clauses to make Check_Formal_Restriction visible
14416 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14418 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14419 in-parameters when type of the generic formal is private in the generic
14420 spec and non-private in the body.
14422 2011-08-02 Claire Dross <dross@adacore.com>
14424 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14425 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14426 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14427 * impunit.adb, Makefile.rtl: Take new files into account.
14429 2011-08-02 Robert Dewar <dewar@adacore.com>
14431 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14432 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14434 2011-08-02 Yannick Moy <moy@adacore.com>
14436 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14438 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14439 matching static array bounds, taking into account the special case of
14441 * sem_ch3.adb: Typo in comment.
14443 2011-08-02 Yannick Moy <moy@adacore.com>
14445 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14446 which issues an error in formal mode if its argument node is originally
14448 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14449 has a discriminant specification so that it does not include the case
14451 (Derived_Type_Declaration): move here the test that a derived type has a
14452 discriminant specification
14453 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14454 first element of a component association before accessing its choices
14455 (presence of component association is not enough)
14456 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14457 declaration is a library item before accessing the next element in a
14458 list, as library items are not member of lists
14459 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14460 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14461 Check_Formal_Restriction whenever possible.
14463 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14465 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14466 reference when needed.
14468 2011-08-02 Bob Duff <duff@adacore.com>
14470 * gnat_ugn.texi: Fix typo.
14472 2011-08-02 Vincent Celier <celier@adacore.com>
14474 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14475 archive file name. Do not use the full path name of archives for Open
14478 2011-08-02 Robert Dewar <dewar@adacore.com>
14480 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14481 Analyze_Aspect_Specifications
14483 (Analyze_Aspect_Specifications): New handling for boolean aspects
14484 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14485 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14486 sequence for Analyze_Aspect_Specifications
14487 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14488 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14490 2011-08-02 Robert Dewar <dewar@adacore.com>
14492 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14493 aspects, since these no longer exist.
14495 2011-08-02 Robert Dewar <dewar@adacore.com>
14497 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14498 semicolon, do not try to see if there are aspects following it.
14499 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14502 2011-08-02 Robert Dewar <dewar@adacore.com>
14504 * sem_ch8.adb, aspects.ads: Minor reformatting.
14506 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14508 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14509 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14511 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14513 2011-08-02 Yannick Moy <moy@adacore.com>
14515 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14516 mode on subprogram declaration outside of package specification, unless
14517 it is followed by a pragma Import
14518 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14519 Access_Type_Declaration): issue error in formal mode on access type
14520 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14522 (Analyze_Object_Declaration): issue error in formal mode on object
14523 declaration which does not respect SPARK restrictions
14524 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14525 declaration which does not respect SPARK restrictions
14526 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14527 error in formal mode on digits or delta constraint
14528 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14529 decimal fixed point type
14530 (Derived_Type_Declaration): issue error in formal mode on derived type
14531 other than type extensions of tagged record types
14532 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14533 with check on access definition
14534 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14535 mode on protected definition.
14536 (Analyze_Task_Definition): issue error in formal mode on task definition
14538 2011-08-02 Robert Dewar <dewar@adacore.com>
14540 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14542 2011-08-02 Javier Miranda <miranda@adacore.com>
14544 * sem_ch6.adb (Can_Override_Operator): New function.
14545 (Verify_Overriding_Indicator): Add missing code to check overriding
14546 indicator in operators. Fixes regression.
14547 (Check_Overriding_Indicator): Minor reformating after replacing the
14548 code that evaluates if the subprogram can override an operator by
14549 invocations to the above new function.
14551 (Write_Field26_Name): Add missing code to ensure that, following
14552 the documentation in einfo.ads, this field is not shown as attribute
14553 "Static_Initialization" on non-dispatching functions.
14555 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14557 * sem_res.adb (Resolve_Call): A call to
14558 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14559 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14560 i.e., when the second parameter is of type Time_Span.
14562 2011-08-02 Vincent Celier <celier@adacore.com>
14564 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14565 with an archive instead of -L<library dir> -l<library name>.
14567 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14569 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14570 mark the base types In_Use in addition to making the operations
14573 2011-08-02 Ed Falis <falis@adacore.com>
14575 * init.c: add and setup __gnat_signal_mask for the exception signals
14576 * s-inmaop-vxworks.adb: new file.
14577 * s-intman-vxworks.adb: remove unnecessary initializations and
14579 * s-intman-vxworks.ads: remove unnecessary variable
14580 * s-taprop-vxworks.adb: simplify signal initialization
14582 2011-08-02 Robert Dewar <dewar@adacore.com>
14584 * sem_ch8.adb: Minor code reorganization, comment updates.
14586 2011-08-02 Robert Dewar <dewar@adacore.com>
14588 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14589 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14591 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14592 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14594 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14596 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14597 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14598 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14599 use_type_clauses, to handle more efficiently use_type and use_all_type
14601 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14602 Ada2012 Use_All_Type clause.
14603 (Use_Class_Wide_Operations): new procedure.
14605 2011-08-02 Robert Dewar <dewar@adacore.com>
14607 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14608 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14609 expression to expression function.
14611 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14613 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14614 if types are compatible.
14616 2011-08-02 Yannick Moy <moy@adacore.com>
14618 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14619 returns True if its argument array types have same dimension and same
14620 static bounds at each index.
14621 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14622 OUT or IN OUT paramaters which are not view conversions in SPARK.
14623 (Resolve_Arithmetic_Op): issue an error in formal mode on
14624 multiplication or division with operands of fixed point types which are
14625 not qualified or explicitly converted.
14626 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14627 Boolean or array type (except String) operands.
14628 (Resolve_Equality_Op): issue an error in formal mode on equality
14629 operators for array types other than String with non-matching static
14631 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14632 for array types with non-matching static bounds. Factorize the code in
14633 Matching_Static_Array_Bounds.
14634 (Resolve_Qualified_Expression): issue an error in formal mode on
14635 qualified expressions for array types with non-matching static bounds.
14636 (Resolve_Type_Conversion): issue an error in formal mode on type
14637 conversion for array types with non-matching static bounds
14639 2011-08-02 Robert Dewar <dewar@adacore.com>
14641 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14643 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14645 * par-ch9.adb: save location of entry for proper error message.
14647 2011-08-02 Javier Miranda <miranda@adacore.com>
14649 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14650 (Use_Full_View) which permits this routine to climb through the
14651 ancestors using the full-view of private parents.
14652 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14653 Use_Full_View to true in calls to Is_Ancestor.
14654 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14655 true in call to Is_Ancestor.
14656 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14657 Use_Full_View to true in call to Is_Ancestor.
14658 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14659 call to Is_Ancestor.
14660 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14661 Use_Full_View to true in calls to Is_Ancestor.
14662 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14663 Make_Select_Specific_Data_Table, Register_Primitive,
14664 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14665 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14666 to true in call to Is_Ancestor.
14667 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14668 Use_Full_View to true in calls to Is_Ancestor.
14670 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14671 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14673 2011-08-02 Robert Dewar <dewar@adacore.com>
14675 * gnat_rm.texi: Minor reformatting.
14676 * sem_prag.adb: Minor reformatting.
14678 2011-08-02 Tristan Gingold <gingold@adacore.com>
14680 * vms_data.ads: Add VMS qualifier for -gnateP.
14682 2011-08-02 Robert Dewar <dewar@adacore.com>
14684 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14685 * par-ch7.adb (P_Package): Proper placement of aspects for package
14686 decl/instantiation.
14687 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14688 (End_Statements): Add Is_Sloc parameterr
14689 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14690 (Check_End): Ad Is_Sloc parameter
14691 (End_Statements): Add Is_Sloc parameterr
14693 2011-08-02 Vincent Celier <celier@adacore.com>
14695 * ug_words: Add VMS qualifier equivalent to -gnateP:
14696 /SYMBOL_PREPROCESSING.
14698 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14700 * gnat-style.texi: For hexadecimal numeric literals the typical
14701 grouping of digits is 4 to represent 2 bytes.
14702 A procedure spec which is split into several lines is indented two
14705 2011-08-02 Yannick Moy <moy@adacore.com>
14707 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14708 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14709 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14711 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14712 choice in array aggregate
14713 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14715 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14716 positional and named aggregate for record, or others in record
14717 aggregate, or multiple choice in record aggregate
14718 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14719 array operands to logical operations AND, OR and XOR do not have the
14720 same static lower and higher bounds
14721 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14723 2011-08-01 Robert Dewar <dewar@adacore.com>
14725 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14726 Replaces Last_Source_Node_In_Sequence.
14727 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14728 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14729 parens and blank in string (this was inconsistently implemented).
14731 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14732 blank in string (this was inconsistently implemented).
14734 (Set_Global_Switches): Set formal mode switches appropriately
14735 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14737 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14738 call Set_Error_Msg_Lang to set "spark" as language name.
14739 * par.adb: Remove unnecessary call to set formal language for errout
14740 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14741 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14743 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14744 calls to it, moved after resolution so that types are known
14745 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14746 result of concatenation is not of type String
14747 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14748 concatenation is not properly restricted
14749 * gnat_rm.texi: Add doc on pragma Spark_95.
14750 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14751 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14752 * gcc-interface/Make-lang.in: Update dependencies.
14754 2011-08-01 Javier Miranda <miranda@adacore.com>
14756 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14757 condition that detects if the overridden operation must replace an
14760 2011-08-01 Javier Miranda <miranda@adacore.com>
14762 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14763 code declarations inserted by Insert_Actions in each alternative of the
14764 N_Case_Expression node.
14766 2011-08-01 Robert Dewar <dewar@adacore.com>
14768 * sem_ch6.adb: Minor code reorganization.
14769 * sem_util.adb: Minor reformatting.
14771 2011-08-01 Pascal Obry <obry@adacore.com>
14773 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14774 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14776 2011-08-01 Yannick Moy <moy@adacore.com>
14778 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14779 literal or operator symbol which is prefixed
14780 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14781 mode on access attributes.
14782 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14783 that concatenation operands are properly restricted in formal mode
14784 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14785 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14786 result of the concatenation has a type different from String.
14787 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14788 Analyze_Quantified_Expression, Analyze_Slice,
14789 Analyze_Null): issue an error in formal mode on unsupported constructs
14791 (Analyze_Block_Statement): only issue error on source block statement
14792 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14793 function which returns the last node in a list of nodes for which
14794 Comes_From_Source returns True, if any
14795 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14796 Last_Source_Node_In_Sequence
14797 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14798 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14799 mode on unsupported constructs
14800 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14801 rest of the actions may be needed later on since the error is marked as
14803 * sinfo.ads: Typos in comments.
14805 2011-08-01 Pascal Obry <obry@adacore.com>
14807 * projects.texi: Minor editing.
14809 2011-08-01 Yannick Moy <moy@adacore.com>
14811 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14812 insertion character ~~
14813 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14814 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14815 with insertion character ~~
14816 (Set_Msg_Text): treat insertion character ~~
14817 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14818 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14819 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14820 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14821 errors related to the formal language restriction not serious
14822 (insertion character |).
14823 * par.adb (Par): set formal language for error messages if needed
14824 * sem_ch6.adb (Check_Missing_Return): take into account possible
14825 generated statements at the end of the function
14826 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14827 enumeration value to define a new pragma SPARK_95
14828 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14829 SPARK_Version): new type and variables to store the SPARK version
14831 (SPARK_Mode): return True when SPARK_Version is set
14832 * par-prag.adb: Correct indentation
14833 (Prag): take Pragma_SPARK_95 into account
14834 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14837 2011-08-01 Robert Dewar <dewar@adacore.com>
14839 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14840 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14841 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14843 2011-08-01 Pascal Obry <obry@adacore.com>
14845 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14846 Target_Name to Get_Path call.
14847 (Parse_Single_Project): Likewise.
14848 (Post_Parse_Context_Clause): Likewise.
14849 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14850 Call Initialise_Project_Path with the proper Target_Name.
14851 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14853 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14854 with the proper Target_Name.
14855 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14856 Part.Parse routine.
14857 (Parse_Project_And_Apply_Config): Likewise.
14858 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14859 This is fine as this part of the code is supporting only native
14861 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14862 is fine as this part of the code is supporting only native compilation.
14864 2011-08-01 Yannick Moy <moy@adacore.com>
14866 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14867 of homonym, unless the homonym is one of the cases allowed in SPARK
14868 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14869 package declaration occurring after a body.
14871 2011-08-01 Robert Dewar <dewar@adacore.com>
14873 * checks.adb, exp_ch4.adb: Minor reformatting.
14875 2011-08-01 Javier Miranda <miranda@adacore.com>
14877 * einfo.ads (Access_Disp_Table): Fix documentation.
14878 (Dispatch_Table_Wrappers): Fix documentation.
14880 2011-08-01 Pascal Obry <obry@adacore.com>
14882 * prj-env.adb, prj-env.ads: Minor reformatting.
14884 2011-08-01 Yannick Moy <moy@adacore.com>
14886 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14887 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14888 procedures out of these packages.
14889 * errout.ads, errout.adb
14890 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14891 procedures in of this package
14892 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14893 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14894 on misplaced later vs initial declarations, like in Ada 83
14895 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14896 formal mode on attribute of private type whose full type declaration
14898 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14899 package declaration inside a package specification
14900 (Analyze_Full_Type_Declaration): issue error in formal mode on
14901 controlled type or discriminant type
14902 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14903 user-defined operator means that it should come from the source
14904 (New_Overloaded_Entity): issue error in formal mode on overloaded
14906 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14908 2011-08-01 Thomas Quinot <quinot@adacore.com>
14910 * atree.adb: Minor reformatting.
14911 * checks.adb: Minor reformatting.
14913 2011-08-01 Vincent Celier <celier@adacore.com>
14915 * s-parame-vms-ia64.ads: Fix typo in comment
14917 * s-parame-vms-restrict.ads: Removed, unused.
14919 2011-08-01 Javier Miranda <miranda@adacore.com>
14922 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14924 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14925 * sem_ch3.ads, sem_ch3.adb
14926 (Is_Constant_Bound): New extended version of the subprogram that was
14927 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14928 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14929 * sem_aux.ads (Constant_Value): Fix typo in comment.
14930 * checks.adb (Generate_Index_Checks): New implementation which, for
14931 array objects with constant bounds, generates the runtime check
14932 referencing the bounds of the array type. For other cases this routine
14933 provides its previous behavior obtaining such values from the array
14935 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14937 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14938 we cannot have semantic interpretations of the new node.
14940 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14942 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14945 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14947 * sem_ch8.adb: Minor code editing.
14948 * s-vxwext.adb: Remove trailing space.
14949 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14950 consistency with other files.
14952 2011-08-01 Thomas Quinot <quinot@adacore.com>
14954 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14956 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14958 * par-ch10.adb: reject parameterized expressions as compilation unit.
14959 * sem_ch4.adb: handle properly conditional expression with overloaded
14960 then_clause and no else_clause.
14962 2011-08-01 Tristan Gingold <gingold@adacore.com>
14964 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14965 like done by System.Aux_DEC.
14966 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14968 2011-08-01 Yannick Moy <moy@adacore.com>
14970 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14971 missing label at end of declaration (subprogram or package)
14972 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14973 of positional and named parameter association
14974 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14975 Error_Msg_SP which adds a prefix to the error message giving the name
14976 of the formal language analyzed
14977 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14978 access result type in subprogram, unconstrained array as result type,.
14979 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14981 * sem_ch8.adb: Code clean up.
14983 2011-08-01 Javier Miranda <miranda@adacore.com>
14985 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14986 * einfo.ads (Access_Disp_Table): Fix documentation.
14987 (Dispatch_Table_Wrappers): Fix documentation.
14988 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14989 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14990 to enforce the documentation of this attribute.
14991 (Set_Is_Interface): Cleanup the assertion.
14992 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14993 the Underlying_Type entity before reading attribute Access_Disp_Table.
14994 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14995 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14996 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14997 the Underlying_Type entity before reading attribute Access_Disp_Table.
14998 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14999 Locate the Underlying_Type entity before reading attribute
15002 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15004 * s-poosiz.ads: Additional overriding indicators.
15006 2011-08-01 Yannick Moy <moy@adacore.com>
15008 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
15010 (Analyze_Iteration_Scheme): issue error in formal mode when loop
15011 parameter specification does not include a subtype mark.
15012 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
15013 formal mode on abstract subprogram.
15014 (Analyze_Subprogram_Specification): issue error in formal mode on
15015 user-defined operator.
15016 (Process_Formals): issue error in formal mode on access parameter and
15017 default expression.
15018 * sem_ch9.adb (Analyze_Abort_Statement,
15019 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
15020 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
15021 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
15022 Analyze_Requeue, Analyze_Selective_Accept,
15023 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
15024 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
15025 issue error in formal mode on user-defined raise statement.
15027 2011-08-01 Thomas Quinot <quinot@adacore.com>
15029 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
15030 declaration being hidden when overriding an implicit inherited
15032 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
15033 (-gnats), do not complain about a source file that contains only a
15036 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15038 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
15039 variable if already set.
15041 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15043 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
15044 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
15045 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
15046 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
15047 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
15048 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
15049 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
15050 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
15051 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
15052 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
15053 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
15054 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
15055 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
15056 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
15057 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
15058 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
15059 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
15060 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
15061 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
15062 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
15063 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
15064 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
15065 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
15066 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
15067 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
15068 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
15069 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
15070 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
15071 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
15072 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
15073 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
15074 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
15075 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
15076 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
15077 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
15078 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
15079 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
15080 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
15081 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
15082 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
15083 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
15084 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
15085 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
15086 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
15087 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
15088 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
15089 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
15090 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
15091 s-osinte-mingw.ads: Update to GPLv3 run-time license.
15092 Use GNAT instead of GNARL.
15094 2011-08-01 Bob Duff <duff@adacore.com>
15096 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
15097 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
15098 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
15101 2011-08-01 Yannick Moy <moy@adacore.com>
15103 * debug.adb (d.D) reverve flag for the SPARK mode
15104 (d.E) reverve flag for SPARK generation mode
15105 (d.F) reverve flag for Why generation mode
15106 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
15107 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
15108 functions which return True when the corresponding modes are set
15109 (Formal_Language): return "spark" or "alfa" when in formal verification
15111 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
15112 Error_Msg to prefix the error message with a tag giving the formal
15114 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
15115 message with a tag giving the formal language
15116 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
15118 (Analyze_Case_Statement): issue error in formal mode on case statement
15119 with a single "others" case alternative
15120 (Analyze_Exit_Statement): issue errors in formal mode on exit
15121 statements which do not respect SPARK restrictions
15122 (Analyze_Goto_Statement): issue error in formal mode on goto statement
15123 (Check_Unreachable_Code): always issue an error (not a warning) in
15124 formal mode on unreachable code (concerns both code after an infinite
15125 loop and after an unconditional jump, both not allowed in SPARK)
15126 * sem_ch6.adb (Analyze_Return_Statement): add call to
15127 Set_Return_Present for a procedure containing a return statement
15128 (already done for functions in Analyze_Function_Return)
15129 (Analyze_Function_Return): issue error in formal mode on extended
15130 return or if return is not last statement in function
15131 (Check_Missing_Return): issue error in formal mode if function does
15132 not end with return or if procedure contains a return
15133 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
15134 function to detect if there is an inner scope of its parameter S which
15137 2011-08-01 Thomas Quinot <quinot@adacore.com>
15139 * sem_ch6.ads: Minor reformatting.
15141 2011-08-01 Javier Miranda <miranda@adacore.com>
15143 * sem_util.adb (Abstract_Interface_List): Complete condition when
15144 processing private type declarations to avoid reading unavailable
15146 (Is_Synchronized_Tagged_Type): Complete condition when processing
15147 private extension declaration nodes to avoid reading unavailable
15150 2011-08-01 Thomas Quinot <quinot@adacore.com>
15152 * sem_ch3.adb: Minor reformatting.
15154 2011-08-01 Thomas Quinot <quinot@adacore.com>
15156 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
15157 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
15158 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
15159 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
15160 for VMS, instead parametrize the common implementation with
15161 System.Parameters declarations.
15163 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
15165 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
15167 2011-08-01 Tristan Gingold <gingold@adacore.com>
15169 * seh_init.c: Fix SEH handler installation on win64.
15171 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15173 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
15174 double analysis of an anonymous access to subprogram, because it can
15175 lead to improper sharing of profiles and a back-end crash.
15177 2011-08-01 Robert Dewar <dewar@adacore.com>
15179 * make.adb, sem_ch4.adb: Minor reformatting.
15180 * gcc-interface/Make-lang.in: Update dependencies.
15181 * sem_util.adb, exp_ch5.adb: Minor reformatting.
15183 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15185 * gnat_rm.texi: Fix definition of Long_Integer.
15187 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15189 * exp_aggr.adb: check limit size of static aggregate unconditionally,
15190 to prevent storage exhaustion.
15191 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15192 finalized is a function body, insert the cleanup code before the final
15193 return statement, to prevent spurious warnings.
15194 * s-pooglo.ads: add overriding indicator.
15196 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15198 * sem_ch4.adb (Operator_Check): improve error message when both a
15199 with_clause and a use_clause are needed to make operator usage legal.
15200 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15201 determine whether a compilation unit is visible within an other,
15202 either through a with_clause in the current unit, or a with_clause in
15203 its library unit or one one of its parents.
15205 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15207 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15208 over an arbitrary expression of an array or container type.
15209 * lib-xref.adb: clarify comment.
15211 2011-08-01 Bob Duff <duff@adacore.com>
15213 * einfo.ads: Minor reformatting.
15214 * debug.adb: Minor comment improvement.
15216 2011-08-01 Javier Miranda <miranda@adacore.com>
15218 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15219 consider hidden subprograms as valid candidates.
15221 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15223 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15225 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15227 * gnat_ugn.texi: Fix typo.
15229 2011-08-01 Robert Dewar <dewar@adacore.com>
15231 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15232 lib-xref.adb: Minor reformatting
15234 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15236 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15237 when to generate a call to Move_Final_List.
15238 (Has_Controlled_Parts): Remove this function.
15240 2011-08-01 Geert Bosch <bosch@adacore.com>
15242 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15243 "," in choice list.
15245 2011-08-01 Thomas Quinot <quinot@adacore.com>
15247 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15248 explicit raise of a predefined exception as Comes_From_Source if the
15249 original N_Raise_Statement comes from source.
15251 2011-08-01 Robert Dewar <dewar@adacore.com>
15253 * sinfo.ads: Add comment.
15254 * sem_ch6.adb: Minor reformatting.
15256 2011-08-01 Robert Dewar <dewar@adacore.com>
15258 * freeze.adb (Freeze_Entity): Refine check for bad component size
15259 clause to avoid rejecting confirming clause when atomic/aliased present.
15261 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15263 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15264 better determine whether an entity reference is a write.
15265 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15267 * lib-xref.adb (Output_References): Do no suppress a read reference at
15268 the same location as an immediately preceeding modify-reference, to
15269 handle properly in-out actuals.
15271 2011-08-01 Tristan Gingold <gingold@adacore.com>
15273 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15275 2011-08-01 Quentin Ochem <ochem@adacore.com>
15277 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15278 heap to compute the result.
15280 2011-08-01 Robert Dewar <dewar@adacore.com>
15282 * atree.ads: Minor reformatting.
15284 2011-08-01 Emmanuel Briot <briot@adacore.com>
15286 * g-expect.adb (Get_Command_Output): Fix memory leak.
15288 2011-08-01 Geert Bosch <bosch@adacore.com>
15290 * cstand.adb (P_Float_Type): New procedure to print the definition of
15291 predefined fpt types.
15292 (P_Mixed_Name): New procedure to print a name using mixed case
15293 (Print_Standard): Use P_Float_Type for printing floating point types
15294 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15295 precision IEEE float.
15297 2011-08-01 Thomas Quinot <quinot@adacore.com>
15299 * sem_ch3.adb: Minor reformatting.
15301 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15303 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15304 the completion of a generic function, insert the new body rather than
15305 rewriting the original.
15307 2011-08-01 Yannick Moy <moy@adacore.com>
15309 * sinfo.ads, errout.ads: Typos in comments.
15311 2011-08-01 Robert Dewar <dewar@adacore.com>
15313 * par-endh.adb: Minor reformatting.
15315 2011-08-01 Robert Dewar <dewar@adacore.com>
15317 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15318 (Pre_Post_Aspects): New subtype.
15319 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15320 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15321 * par-ch7.adb (P_Package): Remove Decl parameter
15322 (P_Package): Handle new syntax for aspects (before IS)
15323 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15325 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15326 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15327 (P_Package): Remove Decl parameter
15328 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15330 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15332 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15333 * sinfo.ads: Document new syntax for aspects in packages etc.
15334 * sprint.adb: Handle new syntax of aspects before IS in package
15336 2011-08-01 Thomas Quinot <quinot@adacore.com>
15338 * atree.ads: Minor reformatting.
15339 * sem_prag.adb: Minor reformatting.
15341 2011-08-01 Robert Dewar <dewar@adacore.com>
15343 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15344 case expr alternative.
15346 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15348 * sem_ch12.adb: Fix typo.
15350 2011-08-01 Geert Bosch <bosch@adacore.com>
15352 * sem_prag.adb (Check_No_Link_Name): New procedure.
15353 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15354 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15355 instead of Standard_Long_Long_Float_Size global. Preparation for
15356 eventual removal of per type constants.
15357 * exp_util.ads (Get_Stream_Size): New function returning the stream
15358 size value of subtype E.
15359 * exp_util.adb (Get_Stream_Size): Implement new function.
15360 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15362 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15364 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15366 2011-08-01 Geert Bosch <bosch@adacore.com>
15368 * cstand.adb: Fix comments.
15369 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15370 count of arguments.
15372 2011-08-01 Robert Dewar <dewar@adacore.com>
15374 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15376 2011-08-01 Geert Bosch <bosch@adacore.com>
15378 * atree.ads: Fix comment.
15380 2011-08-01 Robert Dewar <dewar@adacore.com>
15382 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15383 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15384 * par.adb: Add with for Namet.Sp.
15385 * par-tchk.adb: Minor reformatting.
15387 2011-08-01 Vincent Celier <celier@adacore.com>
15389 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15390 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15391 of the init procedure of a SAL.
15392 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15395 2011-08-01 Thomas Quinot <quinot@adacore.com>
15397 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15400 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15402 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15404 2011-08-01 Thomas Quinot <quinot@adacore.com>
15406 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15407 conformant with its spec (return True only for types that have
15408 an overriding Initialize primitive operation that prevents them from
15409 having preelaborable initialization).
15410 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15411 initialization for controlled types in Ada 2005 or later mode.
15413 2011-08-01 Robert Dewar <dewar@adacore.com>
15415 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15417 (Same_Aspect): New function.
15418 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15419 Type_Invariant, Precondition, Postcondition.
15420 * snames.ads-tmpl: Add Name_Type_Invariant.
15422 2011-08-01 Robert Dewar <dewar@adacore.com>
15424 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15426 (Freeze_All_Ent): Fix error in handling inherited aspects.
15427 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15428 already analyzed, but don't skip entire processing of a declaration,
15429 that's wrong in some cases of declarations being rewritten.
15430 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15431 Don't delay for integer, string literals
15432 Treat predicates in usual manner for delay, remove special case code,
15434 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15435 (Build_Predicate_Function): Update saved expression in aspect
15436 (Build_Invariant_Procedure): Update saved expression in aspect
15437 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15438 of replacement of discriminant references if the reference is simple.
15440 2011-08-01 Robert Dewar <dewar@adacore.com>
15442 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15443 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15444 Static_Predicate and Dynamic_Predicate.
15445 (Build_Predicate_Function): Add processing for Static_Predicate
15446 and Dynamic_Predicate.
15447 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15448 (From_Static_Predicate): New flag
15449 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15451 2011-08-01 Robert Dewar <dewar@adacore.com>
15453 * usage.adb: Documentation cleanup for Ada version modes in usage.
15454 * expander.adb: Minor reformatting.
15456 2011-08-01 Robert Dewar <dewar@adacore.com>
15458 * atree.ads: Minor comment fix.
15459 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15460 a-witeio.ads, sem_prag.adb: Minor reformatting.
15462 2011-08-01 Doug Rupp <rupp@adacore.com>
15464 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15465 pointers. Use descrip.h header file for convenience. Add some
15468 2011-08-01 Robert Dewar <dewar@adacore.com>
15470 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15471 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15472 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15474 (Check_Aspect_At_End_Of_Declarations): New procedure
15475 (Analye_Aspect_Specification): Minor changes for above procedures
15476 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15477 specification node as well.
15479 2011-08-01 Pascal Obry <obry@adacore.com>
15481 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15482 Windows files. Use GetFilesAttributes() in this case to check for file
15483 existence instead of returning with an error code.
15485 2011-08-01 Vincent Celier <celier@adacore.com>
15487 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15488 High is above Source length.
15490 2011-08-01 Robert Dewar <dewar@adacore.com>
15492 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15494 2011-08-01 Robert Dewar <dewar@adacore.com>
15496 * aspects.ads (Boolean_Aspects): New subtype.
15497 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15498 for derived types in cases where the parent type and derived type have
15500 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15501 with aspects when parent type also has aspects.
15502 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15503 boolean expression at this point).
15504 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15505 accordance with final decision on the Ada 2012 feature.
15506 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15508 2011-08-01 Matthew Heaney <heaney@adacore.com>
15510 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15512 2011-08-01 Pascal Obry <obry@adacore.com>
15514 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15515 Fix Replace_Slice when High is above current string size.
15516 (Replace_Slice): Fix DL computation when High is above current
15519 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15521 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15523 2011-08-01 Matthew Heaney <heaney@adacore.com>
15525 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15528 2011-08-01 Pascal Obry <obry@adacore.com>
15530 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15533 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15535 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15536 access to protected subprograms in generic bodies.
15537 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15538 protected type, indicate that the convention of the subprogram is
15539 Convention_Protected, because it may be used in subsequent declarations
15540 within the protected declaration.
15542 2011-08-01 Vincent Celier <celier@adacore.com>
15544 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15545 and "final" procedures when the name of the library is "ada", to avoid
15546 duplicate symbols "adainit" and "adafinal" in executables.
15548 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15550 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15551 quantified expression that appears within a postcondition and uses the
15552 Ada2012 'Result attribute.
15554 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15556 * init.c (__gnat_error_handler): Cast reason to int.
15557 (__gnat_install_handler): Explain sa_sigaction use.
15559 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15561 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15562 subprogram has copy-in copy-out parameters, try to promote the mode of
15563 the return type if it is passed in registers.
15565 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15567 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15568 left operand as addressable.
15570 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15572 * gcc-interface/gigi.h (build_function_stub): Remove.
15573 (build_return_expr): Likewise.
15574 (convert_vms_descriptor): Declare.
15575 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15576 (build_function_stub): Move to...
15577 * gcc-interface/utils2.c (build_return_expr): Move to...
15578 * gcc-interface/trans.c (build_function_stub): ...here.
15579 (build_return_expr): ...here.
15580 (Subprogram_Body_to_gnu): Add local variable for language_function.
15581 Disconnect the parameter attributes cache, if any, once done with it.
15582 Call end_subprog_body only after setting the end_locus.
15583 Build the stub associated with the function, if any, at the very end.
15584 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15585 variables and streamline control flow.
15587 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15590 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15591 g-trasym-dwarf.adb.
15593 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15596 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15597 Assign to act.sa_sigaction.
15598 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15599 current->return_address to char * before arithmetic.
15601 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15603 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15604 Correct argument types.
15605 Extract code from reason.
15606 (__gnat_install_handler): Assign to act.sa_sigaction.
15608 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15610 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15611 (GNAT1_OBJS): ...here.
15613 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15616 * g-socthi-mingw.adb (Fill): Fix formatting.
15618 * gcc-interface/gigi.h: Move around comment.
15620 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15623 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15625 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15628 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15630 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15632 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15633 range comparison if Pmode is SImode.
15635 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15636 Eric Botcazou <ebotcazou@adacore.com>
15638 * adadecode.c: Wrap up in extern "C" block.
15639 * adadecode.h: Likewise.
15640 * adaint.c: Likewise. Remove 'const' keyword.
15641 * adaint.h: Likewise.
15642 * argv.c: Likewise.
15643 * atree.h: Likewise.
15645 * cstreams.c: Likewise.
15647 * exit.c: Likewise.
15649 * final.c: Likewise.
15650 * init.c: Likewise.
15651 * initialize.c: Likewise.
15652 * link.c: Likewise.
15653 * namet.h: Likewise.
15654 * nlists.h: Likewise.
15655 * raise.c: Likewise.
15656 * raise.h: Likewise.
15657 * repinfo.h: Likewise.
15658 * seh_init.c: Likewise.
15659 * targext.c: Likewise.
15660 * tracebak.c: Likewise.
15661 * uintp.h: Likewise.
15662 * urealp.h: Likewise.
15663 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15664 * xsinfo.adb: Likewise.
15665 * xsnamest.adb: Likewise.
15666 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15667 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15668 * gcc-interface/misc.c: Likewise.
15669 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15670 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15671 ada/targext.o here...
15672 (GNAT_ADA_OBJS): ...and not here.
15673 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15674 (GNATBIND_OBJS): Reorder.
15676 2011-07-07 Richard Henderson <rth@redhat.com>
15678 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15679 dwarf2out_frame_init.
15681 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15683 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15685 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15688 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15690 2011-07-06 Richard Guenther <rguenther@suse.de>
15692 * gcc-interface/misc.c (gnat_init): Merge calls to
15693 build_common_tree_nodes and build_common_tree_nodes_2.
15694 Re-initialize boolean_false_node.
15696 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15697 Olivier Hainque <hainque@adacore.com>
15698 Nicolas Setton <setton@adacore.com>
15700 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15701 the type according to the ARTIFICIAL_P parameter.
15702 (create_type_decl): Likewise.
15703 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15705 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15707 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15708 (gnatbind): Likewise.
15710 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15712 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15714 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15716 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15717 local variable throughout. Remove useless call to Base_Type.
15718 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15719 Take it also into account for the volatileness of the field. Set the
15720 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15722 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15724 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15725 on a dereference built for a by-ref object if it has an address clause.
15727 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15729 * einfo.ads (Address_Taken): Document use for the second argument of
15730 Asm_Input and Asm_Output attributes.
15731 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15732 argument is an entity name, then set Address_Taken on it.
15733 <Attribute_Asm_Output>: Likewise.
15734 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15735 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15736 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15737 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15739 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15741 PR middle-end/46500
15742 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15744 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15746 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15747 (ada/utils.o): Update dependencies.
15748 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15749 ../../../libcpp/libcpp.a.
15750 * gcc-interface/utils.c: Include common/common-target.h.
15751 (process_attributes): Use targetm_common.have_named_sections.
15753 2011-06-07 Richard Guenther <rguenther@suse.de>
15755 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15758 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15760 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15761 TREE_THIS_NOTRAP flag.
15763 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15765 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15768 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15770 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15771 constants whose full view has discriminants specially.
15773 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15775 * gcc-interface/utils.c: Include diagnostic.h.
15776 (gnat_write_global_declarations): Output debug information for all
15777 global type declarations before finalizing the compilation unit.
15778 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15780 2011-05-25 Jakub Jelinek <jakub@redhat.com>
15782 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15784 2011-05-25 Kai Tietz <ktietz@redhat.com>
15786 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15787 initialization instead of const/none-const pointer assignment.
15789 2011-05-24 Joseph Myers <joseph@codesourcery.com>
15791 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15792 $(EXTRA_GNAT1_OBJS).
15793 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15794 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15795 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15796 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15797 libcommon-target.a instead of prefix.o.
15799 2011-05-21 Joseph Myers <joseph@codesourcery.com>
15802 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15804 2011-05-20 Joseph Myers <joseph@codesourcery.com>
15806 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15807 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15808 instead of version.o.
15810 2011-05-18 Kai Tietz <ktietz@redhat.com>
15812 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15813 boolean_false_node instead of integer_zero_node.
15814 (convert_with_check): Likewise.
15815 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15817 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15819 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15820 type of the parameter is an unconstrained array, convert the actual to
15821 the type of the formal in the In Out and Out cases as well.
15823 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15825 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15826 call build_function_type_array or build_varargs_function_type_array
15828 (create_subprog_type): Don't call build_function_type; call
15829 build_function_type_vec instead.
15831 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15833 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15834 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15835 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15837 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15839 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15841 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15842 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15844 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15846 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15848 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15850 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15851 instead of accessing TYPE_ARG_TYPES directly.
15852 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15854 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15857 * gcc-interface/gigi.h (get_variant_part): Declare.
15858 * gcc-interface/decl.c (get_variant_part): Make global.
15859 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15860 types have the same constant size, are record types and T1 has a
15861 variant part while T2 doesn't.
15863 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15865 * gcc-interface/utils.c (begin_subprog_body): Do not call
15867 (end_subprog_body): Likewise.
15869 2011-05-04 Richard Guenther <rguenther@suse.de>
15871 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15873 (pos_to_constructor): Likewise.
15875 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
15876 Eric Botcazou <ebotcazou@adacore.com>
15878 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15879 of build_function_type. Adjust calls to...
15880 (build_raise_check): ...this. Do not take a void_tree parameter.
15881 Call build_function_type_list instead of build_function_type.
15882 Fix head comment and swap couple of conditional blocks.
15884 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15886 * gnatvsn.ads (Library_Version): Bump to 4.7.
15887 (Current_Year): Bump to 2011.
15889 2011-04-29 Michael Matz <matz@suse.de>
15891 * gcc-interface/misc.c (gnat_handle_option): Set
15892 warn_maybe_uninitialized.
15894 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15896 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15897 the Watson/McCabe paper.
15899 2011-04-23 Jim Meyering <meyering@redhat.com>
15901 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15903 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15905 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15908 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15910 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15912 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15913 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15914 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15915 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15916 <all>: Do not set flags on the reused DECL node coming from an alias.
15917 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15918 don't need debug info here...
15919 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15920 (gigi): Adjust calls to create_subprog_decl.
15921 (build_raise_check): Likewise.
15922 (establish_gnat_vms_condition_handler): Likewise.
15923 (Compilation_Unit_to_gnu): Likewise.
15924 (gnat_to_gnu): Likewise.
15926 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15928 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15929 (NO_REORDER_ADAFLAGS): New variable.
15930 (EXTRA_GNATTOOLS): Always define.
15931 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15932 Clean up and adjust list of files compiled with special options.
15933 * gcc-interface/Make-lang.in: Likewise.
15934 (ada/decl.o): Cosmetical change.
15935 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15937 2011-04-20 Jim Meyering <meyering@redhat.com>
15939 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15941 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15943 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15944 $(CFLAGS) on the link line.
15946 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15948 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15949 padded type built for the return type if it is unconstrained.
15951 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15953 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15955 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15957 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15958 before calling TREE_CHAIN.
15959 * gcc-interface/misc.c (gnat_init_ts): New function.
15960 (LANG_HOOKS_INIT_TS): Define.
15962 2011-04-12 Martin Jambor <mjambor@suse.cz>
15964 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15965 instead of cgraph_node.
15967 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15969 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15970 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15973 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15975 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15976 of aggregate types that contain a placeholder.
15978 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15980 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15982 (handle_type_generic_attribute): Likewise.
15984 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15987 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15989 2011-04-04 Kai Tietz <ktietz@redhat.com>
15992 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15995 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15997 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15998 type case, do not strip a padding type around the array type.
16000 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16002 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
16005 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16007 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
16008 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
16009 code for -feliminate-unused-debug-types.
16010 (gnat_post_options): Likewise.
16012 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16014 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16015 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
16018 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16020 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
16021 DECL_ARTIFICIAL flag on enumeration types.
16023 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16025 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
16026 fat pointer types artificial unconditionally.
16027 <E_Array_Subtype>: Attach the base array type as a parallel type if it
16030 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16032 * gcc-interface/gigi.h (get_dummy_type): Declare.
16033 (build_dummy_unc_pointer_types): Likewise.
16034 (finish_fat_pointer_type): Likewise.
16035 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
16036 fat pointer type has been built, complete it in place.
16037 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
16038 and thin pointers. Remove useless variable.
16039 (finish_fat_pointer_type): Make global and move to...
16040 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
16041 (get_dummy_type): New function.
16042 (build_dummy_unc_pointer_types): Likewise.
16043 (gnat_pushdecl): Propage the name to the anonymous variants only.
16044 (update_pointer_to): Only adjust the pointer types in the unconstrained
16047 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16049 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
16050 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
16051 if this is a Taft amendment type and the full declaration is available.
16052 * gcc-interface/trans.c (process_type): Likewise.
16053 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
16054 (process_freeze_entity): Likewise.
16055 * gcc-interface/utils.c (dummy_global): New static variable.
16056 (gnat_write_global_declarations): If there are types declared as used
16057 at the global level, insert them in the global hash table.
16059 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16061 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
16062 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16063 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
16065 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
16066 flag of the type accordingly.
16067 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
16069 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16071 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16072 finalizing types when updating the pointers to the designated type.
16073 <all>: Finalize the deferred types even if we didn't defer processing
16074 of incomplete types in this invocation.
16076 2011-04-01 Olivier Hainque <hainque@adacore.com>
16077 Nicolas Setton <setton@adacore.com>
16078 Eric Botcazou <ebotcazou@adacore.com>
16080 * gcc-interface/misc.c (gnat_descriptive_type): New function.
16081 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
16083 2011-03-28 Kai Tietz <ktietz@redhat.com>
16085 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
16087 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
16088 * system-mingw.ads (System): Change ZCX_By_Default default to True.
16090 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
16092 2011-03-28 Tristan Gingold <gingold@adacore.com>
16095 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
16096 Use ada output of gnatbind.
16097 (ada/b_gnatb.adb): Ditto.
16098 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
16099 (ada.mostlyclean, ada.stage1)
16100 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
16101 (ada.stagefeedback): Adjust.
16102 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
16103 Use ada output of gnatbind.
16104 (b_gnatm.adb): Ditto.
16105 (b_gnatl.o, b_gnatm.o): New rules.
16107 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16109 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16110 for the padded type built to support a specified size or alignment.
16112 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16114 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
16115 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16116 unconditionally to the end of the unit when the designated type is
16118 <all>: Rename local variable. Attempt to un-defer types only and do it
16119 for limited_with'ed types as well.
16120 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
16121 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
16122 consistently and remove redundant call to finalize_from_with_types.
16124 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16126 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
16127 subprograms without a previous spec declared in the same unit.
16128 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
16129 subprograms at the end of the unit instead of at the beginning.
16130 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
16131 isn't public for the special handling of non-inline functions nested
16132 inside inline external functions.
16134 2011-03-25 Jeff Law <law@redhat.com>
16136 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
16138 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
16140 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
16141 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
16142 to compute Set_Size_Depends_On_Discriminant.
16143 (Layout_Type): Call it on array types in back-end layout mode.
16144 * sem_util.adb (Requires_Transient_Scope): Return true for array
16145 types only if the size depends on the value of discriminants.
16146 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
16147 type if the RHS is a call to a function that returns an unconstrained
16148 type with default discriminant.
16150 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
16152 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
16153 non-conversion to the nominal result type at the end.
16155 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16157 * gcc-interface/trans.c (create_temporary): New function taken from...
16158 (create_init_temporary): ...here. Call it.
16159 (call_to_gnu): Create the temporary for the return value early, if any.
16160 Create it for a function with copy-in/copy-out parameters if there is
16161 no target; in other cases of copy-in/copy-out, use another temporary.
16162 Push the new binding level lazily. Add and rename local variables.
16164 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16166 * gcc-interface/decl.c (validate_size): Improve comments and tweak
16168 (set_rm_size): Likewise.
16170 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16172 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16173 for the padded type built in order to support a specified alignment.
16174 Fix incorrect formatting.
16176 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16179 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16181 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16183 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16184 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16185 to the end of the list. Adjust recursive call. Rename local variable.
16186 If REORDER is true, reorder components of the record type.
16187 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16188 components_to_record and adjust the parameter list.
16190 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16192 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16193 disabled, use the variable for bounds of loop iteration scheme.
16195 2011-03-21 Kai Tietz <ktietz@redhat.com>
16198 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16200 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16202 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16203 out whether the expression is read-only. Short-circuit placeholder
16204 case and rename a couple of local variables.
16206 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16208 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16209 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16210 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16211 (convert): Deal with conversions from a smaller form type specially.
16213 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
16215 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16216 its argument, except for the special -I- switch.
16218 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
16220 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16223 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16225 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16227 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16229 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16231 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16232 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16233 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16234 Do not generate the check directly, instead instantiate the template
16235 check present in the descriptor.
16236 (make_descriptor_field): Move around.
16237 (build_vms_descriptor32): Build a template check in the POINTER field.
16238 (build_vms_descriptor): Remove useless suffixes.
16239 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16241 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16244 * targext.c: Include target files if IN_RTS is defined.
16246 2011-01-26 Richard Guenther <rguenther@suse.de>
16249 * targext.c: Include config.h.
16250 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16253 2011-01-04 Pascal Obry <obry@adacore.com>
16254 Eric Botcazou <ebotcazou@adacore.com>
16256 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16258 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16260 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16261 end-of-case on the end label and its associated gotos, if any.
16263 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16265 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16266 expressions of the parameter cache within the statement group of
16267 the CICO mechanism.
16269 2011-01-04 Olivier Hainque <hainque@adacore.com>
16270 Eric Botcazou <ebotcazou@adacore.com>
16272 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16273 (set_end_locus_from_node): New function.
16274 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16275 make and the function end_locus.
16276 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16277 for the elaboration subprogram.
16278 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16279 set the end_locus of the expression as well.
16281 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16284 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16285 variables that are referenced in exception handlers volatile.
16289 Copyright (C) 2011 Free Software Foundation, Inc.
16291 Copying and distribution of this file, with or without modification,
16292 are permitted in any medium without royalty provided the copyright
16293 notice and this notice are preserved.