1 2011-11-07 Olivier Hainque <hainque@adacore.com>
3 * sigtramp-ppcvxw.c: Add general comments.
4 (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
5 rules for r2 to r13, plus CTR and XER.
6 (CFA_REG): New, register number used to hold the local CFA.
7 (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
8 Make that 15, not 14, with documentation.
9 (TCR): Undef before definition, preventing conflict with reg number in
12 2011-11-07 Robert Dewar <dewar@adacore.com>
14 * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
15 aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
16 * gcc-interface/Make-lang.in: Update dependencies.
18 2011-11-07 Ed Schonberg <schonberg@adacore.com>
20 * exp_ch6.adb: A tagged type is a legal actual for an aliased
23 2011-11-07 Pascal Obry <obry@adacore.com>
25 * g-socket.adb, g-socket.ads: Minor reformatting.
27 2011-11-07 Robert Dewar <dewar@adacore.com>
29 * sem_res.adb (Resolve_Actuals): Minor error message improvement.
31 2011-11-07 Robert Dewar <dewar@adacore.com>
33 * gnat_ugn.texi: Add discussion of default mode handling of
34 source representation with no -gnatW option given, in particular
35 noting that NEL (next line) is not recognized in this context.
37 2011-11-07 Yannick Moy <moy@adacore.com>
39 * sem_util.adb (Note_Possible_Modification): In Alfa mode,
40 generate a reference for a modification even when the modification
41 does not come from source.
43 2011-11-07 Ed Schonberg <schonberg@adacore.com>
45 * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
46 use the indexing attributes rather than the Element function,
47 to obtain variable references.
48 * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
49 Find_Aspect rather than iterating over representation
50 items. Improve error message.
51 * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
52 of Reference functions.
54 2011-11-07 Yannick Moy <moy@adacore.com>
56 * sem_util.adb (Unique_Entity): For a parameter on a subprogram
57 body that has a corresponding parameter on the subprogram
58 declaration, define the unique entity as being the declaration
61 2011-11-07 Ed Schonberg <schonberg@adacore.com>
63 * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
64 return type of a function is the class-wide type of an incomplete
65 type T, T can be a Taft-amendment type and does not have to be
66 completed in the current private part.
68 2011-11-07 Ed Schonberg <schonberg@adacore.com>
70 * aspects.ads (Inherited_Aspect): Map that indicates type aspects
71 that are inherited by default, and apply to the class-wide type
73 * aspects.adb (Find_Aspect): If the entity is class-wide and the
74 aspect is inherited, use the aspect of the specific type.
76 2011-11-07 Hristian Kirtchev <kirtchev@adacore.com>
78 * exp_alfa.adb: Remove with and use clause for
79 Exp_Ch8. Add with and use clause for Exp_Util.
80 Remove local constant Disable_Processing_Of_Renamings.
81 (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
82 object renamings has been reenabled.
83 (Expand_Possible_Renaming):
84 The expansion of identifier and expanded names has been
85 reenabled. Perform the substitutions only for entities that
87 * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
88 * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
89 (Remove_Side_Effects): Alphabetize local variables. Add a guard
90 to avoid the infinite expansion of an expression in Alfa mode. Add
91 processing for function calls in Alfa mode.
92 * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
94 2011-11-07 Ed Schonberg <schonberg@adacore.com>
96 * freeze.adb (Freeze_Entity): If the entity is an access to
97 subprogram whose designated type is itself a subprogram type,
98 its own return type must be decorated with size information.
100 2011-11-04 Arnaud Charlet <charlet@adacore.com>
102 * gcc-interface/Make-lang.in: Update dependencies.
104 2011-11-04 Robert Dewar <dewar@adacore.com>
106 * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
107 Avoid junk semicolon after argument of machine code Asm operand.
109 2011-11-04 Robert Dewar <dewar@adacore.com>
111 * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
112 CodePeer mode or if restriction No_Exception_Handlers is present.
113 * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
114 nodes in CodePeer mode or if restriction No_Exception_Handlers
117 2011-11-04 Robert Dewar <dewar@adacore.com>
119 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
121 2011-11-04 Ed Schonberg <schonberg@adacore.com>
123 * sem_ch6.adb (Analyze_Subprogram_Specification): The
124 specification is legal if it is a function that returns an
125 abstract type, if it comes from an attribute renaming of a stream
126 attribute of an abstract type.
128 2011-11-04 Gary Dismukes <dismukes@adacore.com>
130 * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
131 components, check whether recursively check whether the prefix
132 denotes an unaligned object.
134 2011-11-04 Ed Schonberg <schonberg@adacore.com>
136 * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
137 the pragma is legal if it is an expanded name that denotes a
138 procedure that be can called without parameters.
140 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
142 * gnat_ugn.texi (Performance Considerations) <Vectorization
143 of loops>: New sub-section. <Other Optimization Switches>:
146 2011-11-04 Robert Dewar <dewar@adacore.com>
148 * gnat_rm.texi: Minor reformatting.
150 2011-11-04 Matthew Heaney <heaney@adacore.com>
152 * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
153 when Target and Source denote same non-empty object
154 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
156 2011-11-04 Robert Dewar <dewar@adacore.com>
158 * exp_attr.adb: Minor reformatting.
160 2011-11-04 Ed Schonberg <schonberg@adacore.com>
162 * exp_ch5.adb (Expand_Assign_Record): Do not generate a
163 discriminant assignment within an initialization proc if the
164 record is an unchecked union, as it can only come from the
165 initialization of an unchecked union component.
167 2011-11-04 Robert Dewar <dewar@adacore.com>
169 * gnat_ugn.texi: Minor reformatting.
171 2011-11-04 Robert Dewar <dewar@adacore.com>
173 * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
176 2011-11-04 Robert Dewar <dewar@adacore.com>
178 * exp_ch4.adb: Minor code reorganization (remove junk obsolete
181 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
183 * exp_alfa.adb: Add local constant
184 Disable_Processing_Of_Renamings;
185 (Expand_Alfa_N_Object_Renaming_Declaration): Disable
186 the name evaluation of object renamings for now.
187 (Expand_Potential_Renaming): Do not perform the substitution
189 * exp_util.adb (Remove_Side_Effects): Remove processing for
190 functions with side effects in Alfa mode.
192 2011-11-04 Gary Dismukes <dismukes@adacore.com>
194 * bindgen.adb (Gen_Elab_Calls): In the case
195 of the AAMP target, set elaboration entities to 1 rather than
198 2011-11-04 Ed Schonberg <schonberg@adacore.com>
200 * sem_ch10.adb (Install_Limited_With_Unit): To establish the
201 proper entities on the ancestors of a child unit that appear
202 in a limited_with clause, follow the unit links because the
203 units are not analyzed and scope information is incomplete.
205 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
207 * exp_ch4.adb (Expand_N_Selected_Component): Refine code
208 setting the Atomic_Sync_Required flag to detect one more case.
209 * exp_util.adb (Activate_Atomic_Synchronization): Refine code
210 setting the Atomic_Sync_Required flag to exclude more cases,
211 depending on the parent of the node to be examined.
213 2011-11-04 Bob Duff <duff@adacore.com>
215 * g-excact.adb: Minor: use named notation.
217 2011-11-04 Ed Schonberg <schonberg@adacore.com>
219 * sem_ch5.adb: Improve error messages for illegal iterators.
221 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
223 * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
225 (Expand_Alfa): Alphabetize cases on first choice. Add
226 processing for object renaming declarations, identifiers and
228 (Expand_Alfa_N_In): Remove useless return.
229 (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
230 (Expand_Potential_Renaming): New routine.
231 * exp_ch8.adb (Evaluate_Name): Moved to the top level.
232 (Expand_N_Object_Declaration): Alphabetize local variables. Move
233 Evaluate_Name out to the top level.
234 * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
235 * exp_util.adb (Remove_Side_Effects): Add processing for
236 functions with side effects in Alfa mode.
238 2011-11-04 Hristian Kirtchev <kirtchev@adacore.com>
240 * gnat_rm.texi: Add entries for
241 restrictions No_Relative_Delay, No_Requeue_Statements and
242 No_Stream_Optimizations.
244 2011-11-04 Ed Schonberg <schonberg@adacore.com>
246 * sem_ch4.adb: Set type of entity in prefixed call, for
247 completeness in a generic context.
249 2011-11-04 Yannick Moy <moy@adacore.com>
251 * sem_prag.adb: Minor refactoring (renaming of a parameter).
253 2011-11-04 Robert Dewar <dewar@adacore.com>
255 * atree.ads: Minor reformatting.
257 2011-11-04 Robert Dewar <dewar@adacore.com>
259 * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
261 * exp_ch2.adb (Expand_Entity_Reference): Use
262 Activate_Atomic_Synchronization
263 * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
264 Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
265 Activate_Atomic_Synchronization (Expand_N_Selected_Component):
266 Use Activate_Atomic_Synchronization
267 * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
269 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
270 N_Selected_Component node
272 2011-11-04 Robert Dewar <dewar@adacore.com>
274 * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
276 2011-11-04 Yannick Moy <moy@adacore.com>
278 * atree.adb, atree.ads (Set_Original_Node): New set procedure.
279 * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
280 In ASIS mode, no splitting of aspects between conjuncts.
281 (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
282 expressions refer to the original aspect expressions through
283 the Original_Node link. This is used in semantic analysis for
284 ASIS mode, so that the original expression also gets analyzed.
285 * sem_prag.adb (Preanalyze_TC_Args,
286 Check_Precondition_Postcondition,
287 Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
288 generated from a source aspect, also analyze the original aspect
290 (Check_Expr_Is_Static_Expression): New procedure
291 similar to existing procedure Check_Arg_Is_Static_Expression,
292 except called on expression inside pragma.
294 2011-11-04 Tristan Gingold <gingold@adacore.com>
296 * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
297 Find_Project.Try_Path_Name.
298 (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
300 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
302 * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
304 2011-11-04 Pascal Obry <obry@adacore.com>
306 * projects.texi: Add short description for qualifiers aggregate
307 and aggregate library.
309 2011-11-04 Matthew Heaney <heaney@adacore.com>
311 * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
312 * a-cgaaso.adb: Replaced implementation with instantiation
314 * a-cogeso.ad[sb] This is the new Ada 2012 unit
315 Ada.Containers.Generic_Sort
317 2011-11-04 Robert Dewar <dewar@adacore.com>
319 * exp_ch2.adb (Expand_Entity_Reference): Do not set
320 Atomic_Sync_Required for the case of a prefix of an attribute.
321 * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
322 atomic synchronization
323 (Expand_N_Indexed_Component): Ditto.
324 (Expand_B_Selected_Component): Ditto.
325 * sem_prag.adb (Process_Suppress_Unsuppress):
326 Disable/Enable_Atomic_Synchronization can now occur for array
327 types with pragma Atomic_Components.
328 * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
329 N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
331 2011-11-04 Gary Dismukes <dismukes@adacore.com>
333 * gnat_ugn.texi: Editorial corrections for gnattest section.
335 2011-11-04 Robert Dewar <dewar@adacore.com>
337 * sem_prag.adb: Minor reformatting.
338 * gnat_rm.texi: Update documentation for pragma Warnings (Off,
340 * exp_ch2.adb (Expand_Entity_Reference): Only set
341 Atomic_Sync_Required on entities that are variables. Doesn't
342 make any sense on anything else.
344 2011-11-04 Robert Dewar <dewar@adacore.com>
346 * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
347 atomic sync to type case.
348 * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
351 2011-11-04 Robert Dewar <dewar@adacore.com>
353 * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
355 * gcc-interface/Make-lang.in: Update dependencies.
357 2011-11-04 Robert Dewar <dewar@adacore.com>
359 * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
362 2011-11-04 Matthew Heaney <heaney@adacore.com>
364 * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
365 * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
366 a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
367 * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
368 a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
369 a-sulcin.ad[sb]: New files.
371 2011-11-04 Geert Bosch <bosch@adacore.com>
373 * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
374 s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
375 i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
376 s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
377 * gcc-interface/Makefile.in: Remove libgnala and related objects.
379 2011-11-04 Matthew Heaney <heaney@adacore.com>
381 * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
382 a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
383 a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
384 a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
387 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
389 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
390 that the type of the parameters isn't dummy in type_annotate_only mode.
392 2011-11-04 Robert Dewar <dewar@adacore.com>
394 * sem_ch12.adb: Minor reformatting
396 2011-11-04 Gary Dismukes <dismukes@adacore.com>
398 * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
399 initialize elaboration entities to zero when specs are processed.
401 2011-10-28 Iain Sandoe <iains@gcc.gnu.org>
402 Eric Botcazou <ebotcazou@adacore.com>
405 * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
406 bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
408 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
411 * gcc-interface/Makefile.in (SYMDEPS): Delete.
412 (LIBICONV): New variable.
413 (LIBICONV_DEP): Likewise.
414 (LIBS): Add $(LIBICONV).
415 (LIBDEPS): Add $(LIBICONV_DEP).
416 (EXTRA_GNATTOOLS_OBJS): Merge into...
417 (TOOLS_LIBS): ...this. Add $(LIBICONV).
419 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
421 * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
422 variable. Always create the elaboration variable, if any, as constant.
424 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
426 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
427 make a packable type for fields of union types as well.
428 <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
429 (gnat_to_gnu_component_type): Try to make a packable type for fields
430 of union types as well.
431 (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
432 (maybe_pad_type): Try to make a packable type for fields of union types
434 (gnat_to_gnu_field): Likewise.
435 (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
436 (set_rm_size): Likewise.
438 * gcc-interface/misc.c (gnat_type_max_size): Likewise.
439 * gcc-interface/trans.c (add_decl_expr): Likewise.
440 * gcc-interface/utils.c (finish_record_type): Likewise.
441 * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
443 2011-10-26 Eric Botcazou <ebotcazou@adacore.com>
445 * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
446 declared as atomic. Move around conditionally executed code.
448 2011-10-24 Robert Dewar <dewar@adacore.com>
450 * sem.adb (Initialize): Fix bug that blew up if called a second time.
452 2011-10-24 Robert Dewar <dewar@adacore.com>
454 * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
455 tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
457 2011-10-24 Robert Dewar <dewar@adacore.com>
459 * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
462 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
464 * gnat_rm.texi: Add an entry for restriction No_Finalization.
466 2011-10-24 Ed Schonberg <schonberg@adacore.com>
468 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the
469 current instance is within the one that contains the generic,
470 the freeze node for the current one must appear in the current
471 declarative part. Ditto if the current instance is within another
472 package instance. In both of these cases the freeze node of the
473 previous instance is not relevant.
475 2011-10-24 Gary Dismukes <dismukes@adacore.com>
477 * switch-m.adb (Normalize_Compiler_Switches): Add recognition
478 of AAMP-specific switches -univ and -aamp_target.
480 2011-10-24 Robert Dewar <dewar@adacore.com>
482 * a-tienau.adb (Put): Deal properly with limited line length.
484 2011-10-24 Robert Dewar <dewar@adacore.com>
486 * sem_warn.adb, sem_ch12.adb: Minor reformatting.
488 2011-10-24 Tristan Gingold <gingold@adacore.com>
490 * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
493 2011-10-24 Ed Schonberg <schonberg@adacore.com>
495 * sem_ch12.adb (Earlier): make available globally. If both
496 nodes have the same sloc, the freeze node that does not come
497 from source is the later one.
498 (True_Parent): Make available globally.
499 (Previous_Instance): Subsidiary of
500 Insert_Freeze_Node_For_Instance, to check whether the generic
501 parent of the current instance is declared within a previous
502 instance in the same unit or declarative part, in which case the
503 freeze nodes of both instances must appear in order to prevent
504 elaboration problems in gigi.
505 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
506 freeze point, and the freeze node of a preceding instantiation
507 must be inserted before it.
509 2011-10-24 Robert Dewar <dewar@adacore.com>
511 * checks.ads, checks.adb: Add handling of Synchronization_Check
512 * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
514 * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
515 flag Minor code reorganization.
516 * opt.ads (Warn_On_Atomic_Synchronization): New switch.
517 * par-prag.adb: Add dummy entries for pragma
518 Disable/Enable_Atomic_Synchronization.
519 * sem_prag.adb (Process_Suppress_Unsuppress): Handle
520 case of Atomic_Synchronization specially (not suppressed
521 by All_Checks, cannot be set from Source).
522 (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
523 * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
524 * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
525 entry for pragma Disable/Enable_Atomic_Synchronization
526 * switch-c.adb: The -gnatp switch does not disable
527 Atomic_Synchronization Add -gnatep switch to disable
528 Atomic_Synchronization.
529 * types.ads: Add entry for Synchronization_Check
530 * usage.adb: Add line for -gnated switch
531 * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
533 2011-10-24 Geert Bosch <bosch@adacore.com>
535 * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
538 2011-10-24 Robert Dewar <dewar@adacore.com>
540 * sem_ch12.adb, s-gearop.adb: Minor reformatting.
542 2011-10-24 Robert Dewar <dewar@adacore.com>
544 * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
545 * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
547 2011-10-24 Emmanuel Briot <briot@adacore.com>
549 * prj-proc.adb (Process_Expression_Variable_Decl): No special
550 handling for Project_Path unless it is an attribute.
552 2011-10-24 Javier Miranda <miranda@adacore.com>
554 * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
555 (Install_Hidden_Primitives): New subprogram.
556 (Restore_Hidden_Primitives): New subprogram.
557 (Analyze_Formal_Package_Declaration,
558 Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
559 Invoke Check_Hidden_Primitives after every call to
560 Analyze_Associations, and invoke Restore_Hidden_Primitives to
561 restore their visibility after processing the instantiation.
562 (Instantiate_Package_Body): Install visible primitives before
563 analyzing the instantiation and uninstall them to restore their
564 visibility when the instantiation has been analyzed.
565 * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
566 (Remove_Suffix): New subprogram
567 * sem_ch3.adb (Derive_Subprogram): When handling
568 a derived subprogram for the instantiation of a formal derived
569 tagged type, inherit the dispatching attributes from the actual
570 subprogram (not from the parent type).
572 2011-10-24 Vasiliy Fofanov <fofanov@adacore.com>
574 * gnat_ugn.texi: Document explicit use of XDECGNAT library.
576 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
578 * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
580 (Build_Discriminant_Assignments): Add local variable D_Loc and update
582 (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
583 Var_Loc and update their uses.
584 (Build_Record_Init_Proc): Code reformatting.
585 (Increment_Counter): Add formal parameter Loc.
586 (Make_Counter): Add formal parameter Loc.
588 2011-10-24 Eric Botcazou <ebotcazou@adacore.com>
590 * sem_disp.adb (Covers_Some_Interface): Fix typo.
592 2011-10-24 Matthew Heaney <heaney@adacore.com>
594 * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
597 2011-10-24 Yannick Moy <moy@adacore.com>
599 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
600 Translate arguments in positional notation into pragma argument
601 association arguments for the generated pragma.
603 2011-10-24 Arnaud Charlet <charlet@adacore.com>
605 * exp_ch5.adb: Fix minor typo.
607 2011-10-24 Ed Schonberg <schonberg@adacore.com>
609 * sem_ch3.adb (Is_Visible_Component): Refine predicate for
610 the case of a component reference in an instance body, when the
611 enclosing type is private.
613 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
615 * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
616 driver for getting the project support into gnatelim section.
618 2011-10-24 Robert Dewar <dewar@adacore.com>
620 * gnat_rm.texi: Minor correction to documentation on address clause.
622 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com>
624 * s-finmas.adb (Attach): Synchronize and call the unprotected version.
625 (Attach_Unprotected): New routine.
626 (Delete_Finalize_Address): Removed.
627 (Delete_Finalize_Address_Unprotected): New routine.
628 (Detach): Synchronize and call the unprotected version.
629 (Detach_Unprotected): Remove locking.
630 (Finalize): Add various comment on synchronization. Lock the critical
631 region and call the unprotected versions of routines.
632 (Finalize_Address): Removed.
633 (Finalize_Address_Unprotected): New routine.
634 (Set_Finalize_Address): Synchronize and call
635 the unprotected version.
636 (Set_Finalize_Address_Unprotected): New routine.
637 (Set_Heterogeneous_Finalize_Address): Removed.
638 (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
639 (Set_Is_Heterogeneous): Add comment on synchronization and
641 * s-finmas.ads: Flag Finalization_Started is no longer atomic
642 because synchronization uses task locking / unlocking.
643 (Attach): Add comment on usage.
644 (Attach_Unprotected): New routine.
645 (Delete_Finalize_Address): Renamed to
646 Delete_Finalize_Address_Unprotected.
647 (Detach): Add comment on usage.
648 (Detach_Unprotected): New routine.
649 (Finalize_Address): Renamed to Finalize_Address_Unprotected.
650 (Set_Finalize_Address): Add comment on usage.
651 (Set_Finalize_Address_Unprotected): New routine.
652 (Set_Heterogeneous_Finalize_Address): Renamed to
653 Set_Heterogeneous_Finalize_Address_Unprotected.
654 * s-stposu.adb (Allocate_Any_Controlled): Add local variable
655 Allocation_Locked. Add various comments on synchronization. Lock
656 the critical region and call the unprotected version of
658 (Deallocate_Any_Controlled): Add various comments on
659 synchronization. Lock the critical region and call the unprotected
662 2011-10-24 Ed Schonberg <schonberg@adacore.com>
664 * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
665 are universal and must carry the corresponding type.
666 * sem_eval.adb (Check_Non_Static_Context): If the type of the
667 expression is universal real, as may be the case for a fixed point
668 expression with constant operands in the context of a conversion,
669 there is nothing to check.
670 * s-finmas.adb: Minor reformatting
672 2011-10-23 Eric Botcazou <ebotcazou@adacore.com>
674 * gcc-interface/decl.c (create_concat_name): Add explicit cast.
676 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
678 * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
680 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
681 ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
683 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
685 * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
686 (unchecked_conversion_nop): Use it.
687 (gnat_to_gnu): Likewise.
689 2011-10-20 Eric Botcazou <ebotcazou@adacore.com>
691 * back_end.adb (Call_Back_End): Pass the maximum logical line number
692 instead of the maximum physical line number to gigi.
693 * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
695 2011-10-16 Tom Tromey <tromey@redhat.com>
696 Dodji Seketeli <dodji@redhat.com>
698 * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
699 public ordinary map interface.
701 2011-10-16 Tristan Gingold <gingold@adacore.com>
703 * link.c (_AIX): Add support for GNU ld.
705 2011-10-16 Fedor Rybin <frybin@adacore.com>
707 * gnat_ugn.texi: Fixing gnattest example names in the doc.
708 Adding explanation to additional tests usage.
710 2011-10-16 Robert Dewar <dewar@adacore.com>
712 * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
714 2011-10-16 Eric Botcazou <ebotcazou@adacore.com>
716 * a-convec.adb: Fix minor inconsistencies.
718 2011-10-16 Matthew Heaney <heaney@adacore.com>
720 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
721 Implementation): Specify pragma Implementation_Defined.
723 2011-10-15 Nicolas Roche <roche@adacore.com>
725 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
726 either rtp-smp or ravenscar-cert-rtp runtimes.
728 2011-10-15 Bob Duff <duff@adacore.com>
730 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
731 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
733 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
734 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
736 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
737 pool only if RE_Root_Storage_Pool_Ptr is available.
738 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
739 pool actual unless RE_Root_Storage_Pool_Ptr is available.
740 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
741 formal only if RE_Root_Storage_Pool_Ptr is available.
743 2011-10-15 Matthew Heaney <heaney@adacore.com>
745 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
746 type): Specify Priority aspect for protected type.
748 2011-10-14 Ed Schonberg <schonberg@adacore.com>
750 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
751 is a generic actual, it is a subtype of a type that was frozen
752 by the instantiation, and even if not marked frozen it does not
753 affect the construction of the dispatch table.
755 2011-10-14 Robert Dewar <dewar@adacore.com>
757 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
759 * s-rident.ads: Add missing Compiler_Unit pragma.
761 2011-10-14 Gary Dismukes <dismukes@adacore.com>
763 * sem_res.adb: Minor reformatting.
765 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
767 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
768 Code and comment reformatting. Use BIP_Task_Master
769 when creating a _master.
770 (BIP_Formal_Suffix): Code reformatting. Correct the case for
772 (Make_Build_In_Place_Call_In_Object_Declaration): Use
773 BIP_Task_Master when creating a reference to the enclosing
774 function's _master formal.
775 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
777 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
778 (Needs_BIP_Finalization_Master): Alphabetized.
779 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
782 2011-10-14 Ed Schonberg <schonberg@adacore.com>
784 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
785 reject an aliased keyword on the object declaration of an extended
786 return statement. In older versions of the language indicate
787 that this is illegal in the standard.
789 2011-10-14 Pascal Obry <obry@adacore.com>
791 * sem_util.adb, sem_ch4.adb: Minor reformatting.
793 2011-10-14 Ed Schonberg <schonberg@adacore.com>
795 * sem_ch13.adb: Recognize properly procedure calls that are
796 transformed into code statements.
798 2011-10-14 Vincent Celier <celier@adacore.com>
800 * projects.texi: Minor fix in project example.
802 2011-10-14 Ed Schonberg <schonberg@adacore.com>
804 * sem_util.adb: Return objects are aliased if their type is
805 immutably limited as per AI05-0053.
807 2011-10-14 Gary Dismukes <dismukes@adacore.com>
809 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
810 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
811 Short_Circuit_And_Or expansion code (moved to sem_res).
812 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
813 "and" and "or" operators as short-circuit "and then" and "or
814 else", when pragma Short_Circuit_And_Or is active.
816 2011-10-13 Robert Dewar <dewar@adacore.com>
818 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
819 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
821 2011-10-13 Arnaud Charlet <charlet@adacore.com>
823 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
825 2011-10-13 Jerome Guitton <guitton@adacore.com>
827 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
829 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
831 * a-convec.ads (Cursor): Minor reformatting.
832 * a-convec.adb (Next): Fix minor inconsistencies.
833 (Previous): Likewise.
835 2011-10-13 Ed Schonberg <schonberg@adacore.com>
837 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
838 New predicate to determine whether some operations on an array
839 type are available when the full view of its component may differ
840 from the view of the point of the array declaration.
841 * sem_ch4.adb (Find_Equality_Types): Use
842 Available_Full_View_Of_Component.
843 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
845 2011-10-13 Ed Schonberg <schonberg@adacore.com>
847 * sem_ch9.adb: Analyze aspects while discriminants of protected
850 2011-10-13 Geert Bosch <bosch@adacore.com>
852 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
853 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
854 longer depend on an external library.
855 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
856 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
858 * gcc-interface/Make-lang.in: Update dependencies.
860 2011-10-13 Cyrille Comar <comar@adacore.com>
862 * gnat_ugn.texi: Minor editing.
864 2011-10-13 Vincent Celier <celier@adacore.com>
866 * projects.texi: Add documentation on packages and attributes
867 that are inherited from a project being extended into the
870 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
872 * exp_ch3.adb (Build_Master): Rewritten.
873 (Expand_N_Full_Type_Declaration): Reformat the declarative
874 region. Update the call to Build_Master_Renaming.
875 (Expand_Previous_Access_Type): Rewritten.
876 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
877 Add local constant Result_Subt and update related usage.
878 (Expand_N_Extended_Return_Statement): Add local constant
879 Result_Subt and update related usage.
880 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
881 new context detection mechanism.
882 (Build_Class_Wide_Master):
883 Use Insert_Action to add the renaming into the tree.
884 (Build_Master_Entity): Rewritten to use the new context detection
886 (Build_Master_Renaming): Add formal parameter Ins_Nod
887 and related usage. Use Insert_Action to add the renaming into the
889 (Find_Enclosing_Context): New subsidiary routine. Rather
890 than relying on enclosing scopes, this routine looks at the
891 tree structure to figure out the proper context for a _master
892 or a _chain. This approach eliminates the issues with transient
893 scopes which have not been converted into blocks.
894 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
895 to better reflect the new usage. Update the related comment.
896 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
897 the comment on usage.
898 * sem_ch3.adb (Access_Definition): Update the calls to
899 Build_Master_Entity and Build_Master_Renaming.
900 * sem_ch6.adb (Create_Extra_Formals): Add local variable
901 Full_Subt. Code reformatting.
902 * sem_util.adb (Is_Iterator): Alphabetized.
903 (Is_LHS): Alphabetized.
904 (Is_Limited_Class_Wide_Type): New routine.
905 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
907 2011-10-13 Geert Bosch <bosch@adacore.com>
909 * a-ngrear.adb (Solve): Make generic and move to
910 System.Generic_Array_Operations.
911 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
912 New generic solvers to compute a vector resp. matrix Y such
913 that A * Y = X, approximately.
914 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
915 Implement using Forward_Eliminate and Back_Substitute
916 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
918 * a-ngcoar.ads ("abs"): Fix return type to be real.
920 2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
923 * s-linux-alpha.ads: Do not "with" Interfaces.C.
924 * s-linux-sparc.ads: Likewise.
926 2011-10-13 Geert Bosch <bosch@adacore.com>
928 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
930 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
932 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
935 2011-10-13 Geert Bosch <bosch@adacore.com>
937 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
938 move to System.Generic_Array_Operations.
940 2011-10-13 Geert Bosch <bosch@adacore.com>
942 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
943 * s-gearop.ads (L2_Norm): Change profile to be suitable for
945 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
948 2011-10-13 Robert Dewar <dewar@adacore.com>
950 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
951 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
952 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
953 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
954 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
955 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
957 2011-10-13 Geert Bosch <bosch@adacore.com>
959 * s-gearop.adb: Minor comment additions.
961 2011-10-13 Fedor Rybin <frybin@adacore.com>
963 * gnat_ugn.texi: Add gnattest section.
965 2011-10-13 Ed Schonberg <schonberg@adacore.com>
967 * freeze.adb: Do not create body of renaming if declaration has
970 2011-10-13 Olivier Hainque <hainque@adacore.com>
972 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
973 further, to the ppc+kernel case only.
975 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
977 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
978 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
979 Do not create a pool formal on .NET/JVM.
980 (Expand_N_Extended_Return_Statement): Alphabetize local
981 variables. Do not create a renaming of the build-in-place pool
982 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
983 Add the user-defined pool only on non-VM targets.
984 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
985 local variables. Do not add a pool actual on .NET/JVM.
986 * sem_ch6.adb: Add with and use clause for Targparm.
987 (Create_Extra_Formals): Add build-in-place pool formal only on
989 * rtsfind.ads: Alphabetize entries.
991 2011-10-13 Sergey Rybin <rybin@adacore.com>
993 * gnat_ugn.texi: Minor correction.
995 2011-10-13 Ed Schonberg <schonberg@adacore.com>
997 * sem_ch8.adb: Minor error message improvement.
999 2011-10-13 Robert Dewar <dewar@adacore.com>
1001 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
1003 2011-10-13 Gary Dismukes <dismukes@adacore.com>
1005 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
1006 of a for loop for an enumeration type with an enumeration rep
1007 clause, which involves moving the original loop parameter into
1008 a nested block, the loop parameter's entity must be removed from
1009 the entity list of the loop scope.
1011 2011-10-13 Bob Duff <duff@adacore.com>
1013 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
1014 that gets passed in the same cases where BIP_Alloc_Form is passed
1015 (caller-unknown-size results). BIP_Storage_Pool is used when
1016 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
1017 to the user-defined storage pool is passed at the call site,
1018 and this pool is used in callee to allocate the result.
1019 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
1020 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
1021 the additional BIP_Storage_Pool actual.
1022 (Expand_N_Extended_Return_Statement): Allocate the function
1023 result using the user-defined storage pool, if BIP_Alloc_Form =
1025 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
1026 * exp_ch4.adb: Don't overwrite storage pool set by
1027 Expand_N_Extended_Return_Statement.
1028 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
1029 for use in build-in-place function calls within allocators
1030 where the access type has a user-defined storage pool.
1032 2011-10-13 Sergey Rybin <rybin@adacore.com>
1034 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
1037 2011-10-13 Nicolas Roche <roche@adacore.com>
1039 * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
1042 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1044 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
1045 account that an unchecked union type can be limited.
1047 2011-10-13 Olivier Hainque <hainque@adacore.com>
1049 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
1050 the use of the signal trampoline for PPC in the sjlj case as well.
1051 Add legitimate casts, preventing compile time warnings on the
1052 (sighandler *) profile.
1054 2011-10-13 Yannick Moy <moy@adacore.com>
1056 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
1059 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1061 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
1062 expressions are legal limited return values if each one of their
1063 dependent expressions are legal.
1065 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1067 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
1068 if the prefix of the call is a qualified expression, rewrite as
1070 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
1071 code statement is legal if it is a rewriting of a procedure call.
1073 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1075 * exp_aggr.adb (Flatten): If a component association has a box,
1076 assume that aggregate is not static.
1077 (Safe_Aggregate): If a component association in a non-limited
1078 aggregate has a box, assume that it cannot be expanded in place.
1080 2011-10-13 Vincent Celier <celier@adacore.com>
1082 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
1083 Process_Project_Tree_Phase_1 with Packages_To_Check.
1084 (Process_Project_And_Apply_Config): Ditto
1085 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
1086 Remove default for argument Packages_To_Check.
1087 * prj-proc.adb (Recursive_Process): New argument
1090 (Process_Project_Tree_Phase_1): Ditto.
1091 (Recursive_Project.Process_Aggregated_Projects): Call
1092 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
1094 * prj-proc.ads (Process): New argument Packages_To_Check
1095 (Process_Project_Tree_Phase_1): Ditto
1097 2011-10-13 Arnaud Charlet <charlet@adacore.com>
1099 * gcc-interface/Makefile.in: Fix typo.
1101 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1103 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
1104 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
1105 Use sloc of defining identifier of farmal type declaration,
1106 as sloc of generated internal entity, to prevent misplaced
1109 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1111 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
1112 is fully defined before checking that it is a numeric type.
1114 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1116 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
1117 association for component X has a box, then X is covered in the
1118 aggregate even if there is not default value for X in the type
1119 declaration, and X has to be default-initialized.
1121 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1123 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
1124 literals as referenced only if reference is in current source unit.
1126 2011-10-13 Matthew Heaney <heaney@adacore.com>
1128 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
1130 2011-10-13 Olivier Hainque <hainque@adacore.com>
1132 * sigtramp.h: New file. Prototype and spec of the signal
1133 trampoline to be called by an established handler to provide
1134 dwarf call frame info before the real signal processing code.
1135 * sigtramp-ppcvxw.c: New file. Implementation of the signal
1136 trampoline for ppc-vxworks.
1137 * init.c (vxworks section): Use it for ppc.
1139 2011-10-13 Thomas Quinot <quinot@adacore.com>
1141 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
1142 (Check_Future_Identifier): New subprogram,
1143 factors duplicated code from Par.Ch2.P_Identifier and
1144 Par.Ch3.P_Defining_Identifier.
1146 2011-10-13 Thomas Quinot <quinot@adacore.com>
1148 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
1149 if we fail to initialize CV attributes or CV.
1151 2011-10-13 Thomas Quinot <quinot@adacore.com>
1153 * s-tasren.adb (Timed_Selective_Wait, case
1154 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
1155 we know abortion is already deferred.
1157 2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
1159 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
1160 (Build_Master_Renaming (function)): Removed.
1161 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
1162 (Expand_Full_Type_Declaration): Alphabetize
1163 variables. Reformatting of code and comments. Rewrite the
1164 section on processing of anonymous access-to-task types in
1166 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
1167 (Build_Master_Renaming): Moved to exp_ch9.
1168 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
1169 (Build_Master_Entity): Add formal parameter
1170 Use_Current. Reformatting of code and comments.
1171 (Build_Master_Renaming): Moved from exp_ch3.
1172 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
1173 exp_ch3. Update comment on usage.
1174 (Build_Master_Entity):
1175 Add formal parameter Use_Current. Update comment on usage.
1176 (Build_Master_Renaming): Moved from exp_ch3.
1177 * sem_ch3.adb (Access_Definition): Remove redundant code to
1178 create a _master and a renaming.
1180 2011-10-13 Ed Schonberg <schonberg@adacore.com>
1182 * lib-xref.adb: Do no emit reference to overridden operation,
1183 if it is internally generated.
1185 2011-10-13 Vincent Celier <celier@adacore.com>
1187 * bindgen.adb: Remove any processing related to g-trasym
1188 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
1189 * mlib-prj.adb: Remove any processing related to g-trasym.
1191 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1193 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
1194 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
1195 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
1196 (ADA_FLAGS_TO_PASS): Likewise.
1197 (COMMON_FLAGS_TO_PASS): New.
1198 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
1199 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
1200 (gnatlib): Use COMMON_FLAGS_TO_PASS.
1201 (ada.install-common): Likewise.
1202 (install-gnatlib): Likewise.
1203 (install-gnatlib-obj): Likewise.
1204 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
1205 (gnat-cross): Delete.
1206 (gnatboot): Likewise.
1207 (gnatboot2): Likewise.
1208 (gnatboot3): Likewise.
1209 (gnatstage1): Likewise.
1210 (gnatstage2): Likewise.
1211 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
1212 (MOST_ADAFLAGS): Likewise.
1213 (LOOSE_CFLAGS): Likewise.
1214 (gnat-cross): Likewise.
1215 (GNATLIBFLAGS): Add -W -Wall.
1216 (GNATLIBCFLAGS_FOR_C): Likewise.
1217 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
1218 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
1220 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1222 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
1223 (push_range_check_info): Likewise.
1224 (gnat_to_gnu) <N_Code_Statement>: Likewise.
1225 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
1226 (gnat_invariant_expr): Likewise.
1227 * gcc-interface/utils.c (compute_related_constant): Likewise.
1228 (max_size): Fix handling of SAVE_EXPR.
1229 (remove_conversions): Fix formatting.
1231 2011-10-12 Eric Botcazou <ebotcazou@adacore.com>
1233 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
1234 (DECL_INDUCTION_VAR): New macro.
1235 (SET_DECL_INDUCTION_VAR): Likewise.
1236 * gcc-interface/gigi.h (convert_to_index_type): Declare.
1237 (gnat_invariant_expr): Likewise.
1238 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
1239 parameter, set DECL_LOOP_PARM_P on it.
1240 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
1241 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
1242 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
1243 (struct range_check_info_d): New type.
1244 (struct loop_info_d): Likewise.
1245 (gnu_loop_stack): New stack.
1246 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
1247 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
1248 is set, do not test DECL_RENAMED_OBJECT.
1249 (push_range_check_info): New function.
1250 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
1251 the label. Reference the label and the iteration variable from it.
1252 Build the special induction variable in the unsigned version of the
1253 size type, if it is larger than the base type. And attach it to the
1254 iteration variable if the latter isn't by-ref. In the iteration scheme
1255 case, initialize the invariant conditions in front of the loop if
1256 deemed profitable. Use gnu_loop_stack.
1257 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
1258 <N_Raise_Constraint_Error>: Always process the reason. In the range
1259 check and related cases, and if loop unswitching is enabled, compute
1260 invariant conditions and push this information onto the stack.
1261 Do not translate again the condition if it has been already translated.
1262 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
1263 DECL_LOOP_PARM_P isn't set.
1264 (convert_to_index_type): New function.
1265 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
1266 to convert the index from the base index type to sizetype.
1267 (gnat_invariant_expr): New function.
1269 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1271 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
1272 two parallel arrays to hold standard builtin declarations, and
1273 replace it with a function based interface that can support
1274 creating builtins on the fly in the future.
1275 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
1276 (gnat_to_gnu): Ditto.
1278 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
1281 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
1282 * gcc-interface/utils.c (global_context): New variable.
1283 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
1284 that are either public external or at top level. Use "No" macro.
1285 (end_subprog_body): Call decl_function_context.
1286 (rest_of_subprog_body_compilation): Likewise.
1288 2011-10-07 Eric Botcazou <ebotcazou@adacore.com>
1290 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
1291 (rest_of_subprog_body_compilation): Likewise.
1292 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
1293 test for useless conversions by means of gnat_useless_type_conversion.
1294 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
1295 (language_function): Add named_ret_val and other_ret_val.
1296 (f_named_ret_val): New macro.
1297 (f_other_ret_val): Likewise.
1298 (gigi): Call rest_of_subprog_body_compilation.
1299 (struct nrv_data): New structure.
1300 (is_nrv_p): New predicate.
1301 (prune_nrv_r): New helper function.
1302 (prune_nrv_in_block): New function.
1303 (finalize_nrv_r): New helper function.
1304 (finalize_nrv): New function.
1305 (return_value_ok_for_nrv_p): New predicate.
1306 (build_return_expr): If optimization is enabled, record candidates for
1307 the Named Return Value optimization.
1308 (build_function_stub): Call rest_of_subprog_body_compilation.
1309 (Subprogram_Body_to_gnu): If optimization is enabled and there are
1310 candidates, finalize the Named Return Value optimization.
1311 Call rest_of_subprog_body_compilation.
1312 (call_to_gnu): At the end, if a return value is needed, simplify the
1313 result before wrapping it up in a COMPOUND_EXPR.
1314 * gcc-interface/utils.c (end_subprog_body): Split into...
1315 (rest_of_subprog_body_compilation): ...this. New function.
1316 (gnat_useless_type_conversion): Likewise.
1318 2011-10-06 Thomas Quinot <quinot@adacore.com>
1320 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
1321 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
1322 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
1323 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
1324 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1325 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
1326 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
1327 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
1329 2011-10-06 Ed Schonberg <schonberg@adacore.com>
1331 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
1334 2011-10-06 Matthew Heaney <heaney@adacore.com>
1336 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
1337 (Dequeue_Only_High_Priority): Protected procedure now implemented.
1339 2011-10-06 Vincent Celier <celier@adacore.com>
1341 * g-trasym.adb: Replace old implementation with the default
1342 implementation that returns list of addresses as "0x...".
1343 * g-trasym.ads: Update the list of platforms with the full
1344 capability. Indicate that there is a default implementation
1345 for other platforms.
1346 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
1347 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
1348 is now a default implementation for all platforms without the full
1351 2011-10-06 Robert Dewar <dewar@adacore.com>
1353 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
1354 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
1355 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
1356 reorganization (use conditional expressions).
1358 2011-10-06 Robert Dewar <dewar@adacore.com>
1360 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
1361 floating divide by zero.
1363 2011-10-06 Ed Schonberg <schonberg@adacore.com>
1365 * sem_ch6.adb: Limited interfaces that are not immutably limited
1366 are OK in return statements.
1368 2011-09-30 Iain Sandoe <iains@gcc.gnu.org>
1370 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
1371 change to powerpc section.
1373 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
1375 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
1378 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1380 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
1381 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
1382 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
1384 * a-coorma.ads: Minor reformmating.
1385 * einfo.ads: Improve the comment describing the
1386 Directly_Designated_Type function.
1387 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
1389 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1392 2011-09-27 Robert Dewar <dewar@adacore.com>
1394 * a-comutr.ads: Minor reformatting.
1396 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1398 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
1399 iterators to multiway trees.
1401 2011-09-27 Yannick Moy <moy@adacore.com>
1403 * debug.adb (d.D): New option for strict Alfa mode.
1404 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1405 permissions as strictly as possible.
1406 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1407 Alfa mode, now, interpret ranges of base types like GNAT does; in
1408 strict mode, simply change the range of the implicit base Itype.
1409 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1411 2011-09-27 Robert Dewar <dewar@adacore.com>
1413 * exp_ch9.adb: Minor comment fixes.
1415 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1417 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1420 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1422 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1423 instead of Directly_Designated_Type in the indirect array case.
1425 2011-09-27 Robert Dewar <dewar@adacore.com>
1427 * exp_util.adb, exp_aggr.adb: Minor reformatting.
1429 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1431 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1432 on subtype declarations.
1433 * exp_aggr.adb: Minor comment update.
1435 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
1437 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1438 test in the N_Explicit_Dereference case. Fold double logical
1439 negation in the special loop case and conditionalize it on
1440 Variable_Ref being true.
1442 2011-09-27 Ed Schonberg <schonberg@adacore.com>
1444 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1445 single protected object and the selector is a discriminant or an
1446 entry family, this is a non-overloaded candidate interpretation,
1447 and possible primitive operations of the type must not be
1450 2011-09-27 Arnaud Charlet <charlet@adacore.com>
1452 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1454 2011-09-27 Pascal Obry <obry@adacore.com>
1456 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1457 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1458 Add dummy definitions for pthread_rwlock_t
1459 and pthread_rwlockattr_t on all POSIX platforms.
1460 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1462 (Finalize_Lock): Likewise.
1463 (Write_Lock): Likewise.
1466 2011-09-27 Tristan Gingold <gingold@adacore.com>
1468 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1471 2011-09-27 Pascal Obry <obry@adacore.com>
1473 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1474 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1475 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1476 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1477 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1478 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1479 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1480 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1481 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1482 s-taprop-posix.adb: Revert previous changes.
1483 (Lock): Now a record containing the two possible lock
1484 (mutex and read/write) defined in OS_Interface.
1485 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1487 (Initialize_Protection): Likewise.
1489 (Lock_Read_Only): Likewise.
1492 2011-09-27 Pascal Obry <obry@adacore.com>
1494 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1495 OS_Interface.pthread_rwlock_t.
1497 2011-09-27 Robert Dewar <dewar@adacore.com>
1499 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1500 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1501 sem_ch5.adb, sem_util.adb: Minor reformatting.
1503 2011-09-27 Pascal Obry <obry@adacore.com>
1505 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1506 (Finalize_Lock)[RW_Lock]: Likewise.
1507 (Write_Lock)[RW_Lock]: Likewise.
1508 (Unlock)[RW_Lock]: Likewise.
1509 (Read_Lock): Define L as RW_Lock (instead of Lock).
1510 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1511 routine for r/w lock.
1512 (Finalize_Lock)[RW_Lock]: Likewise.
1513 (Write_Lock)[RW_Lock]: Likewise.
1514 (Unlock)[RW_Lock]: Likewise.
1515 (Read_Lock): Define L as RW_Lock (instead of Lock).
1517 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1518 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1519 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1520 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1521 routine for standard lock.
1522 (Finalize_Lock)[RW_Lock]: Likewise.
1523 (Write_Lock)[RW_Lock]: Likewise.
1524 (Unlock)[RW_Lock]: Likewise.
1525 (Read_Lock): Define L as RW_Lock (instead of Lock).
1526 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1527 in the record definition.
1528 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1529 lock for 'R' locking policy.
1530 (Initialize_Protection): Likewise.
1532 (Lock_Read_Only): Likewise.
1534 * s-taspri-posix.ads (RW_Lock): New type defined as
1535 OS_Interface.pthread_rwlock_t.
1537 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1538 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1539 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1540 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1542 2011-09-27 Pascal Obry <obry@adacore.com>
1544 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1546 2011-09-27 Pascal Obry <obry@adacore.com>
1548 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1549 s-osinte-hpux.ads, s-osinte-irix.ads,
1550 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1552 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1553 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1554 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1555 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1556 pthread_rwlock_destroy, pthread_rwlock_rdlock,
1557 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1559 2011-09-27 Pascal Obry <obry@adacore.com>
1561 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1562 (RE_Id): Add RE_Lock_Read_Only.
1563 (RE_Unit_Table): Likewise.
1564 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1565 to lift restriction on first character. Handle now the
1566 Name_Concurrent_Readers_Locking where policy character is set to
1568 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1570 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1571 read only lock for function in protected object.
1572 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1573 this routine is now used.
1575 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1577 * s-atocou-x86.adb (Decrement): Use %;.
1578 (Increment): Likewise.
1580 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1582 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1583 dereference of the pointer to the storage area. Remove useless type
1584 conversions and factor out common code.
1586 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1588 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1589 variable and use it throughout.
1590 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1591 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1592 first step. Also convert to the unpadded type as a last step.
1594 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1596 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1597 DECL_CHAIN in comment.
1598 * gcc-interface/trans.c (gigi): Likewise.
1599 (Attribute_to_gnu): Likewise.
1600 (build_function_stub): Likewise.
1601 (gnat_to_gnu): Likewise.
1602 * gcc-interface/utils.c (create_subprog_decl): Likewise.
1603 (convert_vms_descriptor64): Likewise.
1604 (convert_vms_descriptor32): Likewise.
1606 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1608 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1609 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1610 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
1611 the type of the record is TYPE_READONLY.
1613 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1614 Robert Dewar <dewar@adacore.com>
1616 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1617 OUT formal parameter which is of an null-exclusion access subtype.
1619 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1621 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1622 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1623 (gnat_to_gnu_param): Likewise.
1624 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1625 maybe_unconstrained_array instead of doing the work manually.
1626 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1627 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1628 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1629 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1630 (gnat_stabilize_reference): Likewise.
1632 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
1634 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1635 (SET_TYPE_NULL_BOUNDS): Likewise.
1636 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1637 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1638 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1640 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1641 check that the initializer is a valid constant expression for use in
1642 initializing a static variable. Add missing guard.
1643 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1644 (convert_to_fat_pointer): In the null fat pointer case, build a valid
1645 pointer for the bounds.
1646 * gcc-interface/utils2.c (compare_fat_pointers): New function.
1647 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1649 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1651 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1652 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1653 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
1654 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1655 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1656 to the indirect case.
1657 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1658 the TREE_THIS_NOTRAP flag.
1660 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1662 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1663 iteration scheme, always generate the do-while form if optimization
1664 is enabled. Use more straightforward test at the end.
1666 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1668 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1669 XNEW instead of xmalloc. Do not build useless pointer type.
1670 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1671 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1672 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1674 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
1676 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1677 the alignment if this doesn't prevent BLKmode access to the object.
1679 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
1681 * gcc-interface/Makefile.in (darwin): Do not issue the
1682 '-flat_namespace' linker flag during Ada build.
1683 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1684 default shared library options.
1686 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
1688 * gcc-interface/decl.c (annotate_value): Look up expression for
1689 insertion in the cache at the end.
1691 2011-09-19 Arnaud Charlet <charlet@adacore.com>
1693 * gcc-interface/Make-lang.in: Update dependencies.
1695 2011-09-19 Steve Baird <baird@adacore.com>
1697 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1698 configuration pragma names so that Is_Configuration_Pragma_Name
1699 will return True for Name_Annotate. Make corresponding change in
1700 Pragma_Id enumeration type. This is needed to allow an Annotate
1701 pragma to occur in a configuration pragma file (typically,
1703 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1704 * gnat_rm.texi: Note that pragma Annotate may be used as a
1705 configuration pragma.
1707 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1709 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1710 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1712 2011-09-19 Yannick Moy <moy@adacore.com>
1714 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1715 for expansion of set membership.
1716 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1717 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1718 visible for use in Alfa expansion.
1719 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1720 variable in Alfa mode.
1722 2011-09-19 Thomas Quinot <quinot@adacore.com>
1724 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1726 2011-09-19 Thomas Quinot <quinot@adacore.com>
1728 * exp_ch9.adb: Minor reformatting.
1730 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1732 * freeze.adb (Build_Renamed_Body): Generic subprograms
1733 instantiations cannot be poperly inlined by the compiler, do
1734 not set the Body_To_Inline attribute in such cases.
1735 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1736 inlining-related flags from the generic subprogram declaration.
1738 2011-09-19 Thomas Quinot <quinot@adacore.com>
1740 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1741 (Build_Stub_Type): Remove, instead copy components from
1742 System.Partition_Interface.RACW_Stub_Type.
1743 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1744 (Copy_Component_List): New subprogram.
1746 2011-09-19 Yannick Moy <moy@adacore.com>
1748 * lib-xref.adb (Generate_Reference): Ignore references to
1749 constants in Standard.
1751 2011-09-19 Robert Dewar <dewar@adacore.com>
1753 * err_vars.ads, errout.ads: Minor reformatting.
1755 2011-09-19 Robert Dewar <dewar@adacore.com>
1757 * aspects.ads (Impl_Defined_Aspects): New array
1758 * lib-writ.adb (No_Dependences): New name for No_Dependence
1759 * restrict.adb (No_Dependences): New name for No_Dependence
1760 (Check_Restriction_No_Specification_Of_Aspect): New
1762 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1763 (Restricted_Profile_Result): New variable
1764 (No_Specification_Of_Aspects): New variable
1765 (No_Specification_Of_Aspect_Warning): New variable
1766 * restrict.ads (No_Dependences): New name for No_Dependence
1767 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1768 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1769 * s-rident.ads: Add restriction
1770 No_Implementation_Aspect_Specifications, this is also added to
1771 the No_Implementation_Extensions profile.
1772 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1773 No_Implementation_Defined_Aspects
1774 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1775 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1776 No_Implementation_Aspects
1777 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1778 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1780 2011-09-19 Yannick Moy <moy@adacore.com>
1782 * lib-xref.adb (Generate_Reference): Take into account multiple
1783 renamings for Alfa refs.
1785 2011-09-19 Thomas Quinot <quinot@adacore.com>
1787 * g-socthi-mingw.adb: Minor reformatting.
1789 2011-09-19 Yannick Moy <moy@adacore.com>
1791 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1792 expansion to False in mode Alfa
1794 2011-09-19 Pascal Obry <obry@adacore.com>
1796 * mingw32.h: Remove obsolete code needed for old versions
1799 2011-09-19 Robert Dewar <dewar@adacore.com>
1801 * errout.ads: Minor reformatting.
1803 2011-09-19 Ed Schonberg <schonberg@adacore.com>
1805 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1806 function is transformed into a declaration and a body, insert
1807 body at the end of the declarative part, to prevent premature
1808 freeze actions, and preserve original specification in the
1809 subprogram declaration.
1811 2011-09-19 Vincent Celier <celier@adacore.com>
1813 * projects.texi: Minor editing.
1815 2011-09-19 Robert Dewar <dewar@adacore.com>
1817 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1818 exp_aggr.adb: Minor reformatting.
1820 2011-09-19 Yannick Moy <moy@adacore.com>
1822 * lib-xref.adb (Generate_Reference): Change entity referenced
1823 to underlying object if any, or else reference to the HEAP.
1825 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1827 * gcc-interface/Make-lang.in: Update dependencies.
1829 2011-09-15 Robert Dewar <dewar@adacore.com>
1831 * tree_io.ads: Minor reformatting.
1832 * a-intnam.ads: Fix bad header.
1834 2011-09-15 Thomas Quinot <quinot@adacore.com>
1836 * a-exexpr-gcc.adb: Minor reformatting.
1838 2011-09-15 Yannick Moy <moy@adacore.com>
1840 * sem_ch6.adb: Propagate information that an expression function comes
1841 from source (otherwise references to this entity are not stored).
1843 2011-09-15 Robert Dewar <dewar@adacore.com>
1845 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1846 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1847 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1849 2011-09-15 Ed Schonberg <schonberg@adacore.com>
1851 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1852 if the expression function is not a completion, create a
1853 new specification for the generated declaration, and keep the
1854 original specification in the generated body. Shorter code also
1855 ensures that proper warnings are generated for unused formals
1858 2011-09-15 Sergey Rybin <rybin@adacore.com>
1860 * tree_io.ads: Update ASIS_Version_Number because of the changes
1861 in the tree structures for expression functions.
1863 2011-09-15 Arnaud Charlet <charlet@adacore.com>
1865 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1866 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1867 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1868 (CLOCK_REALTIME): Fix wrong value on some OSes.
1869 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1871 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1873 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1874 to unconstrained array case, deal with each branch of a COND_EXPR.
1875 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1876 a COND_EXPR in the initializer, if present.
1878 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1880 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1881 of an addressable type.
1882 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1883 Deal with those cases for which creating a temporary is mandatory.
1885 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1887 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1888 this is a real formal parameter before testing whether it is by ref.
1890 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1892 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1893 (build_call_1_expr): Likewise.
1894 (build_call_2_expr): Likewise.
1895 (build_call_n_expr): New prototype.
1896 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1897 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1898 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1899 (Exception_Handler_to_gnu_zcx): Likewise.
1900 (gnat_to_gnu): Likewise.
1901 (build_binary_op_trapv): Likewise.
1902 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1903 (build_call_1_expr): Likewise.
1904 (build_call_2_expr): Likewise.
1905 (build_call_n_expr): New function.
1906 (build_call_raise): Use build_call_n_expr.
1907 (build_call_raise_range): Likewise.
1908 (build_call_raise_column): Likewise.
1909 (build_call_alloc_dealloc_proc): Likewise.
1910 (maybe_wrap_malloc): Likewise.
1911 (maybe_wrap_free): Likewise.
1913 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1915 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1917 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1918 the result type is null if ENABLE_CHECKING. Set operation_type at the
1919 end unconditionally if not set in the previous cases.
1920 Use build2 and void_type_node for MODIFY_EXPR.
1921 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1923 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1925 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1926 precision when converting to or from an integral type whose precision
1927 is not equal to its size.
1929 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1931 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1933 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1935 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1937 * system-darwin-ppc64.ads: New file.
1939 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1941 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1944 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1946 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1947 size switches to the link phase for shared libs.
1949 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1951 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1952 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1954 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1956 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1957 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1958 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1960 (TOOLS_FLAGS_TO_PASS): New.
1961 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1963 2011-09-06 Robert Dewar <dewar@adacore.com>
1965 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1966 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1968 2011-09-06 Robert Dewar <dewar@adacore.com>
1970 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1971 * s-rident.ads: New restriction No_Implementation_Units
1972 (this restriction is also part of the profile
1973 No_Implementation_Extensions)
1974 * sem_ch10.adb (Analyze_With_Clause): Add check for
1975 No_Implementation_Units restriction.
1977 2011-09-06 Jerome Guitton <guitton@adacore.com>
1979 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1982 2011-09-06 Thomas Quinot <quinot@adacore.com>
1984 * s-solita.adb: Minor reformatting.
1986 2011-09-06 Ed Schonberg <schonberg@adacore.com>
1988 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1989 is a rewriting of an expression function does not freeze previous
1992 2011-09-06 Robert Dewar <dewar@adacore.com>
1994 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1996 2011-09-06 Tristan Gingold <gingold@adacore.com>
1998 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1999 powerpc-wrs-vxworksae.
2001 2011-09-06 Thomas Quinot <quinot@adacore.com>
2003 * s-os_lib.ads (Spawn): Minor documentation clarification,
2004 Success is True for a zero exit status.
2006 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2008 * sem_ch5.adb: Add message for common iterator error.
2010 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2012 * exp_ch3.adb (Build_Initialization_Call): If the target is a
2013 selected component discriminated by a current instance, replace
2014 the constraint with a reference to the target object, regardless
2015 of whether the context is an init_proc.
2017 2011-09-06 Robert Dewar <dewar@adacore.com>
2019 * exp_attr.adb: Descriptor_Size is never static.
2021 2011-09-06 Robert Dewar <dewar@adacore.com>
2023 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
2025 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2027 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
2030 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2032 * sem_res.adb (Resolve): An expression that is the body of an
2033 expression function does not freeze.
2035 2011-09-06 Matthew Heaney <heaney@adacore.com>
2037 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
2038 a-cuprqu.adb: Changed copyright notice to indicate current
2041 2011-09-06 Vincent Celier <celier@adacore.com>
2043 * prj.adb: Minor spelling error fix in comment
2044 * sem_res.adb: Minor reformatting
2046 2011-09-06 Pascal Obry <obry@adacore.com>
2048 * sysdep.c (winflush_nt): Removed as not needed anymore.
2049 (winflush_95): Likewise.
2050 (winflush_init): Likewise.
2051 (winflush_function): Likewise.
2052 (getc_immediate_common): Remove call to winflush_function.
2054 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2056 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
2057 processing for Descriptor_Size.
2058 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
2059 to account for its broader usage.
2060 * sem_attr.adb (Analyze_Attribute): Change the error detection
2061 circuitry for Descriptor_Size as the attribute is now applicable
2064 2011-09-06 Robert Dewar <dewar@adacore.com>
2066 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
2068 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2070 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
2071 in a parameter association must not set the Referenced flag on
2073 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
2075 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2077 * gnat_rm.texi: Add a section on attribute Descriptor_Size
2079 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2081 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
2082 gnatlink-re): Speed up by using -j0.
2084 2011-09-06 Yannick Moy <moy@adacore.com>
2086 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
2087 Set_Corresponding_Aspect when creating pragma from aspect.
2088 (Add_Predicates): Use new field Corresponding_Aspect.
2089 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
2090 name when present, for the purpose of issuing error messages;
2091 remove local procedure Error_Pragma_Arg_Alternate_Name.
2092 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
2094 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
2097 2011-09-06 Robert Dewar <dewar@adacore.com>
2099 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
2101 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2103 * exp_ch6.adb (Build_Heap_Allocator): Add new
2104 local variable Desig_Typ. Code and comment reformatting. Add
2105 machinery to ensure that the allocation uses a fat pointer when
2106 the type of the return object is a constrained array and the
2107 function return type is an unconstrained array.
2109 2011-09-06 Vincent Celier <celier@adacore.com>
2111 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
2112 parameters in subprograms.
2114 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2116 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
2118 2011-09-06 Thomas Quinot <quinot@adacore.com>
2120 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
2121 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
2123 (System.Tasking.Primitive_Operations.Specific.Set): If argument
2124 is null, destroy task specific data, to make API consistent with
2125 other platforms, and thus compatible with the shared version
2127 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
2128 Document the above assumption.
2130 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2132 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
2133 variable for type of return value when return type is
2134 unconstrained and context is an assignment.
2136 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2138 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
2139 class-wide operation if expansion is not enabled.
2141 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
2143 * checks.adb (Apply_Scalar_Range_Check): Deal with access
2146 2011-09-06 Yannick Moy <moy@adacore.com>
2148 * sem_ch13.adb (Analyze_Aspect_Specifications, case
2149 Aspect_Invariant): Do not issue error at this point on illegal
2150 pragma placement, as this is checked later on when analyzing
2151 the corresponding pragma.
2152 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
2153 similar to Error_Pragma_Arg, except the source name of the
2154 aspect/pragma to use in warnings may be equal to parameter
2155 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
2156 message to distinguish source name of pragma/aspect, and whether
2157 the illegality resides in the type being public, or being private
2158 without a public declaration
2160 2011-09-06 Thomas Quinot <quinot@adacore.com>
2162 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
2163 size check (fd_set is implemented differently on that platform).
2165 2011-09-06 Thomas Quinot <quinot@adacore.com>
2167 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2168 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2169 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
2170 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2171 (ATCB_Allocation): New subpackage of
2172 System.Tasking.Primitive_Operations, shared across all targets
2173 with full tasking runtime.
2174 (ATCB_Allocation.New_ATCB): Moved there (from target specific
2176 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
2177 taking care of establishing a local temporary ATCB if the one
2178 being deallocated is Self, to avoid a reference to the freed
2179 ATCB in Abort_Undefer.
2181 2011-09-06 Thomas Quinot <quinot@adacore.com>
2183 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
2184 terminated, mark it for deallocation upon termination.
2185 (Terminate_Task): Call Free_Task again if the task is marked
2186 for automatic deallocation upon termination.
2188 2011-09-06 Robert Dewar <dewar@adacore.com>
2190 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
2191 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
2192 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
2193 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
2194 a-intnam-solaris.ads, a-intnam-tru64.ads,
2195 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
2196 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
2197 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
2198 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
2199 * s-rident.ads: Add new restriction No_Implementation_Identifiers
2200 Add new profile No_Implementation_Extensions
2201 * sem_prag.adb: Implement pragma Implementation_Defined Implement
2202 profile No_Implementation_Extensions
2203 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
2204 Check violation of restriction No_Implementation_Identifiers
2205 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
2206 Add entry for Name_No_Implementation_Extensions
2208 2011-09-06 Robert Dewar <dewar@adacore.com>
2210 * impunit.ads: Minor reformatting.
2212 2011-09-06 Robert Dewar <dewar@adacore.com>
2214 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
2216 2011-09-06 Pascal Obry <obry@adacore.com>
2218 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
2221 2011-09-06 Robert Dewar <dewar@adacore.com>
2223 * g-socket.adb: Minor reformatting
2225 2011-09-06 Javier Miranda <miranda@adacore.com>
2227 * ali.adb (Scan_ALI): Add missing support to load references of
2228 entities imported from other languages.
2229 * ali.ads (Xref_Record): Adding new fields to store the language and
2230 name of an imported entity.
2231 * lib-xref.adb (Output_Import_Export_Info): Fix typo
2234 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2236 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
2237 is allowed on a full type declaration if it is the completion of
2238 a private declarations.
2239 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
2240 aspect is allowed on a full type declaration in the private part
2243 2011-09-06 Robert Dewar <dewar@adacore.com>
2245 * sem_ch8.ads: Minor reformatting
2247 2011-09-06 Thomas Quinot <quinot@adacore.com>
2249 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
2250 Guard against socket values that are not in [0;FD_SETSIZE[
2252 2011-09-06 Robert Dewar <dewar@adacore.com>
2254 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
2257 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2259 * s-linux-alpha.ads: Minor reformatting
2260 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
2261 Use sizeof instead of corresponding C defines in s-oscons template.
2263 2011-09-06 Vadim Godunko <godunko@adacore.com>
2265 * a-convec.ads, a-iteint.ads: Minor reformatting.
2267 2011-09-06 Vincent Celier <celier@adacore.com>
2269 * projects.texi: Add menus and @node lines.
2271 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2273 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
2274 where the return type is an unconstrained array and the context
2275 is an assignment. Optimize the case when the target of the
2276 assignment is a selected component.
2278 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2280 * s-solita.adb: Update comments.
2282 2011-09-06 Pascal Obry <obry@adacore.com>
2284 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
2285 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
2286 * s-oscons-tmplt.c: Add support for generating pthread related
2287 types size on GNU/Linux as done for Darwin.
2288 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
2290 2011-09-06 Robert Dewar <dewar@adacore.com>
2292 * exp_ch6.adb: Fix minor typo.
2294 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2296 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2297 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
2298 (Double_Size_Of): Alphabetized. Update the comment on usage.
2299 (Make_Finalize_Address_Stmts): Update comments and reformat code.
2300 (Nearest_Multiple_Rounded_Up): New routine.
2301 (Size_Of): Update comment on usage. The generated expression now
2302 accounts for alignment gaps by rounding the size of the type to the
2303 nearest multiple rounded up of the type's alignment.
2305 2011-09-06 Robert Dewar <dewar@adacore.com>
2307 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
2309 2011-09-06 Steve Baird <baird@adacore.com>
2311 * exp_ch4.adb (Expand_Allocator_Expression): Look through
2312 derived subprograms in checking for presence of an
2313 Extra_Accessibility_Of_Result formal parameter.
2314 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
2315 checking for presence of an Extra_Accessibility_Of_Result formal
2317 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
2318 case where the Parameter_Associatiations attribute is already set,
2319 but set to an empty list.
2320 (Needs_Result_Accessibility_Level):
2321 Unconditionally return False. This is a temporary
2322 change, disabling the Extra_Accessibility_Of_Result
2324 (Expand_Simple_Function_Return): Check for
2325 Extra_Accessibility_Of_Result parameter's presence instead of
2326 testing Ada_Version when generating a runtime accessibility
2327 check which makes use of the parameter.
2329 2011-09-06 Ed Schonberg <schonberg@adacore.com>
2331 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
2332 expression in a given case alternative must be attached to the
2333 statement list of the ccrresponding case statement alternative
2334 They cannot be propagated ahead of the case statement, because
2335 the validity of the expression that generated the action may
2336 hold only for that alternative.
2338 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2340 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2341 (Alignment_Of): Remove the code for strict alignment targets.
2342 (Double_Alignment_Of): Removed.
2343 (Double_Size_Of): New routine.
2344 (Make_Finalize_Address_Stmts): Change the
2345 calculation of the dope's size. Update relevant comments.
2346 (Size_Of): New routine.
2348 2011-09-06 Steve Baird <baird@adacore.com>
2350 * einfo.ads (Extra_Accessibility): Update associated comment to use
2351 the term "present" correctly ("present" just means that it is not
2352 an error to query the value of the attribute - it does not imply
2353 that the value must be non-null).
2354 (Extra_Constrained): Ditto.
2355 (Is_Visible_Formal): Ditto.
2356 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
2357 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
2358 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
2359 * exp_ch6.adb (Expand_Call): The callee may require an
2360 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
2361 < Ada_2012. This can occur if the callee is exported from a Gnat
2362 runtimes unit. Also improve a comment.
2364 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2366 * exp_ch7.adb: Add with and use clauses for Get_Targ.
2367 (Alignment_Of): Rename formal parameter Some_Typ
2368 to Typ, update related comment. Use the allocator alignment on
2369 strict alignment targets such as SPARC.
2370 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
2373 2011-09-06 Gary Dismukes <dismukes@adacore.com>
2375 * sem_ch9.adb (Check_Interfaces): Test
2376 Is_Limited_Type rather than Is_Limited_Record when checking that
2377 the partial view of a synchronized full view must be limited.
2379 2011-09-06 Emmanuel Briot <briot@adacore.com>
2381 * g-comlin.adb (Free): Fix memory leak.
2383 2011-09-06 Robert Dewar <dewar@adacore.com>
2385 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
2387 2011-09-06 Steve Baird <baird@adacore.com>
2389 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
2390 (Ada2012) cases described in AI05-0234 where the accessibility
2391 level of a function result is "determined by the point of
2392 call", an implicit parameter representing that accessibility
2393 level is passed in. Extra_Accessibilty_Of_Result yields this
2394 additional formal parameter. Extra_Accessibility_Of_Result
2395 is analogous to the existing Extra_Accessibility
2396 function used in the implementation of access parameters.
2397 (Set_Extra_Accessibility_Of_Result): New procedure; sets
2398 Extra_Accessibility_Of_Result attribute.
2399 * einfo.adb (Extra_Accessibility_Of_Result): New function.
2400 (Set_Extra_Accessibility_Of_Result): New procedure.
2401 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2402 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2403 an accessibility level literal to Natural; introduce a nested
2404 function, Make_Level_Literal, to do this.
2405 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2406 determines whether a given function (or access-to-function
2407 type) needs to have an implicitly-declared accessibility-level
2408 parameter added to its profile.
2409 (Add_Extra_Actual_To_Call): Export an existing procedure which was
2410 previously declared in the body of Exp_Ch6.
2411 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2413 (Has_Unconstrained_Access_Discriminants): New Function; a
2414 predicate on subtype entities which returns True if the given
2415 subtype is unconstrained and has one or more access discriminants.
2416 (Expand_Call): When expanding a call to a function which takes an
2417 Extra_Accessibility_Of_Result parameter, pass in the appropriate
2418 actual parameter value. In the case of a function call which is
2419 used to initialize an allocator, this may not be possible because
2420 the Etype of the allocator may not have been set yet. In this
2421 case, we defer passing in the parameter and handle it later in
2422 Expand_Allocator_Expression.
2423 (Expand_Simple_Function_Return): When returning from a function which
2424 returns an unconstrained subtype having at least one access
2425 discriminant, generate the accessibility check needed to ensure that
2426 the function result will not outlive any objects designated by its
2428 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2430 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2431 is used to initialize an allocator, we may need to pass in "the
2432 accessibility level determined by the point of call" (AI05-0234)
2433 to the function. Expand_Call, where such actual parameters are
2434 usually generated, is too early in this case because the Etype of
2435 the allocator (which is used in determining the level to be passed
2436 in) may not have been set yet when Expand_Call executes. Instead,
2437 we generate code to pass in the appropriate actual parameter
2438 in Expand_Allocator_Expression.
2439 * sem_ch6.adb (Create_Extra_Formals): Create
2440 the new Extra_Accessibility_Of_Result formal if
2441 Needs_Result_Accessibility_Level returns True. This includes the
2442 introduction of a nested procedure, Check_Against_Result_Level.
2444 2011-09-06 Arnaud Charlet <charlet@adacore.com>
2446 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2449 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2451 * s-finmas.adb (Set_Finalize_Address): Explain the reason
2452 for the synchronization. Move the test for null from
2453 s-stposu.Allocate_Any_Controlled to this routine since the check
2454 needs to be protected too.
2455 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2456 synchronization code.
2457 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2458 explaining the context in which this routine is used.
2459 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2460 to s-finmas.Set_Finalize_Address.
2462 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2464 * einfo.ads: Document that itypes have no parent field.
2466 2011-09-05 Robert Dewar <dewar@adacore.com>
2468 * rtsfind.adb (Check_CRT): Check for overloaded entity
2469 * rtsfind.ads: Document that entities to be found by rtsfind
2470 cannot be overloaded
2471 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2472 (Lock_Entries_With_Status): New name for Lock_Entries with two
2473 arguments (changed to meet rtsfind no overloading rule).
2475 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2477 * s-finmas.adb (Set_Finalize_Address (Address,
2478 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2479 (Set_Finalize_Address (in out Finalization_Master,
2480 Finalize_Address_Ptr): Add synchronization code.
2481 * s-finmas.ads (Set_Finalize_Address (Address,
2482 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2483 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2484 Set_Finalize_Address for the heterogeneous case.
2486 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2488 * sem_ch3.adb: Undo previous change, not suitable after all.
2490 2011-09-05 Robert Dewar <dewar@adacore.com>
2492 * einfo.ads: Minor comment clarification.
2494 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2496 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2497 no longer needs to search through the entities of the return
2498 statement scope to find the _chain.
2499 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2500 (Analyze_Block_Statement): Add local variable
2501 Is_BIP_Return_Statement. Add machinery to install all entities
2502 produced by the expansion of the return object declaration.
2503 (Install_Return_Entities): New routine.
2504 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2506 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2508 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2509 of subunit is incomplete.
2510 (Analyze_Proper_Body): If parent spec is not available, do not
2513 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2515 * sem_disp.adb (Find_Controlling_Arg): Add checks for
2516 interface type conversions, that are expanded into dereferences.
2518 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2520 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2521 Examine the parameter and return profile of a subprogram and swap
2522 any incomplete types coming from a limited context with their
2523 corresponding non-limited views.
2524 (Exchange_Limited_Views): New routine.
2526 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2528 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2529 of internal entity to the subtype declaration, so that when
2530 entities are subsequently exchanged in a package body, the tree
2531 remains properly formatted for ASIS.
2533 2011-09-05 Johannes Kanig <kanig@adacore.com>
2535 * g-comlin.adb (Set_Usage): Additional optional argument to set help
2537 (Display_Help): display the user given help message, if available.
2539 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2541 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2542 is legal if the original node is an identifier that is a
2543 parameterless function call.
2545 2011-09-05 Pascal Obry <obry@adacore.com>
2547 * prj-nmsc.adb: Minor reformatting.
2548 Add support for standalone aggregate library.
2549 (Check_Stand_Alone_Library): Handle standalone aggregate library.
2550 * projects.texi: Fix documentation for aggregate library projects.
2552 2011-09-05 Robert Dewar <dewar@adacore.com>
2554 * sem_ch6.adb: Minor reformatting.
2556 2011-09-05 Matthew Gingell <gingell@adacore.com>
2558 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2559 stack guard page on PPC Linux. This patch ensures the 64K guard page at
2560 the bottom of the stack is not overwritten.
2562 2011-09-05 Thomas Quinot <quinot@adacore.com>
2564 * exp_intr.adb, s-tasini.adb: Minor reformatting.
2566 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2568 * sem_ch3.adb (Access_Definition): If an access type declaration
2569 appears in a child unit, the scope of whatever anonymous type
2570 may be generated is the child unit itself.
2572 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2574 * sem_ch6.adb (Analyze_Expression_Function): Do not set
2575 Comes_From_Source on rewritten body.
2576 (Analyze_Subprogram_Body_Helper): Check that the original node for
2577 the body comes from source, when determining whether expansion
2578 of a protected operation is needed.
2580 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2582 * exp_aggr.adb (Replace_Type): If the target of the assignment is
2583 a selected component and the right-hand side is a self-referential
2584 access, the proper prefix of the rewritten attribute is a copy
2585 of the left-hand side, not of its prefix.
2587 2011-09-05 Robert Dewar <dewar@adacore.com>
2589 * sem_ch5.adb: Minor reformatting.
2590 * sem_ch3.adb: Minor code clean up.
2592 2011-09-05 Jose Ruiz <ruiz@adacore.com>
2594 * exp_ch9.adb (Make_Initialize_Protection): The fact that
2595 restriction No_Dynamic_Attachment is in effect or not should
2596 not influence the default priority associated to a protected
2597 object. With this change, when the restriction is in effect (as
2598 is the case for the Ravenscar profile) the default priority of
2599 a protected object with an interrupt handler is in the range of
2600 interrupt priorities (Default_Interrupt_Priority) as required
2603 2011-09-05 Arnaud Charlet <charlet@adacore.com>
2605 * a-iteint.ads: Fix header.
2607 2011-09-05 Vincent Celier <celier@adacore.com>
2609 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2610 with a directory separator to avoid output such as:
2611 "/path/to/objauto.cgpr" has been deleted.
2613 2011-09-05 Robert Dewar <dewar@adacore.com>
2615 * sem_ch3.adb: Minor reformatting.
2617 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2619 * sem_ch5.adb: Better error message.
2621 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2623 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2624 (Expand_Array_Aggregate): Detect a special case of an aggregate
2625 which contains tasks in the context of an unexpanded return
2626 statement of a build-in-place function.
2627 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2628 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2629 which contains tasks and expand it now that the original simple
2630 return statement has been rewritten.
2631 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2632 reformatting. Do not create a chain for an extended return
2633 statement if one is already available.
2634 (Has_Activation_Chain): New routine.
2636 2011-09-05 Marc Sango <sango@adacore.com>
2638 * sem_ch3.adb (Analyze_Object_Declaration): Remove
2639 the wrong test and add the correct test to detect the violation
2640 of illegal use of unconstrained string type in SPARK mode.
2642 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2644 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2645 message on an iterator over an array.
2647 2011-09-05 Robert Dewar <dewar@adacore.com>
2649 * lib-xref-alfa.adb: Minor reformatting.
2651 2011-09-05 Robert Dewar <dewar@adacore.com>
2653 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2654 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2656 2011-09-05 Gary Dismukes <dismukes@adacore.com>
2658 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2660 2011-09-05 Johannes Kanig <kanig@adacore.com>
2662 * lib-xref-alfa.adb: Update comments.
2664 2011-09-05 Thomas Quinot <quinot@adacore.com>
2666 * sem_res.adb: Minor reformatting
2668 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2670 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2671 present, create them now. Needed in case the return type was
2672 a limited view in the function declaration.
2673 (Make_Build_In_Place_Call_In_Allocator): If return type contains
2674 tasks, build the activation chain for it. Pass a reference to
2675 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2676 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2677 with build_in_place calls.
2678 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2679 incomplete, inatialize its Corresponding_Record_Type component.
2680 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2683 2011-09-05 Johannes Kanig <kanig@adacore.com>
2685 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2688 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2690 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2691 appears within a package specification and the token after "IS"
2692 is not a parenthesis, assume that this is an unparenthesized
2693 expression function, even if the token appears in a line by
2695 * par.adb: Clarify use of Labl field of scope stack in error
2698 2011-09-05 Bob Duff <duff@adacore.com>
2700 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2701 conversions instead of normal type conversions in all cases where a
2702 type conversion would be illegal. In particular, use unchecked
2703 conversions when the operand types are private.
2705 2011-09-05 Johannes Kanig <kanig@adacore.com>
2707 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2708 objects of task type or protected type.
2710 2011-09-05 Ed Schonberg <schonberg@adacore.com>
2712 * sem_ch6.adb (Analyze_Expression_Function): If the expression
2713 function comes from source, indicate that so does its rewriting,
2714 so it is compatible with any subsequent expansion of the
2715 subprogram body (e.g. when it is a protected operation).
2716 * sem_ch4.adb: minor reformatting
2718 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
2720 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2721 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2722 may lead to wrong ancestor package in the case of instantiated subunit
2723 bodies. If a subunit is instantiated, follow the chain of instantiations
2724 rather than the stub structure.
2726 2011-09-02 Robert Dewar <dewar@adacore.com>
2728 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2729 * gcc-interface/Make-lang.in: Update dependencies.
2731 2011-09-02 Marc Sango <sango@adacore.com>
2733 * sem_ch3.adb (Analyze_Object_Declaration): Change
2734 comment and add additional check to differentiate constant of
2735 type string from others unconstrained type.
2737 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2739 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2740 present in incomplete type declarations to refine the error
2741 message the full declaration is in the same unit.
2742 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2743 an incomplete type, set the Premature_Use for additional message.
2744 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2745 and Premature_Use is set, place additional information at the
2746 point of premature use.
2748 2011-09-02 Bob Duff <duff@adacore.com>
2750 * sem_ch6.adb: (Check_Post_State): Suppress warning
2751 "postcondition refers only to pre-state" when the expression has not
2752 yet been analyzed, because it causes false alarms. This can happen when
2753 the postcondition contains a quantified expression, because those are
2754 analyzed later. This is a temporary/partial fix.
2755 (Process_Post_Conditions): Minor: change wording of warning.
2757 2011-09-02 Marc Sango <sango@adacore.com>
2759 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2760 illegal use of unconstrained string type in SPARK mode.
2761 * sem_res.adb (Analyze_Operator_Symbol): Set the
2762 right place where the string operand of concatenation should be
2763 violate in SPARK mode.
2765 2011-09-02 Robert Dewar <dewar@adacore.com>
2767 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2768 exp_ch3.adb: Minor reformatting.
2770 2011-09-02 Vincent Celier <celier@adacore.com>
2772 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2773 as the compiler driver so Is_Compilable returns True for sources.
2774 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2777 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2779 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2780 condition, a reference to a controlling formal must be interpreted
2781 as having the class-wide type (or an access to such) so that the
2782 inherited condition can be properly applied to any overriding
2783 operation (see ARM12 6.6.1 (7)).
2785 2011-09-02 Tristan Gingold <gingold@adacore.com>
2787 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2790 2011-09-02 Javier Miranda <miranda@adacore.com>
2792 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2793 initializing expression of a class-wide interface object declaration
2794 if its type is limited.
2796 2011-09-02 Johannes Kanig <kanig@adacore.com>
2798 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2799 literals, take into account the type name; the type is *not*
2800 the scope for an enumeration literal.
2802 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2804 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2805 to reject an overriding indicator on a user-defined Adjust
2806 subprogram for a limited controlled type.
2808 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2810 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2811 for an actual that is a function call returning an unconstrained
2812 limited controlled type.
2814 2011-09-02 Tristan Gingold <gingold@adacore.com>
2816 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2818 2011-09-02 Johannes Kanig <kanig@adacore.com>
2820 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2821 from "HEAP" to __HEAP Change comment that refers to that variable
2822 * put_alfa.adb: Change comment that refers to that variable
2824 2011-09-02 Robert Dewar <dewar@adacore.com>
2826 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2828 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2830 * exp_util.adb (Extract_Renamed_Object): Renamed to
2831 Find_Renamed_Object. This routine has been reimplemented and now uses
2832 tree traversal to locate a renamed object.
2833 (Is_Aliased): Replace call to Extract_Renamed_Object with
2834 Find_Renamed_Object.
2836 2011-09-02 Tristan Gingold <gingold@adacore.com>
2838 * init.c: (__gnat_is_vms_v7): New function.
2840 2011-09-02 Olivier Hainque <hainque@adacore.com>
2842 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2843 that have a misaligned backchain, necessarily bogus.
2845 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2847 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2848 TSS routine Finalize_Address when compiling in Alfa mode.
2849 (Expand_Freeze_Record_Type): Do not create TSS routine
2850 Finalize_Address when compiling in Alfa mode.
2851 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2852 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2854 (Expand_N_Allocator): Do not produce a call to
2855 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2856 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2857 produce a call to primitive Set_Finalize_Address in Alfa mode because
2858 Finalize_Address is not built.
2859 * exp_ch7.adb (Build_Finalization_Master): Do not create
2860 finalization masters in Afa mode since they are not needed.
2861 (Build_Finalizer): Do not create scope and library-level
2862 finalizers in Alfa mode since they are not needed.
2863 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2864 "new" and "free" when applied to controlled objects in Alfa mode since
2867 2011-09-02 Vincent Celier <celier@adacore.com>
2869 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2870 only library names with the syntax of Ada identifiers, to avoid errors
2871 when compiling the binder generated files.
2872 * projects.texi: Document restriction on SAL library names
2874 2011-09-02 Thomas Quinot <quinot@adacore.com>
2876 * a-chtgbo.adb: Minor comment fix.
2878 2011-09-02 Robert Dewar <dewar@adacore.com>
2880 * lib-xref.adb: Minor reformatting
2882 2011-09-02 Vincent Celier <celier@adacore.com>
2884 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2885 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2886 --version and --help in usage.
2887 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2889 2011-09-02 Bob Duff <duff@adacore.com>
2891 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2892 compilers don't understand it.
2894 2011-09-02 Gary Dismukes <dismukes@adacore.com>
2896 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2897 underlying subtype rather than its base type on the call to
2898 Build_Record_Or_Elementary_Input_Function, so that any
2899 constraints on a discriminated subtype will be available for
2900 doing the check required by AI05-0192.
2901 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2902 If the prefix subtype of the 'Input attribute is a constrained
2903 discriminated subtype, then check each constrained discriminant value
2904 against the corresponding value read from the stream.
2906 2011-09-02 Yannick Moy <moy@adacore.com>
2908 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2909 warnings on suspicious contracts, and enable them with -gnatwa.
2911 2011-09-02 Robert Dewar <dewar@adacore.com>
2913 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2916 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2918 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2919 which ensure that restriction No_Dynamic_Attachment has not been
2921 (Make_Initialize_Protection): Protected types with attach or
2922 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2923 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2924 which ensures that restriction No_Dynamic_Attachment has not been
2926 * sem_attr.adb: (Eval_Attribute): Transform
2927 VAX_Float_Type'First and 'Last into references to
2928 the temporaries which store the corresponding bounds. The
2929 transformation is needed since the back end cannot evaluate
2930 'First and 'Last on VAX.
2931 (Is_VAX_Float): New routine.
2933 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2935 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2936 generic unit is not intrinsic and has an explicit convention,
2937 the instance inherits it.
2939 2011-09-02 Robert Dewar <dewar@adacore.com>
2941 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2942 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2944 2011-09-02 Thomas Quinot <quinot@adacore.com>
2946 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2947 Guard against a prefix that is an N_Has_Entity but has no
2950 2011-09-02 Yannick Moy <moy@adacore.com>
2952 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2955 2011-09-02 Yannick Moy <moy@adacore.com>
2957 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2958 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2960 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2961 procedure looking for suspicious postconditions.
2962 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2963 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2964 options -gnatw.t and -gnatw.T.
2966 2011-09-02 Pascal Obry <obry@adacore.com>
2968 * prj.adb: Minor code refactoring. Move check for null project in
2970 * projects.texi: Fix minor typos.
2972 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2974 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2975 of iteration is an expression, its value must be captured in a
2976 renaming declaration, so that modification of the elements is
2977 propagated to the original container.
2979 2011-09-02 Pascal Obry <obry@adacore.com>
2981 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2982 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2983 prj-tree.adb: Minor reformatting and style fixes.
2985 2011-09-02 Robert Dewar <dewar@adacore.com>
2987 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2988 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2989 No_Implicit_Aliasing
2990 (Analyze_Attribute, case Address): ditto
2991 (Analyze_Attribute, case Unrestricted_Access): ditto
2992 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2993 No_Implicit_Aliasing restriction.
2994 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2996 2011-09-02 Ed Schonberg <schonberg@adacore.com>
2998 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2999 is an unchecked conversion, apply test to its expression.
3001 2011-09-02 Javier Miranda <miranda@adacore.com>
3003 * sem_ch3.adb (Check_Abstract_Overriding): When
3004 traversing the chain of aliased subprograms avoid reporting a
3005 redundant error on the current entity.
3007 2011-09-02 Sergey Rybin <rybin@adacore.com>
3009 * gnat_ugn.texi: Minor clean up.
3011 2011-09-02 Bob Duff <duff@adacore.com>
3013 * s-htable.adb (Set_If_Not_Present): Use renaming
3014 instead of ":=", because the type Key is limited in the generic (even
3015 if not in the instances).
3017 2011-09-02 Robert Dewar <dewar@adacore.com>
3019 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
3020 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
3023 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3025 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
3026 inherited component with the enclosing derived type. Code reformatting.
3028 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3030 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
3031 return done when overflow checks are enabled, since comparisons against
3032 Lor and Hir should not be done when OK1 is False.
3034 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3036 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3037 Add new formal Master_Exp. When present, add that expression to the
3038 call as an extra actual.
3039 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
3040 Fmaster_Actual and in the case of a BIP call initializing a return
3041 object of an enclosing BIP function set it to a
3042 new reference to the implicit finalization master
3043 formal of the enclosing function. Fmaster_Actual is
3044 then passed to the new formal Master_Exp on the call to
3045 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
3046 initializations of Enclosing_Func to its declaration.
3048 2011-09-02 Thomas Quinot <quinot@adacore.com>
3050 * csets.ads: Minor reformatting
3052 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3054 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
3055 the full view of a private type coming from an instantiation.
3056 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
3057 loop to iterate over the declarations rather than use the
3058 First_Entity / Next_Entity scheme.
3060 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3062 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
3063 X'range (N) into X'First (N) .. X'Last (N), do not share the
3064 dimension indicator N, if present. Even though it is a static
3065 constant, its source location may be modified when printing
3066 expanded code under -gnatDL, and node sharing will lead to chaos
3067 in Sprint on large files, by generating a sloc value that does
3068 not correspond to any source file.
3070 2011-09-02 Bob Duff <duff@adacore.com>
3072 * einfo.adb: (Has_Xref_Entry): Do not call
3073 Implementation_Base_Type. Lib.Xref has been
3074 rewritten to avoid the need for it, and it was costly.
3075 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
3076 functions in support of efficient xref.
3077 * lib-xref-alfa.adb: Misc changes related to Key component of
3079 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
3080 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
3081 no longer does. This is the one place where it is needed.
3083 2011-09-02 Johannes Kanig <kanig@adacore.com>
3085 * g-comlin.adb (Getopt): New optional argument Concatenate to have
3086 similar interface as the other Getopt function.
3088 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
3090 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
3091 a call to Set_Finalize_Address if there is no allocator available.
3092 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
3093 a case of allocator expansion where the allocator is not expanded but
3094 needs a custom allocate routine. Code reformatting.
3095 (Is_Finalizable_Transient): Remove local variables Has_Rens and
3096 Ren_Obj. Code reformatting.
3097 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
3098 through the use of 'reference.
3099 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
3100 as part of build-in-place expansion. They are intentionally marked as
3101 coming from source, but their parents are not.
3103 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3105 * sem_ch10.adb (Analyze_With_Clause): If the library unit
3106 is the generated subprogram declaration for a child unit body
3107 that acts as spec, use the original body in the with_clause,
3108 to prevent binding errors.
3110 2011-09-02 Vincent Celier <celier@adacore.com>
3112 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
3113 qualifier /MULTI_UNIT_INDEX=
3115 2011-09-02 Johannes Kanig <kanig@adacore.com>
3117 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
3118 instead of calling the callback function
3120 2011-09-02 Robert Dewar <dewar@adacore.com>
3122 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
3123 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
3125 2011-09-02 Vincent Celier <celier@adacore.com>
3127 * prj-nmsc.adb: (Find_Sources): When the list of sources is
3128 explicitly declared in an extending project, do not warn if a source
3129 for an inherited naming exception is not found.
3131 2011-09-02 Gary Dismukes <dismukes@adacore.com>
3133 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
3134 expansion is inactive.
3136 2011-09-02 Ed Schonberg <schonberg@adacore.com>
3138 * sem_util.adb (Note_Possible_Modification): If the entity
3139 being modified is the renaming generated for an Ada2012 iterator
3140 element, the enclosing container or array is modified as well.
3142 2011-09-02 Jose Ruiz <ruiz@adacore.com>
3144 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
3145 Initialize): Define and initialize the
3146 mutex attributes and condition variable attributes locally.
3148 2011-09-02 Vincent Celier <celier@adacore.com>
3150 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
3151 exception replaced in an extending project.
3152 (Check_Object): No error when the other source is locally removed.
3154 2011-09-02 Yannick Moy <moy@adacore.com>
3156 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
3159 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3161 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
3163 * gcc-interface/Make-lang.in: Update dependencies.
3165 2011-09-01 Robert Dewar <dewar@adacore.com>
3167 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
3169 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3171 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
3172 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
3173 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
3174 specific for systems where their glibc version does not define the
3175 routines to handle dynamically allocated CPU sets.
3177 2011-09-01 Vincent Celier <celier@adacore.com>
3179 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
3180 prj-env.adb: Implement inheritance of naming exceptions in extending
3183 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
3185 * gnatls.adb: Display simple message instead of content of
3188 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3190 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
3191 access discriminant and anonymous access component scopes.
3192 (Inherit_Component): Reuse the itype of an access discriminant
3193 or anonymous access component by copying it in order to set the proper
3194 scope. This is done only when the parent and the derived type
3195 are in different scopes.
3196 (Set_Anonymous_Etype): New routine.
3198 2011-09-01 Robert Dewar <dewar@adacore.com>
3200 * a-convec.adb: Minor reformatting throughout.
3202 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3204 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
3205 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
3206 CPU_ALLOC_SIZE and CPU_FREE linux macros.
3207 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
3208 CPU_SET_S respectively because we are now using dynamically allocated
3209 CPU sets which are more portable across different glibc versions.
3210 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
3211 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
3212 masks dynamically according to the number of processors in the target
3214 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
3215 respectively, so we need to pass the size of the masks as
3217 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
3218 created cpu_set_t masks
3219 with the number of processors available in the target platform,
3220 instead of static bit arrays. It enhances portability because
3221 it uses the information from the target platform.
3222 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
3223 are using a restricted run-time library, use the flag
3224 Configurable_Run_Time_Mode instead of Restricted_Profile.
3226 2011-09-01 Vincent Celier <celier@adacore.com>
3228 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
3229 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
3231 2011-09-01 Nicolas Roche <roche@adacore.com>
3233 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
3234 on VxWorks in kernel mode.
3236 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3238 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
3239 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
3240 directly the bit array.
3241 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
3242 the linux macros with the same name.
3243 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
3244 wrappers around the CPU_ZERO and CPU_SET linux macros.
3246 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3248 * exp_ch7.adb (Find_Insertion_List): Removed.
3249 (Process_Transient_Objects): Insert the declarations of the hook
3250 access type and the hook object before the associated transient object.
3252 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3254 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
3255 package System.Aux_Dec when using restricted run-time libraries which
3256 do not have this package.
3258 2011-09-01 Tristan Gingold <gingold@adacore.com>
3260 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
3262 2011-09-01 Bob Duff <duff@adacore.com>
3264 * sem_attr.adb (Analyze_Access_Attribute): Do not call
3265 Kill_Current_Values for P'Unrestricted_Access, where P is library level
3267 2011-09-01 Thomas Quinot <quinot@adacore.com>
3269 * exp_ch5.adb: Minor reformatting
3270 * gnat_ugn.texi: Fix minor typos.
3271 * gcc-interface/Make-lang.in: Update dependencies.
3273 2011-09-01 Robert Dewar <dewar@adacore.com>
3275 * inline.adb, sem_aggr.adb: Minor reformatting.
3277 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3279 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
3281 2011-09-01 Robert Dewar <dewar@adacore.com>
3283 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
3285 2011-09-01 Bob Duff <duff@adacore.com>
3287 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
3288 body" the same as "in inlined body", because visibility shouldn't
3291 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
3293 * inline.adb (Add_Inlined_Body): Refine previous change.
3295 2011-09-01 Gary Dismukes <dismukes@adacore.com>
3297 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
3298 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3299 Test for case where call
3300 initializes an object of a return statement before testing for
3301 a constrained call, to ensure that all such cases get handled
3302 by simply passing on the caller's parameters. Also, in that
3303 case call Needs_BIP_Alloc_Form to determine whether to pass on
3304 the BIP_Alloc_Form parameter of the enclosing function rather
3305 than testing Is_Constrained. Add similar tests for the return
3306 of a BIP call to later processing to ensure consistent handling.
3307 (Needs_BIP_Alloc_Form): New utility function.
3308 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
3309 a BIP_Alloc_Form formal with call to new utility function
3310 Needs_BIP_Alloc_Form.
3312 2011-09-01 Pascal Obry <obry@adacore.com>
3314 * prj-part.adb: Minor reformatting.
3316 2011-09-01 Vincent Celier <celier@adacore.com>
3318 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
3319 half character in the unit name.
3321 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3323 * exp_ch4.adb: Minor code and comment reformatting.
3325 2011-09-01 Thomas Quinot <quinot@adacore.com>
3327 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
3328 for Is_Limited_Type and Is_Tagged_Type in condition checking
3329 for by-reference type.
3330 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
3331 subprograms may have a completion because of a previous
3332 Inline_Always clause, but the enclosing package must be marked
3333 inlined for the subprogram body to become visible to the backend.
3335 2011-09-01 Thomas Quinot <quinot@adacore.com>
3337 * sem_aux.adb, exp_ch4.adb: Minor reformatting
3339 2011-09-01 Pascal Obry <obry@adacore.com>
3341 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
3343 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3345 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
3346 the formals of a subprogram stub that acts as a spec.
3348 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3350 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
3351 type, declare a renaming for it, not an object declaration.
3353 2011-09-01 Yannick Moy <moy@adacore.com>
3355 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
3356 Ignore_Errors to ignore failures to read ALI files when True.
3358 2011-09-01 Javier Miranda <miranda@adacore.com>
3360 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
3361 constructor calls associated with non-tagged record types.
3363 2011-09-01 Robert Dewar <dewar@adacore.com>
3365 * g-socthi-vms.adb: Minor reformatting.
3367 2011-09-01 Nicolas Roche <roche@adacore.com>
3369 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
3370 in order to avoid impact of imcompatible changes.
3371 * cstreams.c: Likewise
3373 * aux-io.c: Likewise
3375 2011-09-01 Yannick Moy <moy@adacore.com>
3377 * lib-writ.adb (Write_With_Lines): Always output complete information
3378 on "with" line in Alfa mode, as this is required by formal verification
3381 2011-09-01 Tristan Gingold <gingold@adacore.com>
3383 * g-socthi-vms.adb: Add comments.
3385 2011-09-01 Pascal Obry <obry@adacore.com>
3387 * prj.ads: Minor reformatting.
3389 2011-09-01 Vincent Celier <celier@adacore.com>
3391 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
3392 exceptions in the config pragmas file.
3394 2011-09-01 Tristan Gingold <gingold@adacore.com>
3396 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
3398 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3400 * exp_ch7.adb (Find_Insertion_List): New routine.
3401 (Process_Transient_Objects): Add code to handle the abnormal
3402 finalization of a controlled transient associated with a subprogram
3403 call. Since transients are cleaned up right after the associated
3404 context, an exception raised during a subprogram call may bypass the
3407 2011-09-01 Robert Dewar <dewar@adacore.com>
3409 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3412 2011-09-01 Robert Dewar <dewar@adacore.com>
3414 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3416 2011-09-01 Robert Dewar <dewar@adacore.com>
3418 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3420 2011-09-01 Thomas Quinot <quinot@adacore.com>
3422 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3423 GNATRTL_NONTASKING_OBJS.
3425 2011-09-01 Robert Dewar <dewar@adacore.com>
3427 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3428 possibility of this flag being set for formals in Ada 2012 mode.
3429 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3431 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3433 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3435 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3438 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3440 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3441 insertion node in a tree of nested Expression_With_Actions nodes.
3442 (Process_Transient_Object): In the case where a complex if statement
3443 has been converted into nested Expression_With_Actions nodes, the
3444 "hook" object and the associated access type must be inserted before
3445 the top most Expression_With_Actions.
3447 2011-09-01 Robert Dewar <dewar@adacore.com>
3449 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3450 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3452 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3454 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3456 2011-09-01 Jose Ruiz <ruiz@adacore.com>
3458 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3460 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3461 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3462 in a similar way as we do for the Priority or Dispatching_Domain aspect.
3463 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3464 Dispatching_Domains_Frozen): Move this local data to package
3465 System.Tasking because with the CPU aspect we need to have access
3466 to this data when creating the task in System.Tasking.Stages.Create_Task
3467 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3468 Move these variables from the body of
3469 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3470 we need to have access to this data when creating the task in
3471 System.Tasking.Stages.Create_Task.
3472 * s-taskin.adb (Initialize): Signal the allocation of the environment
3473 task to a CPU, if any, so that we know whether the CPU can be
3474 transferred to a different dispatching domain.
3475 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3476 is being allocated belongs to the dispatching domain where the task
3477 lives. Signal the allocation of the task to a CPU, if any, so that we
3478 know whether the CPU can be transferred to a different dispatching
3481 2011-09-01 Ed Schonberg <schonberg@adacore.com>
3483 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3484 attributes Same_Storage and Overlaps_Storage.
3486 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
3488 * exp_strm.adb: Remove with and use clause for Opt.
3489 (Build_Array_Input_Function): Remove the version-dependent generation
3490 of the return statement. The Ada 2005 tree is now the default.
3492 2011-09-01 Yannick Moy <moy@adacore.com>
3494 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3495 it is never empty when compiling in Alfa mode.
3497 2011-09-01 Robert Dewar <dewar@adacore.com>
3499 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3500 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3501 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3502 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3504 2011-09-01 Matthew Heaney <heaney@adacore.com>
3506 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3507 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3508 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3509 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3510 unbounded queue container.
3511 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3512 bounded queue container.
3513 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3514 unbounded priority queue container.
3515 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3516 bounded priority queue container.
3518 2011-08-31 Pascal Obry <obry@adacore.com>
3520 * a-direct.adb: Do not try to create an UNC path on Windows.
3521 (Create_Path): Skip leading computer name in UNC path if any.
3523 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3525 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3526 version-dependent generation of the return statement. The Ada 2005 tree
3529 2011-08-31 Thomas Quinot <quinot@adacore.com>
3531 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3532 types Stream_Element_Offset and Storage_Offset have a different native
3533 type depending on whether the platform is 32 or 64 bits. When
3534 exchanging them, always convert to 64 bits.
3536 2011-08-31 Yannick Moy <moy@adacore.com>
3538 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3539 --force-alfa to gnat2why.
3541 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3543 * sem_ch12.adb (Save_References): If the node has aspects, save
3544 references within the corresponding expressions in a separate step,
3545 because the aspects are not directly in the tree for the declaration
3546 to which they belong.
3548 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3550 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3551 in CodePeer mode, since representation clauses are partially ignored.
3552 * gcc-interface/Make-lang.in: Update dependencies.
3554 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3556 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3557 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3558 to any dispatching domain.
3560 2011-08-31 Thomas Quinot <quinot@adacore.com>
3562 * exp_ch4.adb: Minor reformatting.
3564 2011-08-31 Bob Duff <duff@adacore.com>
3566 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3567 on nodes for which it is not defined.
3568 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3571 2011-08-31 Bob Duff <duff@adacore.com>
3573 * sem_ch3.adb (Process_Full_View): Disable legality check if
3574 In_Instance, to avoid spurious errors.
3575 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3576 if In_Instance, to avoid spurious errors.
3578 2011-08-31 Pascal Obry <obry@adacore.com>
3580 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3581 directory speparators.
3582 (Compose): Use Dir_Seps to handle both forms.
3583 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3585 (Extension): Use Dir_Seps to handle both forms.
3587 2011-08-31 Pascal Obry <obry@adacore.com>
3589 * prj-conf.adb: Minor reformatting.
3591 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3593 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3594 dispatching domain aspect.
3595 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3597 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3598 Dispatching_Domain aspect in a similar way as we do for the Priority
3600 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3601 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3603 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3604 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3605 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3606 Dispatching_Domain and add it to the task definition.
3607 (Sig_Flags): Add Pragma_Dispatching_Domain.
3608 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3609 support to find the types Dispatching_Domain and
3610 Dispatching_Domain_Access.
3611 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3612 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3613 query the availability of a pragma Dispatching_Domain.
3614 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3615 the expander to pass the Dispatching_Domain when creating a task.
3616 (Name_Dispatching_Domain): Add this new name for a pragma.
3617 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3618 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3619 task has been allocated at creation time.
3620 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3621 Ravenscar is always null.
3622 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3623 the task has been allocated at creation time.
3624 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3625 a specific dispatching domain.
3626 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3627 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3628 and CPU are specified for the task, and the CPU value is not contained
3629 within the range of processors for the domain.
3631 2011-08-31 Vincent Celier <celier@adacore.com>
3633 * make.adb (Original_Gcc) : New constant String_Access.
3634 (Gnatmake): For VM targets, do not use VM version of the compiler if
3635 --GCC= has been specified.
3637 2011-08-31 Thomas Quinot <quinot@adacore.com>
3639 * sem_ch5.adb: Minor reformatting.
3641 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3643 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3646 2011-08-31 Bob Duff <duff@adacore.com>
3648 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3649 the access type is private; we don't care about privacy in expansion.
3651 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3653 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3654 subcomponents tnat may be limited, because they originate in view
3655 conflicts. If the original aggregate is legal and the actuals are
3656 legal, the aggregate itself is legal.
3658 2011-08-31 Matthew Heaney <heaney@adacore.com>
3660 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3663 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3665 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3668 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3670 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3671 Interrupt_Priority aspects, force the analysis of the aspect expression
3672 (when building the equivalent pragma). Otherwise, its analysis is done
3673 too late, after the task or protected object has been created.
3674 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3675 Analyze_Single_Task_Declaration): Remove the code to move the aspects
3676 to the object declaration because they are needed in the type
3679 2011-08-31 Robert Dewar <dewar@adacore.com>
3681 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3682 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3685 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3687 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3688 if the corresponding type is malformed due to restriction violations.
3690 2011-08-31 Robert Dewar <dewar@adacore.com>
3692 * s-ransee.ads, s-ransee.adb: Minor reformatting.
3694 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3696 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3697 would cause the generation of Set_Finalize_Address if the target is a
3698 VM and the designated type is not derived from [Limited_]Controlled.
3700 2011-08-31 Arnaud Charlet <charlet@adacore.com>
3702 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3704 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3705 case of a compilation error.
3707 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3709 * init.c (__gnat_error_handler): Standardize the stack overflow or
3710 erroneous memory access message.
3711 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3712 or erroneous memory access message.
3714 2011-08-31 Robert Dewar <dewar@adacore.com>
3716 * sem_ch4.adb: Minor reformatting.
3717 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3719 2011-08-31 Thomas Quinot <quinot@adacore.com>
3721 * scos.ads: Minor documentation clarification.
3722 * put_scos.adb: Do not generate SCO unit header line for a unit that
3725 2011-08-31 Robert Dewar <dewar@adacore.com>
3727 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3729 2011-08-31 Tristan Gingold <gingold@adacore.com>
3731 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3732 hold variables between these following subprograms.
3733 (Build_Exception_Handler, Build_Object_Declarations,
3734 Build_Raise_Statement): Use the above type as parameter.
3735 Make the above adjustments.
3736 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3738 2011-08-31 Pascal Obry <obry@adacore.com>
3740 * projects.texi: Minor reformatting.
3742 2011-08-31 Tristan Gingold <gingold@adacore.com>
3744 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3745 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3747 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3749 * exp_ch5.adb: Minor code cleanup.
3750 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3751 prevent cascaded errors.
3752 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3753 variable of an iterator specification in current scope.
3754 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3755 postconditions on the stack, as they contain no return statements.
3757 2011-08-31 Yannick Moy <moy@adacore.com>
3759 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3760 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3761 call Qualify_Entity_Names.
3762 (Expand_Alfa): call Qualify_Entity_Names in more cases
3763 * lib-xref-alfa.adb: Take into account system package.
3764 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3765 CodePeer mode in which we are interested in finding bugs even if
3766 compiler cannot compile source.
3767 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3770 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3772 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3773 denoted by the subtype mark to ensure getting the concurrent type in
3774 the case where the subtype mark denotes a private subtype of a
3775 concurrent type (needed when using -gnatc).
3776 (Process_Subtype): For the processing specific to type kinds, case on
3777 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3778 subtype denotes a private subtype whose base type is nonprivate (needed
3779 for subtypes of private fulfilled by task types when compiling with
3782 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3784 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3785 late primitives that override interface operations when the full
3786 expander is not active, to avoid blowups in Register_Primitive when
3787 types don't have associated secondary dispatch tables.
3789 2011-08-31 Yannick Moy <moy@adacore.com>
3791 * alfa_test.adb: Code clean up.
3793 2011-08-31 Marc Sango <sango@adacore.com>
3795 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3796 by Comes_From_Source (Original_Node (N)) in order to treat also the
3797 nodes which have been rewritten.
3798 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3799 explicit dereference and slice violation in spark mode on the nodes
3800 coming only from the source code.
3802 2011-08-31 Robert Dewar <dewar@adacore.com>
3804 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3805 lib-xref-alfa.adb: Minor reformatting.
3807 2011-08-31 Matthew Heaney <heaney@adacore.com>
3809 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3811 2011-08-31 Javier Miranda <miranda@adacore.com>
3813 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3814 only for class-wide subprograms conflicting with entities of concurrent
3817 2011-08-31 Matthew Heaney <heaney@adacore.com>
3819 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3822 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3824 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3825 general description of the routine.
3827 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3829 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3830 doubly-linked lists.
3832 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3834 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3835 check is needed for a left-hand side that is a dereference, and the
3836 base type is private without discriminants (whereas the full type does
3837 have discriminants), an extra retrieval of the underlying type may be
3838 needed in the case where the subtype is a record subtype whose base
3839 type is private. Update comments.
3841 2011-08-31 Javier Miranda <miranda@adacore.com>
3843 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3844 found check if there is a class-wide subprogram covering the primitive.
3846 2011-08-31 Yannick Moy <moy@adacore.com>
3848 * sem_res.adb: Further cases where full expansion test is needed,
3849 rather than expansion test.
3851 2011-08-31 Pascal Obry <obry@adacore.com>
3853 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3855 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3857 * exp_ch5.adb: Handle iterators over derived container types.
3859 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3861 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3862 (Has_Anonymous_Master): New routine.
3863 (Set_Has_Anonymous_Master): New routine.
3864 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3865 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3866 (Current_Anonymous_Master): New routine.
3867 (Current_Unit_First_Declaration): Removed.
3868 (Current_Unit_Scope): Removed.
3869 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3870 their objects on a per-unit heterogeneous finalization master.
3872 2011-08-31 Matthew Heaney <heaney@adacore.com>
3874 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3877 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3879 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3882 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3884 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3885 where the actual is an unexpanded call to 'Input.
3887 2011-08-31 Yannick Moy <moy@adacore.com>
3889 * sem_ch4.adb: Code clean up.
3891 2011-08-31 Yannick Moy <moy@adacore.com>
3893 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3895 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3897 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3898 and TSS primitive Finalize_Address if finalization is suppressed.
3899 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3900 primitive Finalize_Address if finalization is suppressed.
3902 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3904 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3905 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3906 sure that the underlying task has already been created before trying
3907 to change its affinity.
3908 (Set_CPU): Use the term processor instead of CPU, as we do in
3911 2011-08-31 Vincent Celier <celier@adacore.com>
3913 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3914 * prj-nmsc.adb (Process_Compiler): Process attribute
3915 Source_File_Switches.
3916 * prj.ads (Language_Config): New name list component
3917 Name_Source_File_Switches.
3918 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3920 2011-08-31 Ed Schonberg <schonberg@adacore.com>
3922 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3923 discriminated component of an actual, expand at once to prevent
3924 ouf-of-order references with generated subtypes.
3926 2011-08-31 Yannick Moy <moy@adacore.com>
3928 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3929 reference to operator in Alfa xrefs.
3931 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3933 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3934 where the parent instance was frozen before the current instance due to
3935 the presence of a source body. Update calls to Insert_After_Last_Decl.
3936 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3937 Update the comment which illustrates the purpose of the routine.
3938 Package instances are now frozen by source bodies which appear after
3939 the instance. This ensures that entities coming from within the
3940 instance are available for use in the said bodies.
3941 (Install_Body): Add code to handle the case where the parent instance
3942 was frozen before the current instance due to the presence of a source
3943 body. Update calls to Insert_After_Last_Decl.
3945 2011-08-31 Jose Ruiz <ruiz@adacore.com>
3947 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3949 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3951 2011-08-31 Yannick Moy <moy@adacore.com>
3953 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3955 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3956 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3957 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3958 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3959 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3960 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3961 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3962 ALFA in Alfa (we dropped acronym).
3963 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3964 operations in a case where it returned previously No_Elist.
3966 2011-08-31 Robert Dewar <dewar@adacore.com>
3968 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3969 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3970 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3971 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3972 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3973 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3976 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3978 * sem_ch12 (Check_Private_View): Revert previous change.
3979 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3980 conversion is in a generic instance.
3982 2011-08-31 Matthew Heaney <heaney@adacore.com>
3984 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3985 * a-chtgbo.adb (Free): Allow 0 as index value.
3987 2011-08-31 Matthew Heaney <heaney@adacore.com>
3989 * a-cborma.adb (Insert): Add comment to explain why no element
3992 2011-08-31 Gary Dismukes <dismukes@adacore.com>
3994 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3995 spec discriminant is already a concurrent type, in which case just use
3996 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3998 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4000 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
4001 system-linux-mips.ads, system-linux-mipsel.ads,
4002 system-linux-mips64el.ads, system-linux-ppc64.ads,
4003 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
4005 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4007 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
4008 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
4009 (build_unary_op): Likewise.
4011 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4013 * raise-gcc.c: Do not include coretypes.h and tm.h.
4014 (setup_to_install): Remove test for compiler macro.
4015 * targext.c: Document use for the library.
4016 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
4018 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
4020 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
4021 the expression to the nominal type if the latter is a record type with
4022 a variant part and the type of the former is a record type without one.
4024 2011-08-30 Yannick Moy <moy@adacore.com>
4026 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4027 expansion in Alfa mode.
4028 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
4029 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
4031 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
4032 * sem_res.adb: Ditto.
4033 * gcc-interface/Make-lang.in: Update dependencies.
4035 2011-08-30 Thomas Quinot <quinot@adacore.com>
4037 * g-socket.ads: Minor documentation adjustment.
4039 2011-08-30 Robert Dewar <dewar@adacore.com>
4041 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
4043 2011-08-30 Yannick Moy <moy@adacore.com>
4045 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
4046 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
4047 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
4048 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
4049 Revert change which introduced files for "light"
4050 expansion, to be replaced by a single file for Alfa expansion.
4052 2011-08-30 Robert Dewar <dewar@adacore.com>
4054 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
4055 Minor code reorg/reformatting.
4057 2011-08-30 Yannick Moy <moy@adacore.com>
4059 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
4060 common shorthand for (Expander_Active and not ALFA_Mode) that can be
4061 used for testing full expansion, that is active expansion not in the
4062 reduced mode for Alfa
4063 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
4064 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
4065 of the verbose (Expander_Active and not ALFA_Mode)
4067 2011-08-30 Tristan Gingold <gingold@adacore.com>
4069 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
4070 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
4071 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
4072 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
4074 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4076 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
4077 access conversions to check that the conversion is a rewritten node,
4078 rather than just having Comes_From_Source set to False, which wasn't
4081 2011-08-30 Robert Dewar <dewar@adacore.com>
4083 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
4084 g-socket.ads: Minor reformatting.
4086 2011-08-30 Thomas Quinot <quinot@adacore.com>
4088 * sem_util.adb: Minor reformatting.
4090 2011-08-30 Tristan Gingold <gingold@adacore.com>
4092 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
4093 to be compliant with the ABI.
4095 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
4097 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
4098 of a designated type when the related access type is an actual in an
4099 instance. This ensures that the full view of designated type is
4100 available when inside the body of the instance.
4102 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4104 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
4105 in a position to be modified, a slice is treated like an indexed
4108 2011-08-30 Thomas Quinot <quinot@adacore.com>
4110 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
4111 field tv_sec in struct timeval.
4113 2011-08-30 Yannick Moy <moy@adacore.com>
4115 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
4116 blocks of code doing full expansion, previously only guarded by
4117 Expander_Active, by anding the test that ALFA_Mode is not set
4119 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4121 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
4122 add the function to the list of private dependents, for subsequent
4123 legality check on Taft amendment types.
4124 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
4125 Private_Dependents, as for other incomplete types.
4126 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
4127 Taft-amendment type is used as the return type of a function.
4129 2011-08-30 Javier Miranda <miranda@adacore.com>
4131 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
4132 which emits an error by a call to a new routine which report the error.
4133 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
4134 entity does not cover an existing interface.
4135 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
4137 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
4138 protected procedures or entries whose mode is not conformant.
4139 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
4140 an error by a call to a new routine which report the error.
4142 2011-08-30 Robert Dewar <dewar@adacore.com>
4144 * gnat_rm.texi: Minor change.
4145 * exp_attr_light.adb: Minor reformatting.
4147 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4149 * sem_ch3.adb: Patch inheritance of aspects in
4150 Complete_Private_Subtype, to avoid infinite loop.
4152 2011-08-30 Javier Miranda <miranda@adacore.com>
4154 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
4155 been reported and a subprogram covering an interface primitive is not
4156 found then skip generating the internal entity. Done to avoid crashing
4158 (Check_Abstract_Overriding): Change text of error of wrong formal of
4159 protected subprogram or entry. Done for consistency to emit exactly the
4160 same error reported by Check_Synchronized_Overriding. In addition, the
4161 error is restricted to protected types (bug found working on AI05-0090)
4163 2011-08-30 Yannick Moy <moy@adacore.com>
4165 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4166 expansion in Alfa mode.
4167 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
4168 * exp_light.adb, exp_light.ads: New package defining light expansion.
4169 * expander.adb (Expand): Call light expansion in Alfa mode
4170 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
4172 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
4174 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
4175 * gnat1drv.adb (Adjust_Global_Switches): Comment
4177 2011-08-30 Yannick Moy <moy@adacore.com>
4179 * lib-xref-alfa.adb: Minor refactoring.
4181 2011-08-30 Yannick Moy <moy@adacore.com>
4183 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
4185 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
4186 expansion in Alfa mode.
4187 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
4190 2011-08-30 Robert Dewar <dewar@adacore.com>
4192 * debug_a.adb: Update comment.
4194 2011-08-30 Robert Dewar <dewar@adacore.com>
4196 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
4197 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
4198 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
4199 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
4201 2011-08-30 Robert Dewar <dewar@adacore.com>
4203 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
4206 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
4208 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
4209 Build_Finalization_Master by supplying an insertion node and enclosing
4210 scope. In its old version, the call did not generate a finalization
4212 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
4213 recognize anonymous access-to-controlled components. Rewrite the
4214 machinery which creates finalization masters to service anonymous
4215 access-to-controlled components of a record type. In its current state,
4216 only one heterogeneous master is necessary to handle multiple anonymous
4218 (Freeze_Type): Comment reformatting.
4219 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
4221 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
4222 associates TSS primitive Finalize_Address with either the master itself
4223 or with the internal hash table depending on the mode of operation of
4226 2011-08-30 Javier Miranda <miranda@adacore.com>
4228 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
4229 interface type then do not generate code to compare this component.
4230 Required since they have no components and their equality operator is
4233 2011-08-30 Steve Baird <baird@adacore.com>
4235 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
4236 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
4237 returns the (static) accessibility level of the object. Otherwise, the
4238 same as Type_Access_Level.
4239 (Dynamic_Accessibility_Level): New function; given an expression which
4240 could occur as the rhs of an assignment to a saooaaat (i.e., an
4241 expression of an access-to-object type), return the new value for the
4242 saooaaat's associated Extra_Accessibility object.
4243 (Effective_Extra_Accessibility): New function; same as
4244 Einfo.Extra_Accessibility except that object renames are looked through.
4246 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
4247 (Dynamic_Accessibility_Level): New function; see sem_util.ads
4249 (Effective_Extra_Accessibility): New function; see sem_util.ads
4251 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
4252 (Extra_Accessibility): Update comments.
4253 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
4254 except RM_Size field (which is only for types) is unaffected.
4256 (Extra_Accessibility): Expand domain to allow objects, not just formals.
4257 (Set_Extra_Accessibility): Expand domain to allow objects, not just
4259 (Init_Size): Add assertion that we are not trashing the
4260 Extra_Accessibility attribute of an object.
4261 (Init_Size_Align): Add assertion that we are not trashing the
4262 Extra_Accessibility attribute of an object.
4263 (Init_Object_Size_Align): New procedure; see einfo.ads description.
4264 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
4265 differently for the type of a (non-library-level) saooaaat depending
4266 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
4267 is queried in this set of changes - everything else (in particular,
4268 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
4269 driven off of the setting of the Is_Local_Anonymous_Access attribute.
4270 The special treatment of library-level saooaaats is an optimization,
4271 not required for correctnesss. This is based on the observation that the
4272 Ada2012 rules (static and dynamic) for saooaaats turn out to be
4273 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
4275 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
4276 false for the type of a saooaaat, declare and initialize its
4277 accessibility level object and set the Extra_Accessibility attribute
4278 of the saooaaat to refer to this object.
4279 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
4280 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
4281 calls to Effective_Extra_Accessibility in order to support
4282 renames of saooaaats.
4283 (Expand_N_Type_Conversion): Add new local function,
4284 Has_Extra_Accessibility, and call it when determining whether an
4285 accessibility check is needed.
4286 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
4287 evaluate to True (without raising an exception).
4289 (Expand_N_Assignment_Statement): When assigning to an Ada2012
4290 saooaaat, update its associated Extra_Accessibility object (if
4291 it has one). This includes an accessibility check.
4292 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
4293 a saooaaat, update its Extra_Accessibility object too (if it
4295 (Expand_Call): Replace a couple of calls to Type_Access_Level
4296 with calls to Dynamic_Access_Level to handle cases where
4297 passing a literal (any literal) is incorrect.
4298 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
4299 checks associated with "Saooaat := Some_Object'Access;"; this must
4300 be rejected if Some_Object is declared in a more nested scope
4302 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
4303 assignment to a saooaaat even if Is_Local_Anonymous_Access
4304 returns False for its type (indicating a 2012-style saooaaat).
4306 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
4307 (which is only appropriate for objects, not types) with a call
4308 of Init_Object_Size_Align in order to avoid trashing the
4309 Extra_Accessibility attribute of a rename (the two attributes
4312 (Valid_Conversion) Replace six calls to Type_Access_Level with
4313 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
4314 Ada2012 non-library-level saooaaat, the former returns library level
4315 while the latter returns the (static) accessibility level of the
4316 saooaaat. A type conversion to the anonymous type of a saooaaat
4317 can only occur as part of an assignment to the saooaaat, so we
4318 know that such a conversion must be in a lhs context, so Deepest
4319 yields the result that we need. If such a conversion could occur,
4320 say, as the operand of an equality operator, then this might not
4321 be right. Also add a test so that static accessibilty checks are
4322 performed for converting to a saooaaat's type even if
4323 Is_Local_Anonymous_Access yields False for the type.
4325 2011-08-30 Javier Miranda <miranda@adacore.com>
4327 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
4328 controls generation of a warning associated with late declaration of
4329 dispatching functions. Required to avoid generating spurious
4332 2011-08-30 Gary Dismukes <dismukes@adacore.com>
4334 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
4335 return object has an anonymous access type and the function's type is
4336 a named access type.
4337 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
4338 conversions on implicit conversions, since such conversions can occur
4339 for anonymous access cases due to expansion. Issue error for attempt
4340 to rename an anonymous expression as an object of a named access type.
4341 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
4342 to indicate whether this function should report errors on invalid
4344 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
4345 the expression is of an anonymous access type and the expected type is
4346 a named general access type, rewrite the expression as a type
4347 conversion, unless this is an expression of a membership test.
4348 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
4349 calling of Error_Msg_N on new formal Report_Errs.
4350 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
4351 calling of Error_Msg_NE on new formal Report_Errs.
4352 (Valid_Conversion): Move declaration of this function to the package
4353 spec, to allow calls from membership test processing. For Ada 2012,
4354 enforce legality restrictions on implicit conversions of anonymous
4355 access values to general access types, disallowing such conversions in
4356 cases where the expression has a dynamic accessibility level (access
4357 parameters, stand-alone anonymous access objects, or a component of a
4358 dereference of one of the first two cases).
4359 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
4360 in the context of a named general access expected type.
4361 * exp_ch4.adb Add with and use of Exp_Ch2.
4362 (Expand_N_In): Add processing for membership tests applied to
4363 expressions of an anonymous access type. First, Valid_Conversion is
4364 called to check whether the test is statically False, and then the
4365 conversion is expanded to test that the expression's accessibility
4366 level is no deeper than that of the tested type. In the case of
4367 anonymous access-to-tagged types, a tagged membership test is applied
4369 (Tagged_Membership): Extend to handle access type cases, applying the
4370 test to the designated types.
4371 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
4372 accessibility level, and the actual is a 'Access applied to a current
4373 instance, pass the accessibility level of the type of the current
4374 instance rather than applying Object_Access_Level to the prefix. Add a
4375 ??? comment, since this level isn't quite right either (will eventually
4376 need to pass an implicit level parameter to init procs).
4378 2011-08-30 Bob Duff <duff@adacore.com>
4380 * s-taskin.ads: Minor comment fix.
4382 2011-08-30 Ed Schonberg <schonberg@adacore.com>
4384 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
4385 component and the selector is a dispatching operation, check if it is
4386 a prefixed call before rewriting as a parameterless function call.
4388 2011-08-29 Jakub Jelinek <jakub@redhat.com>
4390 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
4391 tsystem.h into $(RTSDIR) instead of rts.
4393 2011-08-29 Robert Dewar <dewar@adacore.com>
4395 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4397 * gcc-interface/Make-lang.in: Update dependencies.
4399 2011-08-29 Yannick Moy <moy@adacore.com>
4401 * alfa.ads (Name_Of_Heap_Variable): New constant name.
4402 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4403 table to hold dereferences.
4404 (Add_ALFA_Xrefs): Take into account dereferences as special
4405 reads/writes to the variable "HEAP".
4406 (Enclosing_Subprogram_Or_Package): Move subprogram here.
4407 (Generate_Dereference): New procedure to store a read/write dereferencew
4409 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4410 the special "HEAP" var.
4411 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4413 * sem_util.adb (Note_Possible_Modification): Store write dereference
4416 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4418 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4419 ensures that the level of the subpool access type is not deeper than
4420 that of the pool object.
4421 * sem_util.adb (Object_Access_Level): Expand to handle defining
4423 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4424 subpool handle name of a rewritten allocator.
4426 2011-08-29 Robert Dewar <dewar@adacore.com>
4428 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4430 2011-08-29 Thomas Quinot <quinot@adacore.com>
4432 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4433 values, we generate multiple triples of parameters in the TypeCode.
4434 Bump Choice_Index for each such triple so that a subsequent default
4435 choice is associated with the correct index in the typecode.
4437 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4439 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4441 (First, Last): Handle properly an iterator over a null container.
4443 2011-08-29 Bob Duff <duff@adacore.com>
4445 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4446 processing if we run across a node with no Scope. This can happen if
4447 we're with-ing an library-level instance, and that instance got errors
4448 that caused "instantiation abandoned".
4449 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4450 an exception instead of using Assert, so it won't go into an infinite
4451 loop, even when assertions are turned off.
4453 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4455 * a-coorse.adb: Proper handling of empty ordered sets.
4457 2011-08-29 Johannes Kanig <kanig@adacore.com>
4459 * debug.adb: Add comments.
4461 2011-08-29 Thomas Quinot <quinot@adacore.com>
4463 * a-except.adb, a-except-2005.adb: Minor comment rewording and
4466 2011-08-29 Yannick Moy <moy@adacore.com>
4468 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4469 declaration for Itypes in Alfa mode.
4471 2011-08-29 Robert Dewar <dewar@adacore.com>
4473 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4474 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4475 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4478 2011-08-29 Tristan Gingold <gingold@adacore.com>
4480 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4482 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4483 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4486 2011-08-29 Robert Dewar <dewar@adacore.com>
4488 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4490 2011-08-29 Javier Miranda <miranda@adacore.com>
4492 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4493 renamings of formal subprograms when the actual for a formal type is
4496 2011-08-29 Matthew Heaney <heaney@adacore.com>
4498 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4501 2011-08-29 Matthew Heaney <heaney@adacore.com>
4503 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4504 components of record type.
4505 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4508 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4510 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4511 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4514 2011-08-29 Robert Dewar <dewar@adacore.com>
4516 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4519 2011-08-29 Matthew Heaney <heaney@adacore.com>
4521 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4522 components of record type.
4524 2011-08-29 Bob Duff <duff@adacore.com>
4526 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4527 by the termination handler.
4529 2011-08-29 Yannick Moy <moy@adacore.com>
4531 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4532 created in Alfa mode, instead of inserting artificial declarations of
4533 non-Itypes in the tree.
4534 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4535 know if an Itype has a corresponding declaration, as defined in
4538 2011-08-29 Yannick Moy <moy@adacore.com>
4540 * gnat1drv.adb: Minor rewrite.
4542 2011-08-29 Bob Duff <duff@adacore.com>
4544 * s-tasuti.adb (Make_Passive): Work around race condition in
4545 Make_Independent, which can cause Wait_Count to be zero. So instead of
4546 asserting that Wait_Count > 0, and then decrementing it, decrement it
4547 only if Wait_Count > 0.
4548 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4549 should be nonnegative, so declare them Natural instead of Integer.
4551 2011-08-29 Robert Dewar <dewar@adacore.com>
4553 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4554 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4555 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4556 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4557 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4559 2011-08-29 Tristan Gingold <gingold@adacore.com>
4561 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4563 2011-08-29 Vadim Godunko <godunko@adacore.com>
4565 * s-parint.ads: Minor comment clarification.
4567 2011-08-29 Vincent Celier <celier@adacore.com>
4569 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4570 may be used as identifiers.
4572 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4574 * a-coinho.ads: Minor reformating.
4576 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4578 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4579 container of a derived type.
4581 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4583 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4584 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4586 2011-08-29 Pascal Obry <obry@adacore.com>
4588 * exp_disp.adb: Minor comment fix.
4589 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4590 to avoid warnings when compiling with -Wall.
4591 (Make_Disp_Conditional_Select_Body): Likewise.
4592 (Make_Disp_Timed_Select_Body): Likewise.
4594 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4596 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4597 an entity name, generate reference for it.
4599 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4601 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4603 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4604 the class-wide type.
4605 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4607 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4609 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4610 subtype for an object whose type is an unconstrained union.
4612 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4614 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4615 is allowed in a component definition, by AI95-406.
4617 2011-08-29 Matthew Heaney <heaney@adacore.com>
4619 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4621 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4623 * a-except-2005.adb: Alphabetize all routines.
4624 (Triggered_By_Abort): New routine.
4625 * a-except-2005.ads (Triggered_By_Abort): New routine.
4626 * a-except.adb Alphabetize all routines.
4627 (Triggered_By_Abort): New routine.
4628 * a-except.ads (Triggered_By_Abort): New routine.
4629 * exp_ch7.adb: Update all comments involving the detection of aborts in
4631 (Build_Object_Declarations): Do not generate code to detect the
4632 presence of an abort at the start of finalization code, use a runtime
4634 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4636 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4637 allocate a task on a subpool.
4638 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4639 The flag disables all actions related to the maintenance of
4640 Finalize_Address_Table when subpools are not in use.
4641 (Allocate_Any_Controlled): Signal the machinery that subpools are in
4643 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4644 performs costly task locking when subpools are not in use.
4646 2011-08-29 Yannick Moy <moy@adacore.com>
4648 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4649 types and dispatching calls in Alfa mode.
4650 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4651 correspondance between body and spec scopes, to reuse utility functions
4652 (Traverse_Declarations_Or_Statements): Protect access to body for stub
4653 by testing the presence of the library unit for the body
4654 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4655 mode the expansion of accept statements is skipped
4656 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4657 the unique entity corresponding to the one returned by
4658 Unique_Defining_Entity applied to the enclosing declaration of the
4661 2011-08-29 Bob Duff <duff@adacore.com>
4663 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4664 gdb when x is not a node (it can be a node list, name_id, etc). pp is
4665 an alias for pn. ppp is an alias for pt.
4667 2011-08-29 Javier Miranda <miranda@adacore.com>
4669 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4670 aggregate to take a consistent decision on the need to convert into
4671 assignments aggregates that initialize constant objects.
4673 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4675 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4676 Build_Allocate_Deallocate_Proc in order to handle allocation of
4677 non-controlled objects on subpools.
4678 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4679 to be end-user visible.
4680 * s-finmas.adb: Add with and use clause for System.HTable.
4681 Add an instantiation of Simple_HTable which provides a mapping between
4682 the address of a controlled object and the corresponding
4683 Finalize_Address used to clean up the object. The table is used when a
4684 master is operating in heterogeneous mode.
4685 (Attach): Explain why the input node is not verified on being already
4687 (Delete_Finalize_Address): New routine.
4688 (Detach): Add pragma Assert which ensures that a node is already
4690 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4691 since nodes are no longer removed on traversal. Explain why node
4692 detachment is undesirable in this case.
4693 (Get_Finalize_Address): New routine.
4694 (Hash): New routine.
4695 (Is_Empty_List): Removed.
4696 (pm): Renamed to Print_Master. Add output for discriminant
4698 Comment reformatting.
4699 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4700 * s-finmas.ads: Various comments additions / improvements.
4701 Type Finalization_Master has a discriminant which determines the mode of
4703 (Delete_Finalize_Address): New routine.
4704 (Get_Finalize_Address): New routine.
4705 (pm): Renamed to Print_Master.
4706 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4707 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4708 use clause for System.IO.
4709 (Allocate_Any_Controlled): Add machinery to set TSS primitive
4710 Finalize_Address depending on the mode of allocation and the mode of
4712 (Deallocate_Any_Controlled): Remove the relation pair object -
4713 Finalize_Address regardless of the master mode. Add comment explaining
4715 (Detach): Ensure that fields Prev and Next are null after detachment.
4716 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4717 scheme to check whether the list of subpools is empty. There is no
4718 longer need to store the next subpool or advance the current pointer.
4719 (Is_Empty_List): New routine.
4720 (Print_Pool): New routine.
4721 (Print_Subpool): New routine.
4722 * s-stposu.ads: Various comments additions / improvements.
4723 Field Master of type Root_Subpool is now a heterogeneous collection.
4724 (Print_Pool): New routine.
4725 (Print_Subpool): New routine.
4727 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4729 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4730 forms, using aspects of container types.
4731 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4732 Has_Implicit_Dereference flags, that may be set on the partial view.
4733 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4734 container type with an indexing aspect.
4735 (Analyze_Quantified_Expression): Analyze construct with expansion
4736 disabled, because it will be rewritten as a loop during expansion.
4737 (Try_Container_Indexing): The prefix itself may be a container type
4738 with an indexing aspect, as with a vector of vectors.
4739 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4740 the original doamin of iteration, for name capture.
4741 (Analyze_Iterator_Specification): If the domain is an expression that
4742 needs finalization, create a separate declaration for it.
4743 For an iterator with "of" retrieve default iterator info from aspect of
4744 container type. For "in" iterator, retrieve type of Iterate function.
4745 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4746 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4747 analysis, to prevent spurious errors about late attributes.
4748 * sprint.adb: Handle quantified expression with either loop or iterator
4750 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4753 2011-08-29 Vincent Celier <celier@adacore.com>
4755 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4756 Binder or Linker of the main project file.
4758 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4760 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4763 2011-08-29 Yannick Moy <moy@adacore.com>
4765 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4767 2011-08-29 Yannick Moy <moy@adacore.com>
4769 * exp_ch11.adb: Minor expansion of comment.
4771 2011-08-29 Yannick Moy <moy@adacore.com>
4773 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4775 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4777 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4778 interpretation, set the type before resolving the operands, because
4779 legality checks on an exponention operand need to know the type of the
4782 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4784 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4785 cleanups on a master if the instance is within a generic unit.
4786 Complement to the corresponding fix to inline.adb for K520-030.
4788 2011-08-29 Tristan Gingold <gingold@adacore.com>
4790 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4792 * exp_intr.adb: Minor comment fix.
4794 2011-08-29 Bob Duff <duff@adacore.com>
4796 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4797 Delay_Required was used as an uninitialized variable.
4799 2011-08-29 Robert Dewar <dewar@adacore.com>
4801 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4802 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4803 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4805 2011-08-29 Thomas Quinot <quinot@adacore.com>
4807 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4808 Remove unused variables.
4810 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4812 * sem_res.adb: Remove Build_Explicit_Dereference.
4813 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4814 from sem_res.adb, used in analysis of additional constructs.
4815 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4816 expansion of iterators.
4817 (Is_Object_Reference): Recognize variables rewritten as explicit
4818 dereferences in Ada2012.
4819 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4820 Reversible_Iterator names, for expansion of Ada2012 iterators.
4821 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4822 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4823 linked list container.
4824 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4825 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4827 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4829 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4832 2011-08-29 Vincent Celier <celier@adacore.com>
4834 * make.adb (Gnatmake): Get the maximum number of simultaneous
4835 compilation processes after the Builder switches has been scanned, as
4836 there may include -jnn.
4838 2011-08-29 Matthew Heaney <heaney@adacore.com>
4840 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4842 2011-08-29 Tristan Gingold <gingold@adacore.com>
4844 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4845 GNAT_DRIVER_COMMAND_LINE to 255.
4847 2011-08-29 Pascal Obry <obry@adacore.com>
4849 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4850 reformatting and style fix (class attribute casing).
4852 2011-08-29 Yannick Moy <moy@adacore.com>
4854 * exp_ch11.adb: Yet another case where expansion should be common
4855 between CodePeer and Alfa.
4857 2011-08-29 Yannick Moy <moy@adacore.com>
4859 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4861 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4863 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4864 incomplete type and its completion match.
4866 2011-08-29 Yannick Moy <moy@adacore.com>
4868 * exp_ch13.adb: Adjust previous change.
4870 2011-08-29 Robert Dewar <dewar@adacore.com>
4872 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4873 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4876 2011-08-29 Emmanuel Briot <briot@adacore.com>
4878 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4879 initialize aggregated projects.
4881 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4883 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4884 depth of candidates to resolve a potentially spurious ambiguity between
4885 two visible subprograms.
4887 2011-08-29 Yannick Moy <moy@adacore.com>
4889 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4891 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4892 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4895 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4897 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4900 2011-08-29 Thomas Quinot <quinot@adacore.com>
4902 * sem_res.adb: Minor reformatting.
4904 2011-08-29 Johannes Kanig <kanig@adacore.com>
4906 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4908 * gnat1drv.adb (Adjust_Global_Switches): Set
4909 Use_Expressions_With_Actions to False in ALFA mode.
4910 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4913 2011-08-29 Yannick Moy <moy@adacore.com>
4915 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4916 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4917 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4918 tagged types and dispatching calls in Alfa mode.
4920 2011-08-29 Javier Miranda <miranda@adacore.com>
4922 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4923 we do not report an error on an Empty node.
4925 2011-08-29 Geert Bosch <bosch@adacore.com>
4927 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4928 a-nlrear.o and a-nurear.o.
4930 2011-08-29 Robert Dewar <dewar@adacore.com>
4932 * freeze.adb: Minor code reorganization.
4934 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4935 sem_ch6.adb: Minor reformatting
4937 2011-08-29 Tristan Gingold <gingold@adacore.com>
4939 * s-except.ads, s-except.adb: Provide dummy body.
4941 2011-08-29 Yannick Moy <moy@adacore.com>
4943 * sem_warn.adb (Within_Postcondition): Take into account the case of
4944 an Ensures component in a Test_Case.
4946 2011-08-29 Tristan Gingold <gingold@adacore.com>
4948 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4949 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4950 System_Exceptions_Debug
4951 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4952 * a-except.adb: With and use System.Exceptions_Debug instead of
4954 * a-except-2005.adb: Likewise.
4955 * s-assert.adb: Likewise.
4956 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4957 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4958 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4959 s-excdeb. Update dependencies.
4960 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4961 as these no longer need external libraries.
4963 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4965 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4966 exponentiation operator on universal values in a context that requires
4969 2011-08-29 Tristan Gingold <gingold@adacore.com>
4971 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4972 before calling notify_handled_exception.
4973 * a-exextr.adb: Fix comment.
4975 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4977 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4978 Finalize_Address of the access type's finalization master.
4979 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4980 access type's finalization master. Add a guard to prevent
4981 Associated_Storage_Pool from being set on .NET/JVM.
4982 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4983 attribute Finalize_Address of the access type's finalization master.
4984 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4985 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4986 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4988 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4989 use clause for System.IO
4990 (Detach): Relax the assertion, to be reinstated later.
4991 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4992 Relax the assertion on Finalize_Address, to be reinstated later.
4993 (Is_Empty_List): New routine.
4994 (pm): New debug routine.
4995 (Set_Finalize_Address): New routine.
4996 * s-finmas.ads (pm): New debug routine.
4997 (Set_Finalize_Address): New routine.
4998 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
5000 2011-08-29 Tristan Gingold <gingold@adacore.com>
5002 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
5003 Remove convention C.
5005 2011-08-29 Tristan Gingold <gingold@adacore.com>
5007 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
5008 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
5009 (Finalize_TCB): Remove its finalization.
5010 (Initialize): Remove assignment of GET_Exc_Stack_Addr
5011 * s-soflin.adb (NT_Exc_Stack): Remove
5012 (Get_Exc_Stack_Addr_NT): Likewise.
5013 (Get_Exc_Stack_Addr_Soft): Likewise.
5014 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
5015 (Get_Exc_Stack_Addr): Likewise.
5016 (Get_Exc_Stack_Addr_Soft): Likewise
5017 * s-taspri-vms.ads (Exc_Stack_T): Remove.
5018 (Exc_Stack_Ptr_T): Likewise.
5019 (Private_Data): Remove Exc_Stack_Ptr component.
5021 2011-08-29 Tristan Gingold <gingold@adacore.com>
5023 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
5025 2011-08-29 Tristan Gingold <gingold@adacore.com>
5027 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
5029 2011-08-29 Geert Bosch <bosch@adacore.com>
5031 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
5032 L2_Norm, Swap_Column): New generic subprograms
5033 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
5034 L2_Norm, Swap_Column): Implement new subprograms in order to
5035 eliminate dependency on BLAS and LAPACK libraries in
5036 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
5037 version. Forward_Eliminate/Back_Substitute can be used to put a
5038 matrix in row echelon or reduced row echelon form using partial
5040 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
5041 Swap_Column): Instantiate from System.Generic_Array_Operations.
5042 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
5043 (Sqrt): Local function for simple computation of square root without
5044 adding dependencies on Generic_Elementary_Functions.
5045 (Swap): New subprogram to exchange floating point numbers.
5046 (Inverse): Reimplement using Jordan-Gauss elimination.
5047 (Jacobi): New procedure implementing Jacobi's method for computation
5048 of eigensystems, based on Rutishauser's implementation.
5049 (L2_Norm): Implement directly using the inner product.
5050 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
5051 decreasing eigenvalue as required by the Ada RM.
5052 (Swap_Column): New helper procedure for Sort_Eigensystem.
5053 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
5054 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
5057 2011-08-29 Thomas Quinot <quinot@adacore.com>
5059 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
5062 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5064 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
5065 than the current node.
5066 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
5067 Finalization_Master. The list headers have two fields instead of three.
5068 This should fix alignment issue but subpool allocations are now
5069 unusable. Alphabetize subprograms.
5070 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
5071 the size of the header when converting the beginning of the object to
5072 a FM_Node. Set the master's Finalize_Address attribute if not already
5074 (Deallocate_Any_Controlled): Use the offset rather than the size of the
5075 header when converting the beginning of the object to a FM_Node.
5077 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5079 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
5080 reraise when compiling for CodePeer.
5082 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5084 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
5085 now needed by a-convec.adb. Fix warning.
5087 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5089 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
5090 processing of TSS routine Finalize_Address when compiling in
5093 2011-08-29 Thomas Quinot <quinot@adacore.com>
5095 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
5096 sem_warn.adb: Minor reformatting.
5098 2011-08-29 Emmanuel Briot <briot@adacore.com>
5100 * prj-conf.adb (Get_Config_Switches): Also collect the list of
5101 languages from aggregated projects.
5103 2011-08-29 Yannick Moy <moy@adacore.com>
5105 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
5106 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5107 Traverse_Package_Declaration, Traverse_Subprogram_Body,
5108 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
5109 for stubs are traversed too when parameter is set
5110 (Traverse_All_Compilation_Units): Traverse without going inside stubs
5111 (Traverse_Declarations_Or_Statements): Do the special traversing for
5112 stubs when required.
5113 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
5114 return subprogram or package body from stub.
5115 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
5116 stubs without prior subprogram decl.
5118 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5120 * gnat_ugn.texi: Fix typo.
5122 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5124 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
5125 which accounts for size vs alignment issues and calculates the size of
5127 (Deallocate_Any_Controlled): Ditto.
5128 (Nearest_Multiple_Rounded_Up): New routine.
5130 2011-08-29 Tristan Gingold <gingold@adacore.com>
5132 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
5133 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
5134 (Set_Exception_Msg): Ditto.
5135 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
5137 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
5138 Use Save_Occurrence instead of Save_Occurrence_No_Private.
5139 (Raise_With_Msg): Remove Cleanup_Flag.
5140 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
5141 Clean_Flag and Private_Data components.
5143 2011-08-29 Yannick Moy <moy@adacore.com>
5145 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
5147 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
5148 of an explicitly declared type, so that the base types of the original
5149 type and this generated type are the same, and a "type" (not a subtype
5151 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
5152 small" in Alfa mode, like in CodePeer mode.
5153 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
5154 clauses in Alfa mode.
5156 2011-08-29 Javier Miranda <miranda@adacore.com>
5158 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
5159 function to the package spec.
5160 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
5161 internally generated bodies of null procedures locate the internally
5162 generated spec enforcing mode conformance.
5163 (Is_Interface_Conformant): Ensure that the controlling formal of the
5166 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5168 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
5169 reject the pragma if it appears to apply to a formal subprogram.
5171 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5173 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
5174 inner expression, to prevent double evaluation.
5176 2011-08-29 Tristan Gingold <gingold@adacore.com>
5178 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
5180 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
5181 * a-except-2005.adb (Propagate_Exception): Adjust spec.
5182 (Raise_Current_Excep): Adjust call.
5183 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
5185 2011-08-29 Thomas Quinot <quinot@adacore.com>
5187 * exp_disp.adb: Minor reformatting.
5189 2011-08-29 Tristan Gingold <gingold@adacore.com>
5191 * a-exexpr.adb (Setup_Exception): Removed.
5192 * a-exexpr-gcc.adb (Setup_Exception): Removed.
5193 * a-except.adb (Exception_Propagation): Removed.
5194 * a-except-2005.adb (Setup_Exception): Removed.
5195 (Reraise): Remove call to Setup_Exception.
5196 (Reraise_Occurrence): Ditto.
5197 (Reraise_Occurrence_Always): Ditto.
5198 (Reraise_Occurrence_No_Defer): Ditto.
5199 (Transfer_Occurrence): Ditto.
5200 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
5201 (Set_Exception_Msg): Ditto.
5203 2011-08-29 Robert Dewar <dewar@adacore.com>
5205 * a-convec.adb, exp_disp.adb: Minor reformatting.
5207 2011-08-29 Tristan Gingold <gingold@adacore.com>
5209 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
5211 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5213 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
5214 Exception_Handlers to No_List instead of Empty_List in the case where
5215 there are no handlers.
5217 2011-08-29 Tristan Gingold <gingold@adacore.com>
5219 * gcc-interface/gigi.h (enum standard_datatypes): Add
5220 ADT_reraise_zcx_decl
5221 (reraise_zcx_decl): New macro.
5222 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
5223 (gigi): Set reraise_zcx_decl.
5224 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
5225 (gnat_to_gnu): Handle N_Raise_Statement.
5227 2011-08-29 Robert Dewar <dewar@adacore.com>
5229 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
5230 a-undesu.adb: Minor reformatting.
5232 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5234 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
5235 table, accept an unfrozen untagged component if it is an actual for a
5236 formal incomplete type.
5237 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
5238 provide new iterator forms over vectors.
5239 Introduce type Iterator in package body to implement operations of
5240 Reversible_Iterator interface.
5241 * a-iteint.ads: Make package pure so it is usable with new container
5242 packages, that are categorized Remote_Types.
5244 2011-08-29 Robert Dewar <dewar@adacore.com>
5246 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
5248 2011-08-29 Bob Duff <duff@adacore.com>
5250 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
5251 of <>, because this is the routine that checks for dimensionality
5252 errors (for example, for a two-dimensional array, (others => <>) should
5253 be (others => (others => <>)).
5255 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5257 * impunit.adb: Add new run-time units.
5258 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
5259 s-stposu.ads, s-stposu.adb: Code clean up.
5260 Handle protected class-wide or task class-wide types
5261 Handle C/C++/CIL/Java types.
5262 * s-spsufi.adb, s-spsufi.ads: New files.
5264 2011-08-29 Yannick Moy <moy@adacore.com>
5266 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
5267 library-level subprogram.
5268 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
5270 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
5272 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
5274 * gnat_rm.texi: Update doc for Test_Case pragma.
5276 2011-08-29 Tristan Gingold <gingold@adacore.com>
5278 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
5280 (GCC_Exception_Access): New type.
5281 (Unwind_DeleteException): New imported procedure
5282 (Foreign_Exception): Import it.
5283 (GNAT_GCC_Exception): Simply have the occurrence inside.
5284 (To_GCC_Exception): New function.
5285 (To_GNAT_GCC_Exception): New function.
5286 (GNAT_GCC_Exception_Cleanup): New procedure..
5287 (Propagate_GCC_Exception): New procedure.
5288 (Reraise_GCC_Exception): New procedure.
5289 (Setup_Current_Excep): New procedure.
5290 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
5291 (Unwind_RaiseException): Ditto.
5292 (Unwind_ForcedUnwind): Ditto.
5294 (Begin_Handler): Change type of parameter.
5295 (End_Handler): Ditto. Now delete the exception if still present.
5296 (Setup_Key): Removed.
5297 (Is_Setup_And_Not_Propagated): Removed.
5298 (Set_Setup_And_Not_Propagated): Ditto.
5299 (Clear_Setup_And_Not_Propagated): Ditto.
5300 (Save_Occurrence_And_Private): Ditto.
5301 (EID_For): Add 'not null' constraint on parameter.
5302 (Setup_Exception): Does nothing.
5303 (Propagate_Exception): Simplified.
5304 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
5305 re-raise is not expanded anymore.
5306 * s-except.ads (Foreign_Exception): New exception - placeholder for
5308 * raise-gcc.c (__gnat_setup_current_excep): Declare
5309 (CXX_EXCEPTION_CLASS): Define (not yet used)
5310 (GNAT_EXCEPTION_CLASS): Define.
5311 (is_handled_by): Handle foreign exceptions.
5312 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
5314 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5316 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
5318 2011-08-29 Thomas Quinot <quinot@adacore.com>
5320 * a-synbar-posix.adb: Minor reformatting.
5322 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5324 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
5325 a-exetim-default.ads (Interrupt_Clocks_Supported,
5326 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5327 definitions to be compliant with AI-0171. The target systems do not
5328 support separate account for the execution time of interrupt handlers.
5330 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5332 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
5333 in the barrier to put first the easiest to evaluate (and the one which
5334 will be True more often). More efficient.
5336 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5338 * s-atocou-x86.adb: Fix constraint in machine code insertion.
5340 2011-08-29 Bob Duff <duff@adacore.com>
5342 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
5343 attributes that are now aspects, as specified by AI05-0229-1.
5344 * sem_ch13.adb (Analyze_Aspect_Specifications,
5345 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
5346 pragmas or attribute references, as appropriate.
5348 2011-08-29 Robert Dewar <dewar@adacore.com>
5350 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
5351 a-synbar-posix.ads: Minor reformatting.
5353 2011-08-29 Yannick Moy <moy@adacore.com>
5355 * snames.ads-tmpl: Add name Force.
5357 2011-08-29 Pascal Obry <obry@adacore.com>
5359 * prj-nmsc.adb: Minor reformatting.
5361 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5363 * a-exetim.ads (Interrupt_Clocks_Supported,
5364 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5365 definitions to be compliant with AI-0171.
5367 2011-08-29 Robert Dewar <dewar@adacore.com>
5369 * a-ngelfu.adb: Add comments.
5371 2011-08-29 Geert Bosch <bosch@adacore.com>
5373 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
5374 the closest machine number to Pi / 2.0.
5376 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5378 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
5379 package Ada.Synchronous_Barriers.
5380 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
5381 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
5382 default implementation using protected objects and another one
5383 a-synbar-posix using POSIX barriers as the underlying support.
5384 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
5385 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
5386 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
5387 Clean up dependencies.
5388 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
5390 2011-08-29 Robert Dewar <dewar@adacore.com>
5392 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
5393 exp_dist.adb: Minor code reorganization.
5396 2011-08-29 Thomas Quinot <quinot@adacore.com>
5398 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
5399 primitive operation must support external streaming if it is not a
5400 controlling access result.
5402 2011-08-29 Thomas Quinot <quinot@adacore.com>
5404 * sinfo.ads, sem_ch7.adb: Minor reformatting.
5406 2011-08-29 Bob Duff <duff@adacore.com>
5408 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5409 restriction on allocators, as required by AI05-0013-1.
5410 * restrict.ads: Minor comment fix.
5412 2011-08-29 Tristan Gingold <gingold@adacore.com>
5414 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5415 (To_Jmpbuf_Address): Ditto
5416 (builtin_longjmp): Ditto
5418 2011-08-29 Thomas Quinot <quinot@adacore.com>
5420 * sem_res.adb: Minor reformatting.
5422 2011-08-29 Vincent Celier <celier@adacore.com>
5424 * make.adb (Gnatmake): Move special processing for VM targets after the
5425 call to Get_Target_Parameters.
5427 2011-08-29 Thomas Quinot <quinot@adacore.com>
5429 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5431 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5433 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5434 where an anonymous access discriminant of a limited designated type
5435 appears in a non-immutably limited discriminated type and issue an
5436 error message. Add local variable Desig_T and replace all occurrences
5439 2011-08-29 Jose Ruiz <ruiz@adacore.com>
5441 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5442 implementation is compliant to RM D.15(15/2) after the modification
5443 imposed by AI05-0094-1 (binding interpretation).
5445 2011-08-29 Robert Dewar <dewar@adacore.com>
5447 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5448 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5450 2011-08-29 Thomas Quinot <quinot@adacore.com>
5452 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5453 the scope name, do not report a missing label as a style violation (it
5454 will be diagnosed as an illegality).
5455 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5456 variant records: Get_Enum_Lit_From_Pos already returns a usage
5457 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5458 on Expr in Integer_Literal case so that it can be used by
5461 2011-08-29 Tristan Gingold <gingold@adacore.com>
5463 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5465 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5466 (Build_Abort_Block_Handler): New function to build an Abort_Signal
5468 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5469 Build_Abort_Block_Handler to build the exception handler. Do not
5470 undefer aborts for the Abort_Signal exception handler if back-end
5471 exception mechanism.
5472 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5473 back_end exceptions for all others and abort_signal.
5474 * s-except.ads (ZCX_By_Default): New constant.
5475 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5476 (Raise_Exception_Always): Ditto.
5477 (Raise_From_Signal_Handler): Ditto.
5478 (Raise_With_Location_And_Msg): Ditto.
5479 (Raise_With_Msg): Ditto.
5481 (Reraise_Occurence): Ditto.
5482 (Reraise_Occurrence_Always): Ditto.
5483 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5484 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5486 2011-08-29 Thomas Quinot <quinot@adacore.com>
5488 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5490 2011-08-29 Robert Dewar <dewar@adacore.com>
5492 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5493 Minor code reorganization.
5495 2011-08-29 Bob Duff <duff@adacore.com>
5497 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5498 2012, not just Ada 2005.
5500 2011-08-29 Vincent Celier <celier@adacore.com>
5502 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5503 with a project file or with gprbuid, if -gnatep= is specified, the
5504 builder may need to be invoked with -x.
5506 2011-08-29 Tristan Gingold <gingold@adacore.com>
5508 * a-exexpr-gcc.adb: Minor comment fix.
5510 2011-08-29 Robert Dewar <dewar@adacore.com>
5512 * sem_ch8.adb: Minor reformatting.
5514 2011-08-29 Bob Duff <duff@adacore.com>
5516 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5517 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5518 treating "some" as unreserved in earlier Ada versions. This is now
5519 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5520 rather than Name_Some, since Tok_Some is now recognized as reserved.
5521 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5523 * scans.ads: Minor comment fixes.
5524 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5525 for other language versions.
5526 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5527 treating "some" as unreserved in earlier Ada versions. This is now
5528 handled in Snames.Is_Keyword_Name.
5529 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5531 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5532 unreserved in earlier Ada versions. This is now handled in
5533 Snames.Is_Keyword_Name.
5534 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5535 words as for other language versions.
5536 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5537 Ada 2012, not just Ada 2005.
5539 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5541 * sem_ch13.adb: Additional semantic checks for aspects involved in
5544 2011-08-29 Matthew Heaney <heaney@adacore.com>
5546 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5547 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5548 Container parameter.
5549 (Ancestor_Find): ditto.
5551 2011-08-29 Thomas Quinot <quinot@adacore.com>
5553 * par-endh.adb: Minor reformatting.
5555 2011-08-29 Tristan Gingold <gingold@adacore.com>
5557 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5558 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5559 (Adjust_N_CLeanups_For): Remove.
5560 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5562 (Propgate_Exception): Adjust.
5563 * raise-gcc.c: Add a few static/const.
5564 (Adjust_N_Cleanups_For): Remove declaration.
5565 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5567 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5569 * sem_ch8.adb: Use type of function return when rewriting as object
5572 2011-08-29 Gary Dismukes <dismukes@adacore.com>
5574 * sem_type.adb: Minor reformatting.
5576 2011-08-29 Robert Dewar <dewar@adacore.com>
5578 * makeutl.adb: Minor reformatting.
5580 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5582 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5583 function call of a limited type, the expansion of the renaming is
5584 complicated by the presence of various temporaries and subtypes that
5585 capture constraints of the renamed object.
5586 Rewrite node as an object declaration, whose expansion is simpler.
5587 Given that the object is limited there is no copy involved and no
5590 2011-08-29 Robert Dewar <dewar@adacore.com>
5592 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5593 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5595 2011-08-29 Tristan Gingold <gingold@adacore.com>
5597 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5598 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5599 system-linux-hppa.ads, system-linux-s390.ads,
5600 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5601 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5602 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5603 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5604 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5605 system-solaris-sparc.ads, system-lynxos-x86.ads,
5606 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5607 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5608 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5609 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5610 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5611 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5612 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5613 * opt.ads: Adjust comment.
5614 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5615 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5616 * system.ads: Move GCC_ZCX_Support to obsolete entries.
5618 2011-08-29 Emmanuel Briot <briot@adacore.com>
5620 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5621 file name is specified on the gnatmake or gprbuild command line, and
5622 before we search for that file in the project.
5624 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5626 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5627 used to determine whether a possible interpretation for an overloadable
5628 entity is declared within the current instantiation and should be
5629 included in the candidate set.
5631 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
5633 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5635 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5637 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5638 access subtype is access_to_subprogram, when applying checks for
5641 2011-08-29 Matthew Heaney <heaney@adacore.com>
5643 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5644 for sibling when common parent.
5646 2011-08-29 Thomas Quinot <quinot@adacore.com>
5648 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5651 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5653 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5654 for the return type when in ASIS mode.
5656 2011-08-29 Vincent Celier <celier@adacore.com>
5658 * make.adb (Gnatmake): Get the default search dirs, then the target
5659 parameters after getting the Builder switches, as the Builder switches
5660 may include --RTS= and that could change the default search dirs.
5662 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5664 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5665 Make_Final_Call. Move the processing for class-wide types before the
5666 processing for derivations from [Limited_]Controlled.
5667 (Make_Final_Call): Move the processing for class-wide types before the
5668 processing for derivations from [Limited_]Controlled.
5669 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5670 Add code to account for alignments larger than the list header. Add a
5671 comment illustrating the structure of the allocated object + padding +
5673 (Deallocate_Any_Controlled): Add code to account for alignments larger
5674 than the list header.
5676 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5678 * sinfo.ads, sinfo.adb: New node kind
5679 N_Formal_Incomplete_Type_Definition, related flags.
5680 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5681 Parse formal incomplete types.
5682 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5684 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5685 Formal incomplete types do not need completion.
5686 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5687 Validate_Incomplete_Type_Instance): New procedures to handle formal
5689 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5690 that corresponds to a formal incomplete type.
5691 * sprint.adb: Handle formal incomplete type declarations.
5692 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5695 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5697 * a-fihema.ads, a-fihema.adb: Unit removed.
5698 * a-undesu.ads, a-undesu.adb: New unit implementing
5699 Ada.Unchecked_Deallocate_Subpool.
5700 * einfo.adb: Remove Associated_Collection from the node usage.
5701 Add Finalization_Master to the node usage.
5702 (Associated_Collection): Removed.
5703 (Finalization_Master): New routine.
5704 (Set_Associated_Collection): Removed.
5705 (Set_Finalization_Master): New routine.
5706 (Write_Field23_Name): Remove Associated_Collection from the output. Add
5707 Finalization_Master to the output.
5708 * einfo.ads: Remove attribute Associated_Collection and its uses in
5710 Add new attribute Finalization_Master along with its uses in entitites.
5711 (Associated_Collection): Removed along with its pragma import.
5712 (Finalization_Master): New routine along with a pragma import.
5713 (Set_Associated_Collection): Removed along with its pragma import.
5714 (Set_Finalization_Master): New routine along with a pragma import.
5715 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5716 Build_Finalization_Collection with Build_Finalization_Master.
5717 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5718 before the bodies of the predefined routines. Add comment explaining
5719 this. Replace call to Build_Finalization_Collection with
5720 Build_Finalization_Master.
5721 (Freeze_Type): Replace call to Build_Finalization_Collection with
5722 Build_Finalization_Master.
5723 (Make_Finalize_Address_Body): Comment reformatting.
5724 (Make_Predefined_Primitive_Specs): Code reformatting.
5725 (Stream_Operation_OK): Update comment mentioning finalization
5726 collections. Replace RE_Finalization_Collection with
5727 RE_Finalization_Master.
5728 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5729 Associated_Collection with Finalization_Master. Replace call to
5730 Build_Finalization_Collection with Build_Finalization_Master.
5731 (Expand_Allocator_Expression): Replace call to Associated_Collection
5732 with Finalization_Master. Replace call to Set_Associated_Collection with
5733 Set_Finalization_Master. Remove the generation of
5734 Set_Finalize_Address_Ptr.
5735 (Expand_N_Allocator): Replace call to Associated_Collection with
5736 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5737 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5738 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5739 comment on usage. Replace call to Needs_BIP_Collection with
5740 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5741 BIP_Finalization_Master. Update all comments which mention finalization
5742 collections. Replace Associated_Collection with
5743 Finalization_Master. Replace Build_Finalization_Collection with
5744 Build_Finalization_Master.
5745 (BIP_Formal_Suffix): Update BIP_Collection's case.
5746 (Build_Heap_Allocator): Update the related comment. Rename local
5747 variable Collect to Fin_Mas_Id and update its occurrences. Update
5748 comments which mention finalization collections. Replace
5749 Set_Associated_Collection with Set_Finalization_Master.
5750 (Expand_Call): Update the code which detects a special piece of library
5752 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5753 Add_Collection_Actual_To_Build_In_Place_Call with
5754 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5755 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5756 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5757 Add_Collection_Actual_To_Build_In_Place_Call with
5758 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5759 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5760 Add_Collection_Actual_To_Build_In_Place_Call with
5761 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5762 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5763 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5764 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5765 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5766 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5767 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5768 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5769 Replace the call to Associated_Collection with Finalization_Master.
5770 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5771 Update the way finalization master names are generated. Update the
5772 retrieval of the correct access type which will carry the pool and
5774 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5775 (Make_Finalize_Address_Body): Abstract types do not need
5776 Finalize_Address. Code reformatting.
5777 (Make_Finalize_Address_Stmts): Update comment on usage.
5778 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5779 (Process_Declarations): Update comments.
5780 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5781 Build_Finalization_Master. Update associated comment.
5782 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5783 * exp_ch13.adb: Update comments which mention finalization collections.
5784 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5785 with Finalization_Master.
5786 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5787 create calls to routines Allocate_Any_Controlled and
5788 Deallocate_Any_Controlled.
5789 (Find_Finalize_Address): New routine.
5790 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5792 (Requires_Cleanup_Actions): Update the comment on freeze node
5794 * exp_util.ads: Remove comment on generated code for
5795 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5796 is better to simply look in the body.
5797 * freeze.adb (Freeze_All): Update the comment of finalization
5798 collections. Replace the call to Associated_Collection with
5799 Finalization_Master. Replace the call to Build_Finalization_Collection
5800 with Build_Finalization_Master.
5801 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5802 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5804 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5805 Ada.Finalization. Add processing for children of System.Storage_Pools.
5806 * rtsfind.ads: Remove the naming of second level children of
5808 Remove Ada_Finalization_Heap_Management from the list of units.
5809 Remove subtype Ada_Finalization_Child.
5810 Remove the following subprogram entities:
5814 RE_Finalization_Collection
5815 RE_Finalization_Collection_Ptr
5816 RE_Set_Finalize_Address_Ptr
5818 Add the naming of second level children of System.Storage_Pools.
5819 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5821 Add subtype System_Storage_Pools_Child.
5822 Add the following subprogram entities to System.Finalization_Masters:
5824 RE_Finalization_Master
5825 RE_Finalization_Master_Ptr
5827 Add the following subprogram entities to System.Storage_Pools.Subpools:
5829 RE_Allocate_Any_Controlled
5830 RE_Deallocate_Any_Controlled
5831 RE_Root_Storage_Pool_With_Subpools
5835 Move the following subprogram entities from
5836 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5838 RE_Add_Offset_To_Address
5843 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5844 Set_Associated_Collection with Set_Finalization_Master.
5845 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5846 BIP_Finalization_Master is created.
5847 * s-finmas.adb: New unit System.Finalization_Masters.
5848 * s-finmas.ads: New unit System.Finalization_Masters.
5849 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5850 * s-stposu.ads, s-stposu.adb: New unit implementing
5851 System.Storage_Pools.Subpools.
5853 2011-08-29 Bob Duff <duff@adacore.com>
5855 * tbuild.adb: Add assertion.
5857 2011-08-29 Thomas Quinot <quinot@adacore.com>
5859 * s-pooglo.adb: Minor reformatting.
5861 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5863 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5864 an indexed component of a packed array whose element type is a record
5865 with a representation clause different from that of the right-hand
5866 side, generate a temporary to minimuze the number of bit-field
5867 operations generated.
5869 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5871 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5872 declarations, and thus are likely insertion points for actions.
5874 2011-08-29 Bob Duff <duff@adacore.com>
5876 * einfo.ads: Minor comment fix.
5878 2011-08-29 Robert Dewar <dewar@adacore.com>
5880 * frontend.adb, gnat1drv.adb: Minor reformatting.
5882 2011-08-29 Tristan Gingold <gingold@adacore.com>
5884 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5885 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5886 space in front of the header.
5888 2011-08-29 Johannes Kanig <kanig@adacore.com>
5890 * frontend.adb (Frontend): Exit after creating Standard package when
5891 -gnatd.H is present.
5892 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5895 2011-08-29 Robert Dewar <dewar@adacore.com>
5897 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5898 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5899 snames.ads-tmpl: Minor reformatting.
5901 2011-08-29 Philippe Gil <gil@adacore.com>
5903 * prj.adb (Reset_Units_In_Table): New procedure.
5904 Reset units to avoid access to freed memory.
5906 2011-08-29 Thomas Quinot <quinot@adacore.com>
5908 * get_scos.adb: When reading a P statement SCO without a pragma name
5909 (from an older ALI file), ensure that the Pragma_Name component is set
5910 to Unknown_Pragma (not left uninitialized).
5912 2011-08-29 Vincent Celier <celier@adacore.com>
5914 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5915 modified to compute correctly the object path of a SAL project that is
5916 extending another library project.
5917 (Write_Path_File): New procedure.
5918 * makeutl.ads (Directories): New table moved from Buildgpr
5919 (Get_Directories): New procedure moved from Buildgpr
5920 (Write_Path_File): New procedure
5921 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5922 paths before binding SALs, instead of Set_Ada_Paths.
5923 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5925 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5926 (Current_Source_Path_File_Of): New function
5927 (Set_Current_Object_Path_File_Of): New procedure
5928 (Current_Source_Object_File_Of): New function
5929 (Set_Current_Object_Path_File_Of): New procedure
5930 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5931 (Current_Source_Path_File_Of): New function
5932 (Set_Current_Object_Path_File_Of): New procedure
5933 (Current_Source_Object_File_Of): New function
5934 (Set_Current_Object_Path_File_Of): New procedure
5936 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5938 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5939 packed entity, use a bit-field assignment only if there is no change of
5942 2011-08-29 Thomas Quinot <quinot@adacore.com>
5944 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5945 Is_RTU instead of using Chars comparisons.
5947 2011-08-29 Thomas Quinot <quinot@adacore.com>
5949 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5950 temporary object if the actual is constrained, and the discriminants
5951 read from the stream don't match.
5953 2011-08-29 Tristan Gingold <gingold@adacore.com>
5955 * sem_attr.adb, exp_attr.adb: Add handling of
5956 Attribute_System_Allocator_Alignment
5957 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5958 Attribute_System_Allocator_Alignment.
5959 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5960 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5961 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5962 get_target_system_allocator_alignment.
5964 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5966 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5969 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5971 * exp_ch3.adb (In_Runtime): Fix typo.
5973 2011-08-29 Bob Duff <duff@adacore.com>
5975 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5977 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5979 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5980 and a separate tag assignment is generated, ensure that the tag
5981 assignment is analyzed.
5983 2011-08-29 Ed Schonberg <schonberg@adacore.com>
5985 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5986 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5987 of statement lists that may contain local declarations.
5988 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5989 duplicate the triggering statements needed for the expansion of this
5990 construct, when the trigger is a dispatching call to a synchronized
5993 2011-08-29 Arnaud Charlet <charlet@adacore.com>
5995 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5996 * bindgen.adb: Add comments.
5997 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
6000 2011-08-29 Robert Dewar <dewar@adacore.com>
6002 * exp_attr.adb: Minor reformatting.
6003 Minor code reorganization and commenting.
6004 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
6007 2011-08-29 Thomas Quinot <quinot@adacore.com>
6009 * get_scos.adb: Ignore chaining indicators not currently supported
6012 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6014 * system.ads: Minor editing.
6016 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6018 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
6020 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
6021 Attribute_Elab_Subp_Body.
6022 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
6023 * sem_util.adb: Update comments.
6025 2011-08-29 Thomas Quinot <quinot@adacore.com>
6027 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
6028 pragma name for each SCO statement corresponding to a pragma.
6030 2011-08-29 Arnaud Charlet <charlet@adacore.com>
6032 * opt.ads: Minor editing.
6034 2011-08-29 Yannick Moy <moy@adacore.com>
6036 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
6037 that only made sense for CodePeer mode.
6039 2011-08-29 Jose Ruiz <ruiz@adacore.com>
6041 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
6042 which is no longer used.
6043 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
6044 handling of the 64-bit division check.
6045 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
6047 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
6050 2011-08-29 Thomas Quinot <quinot@adacore.com>
6052 * get_scos.adb: Minor reformatting.
6054 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6056 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
6057 statement list is wrapped in a block, the block is explicitly analyzed
6058 in order to properly redecorate the entities and create a servicing
6061 2011-08-29 Tristan Gingold <gingold@adacore.com>
6063 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
6064 (Set_Zero_Cost_Handling): Remove.
6066 2011-08-29 Thomas Quinot <quinot@adacore.com>
6068 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
6070 2011-08-29 Geert Bosch <bosch@adacore.com>
6072 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
6073 instruction, as the latter may produce -0.0, which is not a valid VAX
6075 (Neg_G): Likewise for VAX F float.
6077 2011-08-29 Robert Dewar <dewar@adacore.com>
6079 * exp_util.adb: Minor reformatting.
6081 2011-08-29 Yannick Moy <moy@adacore.com>
6083 * sem_ch3.adb: Minor comment update.
6085 2011-08-29 Thomas Quinot <quinot@adacore.com>
6087 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
6090 2011-08-29 Thomas Quinot <quinot@adacore.com>
6092 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
6093 current statement sequence on a generic instantiation or a subprogram
6096 2011-08-29 Robert Dewar <dewar@adacore.com>
6098 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
6101 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
6103 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6104 Correct the check which involves the freeze node of a controlled or
6105 access-to-controlled type.
6107 2011-08-29 Geert Bosch <bosch@adacore.com>
6109 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
6111 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
6114 2011-08-29 Yannick Moy <moy@adacore.com>
6116 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
6117 for every index type and component type that is not a subtype_mark.
6118 (Process_Subtype): Set Etype of subtype.
6120 2011-08-29 Robert Dewar <dewar@adacore.com>
6122 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
6123 reorganization. Minor reformatting.
6125 2011-08-29 Steve Baird <baird@adacore.com>
6127 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
6128 for CodePeer and ALFA modes.
6130 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6132 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
6133 that comes from an enclosing scope if it is not the renaming of an
6134 actual, to handle properly a spurious ambiguity in an instance.
6136 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
6138 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
6139 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
6140 use it instead of the Esize of the first parameter.
6141 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
6143 <Size>: Likewise. Call it for composite types on the RM size.
6145 2011-08-29 Yannick Moy <moy@adacore.com>
6147 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
6148 * sem_util.adb (Unique_Name): Correct behaviour for names of
6151 2011-08-29 Yannick Moy <moy@adacore.com>
6153 * sem_prag.adb (Check_Precondition_Postcondition): In formal
6154 verification mode, analyze pragma expression for correctness, for
6155 pre/post on library-level subprogram, as it is not expanded later.
6157 2011-08-29 Yannick Moy <moy@adacore.com>
6159 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
6160 in formal verification.
6162 2011-08-29 Thomas Quinot <quinot@adacore.com>
6164 * sem_util.adb: Minor reformatting.
6165 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
6167 * par_sco.ads, par_sco.adb: Update comments.
6169 2011-08-29 Yannick Moy <moy@adacore.com>
6171 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
6172 associated getter/setter.
6173 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
6175 2011-08-29 Vincent Celier <celier@adacore.com>
6177 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
6178 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
6179 with declarations for Language_Kind and Dependency_Kind for Ada.
6180 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
6181 (Process_Compiler): Take into account the new attributes Dependency_Kind
6183 (Check_Configuration): Check if language kind is unit based, not if the
6184 language name is Ada.
6185 (Process_Exceptions_Unit_Based): Ditto
6186 (Add_Language): Remove default additions of language and dependency kind
6187 * prj.ads: Minor comment change
6188 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
6190 2011-08-29 Johannes Kanig <kanig@adacore.com>
6192 * debug.adb: Update comments.
6194 2011-08-24 Joseph Myers <joseph@codesourcery.com>
6196 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
6197 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
6198 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
6199 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
6200 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
6202 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6204 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
6205 (GNATLIBCFLAGS_FOR_C): Replace
6206 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
6207 (gnatlib-shared-default, gnatlib-shared-dual-win32)
6208 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
6209 (gnatlib-sjlj, gnatlib-zcx): Likewise.
6211 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
6213 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
6215 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
6217 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
6219 2011-08-05 Nicolas Roche <roche@adacore.com>
6221 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
6222 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
6224 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
6226 2011-08-05 Matthew Heaney <heaney@adacore.com>
6228 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
6229 subprogram bodies declared out-of-order.
6231 2011-08-05 Yannick Moy <moy@adacore.com>
6233 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
6234 entities directly in package Standard, otherwise skip the standard
6237 2011-08-05 Robert Dewar <dewar@adacore.com>
6239 * a-cbmutr.adb: Minor reformatting
6240 (Allocate_Node): refactor node allocation algorithm
6242 2011-08-05 Robert Dewar <dewar@adacore.com>
6244 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
6245 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
6247 (Analyze_Pragma, case Check_Policy): Ditto.
6248 * sem_prag.ads (Check_Disabled): New function
6249 * snames.ads-tmpl: Add Name_Disable.
6251 2011-08-05 Robert Dewar <dewar@adacore.com>
6253 * gnat_rm.texi: Document implementation-defined policy DISABLE for
6254 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
6256 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6258 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
6259 that appears in a generic formal part and applies to a formal
6262 2011-08-05 Robert Dewar <dewar@adacore.com>
6264 * a-cbmutr.ads: Minor reformatting.
6266 2011-08-05 Matthew Heaney <heaney@adacore.com>
6268 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
6269 to check count, check sign of value instead.
6270 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
6271 (Copy_Subtree): allocate copy of source element
6272 (Equal_Subtree): compare elements, not access objects
6274 2011-08-05 Vincent Celier <celier@adacore.com>
6276 * gnat_ugn.texi: Fix VMS alternative.
6278 2011-08-05 Thomas Quinot <quinot@adacore.com>
6280 * sem_ch11.adb: Add comment.
6282 2011-08-05 Robert Dewar <dewar@adacore.com>
6284 * exp_util.adb: Minor comment fix.
6286 2011-08-05 Robert Dewar <dewar@adacore.com>
6288 * scng.adb (Error_Unterminated_String): Improve flag position when
6291 2011-08-05 Matthew Heaney <heaney@adacore.com>
6293 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
6295 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
6296 multiway tree containers.
6298 2011-08-05 Robert Dewar <dewar@adacore.com>
6300 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
6301 * stylesw.adb: Implement -gnatyC to control comment spacing
6302 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
6304 * usage.adb: Add line for -gnatyC.
6306 2011-08-05 Robert Dewar <dewar@adacore.com>
6308 * gnat_ugn.texi: Document -gnatyC.
6309 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
6310 synonym for COMMENTS2).
6312 2011-08-05 Robert Dewar <dewar@adacore.com>
6314 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
6315 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
6316 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
6317 a-comutr.ads, lib-xref.adb: Minor reformatting.
6319 2011-08-05 Robert Dewar <dewar@adacore.com>
6321 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
6322 warning if there is an exception handler present.
6324 2011-08-05 Pascal Obry <obry@adacore.com>
6326 * a-iteint.ads: Fix copyright year.
6328 2011-08-05 Thomas Quinot <quinot@adacore.com>
6330 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
6331 statement SCO for a USE clause or a representation clause.
6333 2011-08-05 Yannick Moy <moy@adacore.com>
6335 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
6336 between body and spec for stub.
6337 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
6338 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
6339 pragma precondition or postcondition, for which the enclosing
6340 subprogram or package in the AST is not the desired one, return empty.
6342 2011-08-05 Thomas Quinot <quinot@adacore.com>
6344 * g-expect.adb: Minor reformatting.
6346 2011-08-05 Bob Duff <duff@adacore.com>
6348 * a-fihema.adb: Comment out OS_Lib.
6350 2011-08-05 Matthew Heaney <heaney@adacore.com>
6352 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
6353 (unbounded multiway tree containers) and a-iteint.ads.
6354 * a-comutr.ads, a-comutr.adb:
6355 This is the new Ada 2012 unit for unbounded multiway tree containers
6356 * a-cimutr.ads, a-cimutr.adb
6357 This is the new Ada 2012 unit for indefinite multiway tree containers
6358 * a-iteint.ads: New file.
6360 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6362 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
6364 2011-08-05 Bob Duff <duff@adacore.com>
6366 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
6368 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
6370 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6372 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
6373 general indexing aspects of Ada2012. Called when analyzing indexed
6374 components when other interpretations fail.
6375 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
6376 in an expression context where overloading is meaningful. This excludes
6377 the occurrence in an aspect specification (efficiency only).
6378 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
6379 related to iterators can be set by an attribute specification, but
6381 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
6382 Constant_Indexing and Variable_Indexing.
6383 (Check_Indexing_Functions): New procedure to perform legality checks.
6384 Additional semantic checks at end of declarations.
6386 2011-08-05 Sergey Rybin <rybin@adacore.com>
6388 * tree_io.ads: Update ASIS_Version_Number because of the change of the
6389 order of calling Tree_Write/Tree_Read routines made for aspects.
6391 2011-08-05 Bob Duff <duff@adacore.com>
6393 * a-fihema.adb (Finalize): Fix race condition.
6395 2011-08-05 Yannick Moy <moy@adacore.com>
6397 * sem_ch12.adb (Analyze_Package_Instantiation,
6398 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6401 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6403 * sem_type.adb (Specific_Type): in an instance, the type-specific
6404 operand of an equality check that involves null may have a private
6405 type. Use full view to determine legality of construct.
6407 2011-08-05 Vincent Celier <celier@adacore.com>
6409 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6410 delete or close the file when the call to gnatmake was successful.
6412 2011-08-05 Yannick Moy <moy@adacore.com>
6414 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6415 Global_Discard_Names.
6417 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6419 * sinfo.ads: comments on use of entity field for aspect specifications.
6421 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6423 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6424 node is not itself an entity but a selected component, it is a
6425 rewritten parameterless call to an en enclosing synchronized operation,
6426 and this expansion will be performed again in the instance, so there is
6427 no global information to preserve.
6429 2011-08-05 Javier Miranda <miranda@adacore.com>
6431 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6432 for renamings of predefined primitives.
6433 (In_Predef_Prims_DT): New subprogram.
6435 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6437 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6438 possible interpretation of name is a reference type, add an
6439 interpretation that is the designated type of the reference
6440 discriminant of that type.
6441 * sem_res.adb (resolve): If the interpretation imposed by context is an
6442 implicit dereference, rewrite the node as the deference of the
6443 reference discriminant.
6444 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6445 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6446 parent type or base type.
6447 * sem_ch4.adb (Process_Indexed_Component,
6448 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6449 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6450 Check for implicit dereference.
6451 (List_Operand_Interps): Indicate when an implicit dereference is
6453 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6455 2011-08-05 Thomas Quinot <quinot@adacore.com>
6457 * scos.ads: Update documentation of SCO table. Pragma statements can now
6458 be marked as disabled (using 'p' instead of 'P' as the statement kind).
6459 * par_sco.ads, par_sco.adb: Implement the above change.
6460 (Process_Decisions_Defer): Generate a P decision for the first parameter
6461 of a dyadic pragma Debug.
6462 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6464 * put_scos.adb: Code simplification based on above change.
6466 2011-08-05 Robert Dewar <dewar@adacore.com>
6468 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6469 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6470 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6471 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6473 2011-08-05 Bob Duff <duff@adacore.com>
6475 * a-stunau.ads, g-spipat.adb: Update comments.
6477 2011-08-05 Bob Duff <duff@adacore.com>
6479 * a-fihema.ads: Minor comment fix.
6480 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6482 (Attach, Detach): Remove some unnecessary code.
6483 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6485 2011-08-05 Bob Duff <duff@adacore.com>
6487 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6488 allocation for Objects component. This simplifies the code somewhat. It
6489 is also a little more efficient in the not-so-unusual case where there
6490 are no controlled objects allocated.
6491 Make Finalization_Started flag atomic.
6492 (Finalize): Avoid unnecessary detachment of items from the list.
6493 (pcol): Minor cleanup.
6495 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6497 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6498 package whose name is the same as that of the generic unit, or its
6501 2011-08-05 Bob Duff <duff@adacore.com>
6503 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6504 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6505 Minor comment fixes.
6507 2011-08-05 Arnaud Charlet <charlet@adacore.com>
6509 * make.adb (Linking_Phase): No longer need to set source search path
6510 before calling gnatlink in CodePeer mode.
6511 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6512 gcc in CodePeer mode, since the binder generated file no longer has a
6514 * switch.ads, switch.adb (Is_Language_Switch): Removed.
6515 * switch-c.adb: Update comment.
6517 2011-08-05 Thomas Quinot <quinot@adacore.com>
6519 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6521 2011-08-05 Nicolas Roche <roche@adacore.com>
6523 * gnat_ugn.texi: Fix minor syntax error issue.
6525 2011-08-05 Vincent Celier <celier@adacore.com>
6527 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6528 delete or close the file when the call to gnatmake returns a non
6529 successful return code.
6531 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6533 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6534 check, indicate that the copy of the original node does not come from
6535 source, to prevent an infinite recursion of the expansion.
6537 2011-08-05 Johannes Kanig <kanig@adacore.com>
6539 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6540 VC generation for subprogram bodies.
6542 2011-08-05 Yannick Moy <moy@adacore.com>
6545 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6546 the base type with the smallest allowed base type.
6548 2011-08-05 Sergey Rybin <rybin@adacore.com>
6550 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6553 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6555 * sem_ch12.ads: minor comment updates.
6557 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6559 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6560 instantiation and a formal package the compiler generates a package
6561 renaming declaration so that the generic name within the declaration
6562 is interpreted as a renaming of the instance. At the end of a formal
6563 package declaration, this renaming must become invisible.
6565 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6567 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6568 comparison and rely on concrete entities instead.
6570 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6572 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6573 and discriminants, to indicate that the type has an access discriminant
6574 that supports implicit dereference.
6575 * snames.ads-tmpl: Add names of aspects and attributes related to
6576 Ada2012 iterators: constant_indexing, default_iterator,
6577 iterator_element, implicit_dereference, variable_indexing.
6578 * aspects.ads, aspects.adb: entries for iterator-related aspects.
6579 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6580 iterator-related aspects.
6581 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6583 2011-08-05 Sergey Rybin <rybin@adacore.com>
6585 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6586 metrics in gnatmetric to cover new kinds of coupling mentrics.
6588 2011-08-05 Steve Baird <baird@adacore.com>
6590 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6591 of calling the user-defined main subprogram.
6592 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
6593 is set) Call_Main_Subprogram ahead of, as opposed to
6595 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6596 generation of a "with" of the user-defined main subprogram.
6597 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6598 (which is now called from Gen_Main instead).
6600 2011-08-05 Emmanuel Briot <briot@adacore.com>
6602 * projects.texi: Added reference to the Makefile package.
6604 2011-08-05 Thomas Quinot <quinot@adacore.com>
6606 * exp_ch7.adb: Minor comment rewording.
6608 2011-08-05 Ed Falis <falis@adacore.com>
6610 * env.c: Fix comment.
6612 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6614 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6615 character comparison and rely on concrete entities instead.
6617 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6619 * sem_ch3.adb: (Check_Private_Overriding): better error message,
6620 suggested by AI95-0068.
6622 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
6624 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6625 the two potential initialization calls. This accounts for any
6626 access-before-elaboration checks which may precede the initialization
6628 (Next_Suitable_Statement): New routine. Returns the next real statement
6629 after the input node while skipping generated checks.
6630 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6631 with comment on usage.
6632 Do not generate Elaborate_All when the trigger is a finalization call
6633 coming from a type init proc.
6634 (Check_Elab_Call): Propagate the initialization procedure context to
6635 subsequent calls to Check_A_Call.
6636 (Check_Internal_Call_Continue): Propagate the initialization procedure
6637 context to subsequent calls to Check_Elab_Call.
6638 (Is_Finalization_Procedure): New routine. Returns True if the input
6639 entity denotes a [Deep_]Finalize routine.
6640 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6641 along with comment on usage.
6643 2011-08-05 Vadim Godunko <godunko@adacore.com>
6645 * s-atocou.ads: Add list of supported platforms.
6647 2011-08-05 Yannick Moy <moy@adacore.com>
6649 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6651 * opt.ads (Disable_ALI_File): new Boolean flag
6652 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6654 2011-08-05 Ed Falis <falis@adacore.com>
6656 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6657 environ is properly defined.
6659 2011-08-05 Vincent Celier <celier@adacore.com>
6661 * make.adb (Compilation_Phase): Exit immediately when all objects have
6662 been found up to date, to avoid multiple exit messages.
6663 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6664 same project for languages with no compiler.
6665 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6667 2011-08-05 Robert Dewar <dewar@adacore.com>
6669 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6670 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6671 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6672 s-atocou-builtin.adb: Minor reformatting.
6674 2011-08-05 Yannick Moy <moy@adacore.com>
6676 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6677 if the node to wrap is a pragma check, this node and enclosed
6678 expression are not expanded, so do not apply any transformations here.
6679 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6680 introducing transient scopes.
6682 2011-08-05 Jose Ruiz <ruiz@adacore.com>
6684 * adaint.c (__gnat_set_writable, __gnat_set_readable,
6685 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6686 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6687 routine is available, so we use the default implementation of these
6689 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6690 support for copying attributes on VxWorks 6.
6692 2011-08-05 Yannick Moy <moy@adacore.com>
6694 * debug.adb: Remove use of -gnatd.D.
6695 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6696 * opt.ads: Simplify variables for ALFA mode, to keep one only
6697 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6700 2011-08-05 Vincent Celier <celier@adacore.com>
6702 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6703 Builder'Default_Switches.
6705 2011-08-05 Vincent Celier <celier@adacore.com>
6707 * makeusg.adb: Add lines for --create-map-file switches.
6709 2011-08-05 Ed Schonberg <schonberg@adacore.com>
6711 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6712 profile is incomplete and the full view is available, replace it with
6714 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6715 incomplete, freezing the subprogram is delayed until the full view is
6717 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6718 fixed-point multiplication operator and the predefined operator is
6719 resolved in favor of the user-defined one.
6721 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6723 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6726 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6728 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6729 whether a type lacks user-defined Read or Write operations, or has a
6730 component that lacks them.
6731 * sem_attr.adb (Check_Stream_Attribute): if restriction
6732 No_Default_Stream_Attributes is active, verify that all subcomponent
6733 types of the target have user-defined stream operations, and report
6735 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6736 * exp_strm.adb: Build_Elementary_Input_Call,
6737 Build_Elementary_Write_Call): remove checks for restriction
6738 No_Default_Stream_Attributes, now checked in semantics.
6740 2011-08-04 Vincent Celier <celier@adacore.com>
6742 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6743 switches on the command line, look for all valid --RTS switches in the
6744 Builder switches and for each language use the first runtime name found
6745 to invoke gprconfig.
6746 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6747 command line and there is no auto-configuration.
6748 (Runtime_Name_Set_For): New function.
6750 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6752 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6753 elaborate initialization expression for variable Abort when processing
6754 a package body or a declaration.
6755 (Create_Finalizer): Propagate the package context when creating the
6756 exception-related variables.
6757 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6758 For_Package along with usage comment.
6760 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6762 * gcc-interface/Makefile.in: Clean up targets.
6763 Enable new package for atomic counters and copy-on-write implementation
6764 of unbounded strings on x86 platforms.
6765 * gcc-interface/Make-lang.in: Update dependencies.
6767 2011-08-04 Robert Dewar <dewar@adacore.com>
6769 * exp_ch7.adb: Minor reformatting.
6771 2011-08-04 Robert Dewar <dewar@adacore.com>
6773 * exp_strm.adb: Minor reformatting.
6775 2011-08-04 Vadim Godunko <godunko@adacore.com>
6777 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6778 operations are not supported.
6779 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6780 * s-atocou-x86.adb: New file.
6781 * Makefile.rtl: Add s-atocou.o file
6783 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6785 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6786 (Compilation_Phase): ... here.
6787 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6789 2011-08-04 Thomas Quinot <quinot@adacore.com>
6791 * Make-generated.in: Fix minor typo in comment.
6793 2011-08-04 Thomas Quinot <quinot@adacore.com>
6795 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6798 2011-08-04 Robert Dewar <dewar@adacore.com>
6800 * a-coinho.adb: Minor reformatting.
6802 2011-08-04 Robert Dewar <dewar@adacore.com>
6804 * a-coinho.ads: Minor reformatting.
6806 2011-08-04 Vadim Godunko <godunko@adacore.com>
6808 * s-atocou.ads, s-atocou.adb: New files.
6809 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6810 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6811 direct use of GCC's atomic builtins and replace them by use of new
6812 atomic counter package.
6814 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6816 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6818 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6820 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6821 with a call to Get_External_Tag.
6822 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6823 subprogram usage. Remove the guard against package declarations and
6824 bodies since Build_Cleanup_Statements is no longer invoked in that
6826 (Build_Components): Initialize Tagged_Type_Stmts when the context
6827 contains at least one library-level tagged type.
6828 (Build_Finalizer): New local variables Has_Tagged_Types and
6829 Tagged_Type_Stmts along with associated comments on usage. Update the
6830 logic to include tagged type processing.
6831 (Create_Finalizer): Insert all library-level tagged type unregistration
6832 code before the jump block circuitry.
6833 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6834 (Expand_N_Package_Declaration): Remove the call to
6835 Build_Cleanup_Statements.
6836 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6837 unregister the external tag of a tagged type.
6838 (Processing_Actions): Reimplemented to handle tagged types.
6839 (Process_Declarations): Detect the declaration of a library-level
6840 tagged type and carry out the appropriate actions.
6841 (Unregister_Tagged_Types): Removed. The machinery has been directly
6842 merged with Build_Finalizer.
6844 2011-08-04 Robert Dewar <dewar@adacore.com>
6846 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6847 gnatls.adb, exp_ch3.adb: Minor reformatting.
6849 2011-08-04 Marc Sango <sango@adacore.com>
6851 * sem_attr.adb (Analyze_Attribute): Replace the message
6852 "invisible attribute of}" of the spark restriction violation in
6853 attribute reference by the simple message "invisible attribute of type".
6854 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6855 two insertion characters: '&' and '}'.
6857 2011-08-04 Vadim Godunko <godunko@adacore.com>
6859 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6860 * a-coinho.ads, a-coinho.adb: New file.
6861 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6863 2011-08-04 Nicolas Roche <roche@adacore.com>
6865 * alfa_test.adb: Not all ali files are containing alfa information even
6866 if compiled with -gnatd.F. So suppress warning about missing ALFA
6869 2011-08-04 Yannick Moy <moy@adacore.com>
6871 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6873 * put_alfa.adb: Check that scope name is not empty.
6875 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6877 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6878 Needs_Elementary_Stream_Operation, to determine whether user-defined
6879 Read and Write attributes are available for the elementary components
6880 of the given type. If only the predefined attributes are available,
6881 then when restriction No_Default_Stream_Attributes is active the
6882 predefined stream attributes for the composite type cannot be created.
6884 2011-08-04 Robert Dewar <dewar@adacore.com>
6886 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6887 Put routines in alpha order
6889 2011-08-04 Jose Ruiz <ruiz@adacore.com>
6891 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6892 * gcc-interface/Make-lang.in: Update dependencies.
6894 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6896 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6897 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6900 2011-08-04 Robert Dewar <dewar@adacore.com>
6902 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6903 lib-xref-alfa.adb: Minor reformatting.
6905 2011-08-04 Marc Sango <sango@adacore.com>
6907 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6908 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6909 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6912 2011-08-04 Tristan Gingold <gingold@adacore.com>
6914 * bindgen.adb (Gen_Adainit_C): Remove.
6915 (Gen_Adafinal_C): Ditto.
6916 (Gen_Elab_Externals_C): Ditto.
6917 (Gen_Elab_Calls_C): Ditto.
6918 (Gen_Elab_Order_C): Ditto.
6919 (Gen_Elab_Defs_C): Ditto.
6920 (Gen_Finalize_Library_C): Ditto.
6921 (Gen_Finalize_Library_Defs_C): Ditto.
6922 (Gen_Main_C): Ditto.
6923 (Gen_Output_File_C): Ditto.
6924 (Gen_Restrictions_C): Ditto.
6925 (Gen_Versions_C): Ditto.
6926 (Write_Info_Ada_C): Ditto.
6927 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6928 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6929 Always call Gen_Output_File_Ada.
6930 * gnatlink.adb (Begin_Info): Now a constant.
6932 (Ada_Bind_File): Remove
6933 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6934 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6935 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6936 * opt.ads (Ada_Bind_File): Remove.
6938 2011-08-04 Thomas Quinot <quinot@adacore.com>
6940 * projects.texi: Document target-specific directory in default project
6943 2011-08-04 Thomas Quinot <quinot@adacore.com>
6945 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6948 2011-08-04 Yannick Moy <moy@adacore.com>
6950 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6951 opt.ads, lib-xref.ads: Code clean up.
6953 2011-08-04 Yannick Moy <moy@adacore.com>
6955 * gnat_rm.texi: Update description of Test_Case
6956 * gnat_ugn.texi: Typo.
6958 2011-08-04 Ed Falis <falis@adacore.com>
6960 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6962 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6964 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6965 it is of type Root_Controlled. This action eliminates fields Prev and
6966 Next from type equality.
6968 2011-08-04 Yannick Moy <moy@adacore.com>
6970 * lib-xref-alfa.adb: Correct typo.
6972 2011-08-04 Matthew Heaney <heaney@adacore.com>
6974 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6977 2011-08-04 Yannick Moy <moy@adacore.com>
6979 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6980 (Analyze_Pragma): allow static string expression for name of Test_Case,
6981 instead of simply string literals.
6982 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6985 2011-08-04 Vincent Celier <celier@adacore.com>
6987 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6988 case suffixes to find truncated main sources.
6990 2011-08-04 Tristan Gingold <gingold@adacore.com>
6992 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6993 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6994 (Compute_Current_Task): Ditto.
6996 2011-08-04 Tristan Gingold <gingold@adacore.com>
6998 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
7000 2011-08-04 Yannick Moy <moy@adacore.com>
7002 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
7003 library-level constant.
7004 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
7005 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
7006 used as selector of parameter association, in ALFA mode.
7008 2011-08-04 Robert Dewar <dewar@adacore.com>
7010 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
7011 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
7014 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7016 * make.adb (Linking_Phase): Set source search path before calling
7017 gnatlink in CodePeer mode.
7019 2011-08-04 Javier Miranda <miranda@adacore.com>
7021 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
7022 Remove code which takes care of building TSDs.
7023 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
7024 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
7025 the accessibility check in VM targets.
7026 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
7027 (Building_Static_DT): Now returns false for VM targets.
7028 (Build_VM_TSDs): Removed.
7029 (Expand_Interface_Conversion): Generate missing runtime check for
7030 conversions to interface types whose target type is unknown at compile
7032 (Make_VM_TSD): Add missing code to disable the generation of calls to
7033 Check_TSD if the tagged type is not defined at library level, or not
7034 has a representation clause specifying its external tag, or -gnatdQ is
7036 * exp_disp.ads (Build_VM_TSDs): Removed.
7037 (Make_VM_TSDs): Spec relocated from exp_disp.adb
7038 * sem_disp.adb (Check_Dispatching_Operation): No code required to
7039 register primitives in the dispatch tables in VM targets.
7040 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
7041 initialization of class-wide interface objects in VM targets.
7042 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
7045 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
7047 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
7048 when dotnet-ld cannot be found.
7050 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7052 * bindgen.adb: Simplify significantly generation of binder body file in
7054 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
7055 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
7058 2011-08-04 Yannick Moy <moy@adacore.com>
7060 * sem_prag.adb, sem.ads: Code cleanup.
7062 2011-08-04 Tristan Gingold <gingold@adacore.com>
7064 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
7065 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
7066 results if possible.
7067 * s-stusta.adb (Print): Adjust after changes in s-stausa.
7068 * gnat_ugn.texi: Update dynamic stack usage section.
7070 2011-08-04 Steve Baird <baird@adacore.com>
7072 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
7073 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
7074 contains only a call to the user-defined main subprogram.
7075 (Gen_Main_Ada) - If CodePeer_Mode is set, then
7076 call the "wrapper" subprogram instead of directly
7077 calling the user-defined main subprogram.
7079 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7081 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
7082 alternatives of a case statement for controlled objects. Rename local
7083 variable A to Dead_Alt.
7084 (Expand_N_If_Statement): Check the then and else statements of an if
7085 statement for controlled objects. Check the then statements of all
7086 elsif parts of an if statement for controlled objects.
7087 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
7089 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
7090 detects a loop associated with the expansion of an array object.
7091 Augment the processing of the loop statements to account for a possible
7092 wrap done by Process_Statements_For_Controlled_Objects.
7093 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
7094 statements and abortable part of an asynchronous select for controlled
7096 (Expand_N_Conditional_Entry_Call): Check the else statements of a
7097 conditional entry call for controlled objects.
7098 (Expand_N_Selective_Accept): Check the alternatives of a selective
7099 accept for controlled objects.
7100 (Expand_N_Timed_Entry_Call): Check the entry call and delay
7101 alternatives of a timed entry call for controlled objects.
7102 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
7103 exception handler for controlled objects.
7104 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7105 Add formal parameter Nested_Constructs along with its associated
7107 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
7108 Requires_Cleanup_Actions.
7109 (Process_Statements_For_Controlled_Objects): New routine.
7110 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
7111 routine. Inspect a node which contains a non-handled sequence of
7112 statements for controlled objects. If such an object is found, the
7113 statements are wrapped in a block.
7115 2011-08-04 Bob Duff <duff@adacore.com>
7117 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
7118 need to compare with Class_Wide_Type (T2), in order to get at the
7119 original class-wide type node.
7120 * sem_type.ads (Covers): Improve the comment.
7121 * einfo.ads (Class_Wide_Type): Improve the comment.
7122 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
7123 the type of the Deref.
7125 2011-08-04 Yannick Moy <moy@adacore.com>
7127 * gnat_rm.texi: Document that Test_Case pragma can only appear on
7128 separate declarations.
7129 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
7130 check identifier of pragma argument.
7131 (Chain_TC): check that no other test case associated to the same entity
7132 share the same name.
7133 (Check_Test_Case): disallow test case inside subprogram body
7134 (Analyze_Pragma): correct call to check identifier and not argument
7135 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
7136 function gets name from test case pragma.
7138 2011-08-04 Yannick Moy <moy@adacore.com>
7140 * gnat_rm.texi: Document new pragma and aspect.
7141 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
7142 (No_Duplicates_Allowed): new constant array defining whether duplicates
7143 aspects of each kind can appear on the same declaration.
7144 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
7145 field, which points to a node holding the previous Spec_PPC_List.
7146 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
7147 through the indirection with Contract.
7148 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
7149 * par-prag.adb (Prag): do nothing on Test_Case pragma
7150 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
7152 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
7153 component Ensures of Test_Case.
7154 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
7155 (Analyze_Generic_Subprogram_Declaration,
7156 Analyze_Subprogram_Instantiation,
7157 Analyze_Abstract_Subprogram_Declaration,
7158 Analyze_Subprogram_Body_Helper,
7159 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
7160 insert contract in subprogram node at point of definition
7162 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
7163 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
7164 corresponding pragma
7165 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
7166 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
7167 similar to the analysis of pre/post
7168 (Derive_Subprogram): insert contract in subprogram node at point of
7170 * sem_prag.adb, sem_prag.ads
7171 (Check_Arg_Is_String_Literal, Check_Identifier):
7172 new checking procedures to be called in treatment of pragmas
7173 (Check_Test_Case): new procedure to check that a Test_Case aspect or
7174 pragma is well-formed. This does not check currently that 'Result is
7175 used only in the Ensures component of a Test_Case.
7176 (Analyze_Pragma): add case for Test_Case
7177 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
7178 components of a Test_Case.
7179 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
7180 expressions in the 3rd (and 4th if present) arguments of a Test_Case
7181 pragma, treated as spec expressions.
7182 (Sig_Flags): add value -1 for Test_Case.
7183 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
7184 Get_Requires_From_Test_Case_Pragma): getters for both expression
7185 components of a Test_Case.
7186 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
7187 indirection between an entry or [generic] subprogram entity and its
7188 pre/post + test-cases.
7189 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
7190 get/set for fields of an N_Contract node.
7191 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
7192 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
7193 names and pragma for Test_Case.
7194 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
7196 2011-08-04 Vincent Celier <celier@adacore.com>
7198 * gnat_ugn.texi: Improve documentation of gnatmake switch
7199 --source-info-file=.
7201 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7203 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
7204 type). Initialize Atyp to the appropriate type which is later checked
7205 for completion. Rewrite the assertion associated with private type
7208 2011-08-04 Ed Falis <falis@adacore.com>
7210 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
7211 initialize the number of CPUs.
7213 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7215 * sem_type.adb (Disambiguate): New subsidiary routine
7216 In_Same_Declaration_List, to implement AI05-0020: a user-defined
7217 equality on an anonymous access type whose designated type is private
7218 does not lead to an ambiguity with the universal access equality
7219 operator in the body or child units of the defining package. The same
7220 is true for a multiplication operator on a private type completed with
7223 2011-08-04 Javier Miranda <miranda@adacore.com>
7225 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
7226 (Normalize_Scalars_Config): Removed.
7228 (Register_Opt_Config_Switches): Remove registering config values of
7229 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
7230 (Restore_Opt_Config_Switches): Remove code which restores the values of
7231 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7232 Init_Or_Norm_Scalars.
7233 (Save_Opt_Config_Switches): Remove code which saves values of
7234 Init_Or_Norm_Scalars and Normalize_Scalars.
7235 (Set_Opt_Config_Switches): Remove code which restores config values of
7236 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7237 Init_Or_Norm_Scalars.
7239 2011-08-04 Yannick Moy <moy@adacore.com>
7241 * frontend.adb (Frontend): remove previous patch to avoid full
7242 qualification in ALFA mode.
7243 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
7244 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
7245 unique name for an entity, which could be used to identify the entity
7246 across compilation units.
7248 2011-08-04 Thomas Quinot <quinot@adacore.com>
7251 (Initialize_Default_Project_Path): Add target specific directory
7252 ($prefix/$target/lib/gnat) in front of project path in all cases
7253 (making gnatmake's behaviour consistent with gprbuild).
7254 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
7255 Pass target name from Sdefault to project subsystem.
7256 * gnatls.adb: Show new target specific default project directory.
7258 2011-08-04 Johannes Kanig <kanig@adacore.com>
7260 * cstand.adb: Add Information to Identifier in Standard
7261 (Identifer_For): Set Entity to the corresponding entity
7263 2011-08-04 Sergey Rybin <rybin@adacore.com>
7265 * gnat_ugn.texi: Update doc on gnatcheck.
7267 2011-08-04 Yannick Moy <moy@adacore.com>
7269 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
7272 2011-08-04 Yannick Moy <moy@adacore.com>
7274 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
7275 performing expansion.
7276 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
7277 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
7278 it is not called in ALFA mode.
7280 2011-08-04 Emmanuel Briot <briot@adacore.com>
7282 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
7283 after all, so removed.
7285 2011-08-04 Sergey Rybin <rybin@adacore.com>
7287 * vms_data.ads: Add missing VMS qualifiers.
7289 2011-08-04 Emmanuel Briot <briot@adacore.com>
7291 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
7292 the list of files on the command line after processing it through
7295 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7297 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
7298 processing for .NET/JVM. These targets can now benefit from
7299 Raise_From_Controlled_Operation and they share the same processing with
7301 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
7302 These targets need transient scopes in order to properly finalize short
7303 lived controlled objects.
7304 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
7305 NET/JVM. These targets can now benefit from
7306 Raise_From_Controlled_Operation and they share the same processing with
7309 2011-08-04 Geert Bosch <bosch@adacore.com>
7311 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
7313 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7315 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
7316 Expand_Record_Aggregate, to determine whether aggregate must be
7317 expanded into assignments. This is the case if the ancestor part is
7318 private, regarless of the setting of the flag Has_Private_Ancestor.
7320 2011-08-04 Ed Falis <falis@adacore.com>
7322 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
7324 2011-08-04 Bob Duff <duff@adacore.com>
7326 * sinfo.ads: Fix comment.
7328 2011-08-04 Steve Baird <baird@adacore.com>
7330 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
7331 choose a package name in much the same way as is
7332 done for JGNAT when VM_Target /= No_VM, except that
7333 a slightly more distinctive prefix string is used.
7335 2011-08-04 Emmanuel Briot <briot@adacore.com>
7337 * makeutl.adb (Complete_Mains): no longer accept unit names on the
7338 gnatmake command line.
7339 This behavior was never documented (and was supported only because of
7340 an early bug in the code). This case might lead to ambiguous cases
7341 (between unit names and truncated base names without suffixes).
7343 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7345 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
7346 Remove the external tag of a tagged type from the internal hash table.
7347 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
7348 expanded usage of the routine. Strenghten the check for Is_Master. Add
7349 processing for tagged types.
7350 (Build_Finalizer): Create all the necessary lists used in finalizer
7351 creation when the processed context is a package that may contain
7353 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
7354 Requires_Cleanup_Actions.
7355 (Expand_N_Package_Body): Package bodies may need clean up code
7356 depending on whether they contain tagged types.
7357 (Expand_N_Package_Declaration): Package declarations may need clean up
7358 code depending on whether they contain tagged types.
7359 (Unregister_Tagged_Types): New routine. Search through a list of
7360 declarations or statements, looking for non-abstract Ada tagged types.
7361 For each such type, generate code to unregister the external tag.
7362 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
7363 Requires_Cleanup_Actions.
7364 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
7365 through a list of declarations or statements looking for non-abstract
7366 Ada tagged types or controlled objects.
7367 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
7368 Requires_Cleanup_Actions.
7369 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
7370 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
7373 2011-08-04 Vincent Celier <celier@adacore.com>
7375 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
7376 has Ada sources, not project Project, because if the root project
7377 Project has no sources of its own, all projects will be deemed without
7380 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7382 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
7383 of the No_Param_Proc acc-to-subp type used for initialization of
7384 __gnat_finalize_library_objects so that it's declared at library level
7385 rather than nested inside of the adainit routine.
7387 2011-08-04 Javier Miranda <miranda@adacore.com>
7389 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
7390 if the tagged type has a representation clause which specifies its
7393 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7395 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
7396 Remove previous procedure with that name.
7397 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
7399 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7400 subtype mark, the ancestor cannot have unknown discriminants.
7401 (Resolve_Record_Aggregate): if the type has invisible components
7402 because of a private ancestor, the aggregate is illegal.
7404 2011-08-04 Vincent Celier <celier@adacore.com>
7406 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7407 account switches -gnat2005, -gnat12 and -gnat2012.
7409 2011-08-04 Bob Duff <duff@adacore.com>
7411 * s-tasdeb.ads: Minor comment fix.
7413 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7415 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7417 * switch.ads, switch.adb (Is_Language_Switch): New function.
7419 2011-08-04 Vincent Celier <celier@adacore.com>
7421 * switch-c.adb: Minor comment addition.
7423 2011-08-04 Vincent Celier <celier@adacore.com>
7425 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7426 ending with '=' is followed by a space (missing file name).
7428 2011-08-04 Pascal Obry <obry@adacore.com>
7430 * g-regist.ads: Fix size of HKEY on x86_64-windows.
7432 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7434 * sem_ch12.adb (Analyze_Associations): New routine
7435 Check_Overloaded_Formal_Subprogram to reject a formal package when
7436 there is a named association or a box initialisation for an overloaded
7437 formal subprogram of the corresponding generic.
7439 2011-08-04 Yannick Moy <moy@adacore.com>
7441 * alfa.ads (ALFA_Xref_Record): add component for type of entity
7442 * get_alfa.adb, put_alfa.adb: Read and write new component of
7444 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7446 2011-08-04 Pascal Obry <obry@adacore.com>
7448 * urealp.adb: Minor reformatting.
7450 2011-08-04 Tristan Gingold <gingold@adacore.com>
7452 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7453 Handle the case when Cleanup_Protected_Object returns Empty.
7455 2011-08-04 Yannick Moy <moy@adacore.com>
7457 * frontend.adb (Frontend): only qualify names in non-ALFA mode
7459 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7461 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7462 call, ignore functions.
7464 2011-08-04 Geert Bosch <bosch@adacore.com>
7466 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7469 2011-08-04 Emmanuel Briot <briot@adacore.com>
7471 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7472 as an index for Builder'Switches. This conforms to the documentation.
7473 * make.adb (Insert_Project_Sources): avoid duplicate code
7475 2011-08-04 Emmanuel Briot <briot@adacore.com>
7477 * makeutl.adb (Complete_Mains): if the user has passed a relative file
7478 name on the command line (for instance "../dummy"), never assume it can
7481 2011-08-04 Tristan Gingold <gingold@adacore.com>
7483 * bindgen.adb: Remove code the reference or create the
7484 Break_Start/__gnat_break_start procedure.
7485 * s-stalib.adb (Break_Start): Removed.
7487 2011-08-04 Emmanuel Briot <briot@adacore.com>
7489 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7490 shared with gprbuild.
7492 2011-08-04 Yannick Moy <moy@adacore.com>
7494 * par-ch4.adb (P_Primary): preferentially issue an error message about
7495 a missing parenthesis arount a conditional or case expression in Ada
7496 2012 mode, if we detect that the alignment is not correct for a
7499 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7501 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7502 tag-to-class-wide conversion as needing finalization actions.
7503 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7504 a tag-to-class-wide conversion as needing finalization actions.
7505 (Is_Finalizable_Transient): The result of a tag-to-class-wide
7506 conversion does not need finalization actions.
7507 (Is_Tag_To_CW_Conversion): New routine.
7508 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7509 whether an object is the result of a tag-to-class-wide conversion.
7511 2011-08-04 Yannick Moy <moy@adacore.com>
7513 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7514 the left-hand-side and right-hand-side of a conjunct are inserted when
7515 translating a pre- or postcondition
7516 * sem_ch6.adb: Correct typo in comment
7518 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7520 * gnat_rm.texi: Ravenscar does not prohibit dependence on
7521 Unchecked_Conversion and Unchecked_Deallocation.
7523 2011-08-04 Thomas Quinot <quinot@adacore.com>
7525 * make.adb: Minor reformatting.
7527 2011-08-04 Emmanuel Briot <briot@adacore.com>
7529 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7530 sources in the project and its imported projects, but not in the whole
7533 2011-08-04 Emmanuel Briot <briot@adacore.com>
7535 * make.adb: Remove debug trace.
7537 2011-08-04 Vincent Celier <celier@adacore.com>
7539 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7540 path in canonical form, to be able to compare path names on platforms
7541 such as Windows or Darwin.
7543 2011-08-04 Thomas Quinot <quinot@adacore.com>
7545 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7546 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7547 * scos.ads: Update documentation accordingly.
7548 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7551 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7553 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7554 attribute only if prefix type is scalar.
7556 2011-08-04 Emmanuel Briot <briot@adacore.com>
7558 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7559 in gnatmake for specifying mains on the command line that do not belong
7560 to the main project. These mains must currently all belong to the same
7562 (Ultimate_Extension_Of): removed, since duplicated
7563 Ultimate_Extending_Project.
7565 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7567 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7569 (CodePeer_Mode_String): New.
7570 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7572 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7573 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7574 mode, since no useful elaboration subprogram is needed by CodePeer.
7575 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7576 In this mode, compile binder file with -gnatC and do stop after this
7579 2011-08-04 Vincent Celier <celier@adacore.com>
7581 * exp_ch7.adb: Minor comment fix.
7583 2011-08-04 Robert Dewar <dewar@adacore.com>
7585 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7586 exp_ch4.adb, makeutl.adb: Minor reformatting.
7588 2011-08-04 Emmanuel Briot <briot@adacore.com>
7590 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7591 Create several new subprograms to move code out of Make. This makes the
7592 code more readable, removes code duplication, and is a preparation work
7593 for adding support for aggregate projects.
7595 2011-08-04 Tristan Gingold <gingold@adacore.com>
7597 * s-po32gl.ads, s-po32gl.adb: New files.
7598 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7599 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7600 (Build_Finalization_Collection): Use it.
7601 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7602 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7604 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7605 * gcc-interface/Make-lang.in: Update dependencies.
7607 2011-08-04 Emmanuel Briot <briot@adacore.com>
7609 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7612 2011-08-04 Emmanuel Briot <briot@adacore.com>
7614 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7615 command line is not a file name, also check whether it could be a unit
7618 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7620 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7621 the header of the finalization routine.
7622 If the unit has no finalizer but is a body whose spec has one, then
7623 generate the decrement of the elaboration entity only.
7624 If the unit has a finalizer and is a spec, then do not generate the
7625 decrement of the elaboration entity.
7626 (Gen_Finalize_Library_C): Likewise.
7628 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7630 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7631 (Bounds_Size_Expression): Removed.
7632 (Double_Alignment_Of): New subsidiary routine.
7633 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7634 for a hole in the dope vector of unconstrained arrays due to different
7635 index and element alignments.
7637 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7639 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7640 raise program_error because body has not been seen yet.
7642 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7644 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7647 2011-08-04 Vincent Celier <celier@adacore.com>
7649 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7651 2011-08-04 Yannick Moy <moy@adacore.com>
7653 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7654 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7656 2011-08-04 Thomas Quinot <quinot@adacore.com>
7658 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7659 instantiation in RCI.
7661 2011-08-04 Emmanuel Briot <briot@adacore.com>
7663 * make.adb: Share more code with gprbuild
7665 2011-08-04 Emmanuel Briot <briot@adacore.com>
7667 * projects.texi: Added documentation for the IDE'Gnat project file
7670 2011-08-04 Nicolas Roche <roche@adacore.com>
7672 * gnat_rm.texi: Minor editing.
7674 2011-08-04 Javier Miranda <miranda@adacore.com>
7676 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7677 and the library case for VM targets.
7678 (Gen_Adainit_Ada): Likewise.
7680 2011-08-04 Robert Dewar <dewar@adacore.com>
7682 * g-altive.ads: Minor comment updates.
7683 * prj-nmsc.adb: Minor reformatting.
7685 2011-08-04 Javier Miranda <miranda@adacore.com>
7688 (Normalize_Scalars_Config): Value of the configuration switch set by
7689 pragma Normalize_Scalars when it appears in the gnat.adc file.
7690 (Normalize_Scalars): New field for record Config_Switches_Type. Used
7691 to save and restore settings of this pragma.
7693 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7694 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7696 2011-08-04 Vincent Celier <celier@adacore.com>
7698 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7700 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7702 * makeutl.adb: Minor reformatting.
7704 2011-08-04 Olivier Hainque <hainque@adacore.com>
7706 * g-altive.ads: Update comments to reflect that only the soft
7707 binding is available today.
7709 2011-08-04 Robert Dewar <dewar@adacore.com>
7711 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7712 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7713 * gcc-interface/Make-lang.in: Update dependencies.
7715 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7717 * prj-env.adb: Remove local debug traces.
7719 2011-08-04 Yannick Moy <moy@adacore.com>
7721 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7722 was used instead of Hi_OK, which could cause a read of an uninitialized
7723 value later on. Detected while working on the new warning.
7724 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7726 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7727 in more cases, in order to detect more unreferenced values.
7728 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7729 object for expression, if any.
7731 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7733 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7734 the operand types instead of the Esize.
7736 2011-08-04 Steve Baird <baird@adacore.com>
7738 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7739 enable CodePeer_Mode.
7740 * bindusg.adb (Display): Add help message describing -P binder switch.
7741 * gnat_ugn.texi: Document -P binder switch.
7742 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7743 user-defined main program directly.
7744 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7745 user-defined main program in the context clause of the package body.
7747 2011-08-04 Yannick Moy <moy@adacore.com>
7749 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7750 duplicate of Defining_Entity
7751 (Get_Unique_Entity_For_Decl): rename function into
7752 Unique_Defining_Entity
7753 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7754 (Formal_Proof_On): remove synthesized flag
7755 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7756 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7757 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7758 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7759 Annotate (Formal_Proof)
7761 2011-08-04 Emmanuel Briot <briot@adacore.com>
7763 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7764 source files with non-standard naming schemes, in imported projects
7766 2011-08-04 Emmanuel Briot <briot@adacore.com>
7768 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7769 specified on the gprbuild command line, we need to compile all units
7770 within that file, not just the first one we find
7771 Fix error message for mains that are not found.
7773 2011-08-04 Thomas Quinot <quinot@adacore.com>
7775 * sem_ch6.adb: Update comment.
7776 * sem_ch12.adb: Minor reformatting.
7778 2011-08-04 Bob Duff <duff@adacore.com>
7780 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7781 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7782 race condition whose symptom is to fail to lock Parent. That, in turn,
7783 causes Parent.Awake_Count to be accessed without locking Parent, which
7784 causes another race condition whose symptom is that Parent.Awake_Count
7785 can be off by 1 (either too high or too low). The solution is to lock
7786 Parent unconditionally, and then lock Acceptor, before reading
7787 Acceptor.Terminate_Alternative.
7789 2011-08-04 Arnaud Charlet <charlet@adacore.com>
7791 * debug.adb: Update comment.
7793 2011-08-04 Robert Dewar <dewar@adacore.com>
7795 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7796 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7797 exp_ch6.adb: Minor reformatting.
7799 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7801 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7804 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7806 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7808 2011-08-04 Thomas Quinot <quinot@adacore.com>
7810 * sinfo.ads: Minor reformatting.
7812 2011-08-04 Emmanuel Briot <briot@adacore.com>
7814 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7815 even if there is no location.
7817 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7819 * sem_res.adb, sem_ch4.adb: move check for restriction
7820 No_Task_Hierarchy to resolve_allocator.
7822 2011-08-04 Thomas Quinot <quinot@adacore.com>
7824 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7825 This flag of N_Pragma nodes is not used, remove it as well as all of
7826 the associated circuitry.
7828 2011-08-04 Javier Miranda <miranda@adacore.com>
7830 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7831 runtime check on duplicated externa tags
7832 * debug.adb Document switch -gnatdQ.
7834 2011-08-04 Gary Dismukes <dismukes@adacore.com>
7836 * a-fihema.ads: Minor typo fix.
7838 2011-08-04 Yannick Moy <moy@adacore.com>
7840 * sem_ch10.adb: Minor comment update.
7842 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7844 * einfo.adb: Update the node field usage to reflect the renaming of
7845 Return_Flag to Return_ Flag_Or_Transient_Decl.
7846 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7847 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7848 (Write_Field15_Name): Change Return_Flag to
7849 Return_Flag_Or_Transient_Decl.
7850 * einfo.ads: Rename node field Return_Flag to
7851 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7852 occurrences in entities.
7853 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7854 associated Inline pragma.
7855 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7856 associated Inline pragma.
7857 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7859 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7860 Return_Flag and Set_Return_Flag.
7861 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7862 objects generated for controlled transients declared inside an
7863 Exception_With_Actions. Update the calls to Return_Flag.
7864 (Process_Object_Declaration): Add code to add a null guard for hook
7865 objects generated for controlled transients declared inside an
7866 Exception_With_Actions. Update related comment.
7867 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7868 objects generated for controlled transients declared inside an
7869 Exception_With_Actions. Update the calls to Return_Flag.
7870 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7872 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7874 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7875 positional aggregate.
7877 2011-08-04 Vincent Celier <celier@adacore.com>
7879 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7880 SLOC only for pragmas.
7882 2011-08-04 Emmanuel Briot <briot@adacore.com>
7884 * projects.texi: Minor typo fix.
7886 2011-08-04 Emmanuel Briot <briot@adacore.com>
7888 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7889 on case-sensitive file systems.
7891 2011-08-04 Thomas Quinot <quinot@adacore.com>
7893 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7894 nested in a disabled pragma.
7895 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7896 enclosing pragma, if any, for X decisions.
7898 2011-08-04 Thomas Quinot <quinot@adacore.com>
7900 * sem_prag.adb: Minor reformatting.
7902 2011-08-04 Vincent Celier <celier@adacore.com>
7904 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7905 allowed in no run time mode.
7907 2011-08-04 Vincent Celier <celier@adacore.com>
7909 * make.adb (Check): When -gnatc is used, check for the source file
7910 inside the ALI file with a canonical case file name.
7912 2011-08-04 Emmanuel Briot <briot@adacore.com>
7914 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7915 overriding the separator.
7917 2011-08-04 Robert Dewar <dewar@adacore.com>
7919 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7920 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7922 2011-08-04 Robert Dewar <dewar@adacore.com>
7924 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7926 2011-08-04 Yannick Moy <moy@adacore.com>
7928 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7929 'Result only appears in postcondition of function.
7931 2011-08-04 Thomas Quinot <quinot@adacore.com>
7933 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7934 external tag, include the value of the external tag in the exception
7937 2011-08-04 Yannick Moy <moy@adacore.com>
7939 * sem_attr.adb (Result): modify error message for misplaced 'Result
7941 2011-08-04 Sergey Rybin <rybin@adacore.com>
7943 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7944 clear that the second argument must be an identifier.
7946 2011-08-04 Thomas Quinot <quinot@adacore.com>
7948 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7949 -fpreserve-control-flow, insert an IF statement on the barrier
7950 condition to ensure that a conditional branch instruction is generated.
7952 2011-08-04 Emmanuel Briot <briot@adacore.com>
7954 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7955 (Processing_Flags.Ignore_Missing_With): new flag.
7957 2011-08-04 Emmanuel Briot <briot@adacore.com>
7959 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7960 Source_List_File on case-insensitive systems where the file is actually
7961 on a case-sensitive file system (NFS,...).
7963 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7965 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7966 function return contains a controlled [extension] aggregate and the
7967 return statement is not part of a handled sequence of statements, wrap
7968 the return in a block. This ensures that all controlled temporaries
7969 generated during aggregate resolution will be picked up by the
7970 finalization machinery.
7972 2011-08-04 Ed Schonberg <schonberg@adacore.com>
7974 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7975 components, freeze type before resolution, to ensure that default
7976 initializations are present for all components.
7977 * sem_res.adb (Resolve_Actuals): the designated object of an
7978 accces-to-constant type is a legal actual in a call to an
7979 initialization procedure.
7981 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7983 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7984 N_Unchecked_Type_Conversion to the possible containers of a renamed
7987 2011-08-04 Yannick Moy <moy@adacore.com>
7989 * par-ch13.adb (Aspect_Specifications_Present): recognize
7990 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7991 is issued in Strict mode.
7992 * par.adb: Fix typos in comments.
7994 2011-08-04 Yannick Moy <moy@adacore.com>
7996 * sem_attr.adb (Result): modify error message to take into account Post
7997 aspect when compiling Ada 2012 (or newer) code.
7999 2011-08-04 Nicolas Roche <roche@adacore.com>
8001 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
8002 remove need for GCC exceptions.
8004 2011-08-04 Vincent Celier <celier@adacore.com>
8006 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
8007 project, not the source file name.
8008 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
8009 excluded, continue looking. This excluded source will only be returned
8010 if there is no other source with the same base name that is not locally
8013 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8015 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
8016 private and one of the operands is a real literal, use a qualified
8017 expression rather than a conversion which is not meaningful to the
8020 2011-08-04 Yannick Moy <moy@adacore.com>
8022 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
8023 corresponding aspect X'Class are allowed, proceed with analysis of the
8024 aspect instead of skipping it.
8026 2011-08-04 Tristan Gingold <gingold@adacore.com>
8028 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
8029 This will allow to have an Ada implementation for the subprogram.
8031 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8033 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
8034 completion and aspects are present, apply them to the entity for the
8035 type which is currently the partial view, but which is the one that
8037 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
8038 applies to a partial view, indicate that the full view has predicates
8039 and delayed aspects.
8040 (Replace_Type_Reference): Handle properly predicates that apply to the
8041 full view of a private completion.
8043 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8045 * layout.adb (Layout_Type): For composite types, do not set Esize.
8046 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
8048 (Size_Known): Look at the RM size of components instead of the Esize.
8049 (Freeze_Record_Type): Look at the RM size instead of the Esize to
8050 issue warning and activate Implicit_Packing.
8051 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
8052 if the Esize is not known.
8053 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
8054 for elementary types only.
8055 (Analyze_Record_Representation_Clause): Look at the RM size instead
8056 of the Esize to issue errors.
8057 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
8059 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
8061 Look at the RM size instead of the Esize for types if the latter is
8063 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
8065 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8067 * sem_type.adb: proper handling of equality not involving anonymous
8070 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8072 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
8073 Vis_Decls. When creating a library-level finalizer for a package spec,
8074 both the declaration and body of the finalizer are inserted either in
8075 the visible or private declarations of the package spec.
8077 2011-08-04 Javier Miranda <miranda@adacore.com>
8079 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
8080 use of the full-view of a type when invoking Is_Ancestor.
8081 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
8082 the full-view of private parents is requested, then use also the
8083 full-view of the parent of the first derivation.
8085 2011-08-04 Tristan Gingold <gingold@adacore.com>
8087 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
8088 instead of the locally imported procedure.
8089 * s-taprop-mingw.adb (Enter_Task): Ditto.
8090 * s-valrea.adb (Scan_Real): Ditto.
8091 * s-imgrea.adb (Set_Image_Real): Ditto.
8092 * s-flocon.ads: Make the package pure.
8094 2011-08-04 Thomas Quinot <quinot@adacore.com>
8096 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
8097 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
8098 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
8099 New subprogram, moved here from...
8100 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
8101 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
8102 rewriting of the last argument into a procedure call statement here...
8103 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
8106 2011-08-04 Thomas Quinot <quinot@adacore.com>
8108 * par_sco.adb: Minor reformatting.
8110 2011-08-04 Robert Dewar <dewar@adacore.com>
8112 * erroutc.adb: Minor reformatting.
8114 2011-08-04 Thomas Quinot <quinot@adacore.com>
8116 * par_sco.adb: Comment update.
8118 2011-08-04 Tristan Gingold <gingold@adacore.com>
8120 * s-flocon.ads: New file.
8121 * g-flocon.ads: Now a renaming of s-flocon.
8122 * Makefile.rtl: Add s-flocon.o
8124 2011-08-04 Javier Miranda <miranda@adacore.com>
8126 * exp_strm.adb (Build_Array_Input_Function): if the array type is
8127 constrained, do not attempt to build a subtype of it.
8129 2011-08-04 Yannick Moy <moy@adacore.com>
8131 * errout.ads Change comments: remove 'R'M as an example where quotes
8132 are needed; add ALFA as another case where quotes are not needed
8133 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
8134 case where quotes are not needed.
8135 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8136 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
8137 Remove all occurrences of 'A'L'F'A
8139 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8141 * sem_ch13.adb: check legality of invariant pragma.
8143 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8145 * bindgen.adb: Add comments.
8147 2011-08-04 Yannick Moy <moy@adacore.com>
8149 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
8151 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
8152 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
8154 2011-08-04 Robert Dewar <dewar@adacore.com>
8156 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
8157 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
8158 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
8160 2011-08-04 Thomas Quinot <quinot@adacore.com>
8162 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
8164 2011-08-04 Thomas Quinot <quinot@adacore.com>
8167 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
8170 2011-08-04 Robert Dewar <dewar@adacore.com>
8172 * einfo.ads, exp_ch4.adb: Minor reformatting.
8174 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8176 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
8178 2011-08-04 Ed Schonberg <schonberg@adacore.com>
8180 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
8181 type in all cases to compute list of primitive operations, because full
8182 view may be an itype that is not attached to the list of declarations.
8184 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8186 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
8187 library has already been finalized.
8188 (Gen_Adafinal_C): Likewise.
8189 (Gen_Adainit_Ada): Generate an early return if the library has
8190 already been elaborated.
8191 (Gen_Adainit_C): Likewise.
8192 (Gen_Output_File_Ada): Generate an elaboration flag.
8193 (Gen_Output_File_C): Likewise.
8195 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8197 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
8198 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
8199 built in the first place.
8200 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
8201 for CodePeer because Finalize_Address was not built to begin with.
8202 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
8204 2011-08-04 Pascal Obry <obry@adacore.com>
8206 * adaint.c (__gnat_tmp_name): Use current process id to create temp
8207 filenames, this ensures unicity of filenames across processes.
8209 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8211 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
8212 Raise_Controlled to Raise_From_Controlled_Operation. Update the
8213 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
8214 Add False as the actual to From_Abort in the generated call to
8215 Raise_From_Controlled_Operation.
8217 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8219 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
8220 so that the ali file name can be retrieved from outside of this package.
8221 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
8222 doing nothing in the general case, but used to update the object file
8223 timestamp if directly generated by the backend.
8224 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
8225 to a later time than the ali file one.
8227 2011-08-04 Yannick Moy <moy@adacore.com>
8229 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
8230 entities whose body contains an Annotate pragma which forces formal
8232 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8233 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
8234 Mark_Non_ALFA_Subprogram to pass in a message and node.
8235 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
8236 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
8237 surrounding subprogram.
8238 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
8239 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
8240 as not in ALFA is annotated with Formal_Proof being On, then an error
8241 is issued based on the additional parameters for message and node.
8242 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
8243 * gcc-interface/Make-lang.in: Update dependencies.
8245 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8247 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
8248 Finalize_Address when CodePeer is enabled.
8250 2011-08-04 Pascal Obry <obry@adacore.com>
8252 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
8253 the latter returns a pointer to a static buffer which is deallocated
8254 at the end of the routine.
8256 2011-08-04 Yannick Moy <moy@adacore.com>
8258 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
8259 after index creation; mark unconstrained base array type generated as
8260 being in/not in ALFA as well
8261 (Make_Index): mark subtype created as in/not in ALFA
8262 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
8263 over a loop as in/not in ALFA, depending on its type and form of loop
8266 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8268 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
8269 directly to False on .NET and JVM.
8271 2011-08-04 Yannick Moy <moy@adacore.com>
8273 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
8274 constraint that subtype must come from source code to be in ALFA, so
8275 that anonymous subtypes can be in ALFA too.
8277 2011-08-04 Yannick Moy <moy@adacore.com>
8279 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
8280 reference for ALFA mode.
8281 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
8282 procedure public so as to use it from formal verification back-end.
8284 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
8286 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
8287 invalid checks of the Parameter, making Remove_Switch not working
8290 2011-08-04 Arnaud Charlet <charlet@adacore.com>
8292 * targparm.ads: Update header: no run-time exception is needed on this
8295 2011-08-04 Vincent Celier <celier@adacore.com>
8297 * a-fihema.adb: Use System.IO instead of GNAT.IO
8299 2011-08-04 Thomas Quinot <quinot@adacore.com>
8301 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
8302 are forbidden in Compiler_Unit mode.
8304 2011-08-04 Robert Dewar <dewar@adacore.com>
8306 * sem_util.adb: Minor reformatting.
8308 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8310 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
8311 library-level finalizers.
8312 (Gen_Finalize_Library_C): Update the import string for library-level
8314 (Gen_Finalize_Library_Defs_C): Update the definition name of a
8315 library-level finalizer.
8316 * exp_ch7.adb: Remove with and use clauses for Stringt.
8317 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
8318 Spec_Decl. Add local variable Body_Id. The names of library-level
8319 finalizers are now manually fully qualified and are no longer external.
8320 A single name is now capable of servicing .NET, JVM and non-VM targets.
8321 Pragma Export is no longer required to provide visibility for the name.
8322 (Create_Finalizer_String): Removed.
8323 (New_Finalizer_Name): New routine which mimics New_..._Name.
8325 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8327 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
8328 elaboration counter to Standard_Short_Integer.
8329 * sem_util.adb (Build_Elaboration_Entity): Likewise.
8330 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
8331 (Gen_Elab_Externals_C): Likewise.
8333 2011-08-04 Ed Falis <falis@adacore.com>
8335 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
8336 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
8337 system-vxworks-mips.ads, system-vxworks-x86.ads
8338 (Always_Compatible_Rep): set to False for all VxWorks targets.
8340 2011-08-04 Robert Dewar <dewar@adacore.com>
8342 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
8343 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
8344 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
8345 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
8346 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
8347 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
8348 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
8349 Minor reformatting and code reorganization.
8351 2011-08-04 Emmanuel Briot <briot@adacore.com>
8353 * projects.texi: Added doc for aggregate projects.
8355 2011-08-04 Emmanuel Briot <briot@adacore.com>
8357 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
8358 Add support for overriding the Project_Path in aggregate projects.
8360 2011-08-04 Robert Dewar <dewar@adacore.com>
8362 * a-cofove.ads: Minor reformatting.
8364 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
8366 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
8367 on the generated code.
8368 (Build_Finalize_Statements): Update the comment on the generated code.
8369 (Build_Initialize_Statements): Update the comment on the generated code.
8370 (Build_Object_Declarations): Add local variable Result. The object
8371 declarations are now built in sequence.
8372 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
8375 2011-08-04 Robert Dewar <dewar@adacore.com>
8377 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
8379 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
8381 * einfo.ads (Elaboration_Entity): Document new definition and use.
8382 (Elaboration_Entity_Required): Adjust to above change.
8383 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
8384 * exp_ch12.adb: And with and use for Snames.
8385 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
8386 * exp_util.adb (Set_Elaboration_Flag): Likewise.
8387 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
8388 <Check_Unit_Name>: Deal with N_Expanded_Name.
8389 <Attribute_Elaborated>: Extend to all unit names.
8390 * sem_elab.adb: And with and use for Uintp.
8391 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
8392 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
8393 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
8394 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
8395 from Gen_Adainit_Ada.
8396 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
8397 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
8398 case, do not call System.Standard_Library.Adafinal; instead call
8399 finalize_library if needed.
8400 (Gen_Adafinal_C): Likewise.
8401 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8402 non-main program case.
8403 (Gen_Adainit_C): Generate a couple of external declarations here.
8404 In the main program case, set SSL.Finalize_Library_Objects.
8405 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8406 (Gen_Elab_Calls_C): Likewise.
8407 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
8408 (Gen_Finalize_Library_C): Likewise. Generate a full function.
8409 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8411 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8412 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
8414 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8415 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
8416 of external declarations. Call Gen_Finalize_Library_C.
8418 2011-08-04 Emmanuel Briot <briot@adacore.com>
8420 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8421 Compute_Compilation_Phases): new subprogram.
8422 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8423 The number of mains as well as the various compilation phases that
8424 need to be run are now project tree specific, since various
8425 aggregated trees might have different requirements. In particular,
8426 they do not all require bind or link phases.
8428 2011-08-04 Emmanuel Briot <briot@adacore.com>
8430 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8431 (Project_Tree_Appdata): New type.
8432 It is now possible to associate application-specific data to a project
8433 tree. In particular, this is used in the gprbuild builder to avoid a
8434 number of global tables and htables, especially now that there can be
8435 several project trees loaded at once because of aggregate projects.
8436 (Debug_Name): new procedure.
8437 * projects.texi: Clarify syntax of "**" for Source_Dirs
8439 2011-08-03 Emmanuel Briot <briot@adacore.com>
8441 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8442 the "roots" for a main.
8443 (Fill_From_Project): add support for aggregate projects. Main units
8444 in aggregated projects are now automatically added in the list of
8445 files to build (although this fails later on in gprbuild, because
8446 these files are not using the root proejct tree, so this needs
8448 * gcc-interface/Make-lang.in: Update dependencies.
8450 2011-08-03 Yannick Moy <moy@adacore.com>
8452 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8453 conditional expression in ALFA.
8454 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8455 expressions as not in ALFA.
8457 2011-08-03 Robert Dewar <dewar@adacore.com>
8459 * a-cofove.adb: Minor reformatting.
8461 2011-08-03 Emmanuel Briot <briot@adacore.com>
8463 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8464 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8466 These packages are more logically placed in the Queue package, since
8467 they manipulate the queue. It is also likely that they can be adapted
8468 for gnatmake, thus sharing more code.
8469 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8470 that we could move the above.
8472 2011-08-03 Emmanuel Briot <briot@adacore.com>
8474 * errutil.adb (Finalize): clean up the list of error messages on exit.
8475 Calling this subprogram multiple times will no longer show duplicate
8476 error messages on stderr.
8478 2011-08-03 Emmanuel Briot <briot@adacore.com>
8480 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8481 Getopt_Switches when we have already define a command line
8484 2011-08-03 Yannick Moy <moy@adacore.com>
8486 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8487 in ALFA. Instead, they are considered as assertions to prove.
8488 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8489 nodes as not in ALFA. Instead, include conditional expressions in ALFA
8490 if they have no ELSE part, or if they occur in pre- and postconditions,
8491 where the Condition cannot have side-effects in ALFA
8492 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8493 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8494 Instead, include type conversion between scalar types in ALFA.
8495 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8496 if-and-only-if its type is in ALFA.
8498 2011-08-03 Thomas Quinot <quinot@adacore.com>
8500 * scos.adb, get_scos.adb, put_scos.adb
8501 New code letter for decisions: G (entry guard)
8503 (Traverse_Subprogram_Body): Rename to...
8504 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8505 (Traverse_Protected_Body): New subprogram
8506 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8507 protected bodies and entry bodies.
8509 2011-08-03 Yannick Moy <moy@adacore.com>
8511 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8512 entities with get/set subprograms, which is set on procedure entities
8513 generated by the compiler for a postcondition.
8514 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8515 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8516 entity for a declaration
8517 (Get_Unique_Entity_For_Decl): new function returning an entity which
8518 represents a declaration, so that matching spec and body have the same
8521 2011-08-03 Robert Dewar <dewar@adacore.com>
8523 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8524 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8526 2011-08-03 Yannick Moy <moy@adacore.com>
8528 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8529 library-level because retriction No_Implicit_Dynamic_Code in the
8530 front-end prevents its definition as a local subprogram
8531 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8532 for reuse in other contexts
8533 (Traverse_Declarations_Or_Statements,
8534 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8535 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8536 procedures take a callback parameter to be called on all declarations
8538 (Traverse_All_Compilation_Units): new generic function to traverse a
8539 compilation unit and call a callback parameter on all declarations
8541 2011-08-03 Javier Miranda <miranda@adacore.com>
8543 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8544 in Java since they are always enclosed in a namespace that
8545 differentiates them, and overloaded entities are supported by the VM.
8547 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8549 * checks.adb (Determine_Range): If a computed bound of an operation is
8550 outside the range of the base type of the expression, and overflow
8551 checks are enabled, the result is unknown and cannot be used for any
8552 subsequent constant folding.
8553 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8554 unknown, so is the result of the comparison.
8556 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8558 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8559 From_Abort. When finalization was triggered by an abort, propagate
8560 Standard'Abort_Signal rather than Program_Error.
8561 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8563 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8564 From_Abort. When finalization was triggered by an abort, propagate
8565 Standard'Abort_Signal rather than Program_Error.
8566 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8568 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8569 Abort_Id. Update the calls to Build_Object_Declarations and
8570 Build_Raise_Statement to include Abort_Id.
8571 (Build_Adjust_Statements): New local variable Abort_Id. Update the
8572 calls to Build_Object_Declarations and Build_Raise_Statement to include
8574 (Build_Finalize_Statements): New local variable Abort_Id. Update the
8575 calls to Build_Object_Declarations and Build_Raise_Statement to include
8577 (Build_Components): Create an entity for Abort_Id when exceptions are
8578 allowed on the target.
8579 (Build_Finalizer): New local variable Abort_Id.
8580 (Build_Initialize_Statements): New local variable Abort_Id. Update the
8581 calls to Build_Object_Declarations and Build_Raise_Statement to include
8583 (Build_Object_Declarations): Add new formal Abort_Id. Create the
8584 declaration of flag Abort_Id to preserve the original abort status
8585 before finalization code is executed.
8586 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8587 runtime routine Raise_From_Controlled_Operation.
8588 (Create_Finalizer): Update the call to Build_Raise_Statement to include
8589 Abort_Id. Update the call to Build_Object_Declarations to include
8590 Abort_Id. Update the layout of the finalizer body.
8591 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8592 (Process_Transient_Objects): New local variable Abort_Id. Remove the
8593 clunky code to create all flags and objects related to
8594 exception propagation and replace it with a call to
8595 Build_Object_Declarations. Update the call to Build_Raise_Statement to
8597 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8598 Add new formal Abort_Id and associated comment on its use.
8599 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8601 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8602 Remove the clunky code to create all flags and objects related to
8603 exception propagation and replace it with a call to
8604 Build_Object_Declarations. Update the call to Build_Raise_Statement.
8606 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8608 * s-tassta.adb: Fix minor typos.
8610 2011-08-03 Robert Dewar <dewar@adacore.com>
8612 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8613 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8615 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8617 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8618 to packages. This ensures that the finalizer body will not end up
8619 inside the freeze node.
8620 (Process_Declarations): Add code to detect whether a freeze node has a
8621 nested finalization collection.
8623 2011-08-03 Pascal Obry <obry@adacore.com>
8625 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8626 (Current_Session): Return a not null access to Session_Type.
8627 (Default_Session): Likewise.
8629 2011-08-03 Robert Dewar <dewar@adacore.com>
8631 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8632 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8634 2011-08-03 Pascal Obry <obry@adacore.com>
8636 * g-awk.ads: Minor comment fix.
8638 2011-08-03 Sergey Rybin <rybin@adacore.com>
8640 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8641 the tree structure related to discriminant constraints.
8642 Original_Discriminant cannot be used any more for computing the
8643 defining name for the reference to a discriminant.
8645 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8647 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8648 function is not visibly tagged, this is not a dispatching call and
8649 therfore is not Tag_Indeterminate, even if the function is marked as
8650 dispatching on result.
8652 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8654 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8655 (Expand_N_Free_Statement): Add a guard to protect against run-times
8656 which do not support controlled types.
8657 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8658 against run-times which do not support controlled types.
8659 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8660 against run-times which do not support controlled types.
8661 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8662 against run-times which do not support controlled types.
8663 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8664 protect against run-times which do not support controlled types.
8666 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8668 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8669 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8671 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8673 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8674 modified in the source, to prevent spurious warnings when compiling
8677 2011-08-03 Thomas Quinot <quinot@adacore.com>
8679 * a-except-2005.adb: Minor reformatting.
8681 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8683 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8684 is a renaming declaration in the private part of a package, do not emit
8685 a warning that the with_clause could be moved because the renaming may
8686 be used in the body or in a child unit.
8688 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8690 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8691 Propagate the Comes_From_Source attribute from the original return
8692 object to the renaming.
8694 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8696 * exp_ch7.adb (Build_Raise_Statement): Do not call
8697 Raise_From_Controlled_Operation when this routine is not present in
8698 the run-time library.
8699 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8700 libraries (Ravenscar), tasks are non-terminating, and protected objects
8701 and tasks can only appear at library level, so we do not want
8702 finalization of protected objects nor tasks.
8703 * exp_intr.adb: Minor clarification in comment.
8704 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8705 Gen_Output_File_C): Remove references to finalization of library-level
8706 objects when using restricted run-time libraries.
8708 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8710 * sem_ch3.adb (Build_Discriminant_Constraints): Set
8711 Original_Discriminant only if the parent type is a generic formal.
8713 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8715 * exp_ch13.adb: Add with and use clause for Targparm;
8716 (Expand_N_Free_Statement): Prevent the generation of a custom
8717 Deallocate on .NET/JVM targets since this requires pools and address
8719 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8720 .NET/JVM targets, attach the newly allocated object to the access
8721 type's finalization collection. Do not generate a call to
8722 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8723 exist in the runtime.
8724 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8725 create a custom Allocate for object that do not require initialization.
8726 Attach a newly allocated object to the access type's finalization
8727 collection on .NET/JVM.
8728 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8729 assignment of controlled types on .NET/JVM. The two hidden pointers
8730 Prev and Next and stored and later restored after the assignment takes
8732 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8733 kludge for .NET/JVM to recognize a particular piece of code coming from
8734 Heap_Management and change the call to Finalize into Deep_Finalize.
8735 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8736 finalization collections on .NET/JVM only for types derived from
8737 Controlled. Separate the association of storage pools with a collection
8738 and only allow it on non-.NET/JVM targets.
8739 (Make_Attach_Call): New routine.
8740 (Make_Detach_Call): New routine.
8741 (Process_Object_Declarations): Suppress the generation of
8742 build-in-place return object clean up code on .NET/JVM since it uses
8744 * exp_ch7.ads (Make_Attach_Call): New routine.
8745 (Make_Detach_Call): New routine.
8746 * exp_intr.adb Add with and use clause for Targparm.
8747 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8748 on .NET/JVM targets.
8749 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8750 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8751 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8752 names used in finalization.
8754 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8756 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8757 (Attach, Detach): Lock the current task when chaining an object onto a
8760 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8762 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8763 Rewritten to create the message strings when the exception is not
8764 raised by an abort during finalization.
8765 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8766 Raise_From_Controlled_Operation and update its associated comment.
8767 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8768 Ada.Finalization.Heap_Management provides key functionality
8769 associated with controlled objects on the heap, their creation,
8770 finalization and reclamation. Type Finalization_Collection is
8771 effectively a wrapper which sits ontop of a storage pool and performs
8772 all necessary bookkeeping for all the objects it contains. Each
8773 access-to-controlled or access-to-class-wide type receives a collection
8774 as part of its expansion. The compiler generates buffer code and
8775 invokes Allocate / Deallocate to create and destroy allocated
8777 * a-finali.adb ("="): Removed.
8778 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8779 fields Prev and Next.
8780 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8781 A library unit with at least one controlled object on the library level
8782 has a special finalizer which is invoked by the binder. To signal this,
8783 ali files carry field PF.
8784 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8785 associated comment on field usage.
8786 * a-tags.adb (Get_RC_Offset): Removed.
8787 (Needs_Finalization): New routine.
8788 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8789 Dispatch tables now carry field Needs_Finalization which provides
8790 runtime indication whether a type is controlled or has controlled
8791 components or both. Remove field RC_Offset.
8792 (Get_RC_Offset): Removed along with its associated pragma Export.
8793 Since tagged types with controlled components no longer carry hidden
8794 field _controller, the special mechanism to retrieve its location is no
8796 (Needs_Finalization): New routine.
8797 * atree.ads, atree.adb (Elist24): New routine.
8798 (Set_Elist24): New routine.
8799 * atree.h: Add a define clause for Elist24.
8800 * bindgen.adb New library-level variable Lib_Final_Built.
8801 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8802 presence of a VM target, the routine generates calls to the proper
8803 library finalization routine.
8804 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8805 targets. Set the correct library finalization routine depending on
8806 whether the library has controlled objects or this is a VM compilation.
8807 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8808 to library-level finalizers of compiled units in reverse order of
8809 elaboration. It also produces exception management code and reraises a
8810 potential exception after all units have been finalized.
8811 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8812 library-level finalizers of compiled units in reverse order of
8814 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8815 definitions of all library-level finalizers available to the compilation
8816 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8818 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8819 System.Standard_Library.Adafinal directly. If the library needs
8820 finalization actions, create the sequence of finalization calls.
8821 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8822 Generate a with clause for System.Soft_Links when compiling for a VM.
8823 Remove the code which imports System.Standard_Library.Adafinal as
8824 Do_Finalize. Generate the library finalization routine.
8825 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8826 If the library needs finalization actions, create all the definitions
8827 of library- level finalizers.
8828 (Has_Finalizer): New routine. Determines whether at least one compiled
8829 unit has a library-level finalizer.
8830 Add type Qualification_Mode.
8831 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8832 * einfo.adb: New usage of field 15 as Return_Flag.
8833 Remove Finalization_Chain_Entity from the usages of field 19.
8834 Remove Associated_Final_Chain from the usages of field 23.
8835 New usage of field 23 as Associated_Collection.
8836 New usage of field 24 as Finalizer.
8837 New usage of flag 252 as Is_Processed_Transient.
8838 (Associated_Final_Chain): Removed.
8839 (Associated_Collection): New routine.
8840 (Finalization_Chain_Entity): Removed.
8841 (Finalizer): New routine.
8842 (Is_Finalizer): New routine.
8843 (Is_Processed_Transient): New routine.
8844 (Return_Flag): New routine.
8845 (Set_Associated_Final_Chain): Removed.
8846 (Set_Associated_Collection): New routine.
8847 (Set_Finalization_Chain_Entity): Removed.
8848 (Set_Finalizer): New routine.
8849 (Set_Is_Processed_Transient): New routine.
8850 (Set_Return_Flag): New routine.
8851 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8853 (Write_Field8_Name): Alphabetize the output.
8854 (Write_Field11_Name): Alphabetize the output.
8855 (Write_Field12_Name): Alphabetize the output.
8856 (Write_Field13_Name): Alphabetize the output.
8857 (Write_Field14_Name): Alphabetize the output.
8858 (Write_Field15_Name): Alphabetize the output.
8859 (Write_Field16_Name): Alphabetize the output.
8860 (Write_Field17_Name): Alphabetize the output.
8861 (Write_Field18_Name): Alphabetize the output.
8862 (Write_Field19_Name): Alphabetize the output. Remove the output of
8863 Finalization_Chain_Entity.
8864 (Write_Field20_Name): Alphabetize the output.
8865 (Write_Field21_Name): Alphabetize the output.
8866 (Write_Field22_Name): Alphabetize the output.
8867 (Write_Field23_Name): Alphabetize the output. Remove the output of
8868 Associated_Final_Chain. Add output for Associated_Collection.
8869 (Write_Field24_Name): Alphabetize the output.
8870 (Write_Field25_Name): Add output for Finalizer.
8871 (Write_Field26_Name): Alphabetize the output.
8872 (Write_Field27_Name): Alphabetize the output.
8873 (Write_Field28_Name): Alphabetize the output.
8874 * einfo.ads: Add new field description for Associated_Collection and
8876 Remove Associated_Final_Chain and its uses in nodes.
8877 Remove Finalization_Chain_Entity and its uses in nodes.
8878 Add new field description for Finalizer and its uses in nodes.
8879 Add new synthesized attribute Is_Finalizer.
8880 Add new flag description for Is_Processed_Transient and its uses in
8882 Add new field description for Return_Flag and its uses in nodes.
8883 (Associated_Final_Chain): Removed along with its pragma Inline.
8884 (Associated_Collection): New routine and pragma Inline.
8885 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8886 (Finalizer): New routine and pragma Inline.
8887 (Is_Finalizer): New routine and pragma Inline.
8888 (Is_Processed_Transient): New routine and pragma Inline.
8889 (Return_Flag): New routine and pragma Inline.
8890 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8891 (Set_Associated_Collection): New routine and pragma Inline.
8892 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8893 (Set_Finalizer): New routine and pragma Inline.
8894 (Set_Is_Processed_Transient): New routine and pragma Inline.
8895 (Set_Return_Flag): New routine and pragma Inline.
8896 * exp_aggr.adb: Alphabetize subprograms.
8897 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8898 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8899 associated comments. Remove local variables External_Final_List and
8901 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8902 Ancestor. Remove the retrieval of finalization lists. Update the call to
8904 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8905 lists. Update the call to Late_Expansion.
8906 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8907 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8908 (Gen_Assign): Remove the retrieval of the finalization list used to
8909 build the assignment. Update the calls to Make_Init_Call and
8911 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8912 Remove the mechanism to determine attachment levels and finalization
8913 list retrieval. Remove the processing for coextensions.
8914 (Init_Controller): Removed. Controllers no longer exist.
8915 (Late_Expansion): Remove formals Flist and Obj along with their
8916 associated comments. Update the calls to Build_Record_Aggr_Code and
8917 Build_Array_Aggr_Code.
8918 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8919 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8920 appear in entry bodies, protected subprograms and task bodies.
8921 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8922 * exp_ch3.adb (Add_Final_Chain): Removed.
8923 (Build_Array_Init_Proc): Alphabetize local variables.
8924 (Build_Assignment): Alphabetize local variables. Update the call to
8926 (Build_Class_Wide_Master): Rename local variables to better reflect
8928 (Build_Discriminant_Assignments): Code reformatting.
8929 (Build_Init_Call_Thru): Code reformatting.
8930 (Build_Init_Procedure): Code reformatting. Generate a special version
8931 of Deep_Finalize which is capable of finalizing all initialized
8932 components and ignore the rest.
8933 (Build_Init_Statements): Rename local variables to better reflect their
8935 Reimplement the mechanism to include the creation and update of an index
8936 variable called a "counter". It is used as a bookmark for tracing
8937 initialized and non-initialized components.
8938 (Build_Initialization_Call): Remove local variable Controller_Typ.
8939 Alphabetize all local variables. Remove the initialization of the
8940 record controller and update the call to Make_Init_Call.
8941 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8942 New local variable Counter.
8943 (Constrain_Array): Alphabetize.
8944 (Expand_Freeze_Array_Type): Create a collection instead of a
8946 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8947 Finalize_Address which is used in conjunction with allocated controlled
8949 (Expand_N_Object_Declaration): Remove the creation of a finalization
8950 list for anonymous access types. Update the calls to Make_Init_Call and
8952 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8953 retrieval of finalization lists. Remove the expansion of the record
8954 controller. Create TSS primitive Finalize_Address used in conjunction
8955 with controlled objects on the heap. Create finalization collections
8956 for access-to-controlled record components.
8957 (Expand_Record_Controller): Removed.
8958 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8959 class-wide types now requires additional processing. Create
8960 finalization collections for access-to-controlled types.
8961 (Increment_Counter): New routine.
8962 (Make_Counter): New routine.
8963 (Make_Eq_If): Remove the mention of Name_uController.
8964 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8965 types coming from System.Finalization_Root.
8966 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8967 (Predefined_Primitive_Bodies): There is no longer need to skip types
8968 coming from System.Finalization_Root.
8969 (Stream_Operation_OK): Do not generate stream routines for
8970 type Ada.Finalization.Heap_Management.Finalization_Collection.
8971 * exp_ch3.ads: Alphabetize subprograms.
8972 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8973 Add with and use clause for Lib.
8974 (Complete_Coextension_Finalization): Removed.
8975 (Complete_Controlled_Allocation): New routine. Create a finalization
8976 collection for anonymous access-to-controlled types. Create a custom
8977 Allocate which interfaces with the back end and the machinery in
8979 (Expand_Allocator_Expression): Add necessary calls to
8980 Complete_Controlled_Allocation. Remove the retrieval of finalization
8981 lists. Update the calls to Make_Adjust_Call. Generate a call to
8982 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8983 the associated collection.
8984 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8985 Code clean up. Remove the retrieval of finalization lists and
8987 Update the call to Make_Init_Call. Generate a call to
8988 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8989 the associated collection.
8990 (Get_Allocator_Final_List): Removed. Finalization lists are not
8992 (Suitable_Element): Remove the mention of Name_uController.
8993 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8994 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8995 the left hand side, carry out the assignment and adjust the left hand
8997 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8998 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8999 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
9000 BIP_Collection and BIPcollection.
9001 (Build_Heap_Allocator): New routine used to allocate the return object
9002 of a build-in-place function onto a collection.
9003 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
9004 (Expand_Call): Do not replace direct calls to Deep routines with their
9006 (Expand_N_Extended_Return_Statement): Give all variables shorter names
9007 and update their occurrences. Add a special return flag to monitor the
9008 [ab]normal execution of the function. The flag is set right before the
9010 Rewrite the mechanism used to allocate a build-in-place return object
9011 on the heap or on a storage pool.
9012 (Is_Direct_Deep_Call): New routine.
9013 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
9014 build-in-place function call instead of a final list. Build a call to
9015 Set_Finalize_Address_Ptr to decorate the associated collection.
9016 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
9017 order to name the build-in-place function call's result for later
9018 finalization. Add a collection to a build-in-place function call
9019 instead of a final list.
9020 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
9021 build-in-place function call instead of a final list. Remove the code
9022 which moves one final list and transforms it into the actual in a
9023 nested build-in-place call.
9024 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
9025 build-in-place function call instead of a final list.
9026 (Move_Final_List): Removed.
9027 (Needs_BIP_Collection): New routine.
9028 (Needs_BIP_Final_List): Removed.
9029 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
9030 enumeration type BIP_Formal_Kind.
9031 Update the related comment.
9032 (Needs_BIP_Collection): New routine.
9033 (Needs_BIP_Final_List): Removed.
9034 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
9035 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
9036 majority of subprograms in this unit. Add Name_Finalize_Address to
9037 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
9038 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
9039 statements for an array type.
9040 (Build_Adjust_Statements): Create the adjust statements for a record
9042 (Build_Cleanup_Statements): New routine. A procedure which given any
9043 construct containing asynchronous calls, references to _master, or is a
9044 task body, a task allocation or a protected body produces the necessary
9045 runtime calls to clean up these constructs.
9046 (Build_Exception_Handler): New routine.
9047 (Build_Final_List): Removed.
9048 (Build_Finalization_Collection): New routine. A core procedure which
9049 creates a collection to service heap allocated controlled objects
9050 associated with an access-to-controlled type.
9051 (Build_Finalize_Statements): Create the finalization statements for a
9053 (Build_Finalizer): New routine. A core procedure which given any
9054 construct with declarations and/or statements detects all objects which
9055 need any type of clean up (controlled objects, protected objects) and
9056 generates all necessary code to clean up the said objects in the proper
9058 (Build_Finalizer_Call): New routine.
9059 (Build_Initialize_Statements): Create the initialization statements for
9060 an array type. The generated routine contains code to finalize partially
9062 (Build_Object_Declarations): New routine.
9063 (Build_Raise_Statement): New routine.
9064 (Clean_Simple_Protected_Objects): Removed.
9065 (Controller_Component): Removed.
9066 (Enclosing_Function): New routine.
9067 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
9068 either declarations or statements or both.
9069 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
9070 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
9072 (Find_Final_List): Removed.
9073 (Global_Flist_Ref): Removed.
9074 (In_Finalization_Root): Removed.
9075 (Insert_Actions_In_Scope_Around): Determine the range of the transient
9076 scope in terms of tree nodes. Process all transient variables within
9078 (Make_Adjust_Call): Rewritten. There is no longer an attach call
9079 generated after the adjust.
9080 (Make_Attach_Call): Removed.
9081 (Make_Call): New routine.
9082 (Make_Clean): Removed.
9083 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
9085 (Make_Deep_Proc): Rewritten to generate the new profile signature used
9087 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
9089 (Make_Final_Call): Modified to simply create a call to either
9090 Deep_Finalize or Finalize.
9091 (Make_Finalize_Address_Body): New routine.
9092 (Make_Finalize_Address_Stmts): New routine. A function which produces
9093 TSS primitive Finalize_Address used in conjunction with heap allocated
9095 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
9096 (Make_Init_Call): Rewritten. There is no longer an attach call
9097 generated after initialization.
9098 (Make_Local_Deep_Finalize): New routine.
9099 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9100 (Make_Transient_Block): Remove the finalization list retrieval and
9102 (Needs_Finalization): Moved to Exp_Util.
9103 (Parent_Field_Type): New routine.
9104 (Preprocess_Components): New routine.
9105 (Process_Transient_Objects): New routine.
9106 (Wrap_HSS_In_Block): New routine.
9107 (Wrap_Transient_Declaration): Remove finalization list management and
9108 controller insertion.
9109 (Wrap_Transient_Expression): Code reformatting.
9110 (Wrap_Transient_Statement): Code reformatting.
9111 * exp_ch7.ads (Build_Final_List): Removed.
9112 (Build_Finalization_Collection): New routine.
9113 (Build_Raise_Statement): New routine.
9114 (Controller_Component): Removed.
9115 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
9116 (Find_Final_List): Removed.
9117 (In_Finalization_Root): Removed.
9118 (Is_Simple_Protected_Type): Update related comment.
9119 (Make_Adjust_Call): New parameter profile and associated comments.
9120 (Make_Attach_Call): Removed.
9121 (Make_Final_Call): New parameter profile and associated comments.
9122 (Make_Finalize_Address_Body): New routine.
9123 (Make_Init_Call): New parameter profile and associated comments.
9124 (Make_Local_Deep_Finalize): New routine.
9125 (Make_Set_Finalize_Address_Ptr_Call): New routine.
9126 (Needs_Finalization): Moved to Exp_Util.
9127 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
9128 (Expand_N_Protected_Body): Remove the handling of finalization lists.
9129 (Find_Protection_Type): Moved to Exp_Util.
9130 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
9131 (Make_DT): Update sequence of dispatch table initialization. Remove the
9132 initialization of field RC_Offset. Add initialization of field Needs_
9134 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
9135 Reimplement how an object is first finalized, then deallocated.
9136 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
9138 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
9139 Register TSS_Finalize_Address with type TSS_Names.
9140 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
9141 procedure provides the interface between an allocation / deallocation
9142 and the support machinery in Ada.Finalization.Heap_Management.
9143 (Find_Init_Call): Code reformatting.
9144 (Find_Init_Call_In_List): Code reformatting.
9145 (Find_Protection_Type): Moved from Exp_Ch9.
9146 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
9147 (Has_Controlled_Coextensions): Removed.
9148 (Has_Controlled_Objects): New routine.
9149 (In_Library_Level_Package_Body): New routine.
9150 (Insert_Action_After): New routine.
9151 (Is_Finalizable_Transient): New routine. This predicate determines
9152 whether an object declaration is one of the many variants of controlled
9154 (Is_Null_Access_BIP_Func_Call): New routine.
9155 (Is_Non_BIP_Func_Call): New routine.
9156 (Is_Related_To_Func_Return): New routine.
9157 (Needs_Finalization): Moved from Exp_Ch7.
9158 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
9159 (Find_Protection_Type): Moved from Exp_Ch9.
9160 (Has_Controlled_Coextensions): Removed.
9161 (Has_Controlled_Objects): New routine.
9162 (In_Library_Level_Package_Body): New routine.
9163 (Insert_Action_After): New routine.
9164 (Is_Finalizable_Transient): New routine.
9165 (Is_Null_Access_BIP_Func_Call): New routine.
9166 (Is_Non_BIP_Func_Call): New routine.
9167 (Is_Related_To_Func_Return): New routine.
9168 (Needs_Finalization): Moved from Exp_ch7.
9169 * expander.adb (Expand): Add a case for N_Free_Statement.
9170 * freeze.adb (Freeze_All): Replace the generation of a finalization
9171 list with a collection for access-to-controlled types.
9172 (Freeze_Entity): Code reformatting.
9173 (Freeze_Record_Type): Remove the freezing of a record controller
9175 (Freeze_Subprogram): Code reformatting.
9176 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
9178 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
9179 has a library-level finalizer.
9180 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
9181 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
9182 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
9183 files. Add a-fihema to the list of object files.
9185 Alphabetize the associations in type Is_Parameterless_Attribute.
9186 * rtsfind.ads: Ada.Finalization_List.Controller and
9187 System.Finalization_Implementation are no longer a GNAT unit.
9188 Update the range of type Ada_Finalization_Child. Remove the following
9189 recoverable entities:
9191 RE_Attach_To_Final_List
9195 RE_Finalizable_Ptr_Ptr
9196 RE_Global_Final_List
9197 RE_Limited_Record_Controller
9200 RE_Record_Controller
9201 RE_Simple_List_Controller
9203 Add the following recoverable entities:
9205 RE_Add_Offset_To_Address
9209 RE_Exception_Identity
9210 RE_Finalization_Collection
9211 RE_Finalization_Collection_Ptr
9212 RE_Needs_Finalization
9213 RE_Save_Library_Occurrence
9214 RE_Set_Finalize_Address_Ptr
9215 RE_Set_Storage_Pool_Ptr
9217 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
9219 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
9220 (First_Stored_Discriminant): Remove the mention of Name_uController.
9221 * sem_aux.ads: Comment reformatting.
9222 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
9223 to redecorate an already existing class-wide type.
9224 (Decorate_Tagged_Type): New parameter profile and associated comment.
9225 Create a "shadow class-wide type" for a shadow entity.
9226 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
9227 of the final chain along with the associated comment.
9228 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
9229 Full_Desig and set it to the full view of the designated type.
9230 Initialize the finalization collection to empty.
9231 (Build_Derived_Record_Type): Alphabetize local variables. Code
9233 (Collect_Fixed_Components): Remove the mention of Name_uController.
9234 (Create_Constrained_Components): Remove the mention of Name_uController.
9235 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
9236 class-wide type of a shadow entity.
9237 (Process_Full_View): Update the machinery which marks type
9238 Limited_Controlled's entity as limited.
9239 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
9240 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
9241 list, instead make a collection build-in-place formal.
9242 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
9243 a designated type in order to establish a match between the renaming
9244 and the renamed entity.
9245 (Find_Selected_Component): Add guard to prevent spurious exceptions
9246 from being raised on .NET/JVM.
9247 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
9248 to the list of primitive that need special processing. Update arrays
9249 C_Names and D_Names.
9250 (Replace_Types): Handle class-wide types.
9251 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
9252 different parameter profile, look at the first formal.
9253 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
9254 use clauses for Exp_Util.
9255 * sem_res.adb: Remove with and use clauses for Elists.
9256 (Propagate_Coextensions): Removed.
9257 (Resolve_Allocator): Do not propagate the list of coextensions from one
9258 allocator to another.
9259 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
9260 Deaccessed_T to Desig_Typ.
9261 (Enter_Name): Remove the mention of Name_uController.
9262 (Gather_Components): Remove the mention of Name_uController.
9263 (Incomplete_Or_Private_View): New routine.
9264 (Is_Coextension_Root): Removed.
9265 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
9266 * sem_util.ads (Incomplete_Or_Private_View): New routine.
9267 (Is_Coextension_Root): Removed.
9268 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
9269 Controlled types are now derived from a null tagged record. Remove
9270 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
9271 * sinfo.adb (Coextensions): Removed.
9272 (Set_Coextensions): Removed.
9273 * sinfo.ads: Remove Coextensions from the explanation of node fields
9274 and its uses in nodes.
9275 Update the field usage of N_Allocator.
9276 (Coextensions): Removed along with its pragma Inline.
9277 (Set_Coextensions): Removed along with its pragma Inline.
9278 * snames.ads-tmpl: Remove names
9283 Name_uLocal_Final_List
9284 Name_Finalization_Root
9291 Name_Finalize_Address
9292 * s-pooglo.adb (Allocate): Add overriding indicator.
9293 (Deallocate): Add overriding indicator.
9294 (Storage_Size): Add overriding indicator.
9295 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
9296 than Finalize_Global_List.
9297 (Null_Finalize_Global_List): Removed.
9298 (Save_Library_Occurrence): New routine.
9299 * s-soflin.ads: Remove variable Finalize_Global_List along with its
9300 initialization. Add variable Finalize_Library_Objects along with its
9301 pragma Export. Add variables Library_Exception and
9302 Library_Exception_Set along with their pragma Export.
9303 (Null_Finalize_Global_List): Removed.
9304 (Save_Library_Occurrence): New routine.
9305 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
9306 rather than Finalize_Global_List.
9307 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
9308 of the constructed node.
9310 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9312 * link.c: Include "auto-host.h" before system headers.
9314 2011-08-03 Vincent Celier <celier@adacore.com>
9316 * make.adb (Gnatmake): Add to table Library_Projs only library projects
9317 that are not extended. Do not check if a library project that is
9318 extended should be regenerated. Do not add to table Library_Paths the
9319 libraries that are in extended projects. Link only with libraries that
9320 are in libray projects that are not extended.
9321 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
9322 for a library project that is extended.
9324 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9326 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
9327 conforming subprogram renamings that appear to be completions if they
9328 are not fully conformant.
9329 Such renamings are homographs but not completions.
9330 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
9331 names in a subprogram renaming that appears in an instance.
9333 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9335 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
9336 not immutably limited, build actual subtype from expression to provide
9337 proper bounds to caller.
9339 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9341 * sem_ch8.adb: Minor comment correction.
9343 2011-08-03 Thomas Quinot <quinot@adacore.com>
9345 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
9346 returning a limited array, use an extended return statement.
9348 2011-08-03 Vincent Celier <celier@adacore.com>
9350 * make.adb (Initialize): If --subdirs= is used, but no project file is
9351 specified, attempt to create the specify subdir if it does not already
9352 exist and use it as the object directory as if -D had been specified.
9354 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9356 * s-tpopsp-vms.adb: New file.
9357 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
9358 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
9360 2011-08-03 Emmanuel Briot <briot@adacore.com>
9362 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
9365 2011-08-03 Yannick Moy <moy@adacore.com>
9367 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
9368 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
9369 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
9370 detect that an array has static bounds.
9372 2011-08-03 Thomas Quinot <quinot@adacore.com>
9374 * exp_dist.adb: Minor reformatting.
9376 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9378 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
9379 (ATCB_Key): Removed, not always used.
9381 2011-08-03 Emmanuel Briot <briot@adacore.com>
9383 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
9384 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
9385 most remaining global variables.
9387 2011-08-03 Robert Dewar <dewar@adacore.com>
9389 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
9390 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
9393 2011-08-03 Javier Miranda <miranda@adacore.com>
9395 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
9396 that must be passed by copy in VM targets.
9398 2011-08-03 Emmanuel Briot <briot@adacore.com>
9400 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9401 duplicates a similar htable now in the project tree.
9403 2011-08-03 Claire Dross <dross@adacore.com>
9405 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9406 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9407 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9408 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9409 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9410 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9411 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9414 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9416 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9417 (ATCB_Key): Removed, not always used.
9418 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9420 * s-tpopsp-tls.adb: New file.
9421 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9422 x86/x64/ia64/powerpc/sparc Linux.
9424 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9426 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9427 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9429 2011-08-03 Thomas Quinot <quinot@adacore.com>
9431 * rtsfind.ads, exp_dist.adb, exp_dist.ads
9432 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9433 Fix type selection for mapping integer types to PolyORB types.
9435 2011-08-03 Bob Duff <duff@adacore.com>
9437 * sem_ch7.adb: Minor comment clarification.
9439 2011-08-03 Bob Duff <duff@adacore.com>
9441 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9442 an error analyzing a choice, skip further processing. Further
9443 processing could cause a crash or cascade errors.
9445 2011-08-03 Emmanuel Briot <briot@adacore.com>
9447 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9448 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9449 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9450 prj-env.ads (Shared_Project_Tree_Data): new type
9451 An aggregate project and its aggregated trees need to share the common
9452 data structures used for lists of strings, packages,... This makes the
9453 code simpler since otherwise we have to pass the root tree (also used
9454 for the configuration file data) in addition to the current project
9455 tree. This also avoids ambiguities as to which tree should be used.
9456 And finally this saves a bit of memory.
9457 (For_Every_Project_Imported): new parameter Tree.
9458 Since aggregated projects are using a different tree, we need to let
9459 the caller know which tree to use to manipulate the returned project.
9461 2011-08-03 Robert Dewar <dewar@adacore.com>
9463 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9464 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9465 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9466 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9468 2011-08-03 Javier Miranda <miranda@adacore.com>
9470 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9471 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9473 2011-08-03 Bob Duff <duff@adacore.com>
9475 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9478 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
9480 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9481 g-sehash.ads: Fix typo. Update header.
9483 2011-08-03 Thomas Quinot <quinot@adacore.com>
9485 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9488 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9490 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9491 prefixes of private types along with records, since the selector may be
9493 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9494 private types along with records, since the selector may be a
9497 2011-08-03 Emmanuel Briot <briot@adacore.com>
9499 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9501 2011-08-03 Javier Miranda <miranda@adacore.com>
9503 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9504 Tagged_Type_Expansion.
9506 2011-08-03 Yannick Moy <moy@adacore.com>
9508 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9509 violation when the argument of concatenation is the name of a
9512 2011-08-03 Emmanuel Briot <briot@adacore.com>
9514 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9515 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9516 (Process_Declarative_Items): new parameter Child_Env.
9518 2011-08-03 Yannick Moy <moy@adacore.com>
9520 * alfa.ads: Update format of ALFA section in ALI file in order to
9521 add a mapping from bodies to specs when both are present.
9522 (ALFA_Scope_Record): Add components for spec file/scope.
9523 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9525 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9526 collected, fill in the spec information when relevant.
9527 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9530 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9532 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9533 code unit to decide whether to add internally generated subprograms.
9535 2011-08-03 Javier Miranda <miranda@adacore.com>
9537 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9538 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9539 be handled by copy in VM targets.
9541 2011-08-03 Emmanuel Briot <briot@adacore.com>
9543 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9544 code with Makeutl.Get_Switches.
9545 * prj-tree.adb: Update comment.
9547 2011-08-03 Thomas Quinot <quinot@adacore.com>
9549 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9550 subprogram with a limited formal that does not support external
9553 2011-08-03 Yannick Moy <moy@adacore.com>
9555 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9557 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9558 not from current unit in two phases, because it is not possible to
9559 change the table while iterating over its content.
9560 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9562 2011-08-03 Sergey Rybin <rybin@adacore.com>
9564 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9565 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9567 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9569 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9570 and the component type is composite, this is ambiguous for predefined
9571 concatenation, but if the node is not overloaded and the entity is a use
9572 -defined function its profile can be used to resolve that aggregate.
9574 2011-08-03 Robert Dewar <dewar@adacore.com>
9576 * exp_ch4.adb: Minor code cleanup.
9578 2011-08-03 Thomas Quinot <quinot@adacore.com>
9580 * exp_dist.adb: Do not generate distribution stubs if serious errors
9581 have been diagnosed.
9583 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9585 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9586 the first formal of a primitive operation, go to the base type to
9587 handle properly an access to a derived type with constrained
9589 * sem_type.adb (Disambiguate): an immediately visible operator hides a
9590 user-defined function that is only use-visible.
9592 2011-08-03 Robert Dewar <dewar@adacore.com>
9594 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9595 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9596 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9597 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9598 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9599 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9600 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9601 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9603 2011-08-03 Robert Dewar <dewar@adacore.com>
9605 * repinfo.adb (List_Mechanism): Add handling of
9606 Convention_Ada_Pass_By_XXX.
9607 * sem_mech.adb (Set_Mechanism): Ditto.
9608 * sem_prag.adb (Process_Convention): Add entries for
9609 Convention_Ada_Pass_By_XXX.
9610 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9612 2011-08-03 Pascal Obry <obry@adacore.com>
9614 * makeutl.adb: Minor reformatting.
9616 2011-08-03 Vincent Celier <celier@adacore.com>
9619 (Get_File_Name) If the file cannot be found when there are no config
9620 pragmas file and May_Fail is True, return No_File instead of the file
9621 name, to be consistent.
9623 2011-08-03 Pascal Obry <obry@adacore.com>
9625 * adaint.c (__gnat_is_executable_file_attr): Avoid access
9628 2011-08-03 Javier Miranda <miranda@adacore.com>
9631 (Same_Representation): In VM targets the representation of arrays with
9632 aliased components differs from arrays with non-aliased components.
9634 2011-08-03 Emmanuel Briot <briot@adacore.com>
9636 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9637 not systematically lower case attribute indexes that contain no "."
9638 Fix definition of several Naming attributes, which take
9639 a unit name as index and therefore should be case insensitive.
9640 Minor refactoring (reduce length of variable names).
9642 2011-08-03 Emmanuel Briot <briot@adacore.com>
9644 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9646 2011-08-03 Emmanuel Briot <briot@adacore.com>
9648 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9649 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9650 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9651 prj-tree.ads (Prj.Tree.Environment): new type.
9653 2011-08-03 Emmanuel Briot <briot@adacore.com>
9655 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9656 prj-tree.adb, prj-tree.ads (Environment): new type.
9658 2011-08-03 Emmanuel Briot <briot@adacore.com>
9660 * prj-tree.ads: Remove unused variable.
9662 2011-08-03 Yannick Moy <moy@adacore.com>
9664 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9665 issuing messages related to SPARK restriction violation.
9667 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9669 * sem_ch6.adb: guard against error nodes in return statements.
9671 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9673 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9674 a warning can only appear on a configuration file, so emit warning
9675 without further checks.
9677 2011-08-03 Arnaud Charlet <charlet@adacore.com>
9679 * s-interr.ads: add overriding keyword.
9681 2011-08-03 Geert Bosch <bosch@adacore.com>
9683 * exp_attr.adb: Fix minor typo.
9685 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9687 * par-ch4.adb: improve error recovery.
9689 2011-08-03 Emmanuel Briot <briot@adacore.com>
9691 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9692 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9695 2011-08-03 Emmanuel Briot <briot@adacore.com>
9697 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9698 "external" as an attribute name in aggregate projects.
9700 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9702 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9703 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9704 from 0, so we need to adjust.
9706 2011-08-03 Emmanuel Briot <briot@adacore.com>
9708 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9709 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9711 2011-08-03 Yannick Moy <moy@adacore.com>
9713 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9714 restriction on overloaded entity if the entity is not an operator.
9716 2011-08-03 Yannick Moy <moy@adacore.com>
9718 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9719 restrict.ads: Rename remaining Check_Formal_Restriction* into
9720 Check_SPARK_Restriction*.
9722 2011-08-03 Emmanuel Briot <briot@adacore.com>
9724 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9725 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9727 (Project_Empty): removed
9728 (Empty_Project): new parameter Qualifier
9729 This is used to have fields specific to aggregate projects, cleaner
9730 New field to store the list of aggregated projects.
9731 (Check_Aggregate_Project): removed
9732 (Process_Aggregated_Projects, Free): new subprograms.
9734 2011-08-03 Olivier Hainque <hainque@adacore.com>
9736 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9738 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9740 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9741 explicit dereference of an unconstrained type, create a constrained
9742 subtype for it, as is done for function calls that return an
9745 2011-08-03 Thomas Quinot <quinot@adacore.com>
9747 * g-pehage.adb (Finalize): Avoid possible double-free.
9749 2011-08-03 Steve Baird <baird@adacore.com>
9751 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9752 Elab_Spec/Body attrs in CodePeer_Mode.
9754 2011-08-03 Javier Miranda <miranda@adacore.com>
9756 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9757 low bound is not known at compile time but they have no others choice.
9758 Done because in this case the bounds can be obtained directly from the
9761 2011-08-03 Ed Falis <falis@adacore.com>
9763 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9764 on VxWorks SMP. Remove unusable constant ANY_CPU.
9766 2011-08-03 Emmanuel Briot <briot@adacore.com>
9768 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9769 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9770 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9771 Prj.Env.Initialize_Empty): new subprograms
9772 (Get_Env, Find_Project): remove parameter Target_Name.
9774 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9776 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9777 as a condition for the delayed call to Derived_Subprograms done for the
9778 case of the rewriting of a derived type that constrains the
9779 discriminants of its parent type.
9780 Avoids redundant subprogram derivations for private subtype derivations.
9782 2011-08-03 Javier Miranda <miranda@adacore.com>
9784 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9785 Build_Record_Aggr_Code.
9786 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9787 discriminants in extension aggregates.
9789 2011-08-03 Emmanuel Briot <briot@adacore.com>
9791 * prj-pp.adb (Print): also output project qualifiers, since in
9792 particular "aggregate" is mandatory in an aggregate project.
9794 2011-08-03 Emmanuel Briot <briot@adacore.com>
9796 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9797 (Debug_Output): new function.
9799 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9801 * gnat_ugn.texi: Document -Wstack-usage.
9802 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9804 2011-08-03 Thomas Quinot <quinot@adacore.com>
9806 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9807 have keyword LIMITED.
9809 2011-08-03 Yannick Moy <moy@adacore.com>
9811 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9812 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9813 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9814 section (does not happen in compiler, only if code directly calls
9816 * get_alfa.adb, get_alfa.ads: New files.
9817 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9819 * lib-xref-alfa.adb: New file.
9820 * lib-xref.adb, lib-xref.ads
9821 (Xref_Entry): redefine information needed in cross-references for ALFA.
9822 Push ALFA treatments in separated local package.
9823 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9824 identifiers. Return entity of package body instead of spec. Return
9825 Empty for a scope with no location.
9826 (Generate_Reference): adapt to new components for ALFA information.
9827 Remove the need for D references on definitions.
9828 (Is_Local_Reference): moved to ALFA local package
9829 (Output_References): extract subfunction as Extract_Source_Name
9830 (Output_Local_References): remove procedure, replaced by filtering of
9831 cross-references in package ALFA and printing in Put_ALFA.
9832 (Write_Entity_Name): remove procedure
9833 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9834 print exact name of entity as it appears in source file
9835 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9836 * put_alfa.adb, put_alfa.ads: New files.
9837 * xref_lib.adb (Search_Xref): protect read of cross-references against
9838 reading other sections of the ALI file, in gnatxref
9839 (Search): protect read of cross-references against reading other
9840 sections of the ALI file, in gnatfind.
9841 * gcc-interface/Make-lang.in: Update dependencies.
9843 2011-08-03 Thomas Quinot <quinot@adacore.com>
9845 * sem_ch3.adb: Minor reformatting.
9847 2011-08-03 Jose Ruiz <ruiz@adacore.com>
9849 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9850 raising an exception.
9852 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9854 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9855 type, always use 1 as the lower bound or string, even if lower bound of
9856 context is not static, to handle properly null strings in a non-static
9859 2011-08-03 Bob Duff <duff@adacore.com>
9861 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9862 always legal on the right-hand side of an assignment statement; there
9863 is always an applicable index constraint in this case. Therefore, the
9864 check for Pkind = N_Assignment_Statement is now unconditional -- it
9865 doesn't depend on whether Is_Constrained (Typ).
9867 2011-08-03 Robert Dewar <dewar@adacore.com>
9869 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9871 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9873 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9874 for an itype created within a generic unit.
9876 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9878 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9879 suppresses all inlining.
9881 2011-08-03 Robert Dewar <dewar@adacore.com>
9883 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9884 exp_aggr.adb: Minor reformatting.
9886 2011-08-03 Thomas Quinot <quinot@adacore.com>
9888 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9889 tagged assignment when discriminant checks are suppressed. This is
9890 useless and extremely costly in terms of static stack usage.
9892 2011-08-03 Bob Duff <duff@adacore.com>
9894 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9895 of generics, because this leads to the wrong entity in the wrong scope,
9896 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9898 (Process_Interface_Name): Follow Alias for instances of generics, to
9899 correct for the above change.
9901 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9903 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9904 is an integer literal it is always safe to replace the reference. In
9905 addition, if the reference appears in the generated code for an object
9906 declaration it is necessary to copy because otherwise the reference
9907 might be to the uninitilized value of the discriminant of the object
9910 2011-08-03 Pascal Obry <obry@adacore.com>
9912 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9913 ACL used, in this case we want to check for ending .exe, not .exe
9914 anywhere in the path.
9916 2011-08-03 Sergey Rybin <rybin@adacore.com>
9918 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9919 the tree structure (semantic decoration of references to record
9922 2011-08-03 Gary Dismukes <dismukes@adacore.com>
9924 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9925 choices of a named array aggregate, bail out when any choices are
9926 marked as Errors_Posted.
9928 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9930 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9931 in which entity is frozen, to handle properly loop variables in
9934 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9936 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9937 subtype is not static, compute the upper bound using attributes, to
9938 handle properly index types that are not integer types.
9940 2011-08-03 Bob Duff <duff@adacore.com>
9942 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9943 Update copyright notice.
9945 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9947 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9948 Original_Discriminant if within an instance.
9949 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9951 2011-08-03 Thomas Quinot <quinot@adacore.com>
9953 * einfo.ads: Minor reformatting.
9955 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9957 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9958 composite type with an unfrozen subcomponent, in the profile of a
9959 primitive operation.
9961 2011-08-03 Robert Dewar <dewar@adacore.com>
9963 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9965 2011-08-03 Ed Schonberg <schonberg@adacore.com>
9967 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9968 unconstrained type with discriminants is initialized with an aggregate,
9969 use the constrained subtype of the aggregate as the type of the object,
9970 because it is immutable, and this allows the back-end to generate no
9971 code for the object declaration.
9973 2011-08-03 Robert Dewar <dewar@adacore.com>
9975 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9976 comparison operand is variable, and turns out to be zero or negative.
9978 2011-08-03 Javier Miranda <miranda@adacore.com>
9981 (Expand_Dispatching_Constructor_Call): Disable expansion of
9982 code required for native targets. Done to avoid generating
9983 references to unavailable runtime entities in VM targets.
9985 (Expand_N_Object_Declaration): Add missing support to handle
9986 the explicit initialization of class-wide interface objects.
9989 2011-08-03 Matthew Heaney <heaney@adacore.com>
9991 * a-cobove.adb (Merge): Move source onto target, instead of using
9994 2011-08-03 Matthew Heaney <heaney@adacore.com>
9996 * a-cbdlli.adb (Splice): Move source items from first to last.
9998 2011-08-03 Yannick Moy <moy@adacore.com>
10000 * sem_util.ads: Add comment.
10002 2011-08-03 Javier Miranda <miranda@adacore.com>
10005 (Expand_Record_Aggregate): In VM targets disable the expansion into
10006 assignments of aggregates whose type is not known at compile time.
10008 2011-08-03 Ed Schonberg <schonberg@adacore.com>
10010 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
10011 protected entries and task entries, to build the proper renaming
10012 declaration for entry formals, used in debugging.
10013 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
10014 parameters in the same way.
10016 2011-08-02 Robert Dewar <dewar@adacore.com>
10018 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
10019 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
10020 code reorganization.
10022 2011-08-02 Robert Dewar <dewar@adacore.com>
10024 * debug.adb: Debug flag d.P to suppress length comparison optimization
10025 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
10026 comparison of Length by comparing First/Last instead.
10028 2011-08-02 Matthew Heaney <heaney@adacore.com>
10030 * a-cobove.ads: Code clean up.
10032 2011-08-02 Vincent Celier <celier@adacore.com>
10034 * adaint.c (file_names_case_sensitive_cache): New static int.
10035 (__gnat_get_file_names_case_sensitive): Cache the return value in
10036 file_names_case_sensitive_cache at the first invocation, to avoid
10037 multiple calls to getenv.
10039 2011-08-02 Bob Duff <duff@adacore.com>
10041 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
10043 2011-08-02 Yannick Moy <moy@adacore.com>
10045 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
10046 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
10047 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
10048 indicate that we are in a precondition or postcondition. This is used in
10049 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
10050 decide whether to flag the spec or body of the current subprogram as
10053 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
10055 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
10057 * a-extiin.ads: New file.
10059 2011-08-02 Bob Duff <duff@adacore.com>
10061 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
10062 now raises Name_Error instead of Use_Error in certain cases. The other
10063 parts of this AI were already implemented properly.
10065 2011-08-02 Vincent Celier <celier@adacore.com>
10067 * link.c: Only import "auto-host.h" when building the gnattools.
10069 2011-08-02 Yannick Moy <moy@adacore.com>
10071 * sem_util.adb: Inter-unit inlining does not work for a subprogram
10072 which calls a local subprogram, so extract subprogram
10073 from Mark_Non_ALFA_Subprogram_Body.
10075 2011-08-02 Javier Miranda <miranda@adacore.com>
10078 (Extract_Dispatching_Call): If the type of the dispatching object is an
10079 access type then return an explicit dereference in the Object out-mode
10082 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10084 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
10085 compatibility checks for all indexes of an array subtype, not just the
10086 first. Reset Has_Dynamic_Range_Check on the subtype before each
10087 potential check to ensure that Insert_Range_Checks will not elide any
10088 of the dynamic checks.
10090 2011-08-02 Yannick Moy <moy@adacore.com>
10092 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
10093 SPARK restriction at parsing time.
10094 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
10095 directive only if the SPARK restriction is set for this unit.
10097 2011-08-02 Yannick Moy <moy@adacore.com>
10099 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
10100 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
10101 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
10102 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
10103 Mark_Non_ALFA_Subprogram_Body.
10104 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
10107 2011-08-02 Yannick Moy <moy@adacore.com>
10109 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
10112 2011-08-02 Robert Dewar <dewar@adacore.com>
10114 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
10115 exp_ch3.adb: Minor reformatting.
10117 2011-08-02 Emmanuel Briot <briot@adacore.com>
10119 * adaint.c (__gnat_locate_exec_on_path): only returns executable
10120 files, not any regular file.
10121 (__gnat_locate_file_with_predicate): new subprogram.
10123 2011-08-02 Yannick Moy <moy@adacore.com>
10125 * sinfo.adb, sinfo.ads: Restrict the use of flags
10126 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
10127 nodes, plus N_Subtype_Declaration for the 2nd one.
10129 2011-08-02 Sergey Rybin <rybin@adacore.com>
10131 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10132 - fix bugs in the description of Source_Trace;
10133 - get rid of UNIT_NAME;
10135 2011-08-02 Javier Miranda <miranda@adacore.com>
10138 (Build_Dispatching_Requeue): Adding support for VM targets
10139 since we cannot directly reference the Tag entity.
10140 * exp_sel.adb (Build_K): Adding support for VM targets.
10141 (Build_S_Assignment): Adding support for VM targets.
10143 (Default_Prim_Op_Position): In VM targets do not restrict availability
10144 of predefined interface primitives to compiling in Ada 2005 mode.
10145 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10146 restricted to compiling in Ada 2005 mode.
10147 (Make_VM_TSD): Generate code that declares and initializes the OSD
10148 record. Needed to support dispatching calls through synchronized
10151 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10152 primitives associated with synchronized interfaces.
10153 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10154 primitives associated with synchronized interfaces.
10156 2011-08-02 Yannick Moy <moy@adacore.com>
10158 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10159 statements hidden in SPARK if preceded by the HIDE directive
10160 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10161 exception handlers as hidden in SPARK if preceded by the HIDE directive
10162 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10163 if starting with the HIDE directive
10164 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10165 starting with the HIDE directive; mark the declarations in a private
10166 part as hidden in SPARK if the private part starts with the HIDE
10168 * restrict.adb, restrict.ads
10169 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10170 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10171 argument node belongs to a part which is hidden in SPARK
10172 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10173 parts in SPARK; protect the possibly costly call to
10174 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10175 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10176 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10177 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10179 (Scan): recognize special comment starting with '#' and followed by
10180 SPARK keyword "hide" as a HIDE directive.
10182 2011-08-02 Yannick Moy <moy@adacore.com>
10184 * types.ads, erroutc.ads: Minor reformatting.
10186 2011-08-02 Vincent Celier <celier@adacore.com>
10188 * link.c: Add response file support for cross platforms.
10190 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10192 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10193 in an association, set parent field of copy before partial analysis.
10194 * sem_res.adb (Resolve_Slice): create reference to itype only when
10195 expansion is enabled.
10197 2011-08-02 Yannick Moy <moy@adacore.com>
10199 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10200 for new flag denoting which subprogram bodies are in ALFA
10201 * restrict.adb, sem_ch7.adb: Update comment
10202 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10203 sem_ch9.adb, sem_res.adb: Add calls to
10204 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10205 * sem_ch6.adb (Analyze_Function_Return): add calls to
10206 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10207 middle of the body, and extended return.
10208 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10209 False when missing return.
10210 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10211 to True for subprograms whose spec is in ALFA. Remove later on the flag
10212 on the entity used for a subprogram body when there exists a separate
10214 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10215 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10216 False, otherwise do nothing.
10218 2011-08-02 Robert Dewar <dewar@adacore.com>
10220 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10222 2011-08-02 Yannick Moy <moy@adacore.com>
10224 * sem_ch4.ads: minor formatting.
10226 2011-08-02 Yannick Moy <moy@adacore.com>
10228 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10229 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10230 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10231 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10232 opt.ads: cleanup of SPARK mode
10234 2011-08-02 Yannick Moy <moy@adacore.com>
10236 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10238 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10239 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10241 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10242 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10243 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10244 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10246 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10248 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10249 functions whose return type is not in ALFA.
10250 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10252 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10253 parameter's type is not in ALFA.
10254 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10259 * sem_ch6 (Analyze_Expression_Function): treat the function as
10260 Inline_Always, and introduce a subprogram declaration for it when it is
10262 * inline.adb (Add_Inlined_Body): recognize bodies that come from
10263 expression functions, so that the back-end can determine whether they
10264 can in fact be inlined.
10265 * sem_util.adb (Is_Expression_Function): predicate to determine whether
10266 a function body comes from an expression function.
10268 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10270 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10271 null exclusions to test Can_Never_Be_Null on the anonymous access types
10272 of the formals rather than testing the formals themselves. Exclude this
10273 check in cases where the Old_Formal is marked as a controlling formal,
10274 to avoid issuing spurious errors for bodies completing dispatching
10275 operations (due to the flag not getting set on controlling access
10276 formals in body specs).
10277 (Find_Corresponding_Spec): When checking full and subtype conformance of
10278 subprogram bodies in instances, pass Designated and E in that order, for
10279 consistency with the expected order of the formals (New_Id followed by
10282 2011-08-02 Robert Dewar <dewar@adacore.com>
10284 * sem_ch8.adb: Minor reformatting.
10286 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10288 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10289 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10290 primitive operations of class-wide actuals.
10292 2011-08-02 Javier Miranda <miranda@adacore.com>
10294 * exp_atag.ads, exp_atag.adb
10295 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10296 since its value is implicitly passed in argument Typ.
10297 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10298 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10299 Build_Common_Dispatching_Select_Statements.
10301 2011-08-02 Robert Dewar <dewar@adacore.com>
10303 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10304 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10305 Minor reformatting.
10307 2011-08-02 Robert Dewar <dewar@adacore.com>
10309 * sem_res.adb: Minor reformatting.
10310 * sem_prag.adb: Minor reformatting.
10312 2011-08-02 Javier Miranda <miranda@adacore.com>
10314 * exp_atag.adb, exp_atags.ads
10315 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10316 by the tagged type Entity. Required to use this routine in the VM
10317 targets since we do not have available the Tag entity in the VM
10320 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10321 Ada.Tags has not been previously loaded.
10323 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10324 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10326 (Enclosing_Dynamic_Scope): Add missing support to handle the full
10327 view of enclosing scopes. Required to handle enclosing scopes that
10328 are synchronized types whose full view is a task type.
10330 (Build_VM_TSDs): Minor code improvement to avoid generating and
10331 analyzing lists with empty nodes.
10332 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10333 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10334 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10335 (Make_Disp_Timed_Select_Body): Add support for VM targets.
10336 (Make_Select_Specific_Data_Table): Add support for VM targets.
10337 (Make_VM_TSD): Generate code to initialize the SSD structure of
10340 2011-08-02 Yannick Moy <moy@adacore.com>
10342 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10343 cross-references section in ALI.
10344 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10345 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10347 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10348 subprogram or package entity of a node
10349 (Is_Local_Reference_Type): new function returns True for references
10350 selected in local cross-references.
10351 (Lt): function extracted from Lt in Output_References
10352 (Write_Entity_Name): function extracted from Output_References
10353 (Generate_Definition): generate reference with type 'D' for definition
10354 of objects (object declaration and parameter specification), with
10355 appropriate locations and units, for use in local cross-references.
10356 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10357 references of type 'I' for initialization in object definition.
10358 (Output_References): move part of function Lt and procedure
10359 Write_Entity_Name outside of the body. Ignore references of types 'D'
10360 and 'I' introduced for local cross-references.
10361 (Output_Local_References): new procedure to output the local
10362 cross-references sections.
10363 (Lref_Entity_Status): new array defining whether an entity is a local
10364 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10365 with 'I' type when initialization expression is present.
10366 * get_scos.adb, get_scos.ads: Correct comments and typos
10368 2011-08-02 Javier Miranda <miranda@adacore.com>
10370 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10372 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10374 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10377 2011-08-02 Vincent Celier <celier@adacore.com>
10379 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10380 (No_Space_Img): New function
10381 (Find_Excluded_Sources): When reading from a file, record the file name
10382 and the line number for each excluded source.
10383 (Mark_Excluded_Sources): When reporting an error, if the excluded
10384 sources were read from a file, include file name and line number in
10387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10389 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10391 2011-08-02 Robert Dewar <dewar@adacore.com>
10393 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10395 2011-08-02 Javier Miranda <miranda@adacore.com>
10397 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10398 generation of TSDs to the DOTNET compiler.
10399 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10400 generation of TSDs to the DOTNET compiler.
10402 2011-08-02 Javier Miranda <miranda@adacore.com>
10404 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10405 record of all the tagged types declared inside library level package
10406 declarations, library level package bodies or library level subprograms.
10407 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10408 associated with a given tagged type.
10409 (Build_VM_TSDs): New subprogram.
10410 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10411 compilation units that are subprograms.
10412 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10413 compilation units that are package bodies.
10414 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10415 units that are a package declaration or a package instantiation.
10416 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10417 reorganization to improve the error generated by the frontend when the
10418 function Ada.Tags.Secondary_Tag is not available.
10419 * rtsfind.ads (RE_Register_TSD): New runtime entity.
10420 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10422 2011-08-02 Javier Miranda <miranda@adacore.com>
10424 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10426 2011-08-02 Robert Dewar <dewar@adacore.com>
10428 * s-imenne.ads: Minor reformatting.
10430 2011-08-02 Robert Dewar <dewar@adacore.com>
10432 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10433 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10434 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10436 2011-08-02 Robert Dewar <dewar@adacore.com>
10438 * einfo.ads (Materialize_Entity): Document this is only for renamings
10439 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10440 required debug information in the case where we transform the object
10441 declaration into a renaming declaration.
10442 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10444 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10445 Materialize_Entity.
10447 2011-08-02 Robert Dewar <dewar@adacore.com>
10449 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10450 Suppress_Init_Procs.
10451 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10452 Suppress_Initialization/Initialization_Suppressed.
10453 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10454 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10455 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10456 * sem_prag.adb: New processing for pragma Suppress_Initialization.
10458 2011-08-02 Robert Dewar <dewar@adacore.com>
10460 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10461 Minor reformatting.
10463 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10465 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10466 only have inheritable classwide pre/postconditions.
10468 2011-08-02 Javier Miranda <miranda@adacore.com>
10470 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10471 * rtsfind.ads (RE_Check_TSD): New runtime entity.
10472 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10473 checks if the external tag of a type is the same as the external tag
10474 of some other declaration.
10476 2011-08-02 Thomas Quinot <quinot@adacore.com>
10478 * s-taskin.ads: Minor reformatting.
10480 2011-08-02 Emmanuel Briot <briot@adacore.com>
10482 * g-comlin.adb (Display_Help): swap the order in which it prints the
10483 short help and the general usage.
10485 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10487 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10488 the aspect declarations and attach them to the generic copy for
10489 subsequent analysis.
10490 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10491 declarations of the generic tree to the new subprogram declarations.
10492 * sem_attr.adb (Check_Precondition_Postcondition): recognize
10493 conditions that apply to a subprogram instance.
10495 2011-08-02 Robert Dewar <dewar@adacore.com>
10497 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10499 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10501 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10502 private type with a tagged full view is not derived in the immediate
10503 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10505 2011-08-02 Robert Dewar <dewar@adacore.com>
10507 * exp_ch4.adb: Minor reformatting.
10509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10511 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
10512 Ada2012 iterator, the loop will be rewritten during expansion into a
10513 while loop with a cursor and an element declaration. Do not analyze the
10514 body in this case, because if the container is for indefinite types the
10515 actual subtype of the elements will only be determined when the cursor
10516 declaration is analyzed.
10518 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10520 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10521 size/alignment related attributes in CodePeer_Mode.
10523 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10525 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10526 Prepend_Element, since this can result in the operation getting the
10527 wrong slot in the full type's dispatch table if the full type has
10528 inherited operations. The incomplete type's operation will get added
10529 to the proper position in the full type's primitives
10530 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10531 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10532 dispatching operations, since there are cases where nonprimitive
10533 subprograms can get added to the list of incomplete dependents (such
10534 as subprograms in nested packages).
10535 * sem_ch6.adb (Process_Formals): First, remove test for being in a
10536 private part when determining whether to add a primitive with a
10537 parameter of a tagged incomplete type to the Private_Dependents list.
10538 Such primitives can also occur in the visible part, and should not have
10539 been excluded from being private dependents.
10540 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10541 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10542 list of a Taft-amendment incomplete type is a primitive before issuing
10543 an error that the full type must appear in the same unit. There are
10544 cases where nonprimitives can be in the list (such as subprograms in
10546 * sem_disp.adb (Derives_From): Use correct condition for checking that
10547 a formal's type is derived from the type of the corresponding formal in
10548 the parent subprogram (the condition was completely wrong). Add
10549 checking that was missing for controlling result types being derived
10550 from the result type of the parent operation.
10552 2011-08-02 Yannick Moy <moy@adacore.com>
10554 * errout.adb (First_Node): minor renaming
10555 * restrict.adb (Check_Formal_Restriction): put restriction warning on
10558 2011-08-02 Yannick Moy <moy@adacore.com>
10560 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10561 before accessing operands.
10562 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10563 decide whether an initialization expression respects SPARK rules, as
10564 the plain node is the expanded one. This allows for more valid warnings
10566 * gnat_rm.texi: Minor update.
10568 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10570 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10573 2011-08-02 Robert Dewar <dewar@adacore.com>
10575 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10577 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10579 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10580 loop statements and the element renaming declaration with a block when
10581 the element type is controlled.
10583 2011-08-02 Yannick Moy <moy@adacore.com>
10585 * sinfo.ads: Minor formatting.
10587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10589 * sem_aggr.adb (Add_Association): if the association has a box and no
10590 expression, use the Sloc of the aggregate itself for the new
10592 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10595 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10597 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10598 When a container is provided via a function call, generate a renaming
10599 of the function result. This avoids the creation of a transient scope
10600 and the premature finalization of the container.
10601 * exp_ch7.adb (Is_Container_Cursor): Removed.
10602 (Wrap_Transient_Declaration): Remove the supression of the finalization
10603 of the list controller when the declaration denotes a container cursor,
10606 2011-08-02 Yannick Moy <moy@adacore.com>
10608 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10609 node is from source, instead of the original node being from source.
10611 (Resolve_Array_Aggregate): refine the check for a static expression, to
10612 recognize also static ranges
10613 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10614 Array_Type_Declaration): postpone the test for the type being a subtype
10615 mark after the type has been resolved, so that component-selection and
10616 expanded-name are discriminated.
10617 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10618 to distinguish the case of an iteration scheme, so that an error is
10619 issed on a non-static range in SPARK except in an iteration scheme.
10620 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10621 In_Iter_Schm = True.
10622 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10623 user-defined operators so that they are allowed in renaming
10625 (Find_Selected_Component): refine the check for prefixing of operators
10626 so that they are allowed in renaming. Move the checks for restrictions
10627 on selector name after analysis discriminated between
10628 component-selection and expanded-name.
10629 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10630 concatenation argument of string type if it is static.
10631 * sem_util.adb, sem_util.ads
10632 (Check_Later_Vs_Basic_Declarations): add a new function
10633 Is_Later_Declarative_Item to decice which declarations are allowed as
10634 later items, in the two different modes Ada 83 and SPARK. In the SPARK
10635 mode, add that renamings are considered as later items.
10636 (Enclosing_Package): new function to return the enclosing package
10637 (Enter_Name): correct the rule for homonyms in SPARK
10638 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10639 from source (result of expansion) to avoid issuing wrong warnings.
10641 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10643 * errout.adb: On anything but an expression First_Node returns its
10646 2011-08-02 Pascal Obry <obry@adacore.com>
10648 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10650 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10652 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10653 Set the associated loop as the related expression of internally
10655 * exp_ch7.adb (Is_Container_Cursor): New routine.
10656 (Wrap_Transient_Declaration): Supress the finalization of the list
10657 controller when the declaration denotes a container cursor.
10659 2011-08-02 Yannick Moy <moy@adacore.com>
10661 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10663 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10664 expression is a simple expression. This check cannot be performed in
10665 the semantics, so just drop it.
10666 (P_Index_Or_Discriminant_Constraint): move check that the index or
10667 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10668 semantics. Other cases were previously checked in the semantics.
10669 * par-ch4.adb (P_Name): move checks that a selector name is not
10670 character literal or an operator symbol to Find_Selected_Component in
10672 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10673 declarations are not placed after later declarations in a separate
10674 procedure in Sem_Util (possibly not the best choice?), to be used both
10675 during parsing, for Ada 83 mode, and during semantic analysis, for
10677 * par-endh.adb (Check_End): move check that end label is not missing
10678 to Process_End_Label in the semantics
10679 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10680 the special case for SPARK restriction
10681 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10682 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10683 parameter Force to issue the error message even on internal node (used
10684 for generated end label). Call Check_Restriction to check when an error
10685 must be issued. In SPARK mode, issue an error message even if the
10686 restriction is not set.
10687 (Check_Restriction): new procedure with an additional out parameter to
10688 inform the caller that a message has been issued
10689 * sem_aggr.adb: Minor modification of message
10690 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10691 instead of issuing an error message directly
10692 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10693 declarations are not placed after later declarations, by calling
10694 Check_Later_Vs_Basic_Declarations
10695 (Analyze_Subtype_Declaration): move here the check that an index or
10696 discriminant constraint must be a subtype mark. Change the check that
10697 a subtype of String must start at one so that it works on subtype marks.
10698 * sem_ch4.adb (Analyze_Call): move here the check that a named
10699 association cannot follow a positional one in a call
10700 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10701 instead of issuing an error message directly
10702 * sem_ch8.adb (Find_Selected_Component): move here the check that a
10703 selector name is not a character literal or an operator symbol. Move
10704 here the check that the prefix of an expanded name cannot be a
10705 subprogram or a loop statement.
10706 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10707 procedure called from parsing and semantics to check that basic
10708 declarations are not placed after later declarations
10709 (Process_End_Label): move here the check that end label is not missing
10711 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10713 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10714 representation clause in codepeer mode, since it confuses CodePeer and
10715 does not bring useful info.
10717 2011-08-02 Ed Falis <falis@adacore.com>
10719 * init.c: initialize fp hw on MILS.
10721 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10723 * errout.adb (First_Node): for bodies, return the node itself (small
10724 optimization). For other nodes, do not check source_unit if the node
10725 comes from Standard.
10727 2011-08-02 Robert Dewar <dewar@adacore.com>
10729 * exp_ch3.adb: Minor comment additions.
10730 * sem_ch13.adb: Minor reformatting.
10732 2011-08-02 Pascal Obry <obry@adacore.com>
10734 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10736 2011-08-02 Robert Dewar <dewar@adacore.com>
10738 * sem_attr.adb: Minor reformatting.
10740 2011-08-02 Robert Dewar <dewar@adacore.com>
10742 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10743 (Has_Default_Component_Value): Removed
10744 * einfo.ads Comment updates
10745 (Has_Default_Aspect): Replaces Has_Default_Value
10746 (Has_Default_Component_Value): Removed
10748 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10750 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10751 (Get_Simple_Init_Val): Handle Default_Value aspect
10752 (Needs_Simple_Initialization): Handle Default_Value aspect
10753 * exp_ch3.ads: Needs_Simple_Initialization
10754 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10755 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10757 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10758 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10759 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10761 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10763 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10764 package containing iteration primitives.
10765 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10767 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10769 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10770 "of", pre-analyze expression in case it is a function call with
10771 finalization actions that must be placed ahead of the loop.
10772 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10773 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10775 2011-08-02 Geert Bosch <bosch@adacore.com>
10777 * cstand.adb (Create_Float_Types): Only consider C's long double for
10778 Long_Long_Float, in addition to double.
10780 2011-08-02 Robert Dewar <dewar@adacore.com>
10782 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10783 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10784 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10785 Minor reformatting.
10787 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10789 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10792 2011-08-02 Javier Miranda <miranda@adacore.com>
10794 * einfo.ads, einfo.adb
10795 (Original_Access_Type): Move this attribute to Node26 since there was
10796 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10797 which causes conflicts and breaks the generation of the .NET compiler.
10798 (Interface_Name): Add missing documentation on JGNAT only uses of
10801 2011-08-02 Geert Bosch <bosch@adacore.com>
10803 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10804 (Find_Back_End_Float_Type): Likewise
10805 (Create_Back_End_Float_Types): Likewise
10806 (Create_Float_Types): Likewise
10807 (Register_Float_Type): Likewise
10808 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10809 Nlist and split out type selection in new local Find_Base_Type function.
10810 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10812 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10814 2011-08-02 Robert Dewar <dewar@adacore.com>
10816 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10818 * opt.ads: Minor comment change.
10819 * sem_ch12.adb: Minor code reorganization.
10821 2011-08-02 Gary Dismukes <dismukes@adacore.com>
10823 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10824 subtype's list of rep items to the list on the full subtype in the case
10825 where the lists are the same.
10827 2011-08-02 Geert Bosch <bosch@adacore.com>
10829 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10830 using the one from System.Strings, which also deallocates all strings.
10832 2011-08-02 Geert Bosch <bosch@adacore.com>
10834 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10836 * gcc-interface/Make-lang.in: Update dependencies.
10838 2011-08-02 Olivier Hainque <hainque@adacore.com>
10840 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10843 2011-08-02 Javier Miranda <miranda@adacore.com>
10845 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10846 associated with anonymous access to subprograms.
10848 2011-08-02 Geert Bosch <bosch@adacore.com>
10851 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10852 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10853 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10854 (Add_Symbol_Definition): Move to switch-c.adb
10855 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10856 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10857 (Add_Symbol_Definition): Move to switch-c.adb.
10858 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10860 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10861 Move to warnsw.adb.
10862 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10863 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10864 Move to warnsw.adb.
10865 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10866 (Add_Symbol_Definition): Moved from Prepcomp.
10867 * switch-c.ads: Update copyright notice. Use String_List instead of
10868 Argument_List, removing dependency on System.OS_Lib.
10870 2011-08-02 Yannick Moy <moy@adacore.com>
10872 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10873 mode on initialization expression which does not respect SPARK
10875 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10876 if the tree referenced by its argument represents an initialization
10877 expression in SPARK, suitable for initializing an object in an object
10880 2011-08-02 Javier Miranda <miranda@adacore.com>
10882 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10883 internally generated access to subprogram with its associated protected
10885 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10887 2011-08-02 Geert Bosch <bosch@adacore.com>
10889 * cstand.adb (Register_Float_Type): Print information about type to
10890 register, if the Debug_Flag_Dot_B is set.
10891 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10892 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10893 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10894 with a requested precision of more than Max_Digits digits and no more
10895 than Max_Base_Digits digits, if a range specification is present and the
10896 Predefined_Float_Types list has a suitable type to derive from.
10897 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10898 case of type completion with pragma Import
10900 (Process_Import_Predefined_Type): Processing to complete a type
10901 with pragma Import. Currently supports floating point types only.
10902 (Set_Convention_From_Pragma): Do nothing without underlying type.
10903 (Process_Convention): Guard against absence of underlying type,
10904 which may happen when importing incomplete types.
10905 (Process_Import_Or_Interface): Handle case of importing predefined
10906 types. Tweak error message.
10908 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10910 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10911 functions to previous change. Reorganize code slightly.
10913 2011-08-02 Geert Bosch <bosch@adacore.com>
10915 * back_end.ads (Register_Type_Proc): New call back procedure type for
10916 allowing the back end to provide information about available types.
10917 (Register_Back_End_Types): New procedure to register back end types.
10918 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10920 * cstand.adb (Back_End_Float_Types): New list for floating point types
10921 supported by the back end.
10922 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10923 (Copy_Float_Type): New procedure to make new copies of predefined types.
10924 (Register_Float_Type): New call back procedure to populate the BEFT list
10925 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10926 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10927 (Create_Float_Types): New procedure to create entities for floating
10928 point types predefined in Standard, and put these and any remaining
10929 BEFTs on the Predefined_Float_Types list.
10930 * stand.ads (Predefined_Float_Types): New list for predefined floating
10931 point types that do not have declarations in package Standard.
10933 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10935 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10936 entity node for the unit containing the parameter.
10937 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10938 (Add_Inlined_Subprogram): Likewise.
10939 * gcc-interface/Make-lang.in: Update dependencies.
10941 2011-08-02 Thomas Quinot <quinot@adacore.com>
10943 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10946 2011-08-02 Geert Bosch <bosch@adacore.com>
10948 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10950 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10952 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10953 computed value of Base_Type.
10955 2011-08-02 Yannick Moy <moy@adacore.com>
10957 * restrict.adb (Check_Restriction): issue an error for any use of
10958 class-wide, even if the No_Dispatch restriction is not set.
10959 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10960 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10961 when completing a private extension, the type named in the private part
10962 is not the same as that named in the visible part.
10963 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10964 of an inherited primitive operations of a tagged type or type extension
10965 that returns the tagged type.
10966 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10967 function which returns True for an implicit operation inherited by the
10968 derived type declaration for the argument type.
10969 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10972 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10974 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10975 Process_Bounds, to perform analysis with expansion of a range or an
10976 expression that is the iteration scheme for a loop.
10977 (Analyze_Iterator_Specification): If domain of iteration is given by a
10978 function call with a controlled result, as is the case if call returns
10979 a predefined container, ensure that finalization actions are properly
10981 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10983 2011-08-02 Javier Miranda <miranda@adacore.com>
10985 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10986 * gcc-interface/Make-lang.in: Update dependencies.
10988 2011-08-02 Javier Miranda <miranda@adacore.com>
10990 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10991 determine if the analysis is performed using N or Original_Node (N).
10992 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10993 functionality of routine Is_Variable avoids code duplication.
10994 * checks.adb (Determine_Range): Handle temporaries generated by
10995 Remove_Side_Effects.
10997 2011-08-02 Javier Miranda <miranda@adacore.com>
10999 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11000 expansion of the condition. Required since the previous analysis was
11001 done with expansion disabled (see Resolve_Quantified_Expression) and
11002 hence checks were not inserted and record comparisons have not been
11005 2011-08-02 Ed Falis <falis@adacore.com>
11007 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11010 2011-08-02 Bob Duff <duff@adacore.com>
11012 * opt.ads: Minor comment fix.
11014 2011-08-02 Bob Duff <duff@adacore.com>
11016 * sem_ch12.adb (Analyze_Package_Instantiation,
11017 Analyze_Subprogram_Instantiation): Turn off style checking while
11018 analyzing an instance. Whatever style checks that apply to the generic
11019 unit should apply, so it makes no sense to apply them in an instance.
11020 This was causing trouble when compiling an instance of a runtime
11021 unit that violates the -gnatyO switch.
11022 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11023 one of the two case statements, causing spurious errors.
11025 2011-08-02 Robert Dewar <dewar@adacore.com>
11027 * uname.adb: Minor reformatting.
11028 * gnatcmd.adb: Minor reformatting.
11029 * exp_attr.adb: Minor reformatting.
11031 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11033 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11034 No_Dispatching_Calls, do not look for the Assign primitive, because
11035 predefined primitives are not created in this case.
11037 2011-08-02 Bob Duff <duff@adacore.com>
11039 * stylesw.ads: Minor comment fixes.
11041 2011-08-02 Robert Dewar <dewar@adacore.com>
11043 * freeze.adb (Add_To_Result): New procedure.
11045 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11047 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11048 time, if the specific run-time routines for handling streams of strings
11049 are not available, use the default mechanism.
11051 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11053 * s-regpat.ads: Fix typo.
11055 2011-08-02 Vincent Celier <celier@adacore.com>
11057 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11058 not null, call it to create the in memory config project file without
11059 parsing an existing default config project file.
11061 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11063 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11067 * sem_elim.adb: an abstract subprogram does not need an eliminate
11068 pragma for its descendant to be eliminable.
11070 2011-08-02 Ed Falis <falis@adacore.com>
11072 * init.c: revert to handling before previous checkin for VxWorks
11073 * s-intman-vxworks.adb: delete unnecessary declarations related to
11074 using Ada interrupt facilities for handling signals.
11075 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11076 * s-intman-vxworks.ads: Import __gnat_install_handler as
11077 Initialize_Interrupts.
11078 * s-taprop-vxworks.adb: Delete Signal_Mask.
11079 (Abort_Handler): change construction of mask to unblock exception
11082 2011-08-02 Jerome Guitton <guitton@adacore.com>
11084 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11085 Debug_Raise_Exception before propagation starts.
11087 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11089 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11090 to Restriction_Check_Required.
11091 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11092 * sem_res.adb (Resolve_Call): Likewise.
11093 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11095 2011-08-02 Bob Duff <duff@adacore.com>
11097 * stylesw.ads: Update comment.
11098 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11099 * errout.ads: Remove obsolete comment.
11101 2011-08-02 Javier Miranda <miranda@adacore.com>
11103 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11104 (Set_Is_Safe_To_Reevaluate): new procedure.
11105 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11106 assignment is allowed on safe-to-reevaluate variables.
11107 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11108 temporary created to remove side effects in expressions that use
11109 the secondary stack as safe-to-reevaluate.
11110 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11111 variables that are not true constants.
11113 2011-08-02 Robert Dewar <dewar@adacore.com>
11115 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11116 sem_res.adb, sem_ch6.adb: Minor reformatting.
11118 2011-08-02 Jerome Guitton <guitton@adacore.com>
11120 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11124 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11125 not set Overridden_Operation if subprogram is an initialization
11128 2011-08-02 Yannick Moy <moy@adacore.com>
11130 * par-ch6.adb: Correct obsolete name in comments
11131 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11132 which takes two message arguments (existing function takes one), with
11133 second message used for continuation.
11134 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11135 block statements that originate from a source block statement, not
11136 generated block statements
11137 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11138 symmetry with procedure case
11139 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11140 function to issue an error in formal mode if a package specification
11141 contains more than one tagged type or type extension.
11142 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11143 parameters matching formals of tagged types are objects (or ancestor
11144 type conversions of objects), not general expressions. Issue an error
11145 on view conversions that are not involving ancestor conversion of an
11147 (Resolve_Type_Conversion): in formal mode, issue an error on the
11148 operand of an ancestor type conversion which is not an object
11149 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11150 procedure so that it works also for actuals of function calls
11151 (Is_Actual_Tagged_Parameter): new function which determines if its
11152 argument is an actual parameter of a formal of tagged type in a
11154 (Is_SPARK_Object_Reference): new function which determines if the tree
11155 referenced by its argument represents an object in SPARK
11157 2011-08-02 Robert Dewar <dewar@adacore.com>
11159 * sem_ch3.adb: Minor reformatting
11160 Minor comment addition
11161 Minor error msg text change
11163 2011-08-02 Javier Miranda <miranda@adacore.com>
11165 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11166 function. Used to be more precise when we generate a variable plus one
11167 assignment to remove side effects in the evaluation of the Bound
11169 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11170 of the bound expression to force its re-analysis and thus expand the
11171 associated transient scope (if required). Code cleanup replacing the
11172 previous code that declared the constant entity by an invocation to
11173 routine Force_Evaluation which centralizes this work in the frontend.
11175 2011-08-02 Robert Dewar <dewar@adacore.com>
11177 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11178 (Base_Type): Now uses improved Is_Base_Type function
11179 * einfo.ads (Base_Type): Inline this function
11181 2011-08-02 Robert Dewar <dewar@adacore.com>
11183 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11184 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11186 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11188 * gcc-interface/Make-lang.in: Update dependencies.
11189 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11192 2011-08-02 Yannick Moy <moy@adacore.com>
11194 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11195 non-simple expression used in delta constraint
11196 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11197 index constraint which is not a subtype mark
11198 * par.adb: With and use Restrict
11199 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11200 mode on component type which is not a subtype mark and default
11201 expression on component
11202 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11203 of string which does not have a lower index bound equal to 1
11204 (Array_Type_Declaration): issue an error in formal mode on index or
11205 component type which is not a subtype mark, and on aliased keyword on
11207 (Derived_Type_Declaration): issue an error in formal mode on interface,
11208 limited or abstract type
11209 (Record_Type_Declaration): issue an error in formal mode on interface
11210 (Record_Type_Definition): issue an error in formal mode on tagged types
11211 and type extensions not declared in the specification of a library unit
11212 package; on null non-tagged record; on variant part
11214 2011-08-02 Vincent Celier <celier@adacore.com>
11216 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11217 not declared for qualified library project when Library_Name is not
11218 declared, but Library_Dir is.
11220 2011-08-02 Robert Dewar <dewar@adacore.com>
11222 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11223 pragmas (affects aspects [Component_]Default_Value
11224 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11225 component type for the resolution
11227 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11229 * einfo.adb (Base_Type): Tune implementation for speed.
11231 2011-08-02 Robert Dewar <dewar@adacore.com>
11233 * freeze.adb: Minor reformatting.
11235 2011-08-02 Thomas Quinot <quinot@adacore.com>
11237 * scos.ads: Update comments.
11239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11241 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11242 base type, because the parent may be a subtype of a private type whose
11243 convention is established in a private part.
11245 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11247 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11248 statement in a block when the expansion of the return expression has
11249 created a finalization chain.
11250 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11251 with the parent node.
11252 Add N_Extended_Return_Statement to handle the case where a transient
11253 object declaration appears in the Return_Object_Declarations list of
11254 an extended return statement.
11256 2011-08-02 Matthew Gingell <gingell@adacore.com>
11258 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11259 unused parameter 'name'.
11261 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11263 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11264 inherited operation, check whether its alias, which is the source
11265 operastion that it renames, has been marked eliminated.
11267 2011-08-02 Javier Miranda <miranda@adacore.com>
11269 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11270 in-mode parameter whose type is an access type since it can be used to
11271 modify its designated object. Enforce code that handles as safe an
11272 access type that is not access-to-constant but it is the result of a
11273 previous removal of side-effects.
11274 (Remove_Side_Effects): Minor code reorganization of cases which require
11275 no action. Done to incorporate documentation on new cases uncovered
11276 working in this ticket: no action needed if this routine was invoked
11277 too early and the nodes are not yet decorated.
11278 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11279 to routine Remove_Side_Effects by calls to Force_Evaluation since they
11280 were issued with actuals that are implicitly provided by
11283 2011-08-02 Robert Dewar <dewar@adacore.com>
11285 * sem_ch3.adb, sem_res.adb: Minor reformatting.
11287 2011-08-02 Yannick Moy <moy@adacore.com>
11289 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11290 to issue an error in formal mode on attribute not supported in this mode
11291 (Analyze_Attribute): issue errors on standard attributes not supported
11293 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11294 comment, and issue error in formal mode on modulus which is not a power
11296 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11298 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11300 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11301 operator on modular type (except 'not').
11303 2011-08-02 Robert Dewar <dewar@adacore.com>
11305 * gnat_rm.texi: Minor reformatting.
11307 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11309 * s-osinte-linux.ads: Minor comment update and reformatting.
11310 * i-cexten.ads: Make this unit pure, as for its parent.
11311 Will allow its usage in more contexts if needed.
11313 2011-08-02 Robert Dewar <dewar@adacore.com>
11315 * s-utf_32.ads: Minor comment fix.
11317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11319 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11320 operation of a tagged synchronized type, handle the case where the
11321 controlling argument is overloaded.
11323 2011-08-02 Yannick Moy <moy@adacore.com>
11325 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11326 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11327 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11328 SPARK mode and formal verification mode on processing SPARK restriction
11329 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11330 requiring consistency checking.
11332 2011-08-02 Robert Dewar <dewar@adacore.com>
11334 * sem_res.adb: Minor reformatting.
11336 2011-08-02 Robert Dewar <dewar@adacore.com>
11338 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11339 a-cforse.ads: Remove unneeded with of Ada.Containers
11340 Remove commented out pragma Inline's
11341 Move specifications of new subprograms to the actual specs
11343 2011-08-02 Yannick Moy <moy@adacore.com>
11345 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11346 a-cforse.ads: Update comments.
11348 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11350 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11352 2011-08-02 Robert Dewar <dewar@adacore.com>
11354 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11355 a-cforse.ads, a-cofove.ads: Minor reformatting.
11357 2011-08-02 Claire Dross <dross@adacore.com>
11359 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11360 a-cofove.ads: Add comments.
11362 2011-08-02 Yannick Moy <moy@adacore.com>
11364 * gnat_rm.texi: Document formal containers.
11366 2011-08-02 Emmanuel Briot <briot@adacore.com>
11368 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11369 are empty sections.
11371 2011-08-02 Robert Dewar <dewar@adacore.com>
11373 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11376 2011-08-02 Robert Dewar <dewar@adacore.com>
11378 * aspects.adb: New aspects Default_Value and Default_Component_Value
11379 New format of Aspect_Names table checks for omitted entries
11380 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11381 handling of boolean aspects for derived types.
11382 New aspects Default_Value and Default_Component_Value
11383 New format of Aspect_Names table checks for omitted entries
11384 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11385 (Has_Default_Value): New flag
11386 (Has_Default_Component_Value): New flag
11387 (Has_Default_Value): New flag
11388 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11390 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11391 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11392 Default_Value and Default_Component_Value
11393 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11394 New aspects Default_Value and Default_Component_Value
11395 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11396 * sprint.adb: Print N_Aspect_Specification node when called from gdb
11398 2011-08-02 Vincent Celier <celier@adacore.com>
11400 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11401 inherit library kind.
11403 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11405 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11406 Minor reformatting.
11408 2011-08-02 Robert Dewar <dewar@adacore.com>
11410 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11412 2011-08-02 Yannick Moy <moy@adacore.com>
11414 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11416 2011-08-02 Robert Dewar <dewar@adacore.com>
11418 * impunit.adb: Add comment.
11420 2011-08-02 Yannick Moy <moy@adacore.com>
11422 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11423 qualification of aggregates in formal mode
11424 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11426 (Resolve_Aggregate): complete the test that an aggregate is adequately
11427 qualified in formal mode
11429 2011-08-02 Pascal Obry <obry@adacore.com>
11431 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11432 * mlib-prj.adb: Supress warning when compiling binder generated file.
11433 (Build_Library): Supress all warnings when compiling the binder
11436 2011-08-02 Yannick Moy <moy@adacore.com>
11438 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11440 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11441 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11442 Add with/use clauses to make Check_Formal_Restriction visible
11444 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11446 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11447 in-parameters when type of the generic formal is private in the generic
11448 spec and non-private in the body.
11450 2011-08-02 Claire Dross <dross@adacore.com>
11452 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11453 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11454 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11455 * impunit.adb, Makefile.rtl: Take new files into account.
11457 2011-08-02 Robert Dewar <dewar@adacore.com>
11459 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11460 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11462 2011-08-02 Yannick Moy <moy@adacore.com>
11464 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11466 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11467 matching static array bounds, taking into account the special case of
11469 * sem_ch3.adb: Typo in comment.
11471 2011-08-02 Yannick Moy <moy@adacore.com>
11473 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11474 which issues an error in formal mode if its argument node is originally
11476 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11477 has a discriminant specification so that it does not include the case
11479 (Derived_Type_Declaration): move here the test that a derived type has a
11480 discriminant specification
11481 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11482 first element of a component association before accessing its choices
11483 (presence of component association is not enough)
11484 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11485 declaration is a library item before accessing the next element in a
11486 list, as library items are not member of lists
11487 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11488 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11489 Check_Formal_Restriction whenever possible.
11491 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11493 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11494 reference when needed.
11496 2011-08-02 Bob Duff <duff@adacore.com>
11498 * gnat_ugn.texi: Fix typo.
11500 2011-08-02 Vincent Celier <celier@adacore.com>
11502 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11503 archive file name. Do not use the full path name of archives for Open
11506 2011-08-02 Robert Dewar <dewar@adacore.com>
11508 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11509 Analyze_Aspect_Specifications
11511 (Analyze_Aspect_Specifications): New handling for boolean aspects
11512 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11513 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11514 sequence for Analyze_Aspect_Specifications
11515 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11516 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11518 2011-08-02 Robert Dewar <dewar@adacore.com>
11520 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11521 aspects, since these no longer exist.
11523 2011-08-02 Robert Dewar <dewar@adacore.com>
11525 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11526 semicolon, do not try to see if there are aspects following it.
11527 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11530 2011-08-02 Robert Dewar <dewar@adacore.com>
11532 * sem_ch8.adb, aspects.ads: Minor reformatting.
11534 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11536 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11537 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11539 (Analyze_Aspect_Specifications): ...here. Call above procedure.
11541 2011-08-02 Yannick Moy <moy@adacore.com>
11543 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11544 mode on subprogram declaration outside of package specification, unless
11545 it is followed by a pragma Import
11546 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11547 Access_Type_Declaration): issue error in formal mode on access type
11548 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11550 (Analyze_Object_Declaration): issue error in formal mode on object
11551 declaration which does not respect SPARK restrictions
11552 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11553 declaration which does not respect SPARK restrictions
11554 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11555 error in formal mode on digits or delta constraint
11556 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11557 decimal fixed point type
11558 (Derived_Type_Declaration): issue error in formal mode on derived type
11559 other than type extensions of tagged record types
11560 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11561 with check on access definition
11562 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11563 mode on protected definition.
11564 (Analyze_Task_Definition): issue error in formal mode on task definition
11566 2011-08-02 Robert Dewar <dewar@adacore.com>
11568 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11570 2011-08-02 Javier Miranda <miranda@adacore.com>
11572 * sem_ch6.adb (Can_Override_Operator): New function.
11573 (Verify_Overriding_Indicator): Add missing code to check overriding
11574 indicator in operators. Fixes regression.
11575 (Check_Overriding_Indicator): Minor reformating after replacing the
11576 code that evaluates if the subprogram can override an operator by
11577 invocations to the above new function.
11579 (Write_Field26_Name): Add missing code to ensure that, following
11580 the documentation in einfo.ads, this field is not shown as attribute
11581 "Static_Initialization" on non-dispatching functions.
11583 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11585 * sem_res.adb (Resolve_Call): A call to
11586 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11587 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11588 i.e., when the second parameter is of type Time_Span.
11590 2011-08-02 Vincent Celier <celier@adacore.com>
11592 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11593 with an archive instead of -L<library dir> -l<library name>.
11595 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11597 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11598 mark the base types In_Use in addition to making the operations
11601 2011-08-02 Ed Falis <falis@adacore.com>
11603 * init.c: add and setup __gnat_signal_mask for the exception signals
11604 * s-inmaop-vxworks.adb: new file.
11605 * s-intman-vxworks.adb: remove unnecessary initializations and
11607 * s-intman-vxworks.ads: remove unnecessary variable
11608 * s-taprop-vxworks.adb: simplify signal initialization
11610 2011-08-02 Robert Dewar <dewar@adacore.com>
11612 * sem_ch8.adb: Minor code reorganization, comment updates.
11614 2011-08-02 Robert Dewar <dewar@adacore.com>
11616 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11617 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11619 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11620 (Matching_Static_Array_Bounds): Moved here from Sem_Res
11622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11624 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11625 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11626 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11627 use_type_clauses, to handle more efficiently use_type and use_all_type
11629 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11630 Ada2012 Use_All_Type clause.
11631 (Use_Class_Wide_Operations): new procedure.
11633 2011-08-02 Robert Dewar <dewar@adacore.com>
11635 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11636 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11637 expression to expression function.
11639 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11641 * sem_ch4.adb: transform simple Ada2012 membership into equality only
11642 if types are compatible.
11644 2011-08-02 Yannick Moy <moy@adacore.com>
11646 * sem_res.adb (Matching_Static_Array_Bounds): new function which
11647 returns True if its argument array types have same dimension and same
11648 static bounds at each index.
11649 (Resolve_Actuals): issue an error in formal mode on actuals passed as
11650 OUT or IN OUT paramaters which are not view conversions in SPARK.
11651 (Resolve_Arithmetic_Op): issue an error in formal mode on
11652 multiplication or division with operands of fixed point types which are
11653 not qualified or explicitly converted.
11654 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11655 Boolean or array type (except String) operands.
11656 (Resolve_Equality_Op): issue an error in formal mode on equality
11657 operators for array types other than String with non-matching static
11659 (Resolve_Logical_Op): issue an error in formal mode on logical operators
11660 for array types with non-matching static bounds. Factorize the code in
11661 Matching_Static_Array_Bounds.
11662 (Resolve_Qualified_Expression): issue an error in formal mode on
11663 qualified expressions for array types with non-matching static bounds.
11664 (Resolve_Type_Conversion): issue an error in formal mode on type
11665 conversion for array types with non-matching static bounds
11667 2011-08-02 Robert Dewar <dewar@adacore.com>
11669 * par-ch10.adb: Minor code reorganization (use Nkind_In).
11671 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11673 * par-ch9.adb: save location of entry for proper error message.
11675 2011-08-02 Javier Miranda <miranda@adacore.com>
11677 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11678 (Use_Full_View) which permits this routine to climb through the
11679 ancestors using the full-view of private parents.
11680 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11681 Use_Full_View to true in calls to Is_Ancestor.
11682 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11683 true in call to Is_Ancestor.
11684 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11685 Use_Full_View to true in call to Is_Ancestor.
11686 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11687 call to Is_Ancestor.
11688 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11689 Use_Full_View to true in calls to Is_Ancestor.
11690 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11691 Make_Select_Specific_Data_Table, Register_Primitive,
11692 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11693 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11694 to true in call to Is_Ancestor.
11695 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11696 Use_Full_View to true in calls to Is_Ancestor.
11698 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11699 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11701 2011-08-02 Robert Dewar <dewar@adacore.com>
11703 * gnat_rm.texi: Minor reformatting.
11704 * sem_prag.adb: Minor reformatting.
11706 2011-08-02 Tristan Gingold <gingold@adacore.com>
11708 * vms_data.ads: Add VMS qualifier for -gnateP.
11710 2011-08-02 Robert Dewar <dewar@adacore.com>
11712 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11713 * par-ch7.adb (P_Package): Proper placement of aspects for package
11714 decl/instantiation.
11715 * par-endh.adb (Check_End): Ad Is_Sloc parameter
11716 (End_Statements): Add Is_Sloc parameterr
11717 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11718 (Check_End): Ad Is_Sloc parameter
11719 (End_Statements): Add Is_Sloc parameterr
11721 2011-08-02 Vincent Celier <celier@adacore.com>
11723 * ug_words: Add VMS qualifier equivalent to -gnateP:
11724 /SYMBOL_PREPROCESSING.
11726 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11728 * gnat-style.texi: For hexadecimal numeric literals the typical
11729 grouping of digits is 4 to represent 2 bytes.
11730 A procedure spec which is split into several lines is indented two
11733 2011-08-02 Yannick Moy <moy@adacore.com>
11735 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11736 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11737 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11739 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11740 choice in array aggregate
11741 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11743 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11744 positional and named aggregate for record, or others in record
11745 aggregate, or multiple choice in record aggregate
11746 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11747 array operands to logical operations AND, OR and XOR do not have the
11748 same static lower and higher bounds
11749 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11751 2011-08-01 Robert Dewar <dewar@adacore.com>
11753 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11754 Replaces Last_Source_Node_In_Sequence.
11755 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11756 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11757 parens and blank in string (this was inconsistently implemented).
11759 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11760 blank in string (this was inconsistently implemented).
11762 (Set_Global_Switches): Set formal mode switches appropriately
11763 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11765 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11766 call Set_Error_Msg_Lang to set "spark" as language name.
11767 * par.adb: Remove unnecessary call to set formal language for errout
11768 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11769 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11771 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11772 calls to it, moved after resolution so that types are known
11773 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11774 result of concatenation is not of type String
11775 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11776 concatenation is not properly restricted
11777 * gnat_rm.texi: Add doc on pragma Spark_95.
11778 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11779 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11780 * gcc-interface/Make-lang.in: Update dependencies.
11782 2011-08-01 Javier Miranda <miranda@adacore.com>
11784 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11785 condition that detects if the overridden operation must replace an
11788 2011-08-01 Javier Miranda <miranda@adacore.com>
11790 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11791 code declarations inserted by Insert_Actions in each alternative of the
11792 N_Case_Expression node.
11794 2011-08-01 Robert Dewar <dewar@adacore.com>
11796 * sem_ch6.adb: Minor code reorganization.
11797 * sem_util.adb: Minor reformatting.
11799 2011-08-01 Pascal Obry <obry@adacore.com>
11801 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11802 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11804 2011-08-01 Yannick Moy <moy@adacore.com>
11806 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11807 literal or operator symbol which is prefixed
11808 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11809 mode on access attributes.
11810 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11811 that concatenation operands are properly restricted in formal mode
11812 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11813 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11814 result of the concatenation has a type different from String.
11815 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11816 Analyze_Quantified_Expression, Analyze_Slice,
11817 Analyze_Null): issue an error in formal mode on unsupported constructs
11819 (Analyze_Block_Statement): only issue error on source block statement
11820 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11821 function which returns the last node in a list of nodes for which
11822 Comes_From_Source returns True, if any
11823 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11824 Last_Source_Node_In_Sequence
11825 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11826 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11827 mode on unsupported constructs
11828 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11829 rest of the actions may be needed later on since the error is marked as
11831 * sinfo.ads: Typos in comments.
11833 2011-08-01 Pascal Obry <obry@adacore.com>
11835 * projects.texi: Minor editing.
11837 2011-08-01 Yannick Moy <moy@adacore.com>
11839 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11840 insertion character ~~
11841 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11842 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11843 with insertion character ~~
11844 (Set_Msg_Text): treat insertion character ~~
11845 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11846 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11847 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11848 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11849 errors related to the formal language restriction not serious
11850 (insertion character |).
11851 * par.adb (Par): set formal language for error messages if needed
11852 * sem_ch6.adb (Check_Missing_Return): take into account possible
11853 generated statements at the end of the function
11854 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11855 enumeration value to define a new pragma SPARK_95
11856 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11857 SPARK_Version): new type and variables to store the SPARK version
11859 (SPARK_Mode): return True when SPARK_Version is set
11860 * par-prag.adb: Correct indentation
11861 (Prag): take Pragma_SPARK_95 into account
11862 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11865 2011-08-01 Robert Dewar <dewar@adacore.com>
11867 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11868 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11869 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11871 2011-08-01 Pascal Obry <obry@adacore.com>
11873 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11874 Target_Name to Get_Path call.
11875 (Parse_Single_Project): Likewise.
11876 (Post_Parse_Context_Clause): Likewise.
11877 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11878 Call Initialise_Project_Path with the proper Target_Name.
11879 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11881 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11882 with the proper Target_Name.
11883 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11884 Part.Parse routine.
11885 (Parse_Project_And_Apply_Config): Likewise.
11886 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11887 This is fine as this part of the code is supporting only native
11889 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11890 is fine as this part of the code is supporting only native compilation.
11892 2011-08-01 Yannick Moy <moy@adacore.com>
11894 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11895 of homonym, unless the homonym is one of the cases allowed in SPARK
11896 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11897 package declaration occurring after a body.
11899 2011-08-01 Robert Dewar <dewar@adacore.com>
11901 * checks.adb, exp_ch4.adb: Minor reformatting.
11903 2011-08-01 Javier Miranda <miranda@adacore.com>
11905 * einfo.ads (Access_Disp_Table): Fix documentation.
11906 (Dispatch_Table_Wrappers): Fix documentation.
11908 2011-08-01 Pascal Obry <obry@adacore.com>
11910 * prj-env.adb, prj-env.ads: Minor reformatting.
11912 2011-08-01 Yannick Moy <moy@adacore.com>
11914 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11915 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11916 procedures out of these packages.
11917 * errout.ads, errout.adb
11918 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11919 procedures in of this package
11920 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11921 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11922 on misplaced later vs initial declarations, like in Ada 83
11923 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11924 formal mode on attribute of private type whose full type declaration
11926 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11927 package declaration inside a package specification
11928 (Analyze_Full_Type_Declaration): issue error in formal mode on
11929 controlled type or discriminant type
11930 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11931 user-defined operator means that it should come from the source
11932 (New_Overloaded_Entity): issue error in formal mode on overloaded
11934 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11936 2011-08-01 Thomas Quinot <quinot@adacore.com>
11938 * atree.adb: Minor reformatting.
11939 * checks.adb: Minor reformatting.
11941 2011-08-01 Vincent Celier <celier@adacore.com>
11943 * s-parame-vms-ia64.ads: Fix typo in comment
11945 * s-parame-vms-restrict.ads: Removed, unused.
11947 2011-08-01 Javier Miranda <miranda@adacore.com>
11950 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11952 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11953 * sem_ch3.ads, sem_ch3.adb
11954 (Is_Constant_Bound): New extended version of the subprogram that was
11955 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11956 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11957 * sem_aux.ads (Constant_Value): Fix typo in comment.
11958 * checks.adb (Generate_Index_Checks): New implementation which, for
11959 array objects with constant bounds, generates the runtime check
11960 referencing the bounds of the array type. For other cases this routine
11961 provides its previous behavior obtaining such values from the array
11963 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11965 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11966 we cannot have semantic interpretations of the new node.
11968 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11970 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11973 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11975 * sem_ch8.adb: Minor code editing.
11976 * s-vxwext.adb: Remove trailing space.
11977 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11978 consistency with other files.
11980 2011-08-01 Thomas Quinot <quinot@adacore.com>
11982 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11984 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11986 * par-ch10.adb: reject parameterized expressions as compilation unit.
11987 * sem_ch4.adb: handle properly conditional expression with overloaded
11988 then_clause and no else_clause.
11990 2011-08-01 Tristan Gingold <gingold@adacore.com>
11992 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11993 like done by System.Aux_DEC.
11994 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11996 2011-08-01 Yannick Moy <moy@adacore.com>
11998 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11999 missing label at end of declaration (subprogram or package)
12000 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12001 of positional and named parameter association
12002 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12003 Error_Msg_SP which adds a prefix to the error message giving the name
12004 of the formal language analyzed
12005 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12006 access result type in subprogram, unconstrained array as result type,.
12007 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12009 * sem_ch8.adb: Code clean up.
12011 2011-08-01 Javier Miranda <miranda@adacore.com>
12013 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12014 * einfo.ads (Access_Disp_Table): Fix documentation.
12015 (Dispatch_Table_Wrappers): Fix documentation.
12016 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12017 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12018 to enforce the documentation of this attribute.
12019 (Set_Is_Interface): Cleanup the assertion.
12020 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12021 the Underlying_Type entity before reading attribute Access_Disp_Table.
12022 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12023 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12024 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12025 the Underlying_Type entity before reading attribute Access_Disp_Table.
12026 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12027 Locate the Underlying_Type entity before reading attribute
12030 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12032 * s-poosiz.ads: Additional overriding indicators.
12034 2011-08-01 Yannick Moy <moy@adacore.com>
12036 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12038 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12039 parameter specification does not include a subtype mark.
12040 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12041 formal mode on abstract subprogram.
12042 (Analyze_Subprogram_Specification): issue error in formal mode on
12043 user-defined operator.
12044 (Process_Formals): issue error in formal mode on access parameter and
12045 default expression.
12046 * sem_ch9.adb (Analyze_Abort_Statement,
12047 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12048 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12049 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12050 Analyze_Requeue, Analyze_Selective_Accept,
12051 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12052 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12053 issue error in formal mode on user-defined raise statement.
12055 2011-08-01 Thomas Quinot <quinot@adacore.com>
12057 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12058 declaration being hidden when overriding an implicit inherited
12060 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12061 (-gnats), do not complain about a source file that contains only a
12064 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12066 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12067 variable if already set.
12069 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12071 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12072 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12073 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12074 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12075 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12076 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12077 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12078 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12079 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12080 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12081 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12082 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12083 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12084 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12085 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12086 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12087 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12088 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12089 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12090 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12091 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12092 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12093 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12094 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12095 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12096 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12097 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12098 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12099 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12100 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12101 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12102 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12103 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12104 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12105 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12106 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12107 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12108 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12109 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12110 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12111 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12112 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12113 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12114 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12115 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12116 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12117 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12118 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12119 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12120 Use GNAT instead of GNARL.
12122 2011-08-01 Bob Duff <duff@adacore.com>
12124 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12125 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12126 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12129 2011-08-01 Yannick Moy <moy@adacore.com>
12131 * debug.adb (d.D) reverve flag for the SPARK mode
12132 (d.E) reverve flag for SPARK generation mode
12133 (d.F) reverve flag for Why generation mode
12134 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12135 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12136 functions which return True when the corresponding modes are set
12137 (Formal_Language): return "spark" or "alfa" when in formal verification
12139 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12140 Error_Msg to prefix the error message with a tag giving the formal
12142 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12143 message with a tag giving the formal language
12144 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12146 (Analyze_Case_Statement): issue error in formal mode on case statement
12147 with a single "others" case alternative
12148 (Analyze_Exit_Statement): issue errors in formal mode on exit
12149 statements which do not respect SPARK restrictions
12150 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12151 (Check_Unreachable_Code): always issue an error (not a warning) in
12152 formal mode on unreachable code (concerns both code after an infinite
12153 loop and after an unconditional jump, both not allowed in SPARK)
12154 * sem_ch6.adb (Analyze_Return_Statement): add call to
12155 Set_Return_Present for a procedure containing a return statement
12156 (already done for functions in Analyze_Function_Return)
12157 (Analyze_Function_Return): issue error in formal mode on extended
12158 return or if return is not last statement in function
12159 (Check_Missing_Return): issue error in formal mode if function does
12160 not end with return or if procedure contains a return
12161 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12162 function to detect if there is an inner scope of its parameter S which
12165 2011-08-01 Thomas Quinot <quinot@adacore.com>
12167 * sem_ch6.ads: Minor reformatting.
12169 2011-08-01 Javier Miranda <miranda@adacore.com>
12171 * sem_util.adb (Abstract_Interface_List): Complete condition when
12172 processing private type declarations to avoid reading unavailable
12174 (Is_Synchronized_Tagged_Type): Complete condition when processing
12175 private extension declaration nodes to avoid reading unavailable
12178 2011-08-01 Thomas Quinot <quinot@adacore.com>
12180 * sem_ch3.adb: Minor reformatting.
12182 2011-08-01 Thomas Quinot <quinot@adacore.com>
12184 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12185 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12186 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12187 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12188 for VMS, instead parametrize the common implementation with
12189 System.Parameters declarations.
12191 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12193 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12195 2011-08-01 Tristan Gingold <gingold@adacore.com>
12197 * seh_init.c: Fix SEH handler installation on win64.
12199 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12201 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12202 double analysis of an anonymous access to subprogram, because it can
12203 lead to improper sharing of profiles and a back-end crash.
12205 2011-08-01 Robert Dewar <dewar@adacore.com>
12207 * make.adb, sem_ch4.adb: Minor reformatting.
12208 * gcc-interface/Make-lang.in: Update dependencies.
12209 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12211 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12213 * gnat_rm.texi: Fix definition of Long_Integer.
12215 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12217 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12218 to prevent storage exhaustion.
12219 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12220 finalized is a function body, insert the cleanup code before the final
12221 return statement, to prevent spurious warnings.
12222 * s-pooglo.ads: add overriding indicator.
12224 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12226 * sem_ch4.adb (Operator_Check): improve error message when both a
12227 with_clause and a use_clause are needed to make operator usage legal.
12228 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12229 determine whether a compilation unit is visible within an other,
12230 either through a with_clause in the current unit, or a with_clause in
12231 its library unit or one one of its parents.
12233 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12235 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12236 over an arbitrary expression of an array or container type.
12237 * lib-xref.adb: clarify comment.
12239 2011-08-01 Bob Duff <duff@adacore.com>
12241 * einfo.ads: Minor reformatting.
12242 * debug.adb: Minor comment improvement.
12244 2011-08-01 Javier Miranda <miranda@adacore.com>
12246 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12247 consider hidden subprograms as valid candidates.
12249 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12251 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12253 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
12255 * gnat_ugn.texi: Fix typo.
12257 2011-08-01 Robert Dewar <dewar@adacore.com>
12259 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12260 lib-xref.adb: Minor reformatting
12262 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12264 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12265 when to generate a call to Move_Final_List.
12266 (Has_Controlled_Parts): Remove this function.
12268 2011-08-01 Geert Bosch <bosch@adacore.com>
12270 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12271 "," in choice list.
12273 2011-08-01 Thomas Quinot <quinot@adacore.com>
12275 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12276 explicit raise of a predefined exception as Comes_From_Source if the
12277 original N_Raise_Statement comes from source.
12279 2011-08-01 Robert Dewar <dewar@adacore.com>
12281 * sinfo.ads: Add comment.
12282 * sem_ch6.adb: Minor reformatting.
12284 2011-08-01 Robert Dewar <dewar@adacore.com>
12286 * freeze.adb (Freeze_Entity): Refine check for bad component size
12287 clause to avoid rejecting confirming clause when atomic/aliased present.
12289 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12291 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12292 better determine whether an entity reference is a write.
12293 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12295 * lib-xref.adb (Output_References): Do no suppress a read reference at
12296 the same location as an immediately preceeding modify-reference, to
12297 handle properly in-out actuals.
12299 2011-08-01 Tristan Gingold <gingold@adacore.com>
12301 * env.c (__gnat_setenv) [VMS]: Refine previous change.
12303 2011-08-01 Quentin Ochem <ochem@adacore.com>
12305 * i-cstrin.adb (New_String): Changed implementation, now uses only the
12306 heap to compute the result.
12308 2011-08-01 Robert Dewar <dewar@adacore.com>
12310 * atree.ads: Minor reformatting.
12312 2011-08-01 Emmanuel Briot <briot@adacore.com>
12314 * g-expect.adb (Get_Command_Output): Fix memory leak.
12316 2011-08-01 Geert Bosch <bosch@adacore.com>
12318 * cstand.adb (P_Float_Type): New procedure to print the definition of
12319 predefined fpt types.
12320 (P_Mixed_Name): New procedure to print a name using mixed case
12321 (Print_Standard): Use P_Float_Type for printing floating point types
12322 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12323 precision IEEE float.
12325 2011-08-01 Thomas Quinot <quinot@adacore.com>
12327 * sem_ch3.adb: Minor reformatting.
12329 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12331 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12332 the completion of a generic function, insert the new body rather than
12333 rewriting the original.
12335 2011-08-01 Yannick Moy <moy@adacore.com>
12337 * sinfo.ads, errout.ads: Typos in comments.
12339 2011-08-01 Robert Dewar <dewar@adacore.com>
12341 * par-endh.adb: Minor reformatting.
12343 2011-08-01 Robert Dewar <dewar@adacore.com>
12345 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12346 (Pre_Post_Aspects): New subtype.
12347 * par-ch12.adb (P_Generic): New syntax for aspects in packages
12348 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12349 * par-ch7.adb (P_Package): Remove Decl parameter
12350 (P_Package): Handle new syntax for aspects (before IS)
12351 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12353 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12354 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12355 (P_Package): Remove Decl parameter
12356 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12358 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12360 * sem_util.ads, sem_util.adb (Static_Boolean): New function
12361 * sinfo.ads: Document new syntax for aspects in packages etc.
12362 * sprint.adb: Handle new syntax of aspects before IS in package
12364 2011-08-01 Thomas Quinot <quinot@adacore.com>
12366 * atree.ads: Minor reformatting.
12367 * sem_prag.adb: Minor reformatting.
12369 2011-08-01 Robert Dewar <dewar@adacore.com>
12371 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12372 case expr alternative.
12374 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12376 * sem_ch12.adb: Fix typo.
12378 2011-08-01 Geert Bosch <bosch@adacore.com>
12380 * sem_prag.adb (Check_No_Link_Name): New procedure.
12381 (Process_Import_Or_Interface): Use Check_No_Link_Name.
12382 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12383 instead of Standard_Long_Long_Float_Size global. Preparation for
12384 eventual removal of per type constants.
12385 * exp_util.ads (Get_Stream_Size): New function returning the stream
12386 size value of subtype E.
12387 * exp_util.adb (Get_Stream_Size): Implement new function.
12388 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12390 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12392 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12394 2011-08-01 Geert Bosch <bosch@adacore.com>
12396 * cstand.adb: Fix comments.
12397 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12398 count of arguments.
12400 2011-08-01 Robert Dewar <dewar@adacore.com>
12402 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12404 2011-08-01 Geert Bosch <bosch@adacore.com>
12406 * atree.ads: Fix comment.
12408 2011-08-01 Robert Dewar <dewar@adacore.com>
12410 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12411 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12412 * par.adb: Add with for Namet.Sp.
12413 * par-tchk.adb: Minor reformatting.
12415 2011-08-01 Vincent Celier <celier@adacore.com>
12417 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12418 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12419 of the init procedure of a SAL.
12420 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12423 2011-08-01 Thomas Quinot <quinot@adacore.com>
12425 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12428 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12430 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12432 2011-08-01 Thomas Quinot <quinot@adacore.com>
12434 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12435 conformant with its spec (return True only for types that have
12436 an overriding Initialize primitive operation that prevents them from
12437 having preelaborable initialization).
12438 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12439 initialization for controlled types in Ada 2005 or later mode.
12441 2011-08-01 Robert Dewar <dewar@adacore.com>
12443 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12445 (Same_Aspect): New function.
12446 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12447 Type_Invariant, Precondition, Postcondition.
12448 * snames.ads-tmpl: Add Name_Type_Invariant.
12450 2011-08-01 Robert Dewar <dewar@adacore.com>
12452 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12454 (Freeze_All_Ent): Fix error in handling inherited aspects.
12455 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12456 already analyzed, but don't skip entire processing of a declaration,
12457 that's wrong in some cases of declarations being rewritten.
12458 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12459 Don't delay for integer, string literals
12460 Treat predicates in usual manner for delay, remove special case code,
12462 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12463 (Build_Predicate_Function): Update saved expression in aspect
12464 (Build_Invariant_Procedure): Update saved expression in aspect
12465 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12466 of replacement of discriminant references if the reference is simple.
12468 2011-08-01 Robert Dewar <dewar@adacore.com>
12470 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12471 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12472 Static_Predicate and Dynamic_Predicate.
12473 (Build_Predicate_Function): Add processing for Static_Predicate
12474 and Dynamic_Predicate.
12475 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12476 (From_Static_Predicate): New flag
12477 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12479 2011-08-01 Robert Dewar <dewar@adacore.com>
12481 * usage.adb: Documentation cleanup for Ada version modes in usage.
12482 * expander.adb: Minor reformatting.
12484 2011-08-01 Robert Dewar <dewar@adacore.com>
12486 * atree.ads: Minor comment fix.
12487 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12488 a-witeio.ads, sem_prag.adb: Minor reformatting.
12490 2011-08-01 Doug Rupp <rupp@adacore.com>
12492 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12493 pointers. Use descrip.h header file for convenience. Add some
12496 2011-08-01 Robert Dewar <dewar@adacore.com>
12498 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12499 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12500 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12502 (Check_Aspect_At_End_Of_Declarations): New procedure
12503 (Analye_Aspect_Specification): Minor changes for above procedures
12504 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12505 specification node as well.
12507 2011-08-01 Pascal Obry <obry@adacore.com>
12509 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12510 Windows files. Use GetFilesAttributes() in this case to check for file
12511 existence instead of returning with an error code.
12513 2011-08-01 Vincent Celier <celier@adacore.com>
12515 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12516 High is above Source length.
12518 2011-08-01 Robert Dewar <dewar@adacore.com>
12520 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12522 2011-08-01 Robert Dewar <dewar@adacore.com>
12524 * aspects.ads (Boolean_Aspects): New subtype.
12525 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12526 for derived types in cases where the parent type and derived type have
12528 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12529 with aspects when parent type also has aspects.
12530 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12531 boolean expression at this point).
12532 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12533 accordance with final decision on the Ada 2012 feature.
12534 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12536 2011-08-01 Matthew Heaney <heaney@adacore.com>
12538 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12540 2011-08-01 Pascal Obry <obry@adacore.com>
12542 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12543 Fix Replace_Slice when High is above current string size.
12544 (Replace_Slice): Fix DL computation when High is above current
12547 2011-08-01 Gary Dismukes <dismukes@adacore.com>
12549 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12551 2011-08-01 Matthew Heaney <heaney@adacore.com>
12553 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12556 2011-08-01 Pascal Obry <obry@adacore.com>
12558 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12561 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12563 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12564 access to protected subprograms in generic bodies.
12565 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12566 protected type, indicate that the convention of the subprogram is
12567 Convention_Protected, because it may be used in subsequent declarations
12568 within the protected declaration.
12570 2011-08-01 Vincent Celier <celier@adacore.com>
12572 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12573 and "final" procedures when the name of the library is "ada", to avoid
12574 duplicate symbols "adainit" and "adafinal" in executables.
12576 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12578 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12579 quantified expression that appears within a postcondition and uses the
12580 Ada2012 'Result attribute.
12582 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12584 * init.c (__gnat_error_handler): Cast reason to int.
12585 (__gnat_install_handler): Explain sa_sigaction use.
12587 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12589 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12590 subprogram has copy-in copy-out parameters, try to promote the mode of
12591 the return type if it is passed in registers.
12593 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12595 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12596 left operand as addressable.
12598 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
12600 * gcc-interface/gigi.h (build_function_stub): Remove.
12601 (build_return_expr): Likewise.
12602 (convert_vms_descriptor): Declare.
12603 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12604 (build_function_stub): Move to...
12605 * gcc-interface/utils2.c (build_return_expr): Move to...
12606 * gcc-interface/trans.c (build_function_stub): ...here.
12607 (build_return_expr): ...here.
12608 (Subprogram_Body_to_gnu): Add local variable for language_function.
12609 Disconnect the parameter attributes cache, if any, once done with it.
12610 Call end_subprog_body only after setting the end_locus.
12611 Build the stub associated with the function, if any, at the very end.
12612 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12613 variables and streamline control flow.
12615 2011-07-23 Arnaud Charlet <charlet@adacore.com>
12618 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12619 g-trasym-dwarf.adb.
12621 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12624 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12625 Assign to act.sa_sigaction.
12626 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12627 current->return_address to char * before arithmetic.
12629 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12631 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12632 Correct argument types.
12633 Extract code from reason.
12634 (__gnat_install_handler): Assign to act.sa_sigaction.
12636 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
12638 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12639 (GNAT1_OBJS): ...here.
12641 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
12644 * g-socthi-mingw.adb (Fill): Fix formatting.
12646 * gcc-interface/gigi.h: Move around comment.
12648 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12651 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12653 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
12656 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12658 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
12660 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12661 range comparison if Pmode is SImode.
12663 2011-07-12 Laurent GUERBY <laurent@guerby.net>
12664 Eric Botcazou <ebotcazou@adacore.com>
12666 * adadecode.c: Wrap up in extern "C" block.
12667 * adadecode.h: Likewise.
12668 * adaint.c: Likewise. Remove 'const' keyword.
12669 * adaint.h: Likewise.
12670 * argv.c: Likewise.
12671 * atree.h: Likewise.
12673 * cstreams.c: Likewise.
12675 * exit.c: Likewise.
12677 * final.c: Likewise.
12678 * init.c: Likewise.
12679 * initialize.c: Likewise.
12680 * link.c: Likewise.
12681 * namet.h: Likewise.
12682 * nlists.h: Likewise.
12683 * raise.c: Likewise.
12684 * raise.h: Likewise.
12685 * repinfo.h: Likewise.
12686 * seh_init.c: Likewise.
12687 * targext.c: Likewise.
12688 * tracebak.c: Likewise.
12689 * uintp.h: Likewise.
12690 * urealp.h: Likewise.
12691 * xeinfo.adb: Wrap up generated C code in extern "C" block.
12692 * xsinfo.adb: Likewise.
12693 * xsnamest.adb: Likewise.
12694 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12695 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12696 * gcc-interface/misc.c: Likewise.
12697 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12698 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
12699 ada/targext.o here...
12700 (GNAT_ADA_OBJS): ...and not here.
12701 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12702 (GNATBIND_OBJS): Reorder.
12704 2011-07-07 Richard Henderson <rth@redhat.com>
12706 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12707 dwarf2out_frame_init.
12709 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
12711 * gcc-interface/misc.c (gnat_init): Tweak previous change.
12713 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12716 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12718 2011-07-06 Richard Guenther <rguenther@suse.de>
12720 * gcc-interface/misc.c (gnat_init): Merge calls to
12721 build_common_tree_nodes and build_common_tree_nodes_2.
12722 Re-initialize boolean_false_node.
12724 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12725 Olivier Hainque <hainque@adacore.com>
12726 Nicolas Setton <setton@adacore.com>
12728 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12729 the type according to the ARTIFICIAL_P parameter.
12730 (create_type_decl): Likewise.
12731 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12733 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12735 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12736 (gnatbind): Likewise.
12738 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12740 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12742 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12744 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12745 local variable throughout. Remove useless call to Base_Type.
12746 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12747 Take it also into account for the volatileness of the field. Set the
12748 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12750 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12752 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12753 on a dereference built for a by-ref object if it has an address clause.
12755 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12757 * einfo.ads (Address_Taken): Document use for the second argument of
12758 Asm_Input and Asm_Output attributes.
12759 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12760 argument is an entity name, then set Address_Taken on it.
12761 <Attribute_Asm_Output>: Likewise.
12762 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12763 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12764 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12765 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12767 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12769 PR middle-end/46500
12770 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12772 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12774 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12775 (ada/utils.o): Update dependencies.
12776 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12777 ../../../libcpp/libcpp.a.
12778 * gcc-interface/utils.c: Include common/common-target.h.
12779 (process_attributes): Use targetm_common.have_named_sections.
12781 2011-06-07 Richard Guenther <rguenther@suse.de>
12783 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12786 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12788 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12789 TREE_THIS_NOTRAP flag.
12791 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12793 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12796 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12798 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12799 constants whose full view has discriminants specially.
12801 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12803 * gcc-interface/utils.c: Include diagnostic.h.
12804 (gnat_write_global_declarations): Output debug information for all
12805 global type declarations before finalizing the compilation unit.
12806 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12808 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12810 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12812 2011-05-25 Kai Tietz <ktietz@redhat.com>
12814 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12815 initialization instead of const/none-const pointer assignment.
12817 2011-05-24 Joseph Myers <joseph@codesourcery.com>
12819 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12820 $(EXTRA_GNAT1_OBJS).
12821 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12822 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12823 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12824 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12825 libcommon-target.a instead of prefix.o.
12827 2011-05-21 Joseph Myers <joseph@codesourcery.com>
12830 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12832 2011-05-20 Joseph Myers <joseph@codesourcery.com>
12834 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12835 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12836 instead of version.o.
12838 2011-05-18 Kai Tietz <ktietz@redhat.com>
12840 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12841 boolean_false_node instead of integer_zero_node.
12842 (convert_with_check): Likewise.
12843 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12845 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12847 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12848 type of the parameter is an unconstrained array, convert the actual to
12849 the type of the formal in the In Out and Out cases as well.
12851 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12853 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12854 call build_function_type_array or build_varargs_function_type_array
12856 (create_subprog_type): Don't call build_function_type; call
12857 build_function_type_vec instead.
12859 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12861 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12862 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12863 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12865 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12867 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12869 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12870 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12872 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12874 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12876 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12878 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12879 instead of accessing TYPE_ARG_TYPES directly.
12880 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12882 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12885 * gcc-interface/gigi.h (get_variant_part): Declare.
12886 * gcc-interface/decl.c (get_variant_part): Make global.
12887 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12888 types have the same constant size, are record types and T1 has a
12889 variant part while T2 doesn't.
12891 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12893 * gcc-interface/utils.c (begin_subprog_body): Do not call
12895 (end_subprog_body): Likewise.
12897 2011-05-04 Richard Guenther <rguenther@suse.de>
12899 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12901 (pos_to_constructor): Likewise.
12903 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12904 Eric Botcazou <ebotcazou@adacore.com>
12906 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12907 of build_function_type. Adjust calls to...
12908 (build_raise_check): ...this. Do not take a void_tree parameter.
12909 Call build_function_type_list instead of build_function_type.
12910 Fix head comment and swap couple of conditional blocks.
12912 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12914 * gnatvsn.ads (Library_Version): Bump to 4.7.
12915 (Current_Year): Bump to 2011.
12917 2011-04-29 Michael Matz <matz@suse.de>
12919 * gcc-interface/misc.c (gnat_handle_option): Set
12920 warn_maybe_uninitialized.
12922 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12924 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12925 the Watson/McCabe paper.
12927 2011-04-23 Jim Meyering <meyering@redhat.com>
12929 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12931 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12933 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12936 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12938 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12940 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12941 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12942 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12943 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12944 <all>: Do not set flags on the reused DECL node coming from an alias.
12945 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12946 don't need debug info here...
12947 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12948 (gigi): Adjust calls to create_subprog_decl.
12949 (build_raise_check): Likewise.
12950 (establish_gnat_vms_condition_handler): Likewise.
12951 (Compilation_Unit_to_gnu): Likewise.
12952 (gnat_to_gnu): Likewise.
12954 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12956 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12957 (NO_REORDER_ADAFLAGS): New variable.
12958 (EXTRA_GNATTOOLS): Always define.
12959 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12960 Clean up and adjust list of files compiled with special options.
12961 * gcc-interface/Make-lang.in: Likewise.
12962 (ada/decl.o): Cosmetical change.
12963 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12965 2011-04-20 Jim Meyering <meyering@redhat.com>
12967 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12969 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12971 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12972 $(CFLAGS) on the link line.
12974 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12976 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12977 padded type built for the return type if it is unconstrained.
12979 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12981 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12983 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12985 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12986 before calling TREE_CHAIN.
12987 * gcc-interface/misc.c (gnat_init_ts): New function.
12988 (LANG_HOOKS_INIT_TS): Define.
12990 2011-04-12 Martin Jambor <mjambor@suse.cz>
12992 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12993 instead of cgraph_node.
12995 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12997 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12998 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13001 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13003 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13004 of aggregate types that contain a placeholder.
13006 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13008 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13010 (handle_type_generic_attribute): Likewise.
13012 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13015 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13017 2011-04-04 Kai Tietz <ktietz@redhat.com>
13020 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13023 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13025 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13026 type case, do not strip a padding type around the array type.
13028 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13030 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13033 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13035 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13036 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13037 code for -feliminate-unused-debug-types.
13038 (gnat_post_options): Likewise.
13040 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13042 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13043 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13046 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13048 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13049 DECL_ARTIFICIAL flag on enumeration types.
13051 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13053 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13054 fat pointer types artificial unconditionally.
13055 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13058 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13060 * gcc-interface/gigi.h (get_dummy_type): Declare.
13061 (build_dummy_unc_pointer_types): Likewise.
13062 (finish_fat_pointer_type): Likewise.
13063 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13064 fat pointer type has been built, complete it in place.
13065 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13066 and thin pointers. Remove useless variable.
13067 (finish_fat_pointer_type): Make global and move to...
13068 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13069 (get_dummy_type): New function.
13070 (build_dummy_unc_pointer_types): Likewise.
13071 (gnat_pushdecl): Propage the name to the anonymous variants only.
13072 (update_pointer_to): Only adjust the pointer types in the unconstrained
13075 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13077 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13078 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13079 if this is a Taft amendment type and the full declaration is available.
13080 * gcc-interface/trans.c (process_type): Likewise.
13081 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13082 (process_freeze_entity): Likewise.
13083 * gcc-interface/utils.c (dummy_global): New static variable.
13084 (gnat_write_global_declarations): If there are types declared as used
13085 at the global level, insert them in the global hash table.
13087 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13089 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13090 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13091 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13093 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13094 flag of the type accordingly.
13095 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13097 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13099 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13100 finalizing types when updating the pointers to the designated type.
13101 <all>: Finalize the deferred types even if we didn't defer processing
13102 of incomplete types in this invocation.
13104 2011-04-01 Olivier Hainque <hainque@adacore.com>
13105 Nicolas Setton <setton@adacore.com>
13106 Eric Botcazou <ebotcazou@adacore.com>
13108 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13109 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13111 2011-03-28 Kai Tietz <ktietz@redhat.com>
13113 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13115 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13116 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13118 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13120 2011-03-28 Tristan Gingold <gingold@adacore.com>
13123 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13124 Use ada output of gnatbind.
13125 (ada/b_gnatb.adb): Ditto.
13126 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13127 (ada.mostlyclean, ada.stage1)
13128 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13129 (ada.stagefeedback): Adjust.
13130 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13131 Use ada output of gnatbind.
13132 (b_gnatm.adb): Ditto.
13133 (b_gnatl.o, b_gnatm.o): New rules.
13135 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13137 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13138 for the padded type built to support a specified size or alignment.
13140 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13142 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13143 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13144 unconditionally to the end of the unit when the designated type is
13146 <all>: Rename local variable. Attempt to un-defer types only and do it
13147 for limited_with'ed types as well.
13148 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13149 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13150 consistently and remove redundant call to finalize_from_with_types.
13152 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13154 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13155 subprograms without a previous spec declared in the same unit.
13156 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13157 subprograms at the end of the unit instead of at the beginning.
13158 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13159 isn't public for the special handling of non-inline functions nested
13160 inside inline external functions.
13162 2011-03-25 Jeff Law <law@redhat.com>
13164 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13166 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13168 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13169 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13170 to compute Set_Size_Depends_On_Discriminant.
13171 (Layout_Type): Call it on array types in back-end layout mode.
13172 * sem_util.adb (Requires_Transient_Scope): Return true for array
13173 types only if the size depends on the value of discriminants.
13174 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13175 type if the RHS is a call to a function that returns an unconstrained
13176 type with default discriminant.
13178 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13180 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13181 non-conversion to the nominal result type at the end.
13183 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13185 * gcc-interface/trans.c (create_temporary): New function taken from...
13186 (create_init_temporary): ...here. Call it.
13187 (call_to_gnu): Create the temporary for the return value early, if any.
13188 Create it for a function with copy-in/copy-out parameters if there is
13189 no target; in other cases of copy-in/copy-out, use another temporary.
13190 Push the new binding level lazily. Add and rename local variables.
13192 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13194 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13196 (set_rm_size): Likewise.
13198 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13200 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13201 for the padded type built in order to support a specified alignment.
13202 Fix incorrect formatting.
13204 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13207 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13209 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13211 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13212 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13213 to the end of the list. Adjust recursive call. Rename local variable.
13214 If REORDER is true, reorder components of the record type.
13215 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13216 components_to_record and adjust the parameter list.
13218 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13220 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13221 disabled, use the variable for bounds of loop iteration scheme.
13223 2011-03-21 Kai Tietz <ktietz@redhat.com>
13226 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13228 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13230 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13231 out whether the expression is read-only. Short-circuit placeholder
13232 case and rename a couple of local variables.
13234 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13236 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13237 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13238 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13239 (convert): Deal with conversions from a smaller form type specially.
13241 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13243 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13244 its argument, except for the special -I- switch.
13246 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13248 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13251 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
13253 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13255 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
13257 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13259 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13260 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
13261 instead of GNAT_FORMAL. Protect the expression against multiple uses.
13262 Do not generate the check directly, instead instantiate the template
13263 check present in the descriptor.
13264 (make_descriptor_field): Move around.
13265 (build_vms_descriptor32): Build a template check in the POINTER field.
13266 (build_vms_descriptor): Remove useless suffixes.
13267 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13269 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
13272 * targext.c: Include target files if IN_RTS is defined.
13274 2011-01-26 Richard Guenther <rguenther@suse.de>
13277 * targext.c: Include config.h.
13278 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13281 2011-01-04 Pascal Obry <obry@adacore.com>
13282 Eric Botcazou <ebotcazou@adacore.com>
13284 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13286 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13288 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13289 end-of-case on the end label and its associated gotos, if any.
13291 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13293 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13294 expressions of the parameter cache within the statement group of
13295 the CICO mechanism.
13297 2011-01-04 Olivier Hainque <hainque@adacore.com>
13298 Eric Botcazou <ebotcazou@adacore.com>
13300 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13301 (set_end_locus_from_node): New function.
13302 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13303 make and the function end_locus.
13304 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13305 for the elaboration subprogram.
13306 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13307 set the end_locus of the expression as well.
13309 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
13312 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13313 variables that are referenced in exception handlers volatile.
13317 Copyright (C) 2011 Free Software Foundation, Inc.
13319 Copying and distribution of this file, with or without modification,
13320 are permitted in any medium without royalty provided the copyright
13321 notice and this notice are preserved.
13323 * gnat_rm.texi: Ramification of pragma Eliminate documentation
13324 - fix bugs in the description of Source_Trace;
13325 - get rid of UNIT_NAME;
13327 2011-08-02 Javier Miranda <miranda@adacore.com>
13330 (Build_Dispatching_Requeue): Adding support for VM targets
13331 since we cannot directly reference the Tag entity.
13332 * exp_sel.adb (Build_K): Adding support for VM targets.
13333 (Build_S_Assignment): Adding support for VM targets.
13335 (Default_Prim_Op_Position): In VM targets do not restrict availability
13336 of predefined interface primitives to compiling in Ada 2005 mode.
13337 (Is_Predefined_Interface_Primitive): In VM targets this service is not
13338 restricted to compiling in Ada 2005 mode.
13339 (Make_VM_TSD): Generate code that declares and initializes the OSD
13340 record. Needed to support dispatching calls through synchronized
13343 (Make_Predefined_Primitive_Specs): Enable generation of predefined
13344 primitives associated with synchronized interfaces.
13345 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
13346 primitives associated with synchronized interfaces.
13348 2011-08-02 Yannick Moy <moy@adacore.com>
13350 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
13351 statements hidden in SPARK if preceded by the HIDE directive
13352 (Parse_Exception_Handlers): mark each exception handler in a sequence of
13353 exception handlers as hidden in SPARK if preceded by the HIDE directive
13354 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
13355 if starting with the HIDE directive
13356 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
13357 starting with the HIDE directive; mark the declarations in a private
13358 part as hidden in SPARK if the private part starts with the HIDE
13360 * restrict.adb, restrict.ads
13361 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
13362 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
13363 argument node belongs to a part which is hidden in SPARK
13364 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
13365 parts in SPARK; protect the possibly costly call to
13366 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
13367 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
13368 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
13369 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
13371 (Scan): recognize special comment starting with '#' and followed by
13372 SPARK keyword "hide" as a HIDE directive.
13374 2011-08-02 Yannick Moy <moy@adacore.com>
13376 * types.ads, erroutc.ads: Minor reformatting.
13378 2011-08-02 Vincent Celier <celier@adacore.com>
13380 * link.c: Add response file support for cross platforms.
13382 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13384 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
13385 in an association, set parent field of copy before partial analysis.
13386 * sem_res.adb (Resolve_Slice): create reference to itype only when
13387 expansion is enabled.
13389 2011-08-02 Yannick Moy <moy@adacore.com>
13391 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
13392 for new flag denoting which subprogram bodies are in ALFA
13393 * restrict.adb, sem_ch7.adb: Update comment
13394 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
13395 sem_ch9.adb, sem_res.adb: Add calls to
13396 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
13397 * sem_ch6.adb (Analyze_Function_Return): add calls to
13398 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
13399 middle of the body, and extended return.
13400 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13401 False when missing return.
13402 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13403 to True for subprograms whose spec is in ALFA. Remove later on the flag
13404 on the entity used for a subprogram body when there exists a separate
13406 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13407 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13408 False, otherwise do nothing.
13410 2011-08-02 Robert Dewar <dewar@adacore.com>
13412 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13414 2011-08-02 Yannick Moy <moy@adacore.com>
13416 * sem_ch4.ads: minor formatting.
13418 2011-08-02 Yannick Moy <moy@adacore.com>
13420 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13421 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13422 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13423 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13424 opt.ads: cleanup of SPARK mode
13426 2011-08-02 Yannick Moy <moy@adacore.com>
13428 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13430 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13431 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13433 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13434 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13435 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13436 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13438 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13440 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13441 functions whose return type is not in ALFA.
13442 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13444 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13445 parameter's type is not in ALFA.
13446 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13449 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13451 * sem_ch6 (Analyze_Expression_Function): treat the function as
13452 Inline_Always, and introduce a subprogram declaration for it when it is
13454 * inline.adb (Add_Inlined_Body): recognize bodies that come from
13455 expression functions, so that the back-end can determine whether they
13456 can in fact be inlined.
13457 * sem_util.adb (Is_Expression_Function): predicate to determine whether
13458 a function body comes from an expression function.
13460 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13462 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13463 null exclusions to test Can_Never_Be_Null on the anonymous access types
13464 of the formals rather than testing the formals themselves. Exclude this
13465 check in cases where the Old_Formal is marked as a controlling formal,
13466 to avoid issuing spurious errors for bodies completing dispatching
13467 operations (due to the flag not getting set on controlling access
13468 formals in body specs).
13469 (Find_Corresponding_Spec): When checking full and subtype conformance of
13470 subprogram bodies in instances, pass Designated and E in that order, for
13471 consistency with the expected order of the formals (New_Id followed by
13474 2011-08-02 Robert Dewar <dewar@adacore.com>
13476 * sem_ch8.adb: Minor reformatting.
13478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13480 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13481 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13482 primitive operations of class-wide actuals.
13484 2011-08-02 Javier Miranda <miranda@adacore.com>
13486 * exp_atag.ads, exp_atag.adb
13487 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13488 since its value is implicitly passed in argument Typ.
13489 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13490 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13491 Build_Common_Dispatching_Select_Statements.
13493 2011-08-02 Robert Dewar <dewar@adacore.com>
13495 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13496 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13497 Minor reformatting.
13499 2011-08-02 Robert Dewar <dewar@adacore.com>
13501 * sem_res.adb: Minor reformatting.
13502 * sem_prag.adb: Minor reformatting.
13504 2011-08-02 Javier Miranda <miranda@adacore.com>
13506 * exp_atag.adb, exp_atags.ads
13507 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13508 by the tagged type Entity. Required to use this routine in the VM
13509 targets since we do not have available the Tag entity in the VM
13512 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13513 Ada.Tags has not been previously loaded.
13515 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13516 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13518 (Enclosing_Dynamic_Scope): Add missing support to handle the full
13519 view of enclosing scopes. Required to handle enclosing scopes that
13520 are synchronized types whose full view is a task type.
13522 (Build_VM_TSDs): Minor code improvement to avoid generating and
13523 analyzing lists with empty nodes.
13524 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13525 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13526 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13527 (Make_Disp_Timed_Select_Body): Add support for VM targets.
13528 (Make_Select_Specific_Data_Table): Add support for VM targets.
13529 (Make_VM_TSD): Generate code to initialize the SSD structure of
13532 2011-08-02 Yannick Moy <moy@adacore.com>
13534 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13535 cross-references section in ALI.
13536 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13537 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13539 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13540 subprogram or package entity of a node
13541 (Is_Local_Reference_Type): new function returns True for references
13542 selected in local cross-references.
13543 (Lt): function extracted from Lt in Output_References
13544 (Write_Entity_Name): function extracted from Output_References
13545 (Generate_Definition): generate reference with type 'D' for definition
13546 of objects (object declaration and parameter specification), with
13547 appropriate locations and units, for use in local cross-references.
13548 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13549 references of type 'I' for initialization in object definition.
13550 (Output_References): move part of function Lt and procedure
13551 Write_Entity_Name outside of the body. Ignore references of types 'D'
13552 and 'I' introduced for local cross-references.
13553 (Output_Local_References): new procedure to output the local
13554 cross-references sections.
13555 (Lref_Entity_Status): new array defining whether an entity is a local
13556 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13557 with 'I' type when initialization expression is present.
13558 * get_scos.adb, get_scos.ads: Correct comments and typos
13560 2011-08-02 Javier Miranda <miranda@adacore.com>
13562 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13564 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13566 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13569 2011-08-02 Vincent Celier <celier@adacore.com>
13571 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13572 (No_Space_Img): New function
13573 (Find_Excluded_Sources): When reading from a file, record the file name
13574 and the line number for each excluded source.
13575 (Mark_Excluded_Sources): When reporting an error, if the excluded
13576 sources were read from a file, include file name and line number in
13579 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13581 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13583 2011-08-02 Robert Dewar <dewar@adacore.com>
13585 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13587 2011-08-02 Javier Miranda <miranda@adacore.com>
13589 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13590 generation of TSDs to the DOTNET compiler.
13591 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13592 generation of TSDs to the DOTNET compiler.
13594 2011-08-02 Javier Miranda <miranda@adacore.com>
13596 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13597 record of all the tagged types declared inside library level package
13598 declarations, library level package bodies or library level subprograms.
13599 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13600 associated with a given tagged type.
13601 (Build_VM_TSDs): New subprogram.
13602 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13603 compilation units that are subprograms.
13604 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13605 compilation units that are package bodies.
13606 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13607 units that are a package declaration or a package instantiation.
13608 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13609 reorganization to improve the error generated by the frontend when the
13610 function Ada.Tags.Secondary_Tag is not available.
13611 * rtsfind.ads (RE_Register_TSD): New runtime entity.
13612 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13614 2011-08-02 Javier Miranda <miranda@adacore.com>
13616 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13618 2011-08-02 Robert Dewar <dewar@adacore.com>
13620 * s-imenne.ads: Minor reformatting.
13622 2011-08-02 Robert Dewar <dewar@adacore.com>
13624 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13625 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13626 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13628 2011-08-02 Robert Dewar <dewar@adacore.com>
13630 * einfo.ads (Materialize_Entity): Document this is only for renamings
13631 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13632 required debug information in the case where we transform the object
13633 declaration into a renaming declaration.
13634 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13636 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13637 Materialize_Entity.
13639 2011-08-02 Robert Dewar <dewar@adacore.com>
13641 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13642 Suppress_Init_Procs.
13643 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13644 Suppress_Initialization/Initialization_Suppressed.
13645 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13646 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13647 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13648 * sem_prag.adb: New processing for pragma Suppress_Initialization.
13650 2011-08-02 Robert Dewar <dewar@adacore.com>
13652 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13653 Minor reformatting.
13655 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13657 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13658 only have inheritable classwide pre/postconditions.
13660 2011-08-02 Javier Miranda <miranda@adacore.com>
13662 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13663 * rtsfind.ads (RE_Check_TSD): New runtime entity.
13664 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13665 checks if the external tag of a type is the same as the external tag
13666 of some other declaration.
13668 2011-08-02 Thomas Quinot <quinot@adacore.com>
13670 * s-taskin.ads: Minor reformatting.
13672 2011-08-02 Emmanuel Briot <briot@adacore.com>
13674 * g-comlin.adb (Display_Help): swap the order in which it prints the
13675 short help and the general usage.
13677 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13679 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13680 the aspect declarations and attach them to the generic copy for
13681 subsequent analysis.
13682 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13683 declarations of the generic tree to the new subprogram declarations.
13684 * sem_attr.adb (Check_Precondition_Postcondition): recognize
13685 conditions that apply to a subprogram instance.
13687 2011-08-02 Robert Dewar <dewar@adacore.com>
13689 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13691 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13693 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13694 private type with a tagged full view is not derived in the immediate
13695 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13697 2011-08-02 Robert Dewar <dewar@adacore.com>
13699 * exp_ch4.adb: Minor reformatting.
13701 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13703 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
13704 Ada2012 iterator, the loop will be rewritten during expansion into a
13705 while loop with a cursor and an element declaration. Do not analyze the
13706 body in this case, because if the container is for indefinite types the
13707 actual subtype of the elements will only be determined when the cursor
13708 declaration is analyzed.
13710 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13712 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13713 size/alignment related attributes in CodePeer_Mode.
13715 2011-08-02 Gary Dismukes <dismukes@adacore.com>
13717 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13718 Prepend_Element, since this can result in the operation getting the
13719 wrong slot in the full type's dispatch table if the full type has
13720 inherited operations. The incomplete type's operation will get added
13721 to the proper position in the full type's primitives
13722 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13723 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13724 dispatching operations, since there are cases where nonprimitive
13725 subprograms can get added to the list of incomplete dependents (such
13726 as subprograms in nested packages).
13727 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13728 private part when determining whether to add a primitive with a
13729 parameter of a tagged incomplete type to the Private_Dependents list.
13730 Such primitives can also occur in the visible part, and should not have
13731 been excluded from being private dependents.
13732 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13733 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13734 list of a Taft-amendment incomplete type is a primitive before issuing
13735 an error that the full type must appear in the same unit. There are
13736 cases where nonprimitives can be in the list (such as subprograms in
13738 * sem_disp.adb (Derives_From): Use correct condition for checking that
13739 a formal's type is derived from the type of the corresponding formal in
13740 the parent subprogram (the condition was completely wrong). Add
13741 checking that was missing for controlling result types being derived
13742 from the result type of the parent operation.
13744 2011-08-02 Yannick Moy <moy@adacore.com>
13746 * errout.adb (First_Node): minor renaming
13747 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13750 2011-08-02 Yannick Moy <moy@adacore.com>
13752 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13753 before accessing operands.
13754 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13755 decide whether an initialization expression respects SPARK rules, as
13756 the plain node is the expanded one. This allows for more valid warnings
13758 * gnat_rm.texi: Minor update.
13760 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13762 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13765 2011-08-02 Robert Dewar <dewar@adacore.com>
13767 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13769 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13771 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13772 loop statements and the element renaming declaration with a block when
13773 the element type is controlled.
13775 2011-08-02 Yannick Moy <moy@adacore.com>
13777 * sinfo.ads: Minor formatting.
13779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13781 * sem_aggr.adb (Add_Association): if the association has a box and no
13782 expression, use the Sloc of the aggregate itself for the new
13784 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13787 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13789 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13790 When a container is provided via a function call, generate a renaming
13791 of the function result. This avoids the creation of a transient scope
13792 and the premature finalization of the container.
13793 * exp_ch7.adb (Is_Container_Cursor): Removed.
13794 (Wrap_Transient_Declaration): Remove the supression of the finalization
13795 of the list controller when the declaration denotes a container cursor,
13798 2011-08-02 Yannick Moy <moy@adacore.com>
13800 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13801 node is from source, instead of the original node being from source.
13803 (Resolve_Array_Aggregate): refine the check for a static expression, to
13804 recognize also static ranges
13805 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13806 Array_Type_Declaration): postpone the test for the type being a subtype
13807 mark after the type has been resolved, so that component-selection and
13808 expanded-name are discriminated.
13809 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13810 to distinguish the case of an iteration scheme, so that an error is
13811 issed on a non-static range in SPARK except in an iteration scheme.
13812 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13813 In_Iter_Schm = True.
13814 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13815 user-defined operators so that they are allowed in renaming
13817 (Find_Selected_Component): refine the check for prefixing of operators
13818 so that they are allowed in renaming. Move the checks for restrictions
13819 on selector name after analysis discriminated between
13820 component-selection and expanded-name.
13821 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13822 concatenation argument of string type if it is static.
13823 * sem_util.adb, sem_util.ads
13824 (Check_Later_Vs_Basic_Declarations): add a new function
13825 Is_Later_Declarative_Item to decice which declarations are allowed as
13826 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13827 mode, add that renamings are considered as later items.
13828 (Enclosing_Package): new function to return the enclosing package
13829 (Enter_Name): correct the rule for homonyms in SPARK
13830 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13831 from source (result of expansion) to avoid issuing wrong warnings.
13833 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13835 * errout.adb: On anything but an expression First_Node returns its
13838 2011-08-02 Pascal Obry <obry@adacore.com>
13840 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13842 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13844 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13845 Set the associated loop as the related expression of internally
13847 * exp_ch7.adb (Is_Container_Cursor): New routine.
13848 (Wrap_Transient_Declaration): Supress the finalization of the list
13849 controller when the declaration denotes a container cursor.
13851 2011-08-02 Yannick Moy <moy@adacore.com>
13853 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13855 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13856 expression is a simple expression. This check cannot be performed in
13857 the semantics, so just drop it.
13858 (P_Index_Or_Discriminant_Constraint): move check that the index or
13859 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13860 semantics. Other cases were previously checked in the semantics.
13861 * par-ch4.adb (P_Name): move checks that a selector name is not
13862 character literal or an operator symbol to Find_Selected_Component in
13864 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13865 declarations are not placed after later declarations in a separate
13866 procedure in Sem_Util (possibly not the best choice?), to be used both
13867 during parsing, for Ada 83 mode, and during semantic analysis, for
13869 * par-endh.adb (Check_End): move check that end label is not missing
13870 to Process_End_Label in the semantics
13871 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13872 the special case for SPARK restriction
13873 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13874 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13875 parameter Force to issue the error message even on internal node (used
13876 for generated end label). Call Check_Restriction to check when an error
13877 must be issued. In SPARK mode, issue an error message even if the
13878 restriction is not set.
13879 (Check_Restriction): new procedure with an additional out parameter to
13880 inform the caller that a message has been issued
13881 * sem_aggr.adb: Minor modification of message
13882 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13883 instead of issuing an error message directly
13884 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13885 declarations are not placed after later declarations, by calling
13886 Check_Later_Vs_Basic_Declarations
13887 (Analyze_Subtype_Declaration): move here the check that an index or
13888 discriminant constraint must be a subtype mark. Change the check that
13889 a subtype of String must start at one so that it works on subtype marks.
13890 * sem_ch4.adb (Analyze_Call): move here the check that a named
13891 association cannot follow a positional one in a call
13892 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13893 instead of issuing an error message directly
13894 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13895 selector name is not a character literal or an operator symbol. Move
13896 here the check that the prefix of an expanded name cannot be a
13897 subprogram or a loop statement.
13898 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13899 procedure called from parsing and semantics to check that basic
13900 declarations are not placed after later declarations
13901 (Process_End_Label): move here the check that end label is not missing
13903 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13905 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13906 representation clause in codepeer mode, since it confuses CodePeer and
13907 does not bring useful info.
13909 2011-08-02 Ed Falis <falis@adacore.com>
13911 * init.c: initialize fp hw on MILS.
13913 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13915 * errout.adb (First_Node): for bodies, return the node itself (small
13916 optimization). For other nodes, do not check source_unit if the node
13917 comes from Standard.
13919 2011-08-02 Robert Dewar <dewar@adacore.com>
13921 * exp_ch3.adb: Minor comment additions.
13922 * sem_ch13.adb: Minor reformatting.
13924 2011-08-02 Pascal Obry <obry@adacore.com>
13926 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13928 2011-08-02 Robert Dewar <dewar@adacore.com>
13930 * sem_attr.adb: Minor reformatting.
13932 2011-08-02 Robert Dewar <dewar@adacore.com>
13934 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13935 (Has_Default_Component_Value): Removed
13936 * einfo.ads Comment updates
13937 (Has_Default_Aspect): Replaces Has_Default_Value
13938 (Has_Default_Component_Value): Removed
13940 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13942 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13943 (Get_Simple_Init_Val): Handle Default_Value aspect
13944 (Needs_Simple_Initialization): Handle Default_Value aspect
13945 * exp_ch3.ads: Needs_Simple_Initialization
13946 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13947 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13949 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13950 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13951 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13953 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13955 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13956 package containing iteration primitives.
13957 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13961 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13962 "of", pre-analyze expression in case it is a function call with
13963 finalization actions that must be placed ahead of the loop.
13964 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13965 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13967 2011-08-02 Geert Bosch <bosch@adacore.com>
13969 * cstand.adb (Create_Float_Types): Only consider C's long double for
13970 Long_Long_Float, in addition to double.
13972 2011-08-02 Robert Dewar <dewar@adacore.com>
13974 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13975 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13976 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13977 Minor reformatting.
13979 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13981 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13984 2011-08-02 Javier Miranda <miranda@adacore.com>
13986 * einfo.ads, einfo.adb
13987 (Original_Access_Type): Move this attribute to Node26 since there was
13988 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13989 which causes conflicts and breaks the generation of the .NET compiler.
13990 (Interface_Name): Add missing documentation on JGNAT only uses of
13993 2011-08-02 Geert Bosch <bosch@adacore.com>
13995 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13996 (Find_Back_End_Float_Type): Likewise
13997 (Create_Back_End_Float_Types): Likewise
13998 (Create_Float_Types): Likewise
13999 (Register_Float_Type): Likewise
14000 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
14001 Nlist and split out type selection in new local Find_Base_Type function.
14002 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
14004 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
14006 2011-08-02 Robert Dewar <dewar@adacore.com>
14008 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
14010 * opt.ads: Minor comment change.
14011 * sem_ch12.adb: Minor code reorganization.
14013 2011-08-02 Gary Dismukes <dismukes@adacore.com>
14015 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
14016 subtype's list of rep items to the list on the full subtype in the case
14017 where the lists are the same.
14019 2011-08-02 Geert Bosch <bosch@adacore.com>
14021 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
14022 using the one from System.Strings, which also deallocates all strings.
14024 2011-08-02 Geert Bosch <bosch@adacore.com>
14026 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
14028 * gcc-interface/Make-lang.in: Update dependencies.
14030 2011-08-02 Olivier Hainque <hainque@adacore.com>
14032 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
14035 2011-08-02 Javier Miranda <miranda@adacore.com>
14037 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
14038 associated with anonymous access to subprograms.
14040 2011-08-02 Geert Bosch <bosch@adacore.com>
14043 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
14044 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
14045 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
14046 (Add_Symbol_Definition): Move to switch-c.adb
14047 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
14048 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
14049 (Add_Symbol_Definition): Move to switch-c.adb.
14050 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
14052 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14053 Move to warnsw.adb.
14054 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
14055 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14056 Move to warnsw.adb.
14057 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
14058 (Add_Symbol_Definition): Moved from Prepcomp.
14059 * switch-c.ads: Update copyright notice. Use String_List instead of
14060 Argument_List, removing dependency on System.OS_Lib.
14062 2011-08-02 Yannick Moy <moy@adacore.com>
14064 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
14065 mode on initialization expression which does not respect SPARK
14067 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
14068 if the tree referenced by its argument represents an initialization
14069 expression in SPARK, suitable for initializing an object in an object
14072 2011-08-02 Javier Miranda <miranda@adacore.com>
14074 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
14075 internally generated access to subprogram with its associated protected
14077 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
14079 2011-08-02 Geert Bosch <bosch@adacore.com>
14081 * cstand.adb (Register_Float_Type): Print information about type to
14082 register, if the Debug_Flag_Dot_B is set.
14083 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
14084 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
14085 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
14086 with a requested precision of more than Max_Digits digits and no more
14087 than Max_Base_Digits digits, if a range specification is present and the
14088 Predefined_Float_Types list has a suitable type to derive from.
14089 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
14090 case of type completion with pragma Import
14092 (Process_Import_Predefined_Type): Processing to complete a type
14093 with pragma Import. Currently supports floating point types only.
14094 (Set_Convention_From_Pragma): Do nothing without underlying type.
14095 (Process_Convention): Guard against absence of underlying type,
14096 which may happen when importing incomplete types.
14097 (Process_Import_Or_Interface): Handle case of importing predefined
14098 types. Tweak error message.
14100 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14102 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
14103 functions to previous change. Reorganize code slightly.
14105 2011-08-02 Geert Bosch <bosch@adacore.com>
14107 * back_end.ads (Register_Type_Proc): New call back procedure type for
14108 allowing the back end to provide information about available types.
14109 (Register_Back_End_Types): New procedure to register back end types.
14110 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
14112 * cstand.adb (Back_End_Float_Types): New list for floating point types
14113 supported by the back end.
14114 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
14115 (Copy_Float_Type): New procedure to make new copies of predefined types.
14116 (Register_Float_Type): New call back procedure to populate the BEFT list
14117 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
14118 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
14119 (Create_Float_Types): New procedure to create entities for floating
14120 point types predefined in Standard, and put these and any remaining
14121 BEFTs on the Predefined_Float_Types list.
14122 * stand.ads (Predefined_Float_Types): New list for predefined floating
14123 point types that do not have declarations in package Standard.
14125 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14127 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
14128 entity node for the unit containing the parameter.
14129 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
14130 (Add_Inlined_Subprogram): Likewise.
14131 * gcc-interface/Make-lang.in: Update dependencies.
14133 2011-08-02 Thomas Quinot <quinot@adacore.com>
14135 * s-stusta.adb (Print): Make sure Pos is always initialized to a
14138 2011-08-02 Geert Bosch <bosch@adacore.com>
14140 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
14142 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14144 * sem_type.adb (Covers): Move trivial case to the top and reuse the
14145 computed value of Base_Type.
14147 2011-08-02 Yannick Moy <moy@adacore.com>
14149 * restrict.adb (Check_Restriction): issue an error for any use of
14150 class-wide, even if the No_Dispatch restriction is not set.
14151 * sem_aggr.adb: Correct typos in comments and messages in formal mode
14152 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
14153 when completing a private extension, the type named in the private part
14154 is not the same as that named in the visible part.
14155 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
14156 of an inherited primitive operations of a tagged type or type extension
14157 that returns the tagged type.
14158 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
14159 function which returns True for an implicit operation inherited by the
14160 derived type declaration for the argument type.
14161 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
14164 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14166 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
14167 Process_Bounds, to perform analysis with expansion of a range or an
14168 expression that is the iteration scheme for a loop.
14169 (Analyze_Iterator_Specification): If domain of iteration is given by a
14170 function call with a controlled result, as is the case if call returns
14171 a predefined container, ensure that finalization actions are properly
14173 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
14175 2011-08-02 Javier Miranda <miranda@adacore.com>
14177 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
14178 * gcc-interface/Make-lang.in: Update dependencies.
14180 2011-08-02 Javier Miranda <miranda@adacore.com>
14182 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
14183 determine if the analysis is performed using N or Original_Node (N).
14184 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
14185 functionality of routine Is_Variable avoids code duplication.
14186 * checks.adb (Determine_Range): Handle temporaries generated by
14187 Remove_Side_Effects.
14189 2011-08-02 Javier Miranda <miranda@adacore.com>
14191 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
14192 expansion of the condition. Required since the previous analysis was
14193 done with expansion disabled (see Resolve_Quantified_Expression) and
14194 hence checks were not inserted and record comparisons have not been
14197 2011-08-02 Ed Falis <falis@adacore.com>
14199 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
14202 2011-08-02 Bob Duff <duff@adacore.com>
14204 * opt.ads: Minor comment fix.
14206 2011-08-02 Bob Duff <duff@adacore.com>
14208 * sem_ch12.adb (Analyze_Package_Instantiation,
14209 Analyze_Subprogram_Instantiation): Turn off style checking while
14210 analyzing an instance. Whatever style checks that apply to the generic
14211 unit should apply, so it makes no sense to apply them in an instance.
14212 This was causing trouble when compiling an instance of a runtime
14213 unit that violates the -gnatyO switch.
14214 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
14215 one of the two case statements, causing spurious errors.
14217 2011-08-02 Robert Dewar <dewar@adacore.com>
14219 * uname.adb: Minor reformatting.
14220 * gnatcmd.adb: Minor reformatting.
14221 * exp_attr.adb: Minor reformatting.
14223 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14225 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
14226 No_Dispatching_Calls, do not look for the Assign primitive, because
14227 predefined primitives are not created in this case.
14229 2011-08-02 Bob Duff <duff@adacore.com>
14231 * stylesw.ads: Minor comment fixes.
14233 2011-08-02 Robert Dewar <dewar@adacore.com>
14235 * freeze.adb (Add_To_Result): New procedure.
14237 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14239 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
14240 time, if the specific run-time routines for handling streams of strings
14241 are not available, use the default mechanism.
14243 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14245 * s-regpat.ads: Fix typo.
14247 2011-08-02 Vincent Celier <celier@adacore.com>
14249 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
14250 not null, call it to create the in memory config project file without
14251 parsing an existing default config project file.
14253 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14255 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
14257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14259 * sem_elim.adb: an abstract subprogram does not need an eliminate
14260 pragma for its descendant to be eliminable.
14262 2011-08-02 Ed Falis <falis@adacore.com>
14264 * init.c: revert to handling before previous checkin for VxWorks
14265 * s-intman-vxworks.adb: delete unnecessary declarations related to
14266 using Ada interrupt facilities for handling signals.
14267 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
14268 * s-intman-vxworks.ads: Import __gnat_install_handler as
14269 Initialize_Interrupts.
14270 * s-taprop-vxworks.adb: Delete Signal_Mask.
14271 (Abort_Handler): change construction of mask to unblock exception
14274 2011-08-02 Jerome Guitton <guitton@adacore.com>
14276 * a-except-2005.adb (Raise_From_Signal_Handler): Call
14277 Debug_Raise_Exception before propagation starts.
14279 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14281 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
14282 to Restriction_Check_Required.
14283 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
14284 * sem_res.adb (Resolve_Call): Likewise.
14285 * sem_attr.adb (Check_Stream_Attribute): Likewise.
14287 2011-08-02 Bob Duff <duff@adacore.com>
14289 * stylesw.ads: Update comment.
14290 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
14291 * errout.ads: Remove obsolete comment.
14293 2011-08-02 Javier Miranda <miranda@adacore.com>
14295 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
14296 (Set_Is_Safe_To_Reevaluate): new procedure.
14297 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
14298 assignment is allowed on safe-to-reevaluate variables.
14299 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
14300 temporary created to remove side effects in expressions that use
14301 the secondary stack as safe-to-reevaluate.
14302 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
14303 variables that are not true constants.
14305 2011-08-02 Robert Dewar <dewar@adacore.com>
14307 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
14308 sem_res.adb, sem_ch6.adb: Minor reformatting.
14310 2011-08-02 Jerome Guitton <guitton@adacore.com>
14312 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
14314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14316 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
14317 not set Overridden_Operation if subprogram is an initialization
14320 2011-08-02 Yannick Moy <moy@adacore.com>
14322 * par-ch6.adb: Correct obsolete name in comments
14323 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
14324 which takes two message arguments (existing function takes one), with
14325 second message used for continuation.
14326 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
14327 block statements that originate from a source block statement, not
14328 generated block statements
14329 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
14330 symmetry with procedure case
14331 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
14332 function to issue an error in formal mode if a package specification
14333 contains more than one tagged type or type extension.
14334 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
14335 parameters matching formals of tagged types are objects (or ancestor
14336 type conversions of objects), not general expressions. Issue an error
14337 on view conversions that are not involving ancestor conversion of an
14339 (Resolve_Type_Conversion): in formal mode, issue an error on the
14340 operand of an ancestor type conversion which is not an object
14341 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
14342 procedure so that it works also for actuals of function calls
14343 (Is_Actual_Tagged_Parameter): new function which determines if its
14344 argument is an actual parameter of a formal of tagged type in a
14346 (Is_SPARK_Object_Reference): new function which determines if the tree
14347 referenced by its argument represents an object in SPARK
14349 2011-08-02 Robert Dewar <dewar@adacore.com>
14351 * sem_ch3.adb: Minor reformatting
14352 Minor comment addition
14353 Minor error msg text change
14355 2011-08-02 Javier Miranda <miranda@adacore.com>
14357 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
14358 function. Used to be more precise when we generate a variable plus one
14359 assignment to remove side effects in the evaluation of the Bound
14361 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
14362 of the bound expression to force its re-analysis and thus expand the
14363 associated transient scope (if required). Code cleanup replacing the
14364 previous code that declared the constant entity by an invocation to
14365 routine Force_Evaluation which centralizes this work in the frontend.
14367 2011-08-02 Robert Dewar <dewar@adacore.com>
14369 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
14370 (Base_Type): Now uses improved Is_Base_Type function
14371 * einfo.ads (Base_Type): Inline this function
14373 2011-08-02 Robert Dewar <dewar@adacore.com>
14375 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
14376 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
14378 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14380 * gcc-interface/Make-lang.in: Update dependencies.
14381 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
14384 2011-08-02 Yannick Moy <moy@adacore.com>
14386 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
14387 non-simple expression used in delta constraint
14388 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
14389 index constraint which is not a subtype mark
14390 * par.adb: With and use Restrict
14391 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
14392 mode on component type which is not a subtype mark and default
14393 expression on component
14394 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
14395 of string which does not have a lower index bound equal to 1
14396 (Array_Type_Declaration): issue an error in formal mode on index or
14397 component type which is not a subtype mark, and on aliased keyword on
14399 (Derived_Type_Declaration): issue an error in formal mode on interface,
14400 limited or abstract type
14401 (Record_Type_Declaration): issue an error in formal mode on interface
14402 (Record_Type_Definition): issue an error in formal mode on tagged types
14403 and type extensions not declared in the specification of a library unit
14404 package; on null non-tagged record; on variant part
14406 2011-08-02 Vincent Celier <celier@adacore.com>
14408 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14409 not declared for qualified library project when Library_Name is not
14410 declared, but Library_Dir is.
14412 2011-08-02 Robert Dewar <dewar@adacore.com>
14414 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14415 pragmas (affects aspects [Component_]Default_Value
14416 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14417 component type for the resolution
14419 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14421 * einfo.adb (Base_Type): Tune implementation for speed.
14423 2011-08-02 Robert Dewar <dewar@adacore.com>
14425 * freeze.adb: Minor reformatting.
14427 2011-08-02 Thomas Quinot <quinot@adacore.com>
14429 * scos.ads: Update comments.
14431 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14433 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14434 base type, because the parent may be a subtype of a private type whose
14435 convention is established in a private part.
14437 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
14439 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14440 statement in a block when the expansion of the return expression has
14441 created a finalization chain.
14442 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14443 with the parent node.
14444 Add N_Extended_Return_Statement to handle the case where a transient
14445 object declaration appears in the Return_Object_Declarations list of
14446 an extended return statement.
14448 2011-08-02 Matthew Gingell <gingell@adacore.com>
14450 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14451 unused parameter 'name'.
14453 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14455 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14456 inherited operation, check whether its alias, which is the source
14457 operastion that it renames, has been marked eliminated.
14459 2011-08-02 Javier Miranda <miranda@adacore.com>
14461 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14462 in-mode parameter whose type is an access type since it can be used to
14463 modify its designated object. Enforce code that handles as safe an
14464 access type that is not access-to-constant but it is the result of a
14465 previous removal of side-effects.
14466 (Remove_Side_Effects): Minor code reorganization of cases which require
14467 no action. Done to incorporate documentation on new cases uncovered
14468 working in this ticket: no action needed if this routine was invoked
14469 too early and the nodes are not yet decorated.
14470 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14471 to routine Remove_Side_Effects by calls to Force_Evaluation since they
14472 were issued with actuals that are implicitly provided by
14475 2011-08-02 Robert Dewar <dewar@adacore.com>
14477 * sem_ch3.adb, sem_res.adb: Minor reformatting.
14479 2011-08-02 Yannick Moy <moy@adacore.com>
14481 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14482 to issue an error in formal mode on attribute not supported in this mode
14483 (Analyze_Attribute): issue errors on standard attributes not supported
14485 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14486 comment, and issue error in formal mode on modulus which is not a power
14488 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14490 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14492 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14493 operator on modular type (except 'not').
14495 2011-08-02 Robert Dewar <dewar@adacore.com>
14497 * gnat_rm.texi: Minor reformatting.
14499 2011-08-02 Arnaud Charlet <charlet@adacore.com>
14501 * s-osinte-linux.ads: Minor comment update and reformatting.
14502 * i-cexten.ads: Make this unit pure, as for its parent.
14503 Will allow its usage in more contexts if needed.
14505 2011-08-02 Robert Dewar <dewar@adacore.com>
14507 * s-utf_32.ads: Minor comment fix.
14509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14511 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14512 operation of a tagged synchronized type, handle the case where the
14513 controlling argument is overloaded.
14515 2011-08-02 Yannick Moy <moy@adacore.com>
14517 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14518 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14519 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14520 SPARK mode and formal verification mode on processing SPARK restriction
14521 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14522 requiring consistency checking.
14524 2011-08-02 Robert Dewar <dewar@adacore.com>
14526 * sem_res.adb: Minor reformatting.
14528 2011-08-02 Robert Dewar <dewar@adacore.com>
14530 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14531 a-cforse.ads: Remove unneeded with of Ada.Containers
14532 Remove commented out pragma Inline's
14533 Move specifications of new subprograms to the actual specs
14535 2011-08-02 Yannick Moy <moy@adacore.com>
14537 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14538 a-cforse.ads: Update comments.
14540 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14542 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14544 2011-08-02 Robert Dewar <dewar@adacore.com>
14546 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14547 a-cforse.ads, a-cofove.ads: Minor reformatting.
14549 2011-08-02 Claire Dross <dross@adacore.com>
14551 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14552 a-cofove.ads: Add comments.
14554 2011-08-02 Yannick Moy <moy@adacore.com>
14556 * gnat_rm.texi: Document formal containers.
14558 2011-08-02 Emmanuel Briot <briot@adacore.com>
14560 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14561 are empty sections.
14563 2011-08-02 Robert Dewar <dewar@adacore.com>
14565 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14568 2011-08-02 Robert Dewar <dewar@adacore.com>
14570 * aspects.adb: New aspects Default_Value and Default_Component_Value
14571 New format of Aspect_Names table checks for omitted entries
14572 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14573 handling of boolean aspects for derived types.
14574 New aspects Default_Value and Default_Component_Value
14575 New format of Aspect_Names table checks for omitted entries
14576 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14577 (Has_Default_Value): New flag
14578 (Has_Default_Component_Value): New flag
14579 (Has_Default_Value): New flag
14580 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14582 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14583 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14584 Default_Value and Default_Component_Value
14585 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14586 New aspects Default_Value and Default_Component_Value
14587 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14588 * sprint.adb: Print N_Aspect_Specification node when called from gdb
14590 2011-08-02 Vincent Celier <celier@adacore.com>
14592 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14593 inherit library kind.
14595 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14597 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14598 Minor reformatting.
14600 2011-08-02 Robert Dewar <dewar@adacore.com>
14602 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14604 2011-08-02 Yannick Moy <moy@adacore.com>
14606 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14608 2011-08-02 Robert Dewar <dewar@adacore.com>
14610 * impunit.adb: Add comment.
14612 2011-08-02 Yannick Moy <moy@adacore.com>
14614 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14615 qualification of aggregates in formal mode
14616 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14618 (Resolve_Aggregate): complete the test that an aggregate is adequately
14619 qualified in formal mode
14621 2011-08-02 Pascal Obry <obry@adacore.com>
14623 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14624 * mlib-prj.adb: Supress warning when compiling binder generated file.
14625 (Build_Library): Supress all warnings when compiling the binder
14628 2011-08-02 Yannick Moy <moy@adacore.com>
14630 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14632 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14633 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14634 Add with/use clauses to make Check_Formal_Restriction visible
14636 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14638 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14639 in-parameters when type of the generic formal is private in the generic
14640 spec and non-private in the body.
14642 2011-08-02 Claire Dross <dross@adacore.com>
14644 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14645 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14646 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14647 * impunit.adb, Makefile.rtl: Take new files into account.
14649 2011-08-02 Robert Dewar <dewar@adacore.com>
14651 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14652 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14654 2011-08-02 Yannick Moy <moy@adacore.com>
14656 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14658 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14659 matching static array bounds, taking into account the special case of
14661 * sem_ch3.adb: Typo in comment.
14663 2011-08-02 Yannick Moy <moy@adacore.com>
14665 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14666 which issues an error in formal mode if its argument node is originally
14668 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14669 has a discriminant specification so that it does not include the case
14671 (Derived_Type_Declaration): move here the test that a derived type has a
14672 discriminant specification
14673 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14674 first element of a component association before accessing its choices
14675 (presence of component association is not enough)
14676 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14677 declaration is a library item before accessing the next element in a
14678 list, as library items are not member of lists
14679 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14680 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14681 Check_Formal_Restriction whenever possible.
14683 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14685 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14686 reference when needed.
14688 2011-08-02 Bob Duff <duff@adacore.com>
14690 * gnat_ugn.texi: Fix typo.
14692 2011-08-02 Vincent Celier <celier@adacore.com>
14694 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14695 archive file name. Do not use the full path name of archives for Open
14698 2011-08-02 Robert Dewar <dewar@adacore.com>
14700 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14701 Analyze_Aspect_Specifications
14703 (Analyze_Aspect_Specifications): New handling for boolean aspects
14704 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14705 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14706 sequence for Analyze_Aspect_Specifications
14707 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14708 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14710 2011-08-02 Robert Dewar <dewar@adacore.com>
14712 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14713 aspects, since these no longer exist.
14715 2011-08-02 Robert Dewar <dewar@adacore.com>
14717 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14718 semicolon, do not try to see if there are aspects following it.
14719 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14722 2011-08-02 Robert Dewar <dewar@adacore.com>
14724 * sem_ch8.adb, aspects.ads: Minor reformatting.
14726 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14728 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14729 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14731 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14733 2011-08-02 Yannick Moy <moy@adacore.com>
14735 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14736 mode on subprogram declaration outside of package specification, unless
14737 it is followed by a pragma Import
14738 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14739 Access_Type_Declaration): issue error in formal mode on access type
14740 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14742 (Analyze_Object_Declaration): issue error in formal mode on object
14743 declaration which does not respect SPARK restrictions
14744 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14745 declaration which does not respect SPARK restrictions
14746 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14747 error in formal mode on digits or delta constraint
14748 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14749 decimal fixed point type
14750 (Derived_Type_Declaration): issue error in formal mode on derived type
14751 other than type extensions of tagged record types
14752 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14753 with check on access definition
14754 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14755 mode on protected definition.
14756 (Analyze_Task_Definition): issue error in formal mode on task definition
14758 2011-08-02 Robert Dewar <dewar@adacore.com>
14760 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14762 2011-08-02 Javier Miranda <miranda@adacore.com>
14764 * sem_ch6.adb (Can_Override_Operator): New function.
14765 (Verify_Overriding_Indicator): Add missing code to check overriding
14766 indicator in operators. Fixes regression.
14767 (Check_Overriding_Indicator): Minor reformating after replacing the
14768 code that evaluates if the subprogram can override an operator by
14769 invocations to the above new function.
14771 (Write_Field26_Name): Add missing code to ensure that, following
14772 the documentation in einfo.ads, this field is not shown as attribute
14773 "Static_Initialization" on non-dispatching functions.
14775 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14777 * sem_res.adb (Resolve_Call): A call to
14778 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14779 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14780 i.e., when the second parameter is of type Time_Span.
14782 2011-08-02 Vincent Celier <celier@adacore.com>
14784 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14785 with an archive instead of -L<library dir> -l<library name>.
14787 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14789 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14790 mark the base types In_Use in addition to making the operations
14793 2011-08-02 Ed Falis <falis@adacore.com>
14795 * init.c: add and setup __gnat_signal_mask for the exception signals
14796 * s-inmaop-vxworks.adb: new file.
14797 * s-intman-vxworks.adb: remove unnecessary initializations and
14799 * s-intman-vxworks.ads: remove unnecessary variable
14800 * s-taprop-vxworks.adb: simplify signal initialization
14802 2011-08-02 Robert Dewar <dewar@adacore.com>
14804 * sem_ch8.adb: Minor code reorganization, comment updates.
14806 2011-08-02 Robert Dewar <dewar@adacore.com>
14808 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14809 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14811 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14812 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14816 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14817 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14818 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14819 use_type_clauses, to handle more efficiently use_type and use_all_type
14821 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14822 Ada2012 Use_All_Type clause.
14823 (Use_Class_Wide_Operations): new procedure.
14825 2011-08-02 Robert Dewar <dewar@adacore.com>
14827 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14828 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14829 expression to expression function.
14831 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14833 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14834 if types are compatible.
14836 2011-08-02 Yannick Moy <moy@adacore.com>
14838 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14839 returns True if its argument array types have same dimension and same
14840 static bounds at each index.
14841 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14842 OUT or IN OUT paramaters which are not view conversions in SPARK.
14843 (Resolve_Arithmetic_Op): issue an error in formal mode on
14844 multiplication or division with operands of fixed point types which are
14845 not qualified or explicitly converted.
14846 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14847 Boolean or array type (except String) operands.
14848 (Resolve_Equality_Op): issue an error in formal mode on equality
14849 operators for array types other than String with non-matching static
14851 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14852 for array types with non-matching static bounds. Factorize the code in
14853 Matching_Static_Array_Bounds.
14854 (Resolve_Qualified_Expression): issue an error in formal mode on
14855 qualified expressions for array types with non-matching static bounds.
14856 (Resolve_Type_Conversion): issue an error in formal mode on type
14857 conversion for array types with non-matching static bounds
14859 2011-08-02 Robert Dewar <dewar@adacore.com>
14861 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14863 2011-08-02 Ed Schonberg <schonberg@adacore.com>
14865 * par-ch9.adb: save location of entry for proper error message.
14867 2011-08-02 Javier Miranda <miranda@adacore.com>
14869 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14870 (Use_Full_View) which permits this routine to climb through the
14871 ancestors using the full-view of private parents.
14872 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14873 Use_Full_View to true in calls to Is_Ancestor.
14874 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14875 true in call to Is_Ancestor.
14876 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14877 Use_Full_View to true in call to Is_Ancestor.
14878 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14879 call to Is_Ancestor.
14880 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14881 Use_Full_View to true in calls to Is_Ancestor.
14882 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14883 Make_Select_Specific_Data_Table, Register_Primitive,
14884 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14885 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14886 to true in call to Is_Ancestor.
14887 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14888 Use_Full_View to true in calls to Is_Ancestor.
14890 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14891 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14893 2011-08-02 Robert Dewar <dewar@adacore.com>
14895 * gnat_rm.texi: Minor reformatting.
14896 * sem_prag.adb: Minor reformatting.
14898 2011-08-02 Tristan Gingold <gingold@adacore.com>
14900 * vms_data.ads: Add VMS qualifier for -gnateP.
14902 2011-08-02 Robert Dewar <dewar@adacore.com>
14904 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14905 * par-ch7.adb (P_Package): Proper placement of aspects for package
14906 decl/instantiation.
14907 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14908 (End_Statements): Add Is_Sloc parameterr
14909 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14910 (Check_End): Ad Is_Sloc parameter
14911 (End_Statements): Add Is_Sloc parameterr
14913 2011-08-02 Vincent Celier <celier@adacore.com>
14915 * ug_words: Add VMS qualifier equivalent to -gnateP:
14916 /SYMBOL_PREPROCESSING.
14918 2011-08-02 Jose Ruiz <ruiz@adacore.com>
14920 * gnat-style.texi: For hexadecimal numeric literals the typical
14921 grouping of digits is 4 to represent 2 bytes.
14922 A procedure spec which is split into several lines is indented two
14925 2011-08-02 Yannick Moy <moy@adacore.com>
14927 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14928 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14929 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14931 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14932 choice in array aggregate
14933 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14935 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14936 positional and named aggregate for record, or others in record
14937 aggregate, or multiple choice in record aggregate
14938 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14939 array operands to logical operations AND, OR and XOR do not have the
14940 same static lower and higher bounds
14941 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14943 2011-08-01 Robert Dewar <dewar@adacore.com>
14945 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14946 Replaces Last_Source_Node_In_Sequence.
14947 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14948 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14949 parens and blank in string (this was inconsistently implemented).
14951 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14952 blank in string (this was inconsistently implemented).
14954 (Set_Global_Switches): Set formal mode switches appropriately
14955 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14957 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14958 call Set_Error_Msg_Lang to set "spark" as language name.
14959 * par.adb: Remove unnecessary call to set formal language for errout
14960 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14961 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14963 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14964 calls to it, moved after resolution so that types are known
14965 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14966 result of concatenation is not of type String
14967 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14968 concatenation is not properly restricted
14969 * gnat_rm.texi: Add doc on pragma Spark_95.
14970 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14971 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14972 * gcc-interface/Make-lang.in: Update dependencies.
14974 2011-08-01 Javier Miranda <miranda@adacore.com>
14976 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14977 condition that detects if the overridden operation must replace an
14980 2011-08-01 Javier Miranda <miranda@adacore.com>
14982 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14983 code declarations inserted by Insert_Actions in each alternative of the
14984 N_Case_Expression node.
14986 2011-08-01 Robert Dewar <dewar@adacore.com>
14988 * sem_ch6.adb: Minor code reorganization.
14989 * sem_util.adb: Minor reformatting.
14991 2011-08-01 Pascal Obry <obry@adacore.com>
14993 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14994 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14996 2011-08-01 Yannick Moy <moy@adacore.com>
14998 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14999 literal or operator symbol which is prefixed
15000 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
15001 mode on access attributes.
15002 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
15003 that concatenation operands are properly restricted in formal mode
15004 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
15005 Analyze_Concatenation_Operand. Issue an error in formal mode if the
15006 result of the concatenation has a type different from String.
15007 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
15008 Analyze_Quantified_Expression, Analyze_Slice,
15009 Analyze_Null): issue an error in formal mode on unsupported constructs
15011 (Analyze_Block_Statement): only issue error on source block statement
15012 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
15013 function which returns the last node in a list of nodes for which
15014 Comes_From_Source returns True, if any
15015 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
15016 Last_Source_Node_In_Sequence
15017 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
15018 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
15019 mode on unsupported constructs
15020 * sem_ch9.adb Do not return after issuing error in formal mode, as the
15021 rest of the actions may be needed later on since the error is marked as
15023 * sinfo.ads: Typos in comments.
15025 2011-08-01 Pascal Obry <obry@adacore.com>
15027 * projects.texi: Minor editing.
15029 2011-08-01 Yannick Moy <moy@adacore.com>
15031 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
15032 insertion character ~~
15033 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
15034 (Set_Error_Msg_Lang): new procedure which fixes the language for use
15035 with insertion character ~~
15036 (Set_Msg_Text): treat insertion character ~~
15037 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
15038 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
15039 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
15040 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
15041 errors related to the formal language restriction not serious
15042 (insertion character |).
15043 * par.adb (Par): set formal language for error messages if needed
15044 * sem_ch6.adb (Check_Missing_Return): take into account possible
15045 generated statements at the end of the function
15046 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
15047 enumeration value to define a new pragma SPARK_95
15048 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
15049 SPARK_Version): new type and variables to store the SPARK version
15051 (SPARK_Mode): return True when SPARK_Version is set
15052 * par-prag.adb: Correct indentation
15053 (Prag): take Pragma_SPARK_95 into account
15054 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
15057 2011-08-01 Robert Dewar <dewar@adacore.com>
15059 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
15060 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
15061 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
15063 2011-08-01 Pascal Obry <obry@adacore.com>
15065 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
15066 Target_Name to Get_Path call.
15067 (Parse_Single_Project): Likewise.
15068 (Post_Parse_Context_Clause): Likewise.
15069 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
15070 Call Initialise_Project_Path with the proper Target_Name.
15071 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
15073 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
15074 with the proper Target_Name.
15075 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
15076 Part.Parse routine.
15077 (Parse_Project_And_Apply_Config): Likewise.
15078 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
15079 This is fine as this part of the code is supporting only native
15081 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
15082 is fine as this part of the code is supporting only native compilation.
15084 2011-08-01 Yannick Moy <moy@adacore.com>
15086 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
15087 of homonym, unless the homonym is one of the cases allowed in SPARK
15088 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
15089 package declaration occurring after a body.
15091 2011-08-01 Robert Dewar <dewar@adacore.com>
15093 * checks.adb, exp_ch4.adb: Minor reformatting.
15095 2011-08-01 Javier Miranda <miranda@adacore.com>
15097 * einfo.ads (Access_Disp_Table): Fix documentation.
15098 (Dispatch_Table_Wrappers): Fix documentation.
15100 2011-08-01 Pascal Obry <obry@adacore.com>
15102 * prj-env.adb, prj-env.ads: Minor reformatting.
15104 2011-08-01 Yannick Moy <moy@adacore.com>
15106 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
15107 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15108 procedures out of these packages.
15109 * errout.ads, errout.adb
15110 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15111 procedures in of this package
15112 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
15113 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
15114 on misplaced later vs initial declarations, like in Ada 83
15115 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
15116 formal mode on attribute of private type whose full type declaration
15118 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
15119 package declaration inside a package specification
15120 (Analyze_Full_Type_Declaration): issue error in formal mode on
15121 controlled type or discriminant type
15122 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
15123 user-defined operator means that it should come from the source
15124 (New_Overloaded_Entity): issue error in formal mode on overloaded
15126 * sem_ch6.ads, sem_ch13.ads: typos in comments.
15128 2011-08-01 Thomas Quinot <quinot@adacore.com>
15130 * atree.adb: Minor reformatting.
15131 * checks.adb: Minor reformatting.
15133 2011-08-01 Vincent Celier <celier@adacore.com>
15135 * s-parame-vms-ia64.ads: Fix typo in comment
15137 * s-parame-vms-restrict.ads: Removed, unused.
15139 2011-08-01 Javier Miranda <miranda@adacore.com>
15142 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
15144 (Constrain_Index): Remove side effects in the evaluation of the bounds.
15145 * sem_ch3.ads, sem_ch3.adb
15146 (Is_Constant_Bound): New extended version of the subprogram that was
15147 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
15148 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
15149 * sem_aux.ads (Constant_Value): Fix typo in comment.
15150 * checks.adb (Generate_Index_Checks): New implementation which, for
15151 array objects with constant bounds, generates the runtime check
15152 referencing the bounds of the array type. For other cases this routine
15153 provides its previous behavior obtaining such values from the array
15155 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
15157 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
15158 we cannot have semantic interpretations of the new node.
15160 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15162 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
15165 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15167 * sem_ch8.adb: Minor code editing.
15168 * s-vxwext.adb: Remove trailing space.
15169 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
15170 consistency with other files.
15172 2011-08-01 Thomas Quinot <quinot@adacore.com>
15174 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
15176 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15178 * par-ch10.adb: reject parameterized expressions as compilation unit.
15179 * sem_ch4.adb: handle properly conditional expression with overloaded
15180 then_clause and no else_clause.
15182 2011-08-01 Tristan Gingold <gingold@adacore.com>
15184 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
15185 like done by System.Aux_DEC.
15186 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
15188 2011-08-01 Yannick Moy <moy@adacore.com>
15190 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
15191 missing label at end of declaration (subprogram or package)
15192 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
15193 of positional and named parameter association
15194 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
15195 Error_Msg_SP which adds a prefix to the error message giving the name
15196 of the formal language analyzed
15197 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
15198 access result type in subprogram, unconstrained array as result type,.
15199 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
15201 * sem_ch8.adb: Code clean up.
15203 2011-08-01 Javier Miranda <miranda@adacore.com>
15205 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
15206 * einfo.ads (Access_Disp_Table): Fix documentation.
15207 (Dispatch_Table_Wrappers): Fix documentation.
15208 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
15209 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
15210 to enforce the documentation of this attribute.
15211 (Set_Is_Interface): Cleanup the assertion.
15212 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
15213 the Underlying_Type entity before reading attribute Access_Disp_Table.
15214 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
15215 Locate the Underlying_Type before reading attribute Access_Disp_Table.
15216 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
15217 the Underlying_Type entity before reading attribute Access_Disp_Table.
15218 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
15219 Locate the Underlying_Type entity before reading attribute
15222 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15224 * s-poosiz.ads: Additional overriding indicators.
15226 2011-08-01 Yannick Moy <moy@adacore.com>
15228 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
15230 (Analyze_Iteration_Scheme): issue error in formal mode when loop
15231 parameter specification does not include a subtype mark.
15232 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
15233 formal mode on abstract subprogram.
15234 (Analyze_Subprogram_Specification): issue error in formal mode on
15235 user-defined operator.
15236 (Process_Formals): issue error in formal mode on access parameter and
15237 default expression.
15238 * sem_ch9.adb (Analyze_Abort_Statement,
15239 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
15240 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
15241 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
15242 Analyze_Requeue, Analyze_Selective_Accept,
15243 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
15244 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
15245 issue error in formal mode on user-defined raise statement.
15247 2011-08-01 Thomas Quinot <quinot@adacore.com>
15249 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
15250 declaration being hidden when overriding an implicit inherited
15252 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
15253 (-gnats), do not complain about a source file that contains only a
15256 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15258 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
15259 variable if already set.
15261 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15263 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
15264 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
15265 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
15266 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
15267 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
15268 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
15269 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
15270 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
15271 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
15272 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
15273 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
15274 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
15275 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
15276 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
15277 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
15278 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
15279 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
15280 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
15281 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
15282 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
15283 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
15284 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
15285 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
15286 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
15287 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
15288 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
15289 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
15290 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
15291 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
15292 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
15293 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
15294 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
15295 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
15296 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
15297 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
15298 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
15299 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
15300 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
15301 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
15302 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
15303 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
15304 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
15305 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
15306 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
15307 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
15308 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
15309 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
15310 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
15311 s-osinte-mingw.ads: Update to GPLv3 run-time license.
15312 Use GNAT instead of GNARL.
15314 2011-08-01 Bob Duff <duff@adacore.com>
15316 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
15317 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
15318 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
15321 2011-08-01 Yannick Moy <moy@adacore.com>
15323 * debug.adb (d.D) reverve flag for the SPARK mode
15324 (d.E) reverve flag for SPARK generation mode
15325 (d.F) reverve flag for Why generation mode
15326 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
15327 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
15328 functions which return True when the corresponding modes are set
15329 (Formal_Language): return "spark" or "alfa" when in formal verification
15331 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
15332 Error_Msg to prefix the error message with a tag giving the formal
15334 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
15335 message with a tag giving the formal language
15336 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
15338 (Analyze_Case_Statement): issue error in formal mode on case statement
15339 with a single "others" case alternative
15340 (Analyze_Exit_Statement): issue errors in formal mode on exit
15341 statements which do not respect SPARK restrictions
15342 (Analyze_Goto_Statement): issue error in formal mode on goto statement
15343 (Check_Unreachable_Code): always issue an error (not a warning) in
15344 formal mode on unreachable code (concerns both code after an infinite
15345 loop and after an unconditional jump, both not allowed in SPARK)
15346 * sem_ch6.adb (Analyze_Return_Statement): add call to
15347 Set_Return_Present for a procedure containing a return statement
15348 (already done for functions in Analyze_Function_Return)
15349 (Analyze_Function_Return): issue error in formal mode on extended
15350 return or if return is not last statement in function
15351 (Check_Missing_Return): issue error in formal mode if function does
15352 not end with return or if procedure contains a return
15353 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
15354 function to detect if there is an inner scope of its parameter S which
15357 2011-08-01 Thomas Quinot <quinot@adacore.com>
15359 * sem_ch6.ads: Minor reformatting.
15361 2011-08-01 Javier Miranda <miranda@adacore.com>
15363 * sem_util.adb (Abstract_Interface_List): Complete condition when
15364 processing private type declarations to avoid reading unavailable
15366 (Is_Synchronized_Tagged_Type): Complete condition when processing
15367 private extension declaration nodes to avoid reading unavailable
15370 2011-08-01 Thomas Quinot <quinot@adacore.com>
15372 * sem_ch3.adb: Minor reformatting.
15374 2011-08-01 Thomas Quinot <quinot@adacore.com>
15376 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
15377 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
15378 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
15379 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
15380 for VMS, instead parametrize the common implementation with
15381 System.Parameters declarations.
15383 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
15385 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
15387 2011-08-01 Tristan Gingold <gingold@adacore.com>
15389 * seh_init.c: Fix SEH handler installation on win64.
15391 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15393 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
15394 double analysis of an anonymous access to subprogram, because it can
15395 lead to improper sharing of profiles and a back-end crash.
15397 2011-08-01 Robert Dewar <dewar@adacore.com>
15399 * make.adb, sem_ch4.adb: Minor reformatting.
15400 * gcc-interface/Make-lang.in: Update dependencies.
15401 * sem_util.adb, exp_ch5.adb: Minor reformatting.
15403 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15405 * gnat_rm.texi: Fix definition of Long_Integer.
15407 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15409 * exp_aggr.adb: check limit size of static aggregate unconditionally,
15410 to prevent storage exhaustion.
15411 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15412 finalized is a function body, insert the cleanup code before the final
15413 return statement, to prevent spurious warnings.
15414 * s-pooglo.ads: add overriding indicator.
15416 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15418 * sem_ch4.adb (Operator_Check): improve error message when both a
15419 with_clause and a use_clause are needed to make operator usage legal.
15420 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15421 determine whether a compilation unit is visible within an other,
15422 either through a with_clause in the current unit, or a with_clause in
15423 its library unit or one one of its parents.
15425 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15427 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15428 over an arbitrary expression of an array or container type.
15429 * lib-xref.adb: clarify comment.
15431 2011-08-01 Bob Duff <duff@adacore.com>
15433 * einfo.ads: Minor reformatting.
15434 * debug.adb: Minor comment improvement.
15436 2011-08-01 Javier Miranda <miranda@adacore.com>
15438 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15439 consider hidden subprograms as valid candidates.
15441 2011-08-01 Arnaud Charlet <charlet@adacore.com>
15443 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15445 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
15447 * gnat_ugn.texi: Fix typo.
15449 2011-08-01 Robert Dewar <dewar@adacore.com>
15451 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15452 lib-xref.adb: Minor reformatting
15454 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15456 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15457 when to generate a call to Move_Final_List.
15458 (Has_Controlled_Parts): Remove this function.
15460 2011-08-01 Geert Bosch <bosch@adacore.com>
15462 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15463 "," in choice list.
15465 2011-08-01 Thomas Quinot <quinot@adacore.com>
15467 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15468 explicit raise of a predefined exception as Comes_From_Source if the
15469 original N_Raise_Statement comes from source.
15471 2011-08-01 Robert Dewar <dewar@adacore.com>
15473 * sinfo.ads: Add comment.
15474 * sem_ch6.adb: Minor reformatting.
15476 2011-08-01 Robert Dewar <dewar@adacore.com>
15478 * freeze.adb (Freeze_Entity): Refine check for bad component size
15479 clause to avoid rejecting confirming clause when atomic/aliased present.
15481 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15483 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15484 better determine whether an entity reference is a write.
15485 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15487 * lib-xref.adb (Output_References): Do no suppress a read reference at
15488 the same location as an immediately preceeding modify-reference, to
15489 handle properly in-out actuals.
15491 2011-08-01 Tristan Gingold <gingold@adacore.com>
15493 * env.c (__gnat_setenv) [VMS]: Refine previous change.
15495 2011-08-01 Quentin Ochem <ochem@adacore.com>
15497 * i-cstrin.adb (New_String): Changed implementation, now uses only the
15498 heap to compute the result.
15500 2011-08-01 Robert Dewar <dewar@adacore.com>
15502 * atree.ads: Minor reformatting.
15504 2011-08-01 Emmanuel Briot <briot@adacore.com>
15506 * g-expect.adb (Get_Command_Output): Fix memory leak.
15508 2011-08-01 Geert Bosch <bosch@adacore.com>
15510 * cstand.adb (P_Float_Type): New procedure to print the definition of
15511 predefined fpt types.
15512 (P_Mixed_Name): New procedure to print a name using mixed case
15513 (Print_Standard): Use P_Float_Type for printing floating point types
15514 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15515 precision IEEE float.
15517 2011-08-01 Thomas Quinot <quinot@adacore.com>
15519 * sem_ch3.adb: Minor reformatting.
15521 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15523 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15524 the completion of a generic function, insert the new body rather than
15525 rewriting the original.
15527 2011-08-01 Yannick Moy <moy@adacore.com>
15529 * sinfo.ads, errout.ads: Typos in comments.
15531 2011-08-01 Robert Dewar <dewar@adacore.com>
15533 * par-endh.adb: Minor reformatting.
15535 2011-08-01 Robert Dewar <dewar@adacore.com>
15537 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15538 (Pre_Post_Aspects): New subtype.
15539 * par-ch12.adb (P_Generic): New syntax for aspects in packages
15540 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15541 * par-ch7.adb (P_Package): Remove Decl parameter
15542 (P_Package): Handle new syntax for aspects (before IS)
15543 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15545 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15546 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15547 (P_Package): Remove Decl parameter
15548 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15550 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15552 * sem_util.ads, sem_util.adb (Static_Boolean): New function
15553 * sinfo.ads: Document new syntax for aspects in packages etc.
15554 * sprint.adb: Handle new syntax of aspects before IS in package
15556 2011-08-01 Thomas Quinot <quinot@adacore.com>
15558 * atree.ads: Minor reformatting.
15559 * sem_prag.adb: Minor reformatting.
15561 2011-08-01 Robert Dewar <dewar@adacore.com>
15563 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15564 case expr alternative.
15566 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15568 * sem_ch12.adb: Fix typo.
15570 2011-08-01 Geert Bosch <bosch@adacore.com>
15572 * sem_prag.adb (Check_No_Link_Name): New procedure.
15573 (Process_Import_Or_Interface): Use Check_No_Link_Name.
15574 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15575 instead of Standard_Long_Long_Float_Size global. Preparation for
15576 eventual removal of per type constants.
15577 * exp_util.ads (Get_Stream_Size): New function returning the stream
15578 size value of subtype E.
15579 * exp_util.adb (Get_Stream_Size): Implement new function.
15580 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15582 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15584 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15586 2011-08-01 Geert Bosch <bosch@adacore.com>
15588 * cstand.adb: Fix comments.
15589 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15590 count of arguments.
15592 2011-08-01 Robert Dewar <dewar@adacore.com>
15594 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15596 2011-08-01 Geert Bosch <bosch@adacore.com>
15598 * atree.ads: Fix comment.
15600 2011-08-01 Robert Dewar <dewar@adacore.com>
15602 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15603 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15604 * par.adb: Add with for Namet.Sp.
15605 * par-tchk.adb: Minor reformatting.
15607 2011-08-01 Vincent Celier <celier@adacore.com>
15609 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15610 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15611 of the init procedure of a SAL.
15612 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15615 2011-08-01 Thomas Quinot <quinot@adacore.com>
15617 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15620 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15622 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15624 2011-08-01 Thomas Quinot <quinot@adacore.com>
15626 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15627 conformant with its spec (return True only for types that have
15628 an overriding Initialize primitive operation that prevents them from
15629 having preelaborable initialization).
15630 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15631 initialization for controlled types in Ada 2005 or later mode.
15633 2011-08-01 Robert Dewar <dewar@adacore.com>
15635 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15637 (Same_Aspect): New function.
15638 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15639 Type_Invariant, Precondition, Postcondition.
15640 * snames.ads-tmpl: Add Name_Type_Invariant.
15642 2011-08-01 Robert Dewar <dewar@adacore.com>
15644 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15646 (Freeze_All_Ent): Fix error in handling inherited aspects.
15647 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15648 already analyzed, but don't skip entire processing of a declaration,
15649 that's wrong in some cases of declarations being rewritten.
15650 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15651 Don't delay for integer, string literals
15652 Treat predicates in usual manner for delay, remove special case code,
15654 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15655 (Build_Predicate_Function): Update saved expression in aspect
15656 (Build_Invariant_Procedure): Update saved expression in aspect
15657 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15658 of replacement of discriminant references if the reference is simple.
15660 2011-08-01 Robert Dewar <dewar@adacore.com>
15662 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15663 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15664 Static_Predicate and Dynamic_Predicate.
15665 (Build_Predicate_Function): Add processing for Static_Predicate
15666 and Dynamic_Predicate.
15667 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15668 (From_Static_Predicate): New flag
15669 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15671 2011-08-01 Robert Dewar <dewar@adacore.com>
15673 * usage.adb: Documentation cleanup for Ada version modes in usage.
15674 * expander.adb: Minor reformatting.
15676 2011-08-01 Robert Dewar <dewar@adacore.com>
15678 * atree.ads: Minor comment fix.
15679 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15680 a-witeio.ads, sem_prag.adb: Minor reformatting.
15682 2011-08-01 Doug Rupp <rupp@adacore.com>
15684 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15685 pointers. Use descrip.h header file for convenience. Add some
15688 2011-08-01 Robert Dewar <dewar@adacore.com>
15690 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15691 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15692 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15694 (Check_Aspect_At_End_Of_Declarations): New procedure
15695 (Analye_Aspect_Specification): Minor changes for above procedures
15696 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15697 specification node as well.
15699 2011-08-01 Pascal Obry <obry@adacore.com>
15701 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15702 Windows files. Use GetFilesAttributes() in this case to check for file
15703 existence instead of returning with an error code.
15705 2011-08-01 Vincent Celier <celier@adacore.com>
15707 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15708 High is above Source length.
15710 2011-08-01 Robert Dewar <dewar@adacore.com>
15712 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15714 2011-08-01 Robert Dewar <dewar@adacore.com>
15716 * aspects.ads (Boolean_Aspects): New subtype.
15717 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15718 for derived types in cases where the parent type and derived type have
15720 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15721 with aspects when parent type also has aspects.
15722 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15723 boolean expression at this point).
15724 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15725 accordance with final decision on the Ada 2012 feature.
15726 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15728 2011-08-01 Matthew Heaney <heaney@adacore.com>
15730 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15732 2011-08-01 Pascal Obry <obry@adacore.com>
15734 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15735 Fix Replace_Slice when High is above current string size.
15736 (Replace_Slice): Fix DL computation when High is above current
15739 2011-08-01 Gary Dismukes <dismukes@adacore.com>
15741 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15743 2011-08-01 Matthew Heaney <heaney@adacore.com>
15745 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15748 2011-08-01 Pascal Obry <obry@adacore.com>
15750 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15753 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15755 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15756 access to protected subprograms in generic bodies.
15757 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15758 protected type, indicate that the convention of the subprogram is
15759 Convention_Protected, because it may be used in subsequent declarations
15760 within the protected declaration.
15762 2011-08-01 Vincent Celier <celier@adacore.com>
15764 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15765 and "final" procedures when the name of the library is "ada", to avoid
15766 duplicate symbols "adainit" and "adafinal" in executables.
15768 2011-08-01 Ed Schonberg <schonberg@adacore.com>
15770 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15771 quantified expression that appears within a postcondition and uses the
15772 Ada2012 'Result attribute.
15774 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15776 * init.c (__gnat_error_handler): Cast reason to int.
15777 (__gnat_install_handler): Explain sa_sigaction use.
15779 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15781 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15782 subprogram has copy-in copy-out parameters, try to promote the mode of
15783 the return type if it is passed in registers.
15785 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15787 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15788 left operand as addressable.
15790 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15792 * gcc-interface/gigi.h (build_function_stub): Remove.
15793 (build_return_expr): Likewise.
15794 (convert_vms_descriptor): Declare.
15795 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15796 (build_function_stub): Move to...
15797 * gcc-interface/utils2.c (build_return_expr): Move to...
15798 * gcc-interface/trans.c (build_function_stub): ...here.
15799 (build_return_expr): ...here.
15800 (Subprogram_Body_to_gnu): Add local variable for language_function.
15801 Disconnect the parameter attributes cache, if any, once done with it.
15802 Call end_subprog_body only after setting the end_locus.
15803 Build the stub associated with the function, if any, at the very end.
15804 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15805 variables and streamline control flow.
15807 2011-07-23 Arnaud Charlet <charlet@adacore.com>
15810 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15811 g-trasym-dwarf.adb.
15813 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15816 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15817 Assign to act.sa_sigaction.
15818 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15819 current->return_address to char * before arithmetic.
15821 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15823 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15824 Correct argument types.
15825 Extract code from reason.
15826 (__gnat_install_handler): Assign to act.sa_sigaction.
15828 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15830 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15831 (GNAT1_OBJS): ...here.
15833 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15836 * g-socthi-mingw.adb (Fill): Fix formatting.
15838 * gcc-interface/gigi.h: Move around comment.
15840 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15843 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15845 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
15848 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15850 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15852 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15853 range comparison if Pmode is SImode.
15855 2011-07-12 Laurent GUERBY <laurent@guerby.net>
15856 Eric Botcazou <ebotcazou@adacore.com>
15858 * adadecode.c: Wrap up in extern "C" block.
15859 * adadecode.h: Likewise.
15860 * adaint.c: Likewise. Remove 'const' keyword.
15861 * adaint.h: Likewise.
15862 * argv.c: Likewise.
15863 * atree.h: Likewise.
15865 * cstreams.c: Likewise.
15867 * exit.c: Likewise.
15869 * final.c: Likewise.
15870 * init.c: Likewise.
15871 * initialize.c: Likewise.
15872 * link.c: Likewise.
15873 * namet.h: Likewise.
15874 * nlists.h: Likewise.
15875 * raise.c: Likewise.
15876 * raise.h: Likewise.
15877 * repinfo.h: Likewise.
15878 * seh_init.c: Likewise.
15879 * targext.c: Likewise.
15880 * tracebak.c: Likewise.
15881 * uintp.h: Likewise.
15882 * urealp.h: Likewise.
15883 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15884 * xsinfo.adb: Likewise.
15885 * xsnamest.adb: Likewise.
15886 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15887 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15888 * gcc-interface/misc.c: Likewise.
15889 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15890 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15891 ada/targext.o here...
15892 (GNAT_ADA_OBJS): ...and not here.
15893 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15894 (GNATBIND_OBJS): Reorder.
15896 2011-07-07 Richard Henderson <rth@redhat.com>
15898 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15899 dwarf2out_frame_init.
15901 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15903 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15905 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15908 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15910 2011-07-06 Richard Guenther <rguenther@suse.de>
15912 * gcc-interface/misc.c (gnat_init): Merge calls to
15913 build_common_tree_nodes and build_common_tree_nodes_2.
15914 Re-initialize boolean_false_node.
15916 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15917 Olivier Hainque <hainque@adacore.com>
15918 Nicolas Setton <setton@adacore.com>
15920 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15921 the type according to the ARTIFICIAL_P parameter.
15922 (create_type_decl): Likewise.
15923 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15925 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15927 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15928 (gnatbind): Likewise.
15930 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15932 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15934 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15936 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15937 local variable throughout. Remove useless call to Base_Type.
15938 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15939 Take it also into account for the volatileness of the field. Set the
15940 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15942 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15944 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15945 on a dereference built for a by-ref object if it has an address clause.
15947 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15949 * einfo.ads (Address_Taken): Document use for the second argument of
15950 Asm_Input and Asm_Output attributes.
15951 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15952 argument is an entity name, then set Address_Taken on it.
15953 <Attribute_Asm_Output>: Likewise.
15954 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15955 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15956 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15957 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15959 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
15961 PR middle-end/46500
15962 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15964 2011-06-14 Joseph Myers <joseph@codesourcery.com>
15966 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15967 (ada/utils.o): Update dependencies.
15968 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15969 ../../../libcpp/libcpp.a.
15970 * gcc-interface/utils.c: Include common/common-target.h.
15971 (process_attributes): Use targetm_common.have_named_sections.
15973 2011-06-07 Richard Guenther <rguenther@suse.de>
15975 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15978 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15980 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15981 TREE_THIS_NOTRAP flag.
15983 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15985 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15988 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15990 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15991 constants whose full view has discriminants specially.
15993 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15995 * gcc-interface/utils.c: Include diagnostic.h.
15996 (gnat_write_global_declarations): Output debug information for all
15997 global type declarations before finalizing the compilation unit.
15998 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
16000 2011-05-25 Jakub Jelinek <jakub@redhat.com>
16002 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
16004 2011-05-25 Kai Tietz <ktietz@redhat.com>
16006 * adaint.c (__gnat_to_canonical_file_list_next): Use array
16007 initialization instead of const/none-const pointer assignment.
16009 2011-05-24 Joseph Myers <joseph@codesourcery.com>
16011 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
16012 $(EXTRA_GNAT1_OBJS).
16013 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
16014 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
16015 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
16016 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
16017 libcommon-target.a instead of prefix.o.
16019 2011-05-21 Joseph Myers <joseph@codesourcery.com>
16022 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
16024 2011-05-20 Joseph Myers <joseph@codesourcery.com>
16026 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
16027 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
16028 instead of version.o.
16030 2011-05-18 Kai Tietz <ktietz@redhat.com>
16032 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
16033 boolean_false_node instead of integer_zero_node.
16034 (convert_with_check): Likewise.
16035 * gcc-interface/decl.c (choices_to_gnu): Likewise.
16037 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
16039 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
16040 type of the parameter is an unconstrained array, convert the actual to
16041 the type of the formal in the In Out and Out cases as well.
16043 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16045 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
16046 call build_function_type_array or build_varargs_function_type_array
16048 (create_subprog_type): Don't call build_function_type; call
16049 build_function_type_vec instead.
16051 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
16053 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
16054 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
16055 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
16057 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
16059 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
16061 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
16062 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
16064 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16066 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
16068 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
16070 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
16071 instead of accessing TYPE_ARG_TYPES directly.
16072 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
16074 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16077 * gcc-interface/gigi.h (get_variant_part): Declare.
16078 * gcc-interface/decl.c (get_variant_part): Make global.
16079 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
16080 types have the same constant size, are record types and T1 has a
16081 variant part while T2 doesn't.
16083 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
16085 * gcc-interface/utils.c (begin_subprog_body): Do not call
16087 (end_subprog_body): Likewise.
16089 2011-05-04 Richard Guenther <rguenther@suse.de>
16091 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
16093 (pos_to_constructor): Likewise.
16095 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
16096 Eric Botcazou <ebotcazou@adacore.com>
16098 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
16099 of build_function_type. Adjust calls to...
16100 (build_raise_check): ...this. Do not take a void_tree parameter.
16101 Call build_function_type_list instead of build_function_type.
16102 Fix head comment and swap couple of conditional blocks.
16104 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
16106 * gnatvsn.ads (Library_Version): Bump to 4.7.
16107 (Current_Year): Bump to 2011.
16109 2011-04-29 Michael Matz <matz@suse.de>
16111 * gcc-interface/misc.c (gnat_handle_option): Set
16112 warn_maybe_uninitialized.
16114 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
16116 * gnat_ugn.texi (Complexity Metrics Control): Update link to
16117 the Watson/McCabe paper.
16119 2011-04-23 Jim Meyering <meyering@redhat.com>
16121 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
16123 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
16125 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
16128 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
16130 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
16132 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
16133 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
16134 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
16135 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
16136 <all>: Do not set flags on the reused DECL node coming from an alias.
16137 Set DECL_IGNORED_P on the DECL node built for subprograms if they
16138 don't need debug info here...
16139 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
16140 (gigi): Adjust calls to create_subprog_decl.
16141 (build_raise_check): Likewise.
16142 (establish_gnat_vms_condition_handler): Likewise.
16143 (Compilation_Unit_to_gnu): Likewise.
16144 (gnat_to_gnu): Likewise.
16146 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
16148 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
16149 (NO_REORDER_ADAFLAGS): New variable.
16150 (EXTRA_GNATTOOLS): Always define.
16151 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
16152 Clean up and adjust list of files compiled with special options.
16153 * gcc-interface/Make-lang.in: Likewise.
16154 (ada/decl.o): Cosmetical change.
16155 (ada/misc.o): Remove dependency on $(PLUGIN_H).
16157 2011-04-20 Jim Meyering <meyering@redhat.com>
16159 * initialize.c (__gnat_initialize): Remove useless if-before-free.
16161 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
16163 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
16164 $(CFLAGS) on the link line.
16166 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
16168 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
16169 padded type built for the return type if it is unconstrained.
16171 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
16173 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
16175 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
16177 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
16178 before calling TREE_CHAIN.
16179 * gcc-interface/misc.c (gnat_init_ts): New function.
16180 (LANG_HOOKS_INIT_TS): Define.
16182 2011-04-12 Martin Jambor <mjambor@suse.cz>
16184 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
16185 instead of cgraph_node.
16187 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
16189 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
16190 alignment on fields of the RETURN type built for the Copy-In Copy-Out
16193 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
16195 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
16196 of aggregate types that contain a placeholder.
16198 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
16200 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
16202 (handle_type_generic_attribute): Likewise.
16204 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
16207 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
16209 2011-04-04 Kai Tietz <ktietz@redhat.com>
16212 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
16215 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16217 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
16218 type case, do not strip a padding type around the array type.
16220 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16222 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
16225 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16227 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
16228 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
16229 code for -feliminate-unused-debug-types.
16230 (gnat_post_options): Likewise.
16232 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16234 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16235 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
16238 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16240 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
16241 DECL_ARTIFICIAL flag on enumeration types.
16243 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16245 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
16246 fat pointer types artificial unconditionally.
16247 <E_Array_Subtype>: Attach the base array type as a parallel type if it
16250 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16252 * gcc-interface/gigi.h (get_dummy_type): Declare.
16253 (build_dummy_unc_pointer_types): Likewise.
16254 (finish_fat_pointer_type): Likewise.
16255 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
16256 fat pointer type has been built, complete it in place.
16257 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
16258 and thin pointers. Remove useless variable.
16259 (finish_fat_pointer_type): Make global and move to...
16260 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
16261 (get_dummy_type): New function.
16262 (build_dummy_unc_pointer_types): Likewise.
16263 (gnat_pushdecl): Propage the name to the anonymous variants only.
16264 (update_pointer_to): Only adjust the pointer types in the unconstrained
16267 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16269 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
16270 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
16271 if this is a Taft amendment type and the full declaration is available.
16272 * gcc-interface/trans.c (process_type): Likewise.
16273 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
16274 (process_freeze_entity): Likewise.
16275 * gcc-interface/utils.c (dummy_global): New static variable.
16276 (gnat_write_global_declarations): If there are types declared as used
16277 at the global level, insert them in the global hash table.
16279 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16281 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
16282 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16283 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
16285 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
16286 flag of the type accordingly.
16287 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
16289 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
16291 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16292 finalizing types when updating the pointers to the designated type.
16293 <all>: Finalize the deferred types even if we didn't defer processing
16294 of incomplete types in this invocation.
16296 2011-04-01 Olivier Hainque <hainque@adacore.com>
16297 Nicolas Setton <setton@adacore.com>
16298 Eric Botcazou <ebotcazou@adacore.com>
16300 * gcc-interface/misc.c (gnat_descriptive_type): New function.
16301 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
16303 2011-03-28 Kai Tietz <ktietz@redhat.com>
16305 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
16307 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
16308 * system-mingw.ads (System): Change ZCX_By_Default default to True.
16310 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
16312 2011-03-28 Tristan Gingold <gingold@adacore.com>
16315 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
16316 Use ada output of gnatbind.
16317 (ada/b_gnatb.adb): Ditto.
16318 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
16319 (ada.mostlyclean, ada.stage1)
16320 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
16321 (ada.stagefeedback): Adjust.
16322 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
16323 Use ada output of gnatbind.
16324 (b_gnatm.adb): Ditto.
16325 (b_gnatl.o, b_gnatm.o): New rules.
16327 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16329 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16330 for the padded type built to support a specified size or alignment.
16332 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16334 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
16335 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16336 unconditionally to the end of the unit when the designated type is
16338 <all>: Rename local variable. Attempt to un-defer types only and do it
16339 for limited_with'ed types as well.
16340 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
16341 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
16342 consistently and remove redundant call to finalize_from_with_types.
16344 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
16346 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
16347 subprograms without a previous spec declared in the same unit.
16348 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
16349 subprograms at the end of the unit instead of at the beginning.
16350 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
16351 isn't public for the special handling of non-inline functions nested
16352 inside inline external functions.
16354 2011-03-25 Jeff Law <law@redhat.com>
16356 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
16358 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
16360 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
16361 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
16362 to compute Set_Size_Depends_On_Discriminant.
16363 (Layout_Type): Call it on array types in back-end layout mode.
16364 * sem_util.adb (Requires_Transient_Scope): Return true for array
16365 types only if the size depends on the value of discriminants.
16366 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
16367 type if the RHS is a call to a function that returns an unconstrained
16368 type with default discriminant.
16370 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
16372 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
16373 non-conversion to the nominal result type at the end.
16375 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16377 * gcc-interface/trans.c (create_temporary): New function taken from...
16378 (create_init_temporary): ...here. Call it.
16379 (call_to_gnu): Create the temporary for the return value early, if any.
16380 Create it for a function with copy-in/copy-out parameters if there is
16381 no target; in other cases of copy-in/copy-out, use another temporary.
16382 Push the new binding level lazily. Add and rename local variables.
16384 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16386 * gcc-interface/decl.c (validate_size): Improve comments and tweak
16388 (set_rm_size): Likewise.
16390 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
16392 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16393 for the padded type built in order to support a specified alignment.
16394 Fix incorrect formatting.
16396 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16399 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16401 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16403 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16404 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16405 to the end of the list. Adjust recursive call. Rename local variable.
16406 If REORDER is true, reorder components of the record type.
16407 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16408 components_to_record and adjust the parameter list.
16410 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
16412 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16413 disabled, use the variable for bounds of loop iteration scheme.
16415 2011-03-21 Kai Tietz <ktietz@redhat.com>
16418 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16420 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16422 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16423 out whether the expression is read-only. Short-circuit placeholder
16424 case and rename a couple of local variables.
16426 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
16428 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16429 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16430 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16431 (convert): Deal with conversions from a smaller form type specially.
16433 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
16435 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16436 its argument, except for the special -I- switch.
16438 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
16440 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16443 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
16445 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16447 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
16449 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16451 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16452 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
16453 instead of GNAT_FORMAL. Protect the expression against multiple uses.
16454 Do not generate the check directly, instead instantiate the template
16455 check present in the descriptor.
16456 (make_descriptor_field): Move around.
16457 (build_vms_descriptor32): Build a template check in the POINTER field.
16458 (build_vms_descriptor): Remove useless suffixes.
16459 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16461 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
16464 * targext.c: Include target files if IN_RTS is defined.
16466 2011-01-26 Richard Guenther <rguenther@suse.de>
16469 * targext.c: Include config.h.
16470 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16473 2011-01-04 Pascal Obry <obry@adacore.com>
16474 Eric Botcazou <ebotcazou@adacore.com>
16476 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16478 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16480 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16481 end-of-case on the end label and its associated gotos, if any.
16483 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16485 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16486 expressions of the parameter cache within the statement group of
16487 the CICO mechanism.
16489 2011-01-04 Olivier Hainque <hainque@adacore.com>
16490 Eric Botcazou <ebotcazou@adacore.com>
16492 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16493 (set_end_locus_from_node): New function.
16494 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16495 make and the function end_locus.
16496 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16497 for the elaboration subprogram.
16498 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16499 set the end_locus of the expression as well.
16501 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
16504 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16505 variables that are referenced in exception handlers volatile.
16509 Copyright (C) 2011 Free Software Foundation, Inc.
16511 Copying and distribution of this file, with or without modification,
16512 are permitted in any medium without royalty provided the copyright
16513 notice and this notice are preserved.